diff --git a/ExternalConnectors/AWS/AWSConnectionForm.Designer.cs b/ExternalConnectors/AWS/AWSConnectionForm.Designer.cs deleted file mode 100644 index f843e709f..000000000 --- a/ExternalConnectors/AWS/AWSConnectionForm.Designer.cs +++ /dev/null @@ -1,180 +0,0 @@ -namespace ExternalConnectors.AWS -{ - partial class AWSConnectionForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.tbAccesKeyID = new System.Windows.Forms.TextBox(); - this.tbAccesKey = new System.Windows.Forms.TextBox(); - this.btnOK = new System.Windows.Forms.Button(); - this.btnCancel = new System.Windows.Forms.Button(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.tableLayoutPanel1.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - this.SuspendLayout(); - // - // tbAccesKeyID - // - this.tbAccesKeyID.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbAccesKeyID.Location = new System.Drawing.Point(152, 4); - this.tbAccesKeyID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.tbAccesKeyID.Name = "tbAccesKeyID"; - this.tbAccesKeyID.Size = new System.Drawing.Size(490, 23); - this.tbAccesKeyID.TabIndex = 0; - // - // tbAccesKey - // - this.tbAccesKey.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbAccesKey.Location = new System.Drawing.Point(152, 43); - this.tbAccesKey.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.tbAccesKey.Name = "tbAccesKey"; - this.tbAccesKey.Size = new System.Drawing.Size(490, 23); - this.tbAccesKey.TabIndex = 2; - // - // btnOK - // - this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Location = new System.Drawing.Point(219, 12); - this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(88, 26); - this.btnOK.TabIndex = 10; - this.btnOK.Text = "OK"; - this.btnOK.UseVisualStyleBackColor = true; - // - // btnCancel - // - this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(338, 12); - this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(88, 26); - this.btnCancel.TabIndex = 11; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.92994F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 77.07006F)); - this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.tbAccesKeyID, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.tbAccesKey, 1, 1); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 23F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(646, 102); - this.tableLayoutPanel1.TabIndex = 12; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Dock = System.Windows.Forms.DockStyle.Fill; - this.label1.Location = new System.Drawing.Point(4, 0); - this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(140, 39); - this.label1.TabIndex = 2; - this.label1.Text = "Access Key ID"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Dock = System.Windows.Forms.DockStyle.Fill; - this.label2.Location = new System.Drawing.Point(4, 39); - this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(140, 39); - this.label2.TabIndex = 4; - this.label2.Text = "Access Key"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // tableLayoutPanel2 - // - this.tableLayoutPanel2.ColumnCount = 5; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 23F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F)); - this.tableLayoutPanel2.Controls.Add(this.btnOK, 1, 0); - this.tableLayoutPanel2.Controls.Add(this.btnCancel, 3, 0); - this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom; - this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 112); - this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 1; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(646, 50); - this.tableLayoutPanel2.TabIndex = 13; - // - // AWSConnectionForm - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(646, 162); - this.Controls.Add(this.tableLayoutPanel2); - this.Controls.Add(this.tableLayoutPanel1); - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.Name = "AWSConnectionForm"; - this.Text = "AWS EC2 API Login Data"; - this.Activated += new System.EventHandler(this.AWSConnectionForm_Activated); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.tableLayoutPanel2.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - public System.Windows.Forms.TextBox tbAccesKeyID; - public System.Windows.Forms.TextBox tbAccesKey; - private System.Windows.Forms.Button btnOK; - private System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - } -} \ No newline at end of file diff --git a/ExternalConnectors/AWS/AWSConnectionForm.cs b/ExternalConnectors/AWS/AWSConnectionForm.cs deleted file mode 100644 index 196613edf..000000000 --- a/ExternalConnectors/AWS/AWSConnectionForm.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace ExternalConnectors.AWS -{ - public partial class AWSConnectionForm : Form - { - public AWSConnectionForm() - { - InitializeComponent(); - - } - - private void AWSConnectionForm_Activated(object sender, EventArgs e) - { - tbAccesKeyID.Focus(); - } - } -} diff --git a/ExternalConnectors/AWS/AWSConnectionForm.resx b/ExternalConnectors/AWS/AWSConnectionForm.resx deleted file mode 100644 index f298a7be8..000000000 --- a/ExternalConnectors/AWS/AWSConnectionForm.resx +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/ExternalConnectors/AWS/EC2FetchDataService.cs b/ExternalConnectors/AWS/EC2FetchDataService.cs deleted file mode 100644 index a4df79544..000000000 --- a/ExternalConnectors/AWS/EC2FetchDataService.cs +++ /dev/null @@ -1,119 +0,0 @@ -using Amazon; -using Amazon.EC2; -using Amazon.EC2.Model; -using Microsoft.Win32; - -namespace ExternalConnectors.AWS -{ - public class EC2FetchDataService - { - private static DateTime lastFetch; - private static List? lastData; - - // input must be in format "AWSAPI:instanceid" where instanceid is the ec2 instance id, e.g. i-066f750a76c97583d - public static async Task GetEC2InstanceDataAsync(string input, string region) - { - // get secret id - if (!input.StartsWith("AWSAPI:")) - throw new Exception("calling this function requires AWSAPI: input"); - string InstanceID = input[7..]; - - // init connection credentials, display popup if necessary - AWSConnectionData.Init(); - var alldata = await GetEC2IPDataAsync(region); - var found = alldata.Where(x => x.InstanceId == InstanceID).SingleOrDefault(); - return (found == null) ? "" : found.PublicIP; - } - - private static async Task> GetEC2IPDataAsync(string region) - { - // caching - TimeSpan timeSpan = DateTime.Now - lastFetch; - if (timeSpan.TotalMinutes < 1 && lastData != null) - return lastData; - - //AWSConfigs.AWSRegion = AWSConnectionData.region; - AWSConfigs.AWSRegion = region; - string awsAccessKeyId = AWSConnectionData.awsKeyID; - string awsSecretAccessKey = AWSConnectionData.awsKey; - - var _client = new AmazonEC2Client(awsAccessKeyId, awsSecretAccessKey, RegionEndpoint.EUCentral1); - bool done = false; - - List instanceList = new(); - var request = new DescribeInstancesRequest(); - while (!done) - { - DescribeInstancesResponse response = await _client.DescribeInstancesAsync(request); - - foreach (var reservation in response.Reservations) - { - foreach (var instance in reservation.Instances) - { - string vmname = ""; - foreach (var tag in instance.Tags) - { - if (tag.Key == "Name") - { - vmname = tag.Value; - } - } - InstanceInfo inf = new(instance, vmname); - instanceList.Add(inf); - } - } - - request.NextToken = response.NextToken; - - if (response.NextToken == null) - { - done = true; - } - } - - lastData = instanceList.OrderBy(x => x.Name).ToList(); - lastFetch = DateTime.Now; - return lastData; - } - - - public static class AWSConnectionData - { - private static readonly RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\mRemoteAWSInterface"); - - public static string awsKeyID = ""; - public static string awsKey = ""; - //public static string _region = "eu-central-1"; - - public static void Init() - { - if (awsKey != "") - return; - // display gui and ask for data - AWSConnectionForm f = new(); - f.tbAccesKeyID.Text = "" + key.GetValue("KeyID"); - f.tbAccesKey.Text = "" + key.GetValue("Key"); - //f.tbRegion.Text = "" + key.GetValue("Region"); - //if (f.tbRegion.Text == null || f.tbRegion.Text.Length < 2) - // f.tbRegion.Text = region; - _ = f.ShowDialog(); - - if (f.DialogResult != DialogResult.OK) - return; - - // store values to memory - awsKeyID = f.tbAccesKeyID.Text; - awsKey = f.tbAccesKey.Text; - //region = f.tbRegion.Text; - - - // write values to registry - key.SetValue("KeyID", awsKeyID); - key.SetValue("Key", awsKey); - //key.SetValue("Region", region); - key.Close(); - } - } - - } -} diff --git a/ExternalConnectors/AWS/InstanceInfo.cs b/ExternalConnectors/AWS/InstanceInfo.cs deleted file mode 100644 index 53a9422b7..000000000 --- a/ExternalConnectors/AWS/InstanceInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -using Amazon.EC2.Model; -using System; - -namespace ExternalConnectors.AWS -{ - public class InstanceInfo - { - public string InstanceId { get; } - public string Name { get; } - public string Status { get; } - public string PublicIP { get; } - public string PrivateIP { get; } - public InstanceInfo(Instance instance, string name) - { - InstanceId = instance.InstanceId; - Name = name; - - switch(instance.State.Code) - { - case 0: Status = "Pending"; break; - case 16: Status = "Running"; break; - case 32: Status = "Shutdown"; break; - case 48: Status = "Terminated"; break; - case 64: Status = "Stopping"; break; - case 80: Status = "Stopped"; break; - default: Status = "Unknown"; break; - }; - - PublicIP = instance.PublicIpAddress ?? ""; - PrivateIP = instance.PrivateIpAddress ?? ""; - - } - } -} diff --git a/ExternalConnectors/ExternalConnectors.csproj b/ExternalConnectors/ExternalConnectors.csproj deleted file mode 100644 index bf58eb5c5..000000000 --- a/ExternalConnectors/ExternalConnectors.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - net6.0-windows - enable - enable - Library - True - x64 - Debug;Release;Debug Portable;Release Portable - - - - - - - - - - - Form - - - Form - - - - diff --git a/ExternalConnectors/TSS/SSConnectionForm.Designer.cs b/ExternalConnectors/TSS/SSConnectionForm.Designer.cs deleted file mode 100644 index 3297034ba..000000000 --- a/ExternalConnectors/TSS/SSConnectionForm.Designer.cs +++ /dev/null @@ -1,280 +0,0 @@ -namespace ExternalConnectors.TSS -{ - partial class SSConnectionForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SSConnectionForm)); - this.tbSSURL = new System.Windows.Forms.TextBox(); - this.tbUsername = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.tbPassword = new System.Windows.Forms.TextBox(); - this.btnOK = new System.Windows.Forms.Button(); - this.btnCancel = new System.Windows.Forms.Button(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.label5 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.cbUseSSO = new System.Windows.Forms.CheckBox(); - this.label6 = new System.Windows.Forms.Label(); - this.tbOTP = new System.Windows.Forms.TextBox(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.label4 = new System.Windows.Forms.Label(); - this.tableLayoutPanel1.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - this.SuspendLayout(); - // - // tbSSURL - // - this.tbSSURL.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSSURL.Location = new System.Drawing.Point(260, 4); - this.tbSSURL.Margin = new System.Windows.Forms.Padding(4); - this.tbSSURL.Name = "tbSSURL"; - this.tbSSURL.Size = new System.Drawing.Size(536, 23); - this.tbSSURL.TabIndex = 0; - // - // tbUsername - // - this.tbUsername.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbUsername.Location = new System.Drawing.Point(260, 35); - this.tbUsername.Margin = new System.Windows.Forms.Padding(4); - this.tbUsername.Name = "tbUsername"; - this.tbUsername.Size = new System.Drawing.Size(536, 23); - this.tbUsername.TabIndex = 2; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Dock = System.Windows.Forms.DockStyle.Fill; - this.label3.Location = new System.Drawing.Point(4, 62); - this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(248, 31); - this.label3.TabIndex = 5; - this.label3.Text = "Password"; - this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // tbPassword - // - this.tbPassword.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbPassword.Location = new System.Drawing.Point(260, 66); - this.tbPassword.Margin = new System.Windows.Forms.Padding(4); - this.tbPassword.Name = "tbPassword"; - this.tbPassword.Size = new System.Drawing.Size(536, 23); - this.tbPassword.TabIndex = 4; - this.tbPassword.UseSystemPasswordChar = true; - // - // btnOK - // - this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Location = new System.Drawing.Point(296, 12); - this.btnOK.Margin = new System.Windows.Forms.Padding(4); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(88, 26); - this.btnOK.TabIndex = 6; - this.btnOK.Text = "OK"; - this.btnOK.UseVisualStyleBackColor = true; - // - // btnCancel - // - this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(415, 12); - this.btnCancel.Margin = new System.Windows.Forms.Padding(4); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(88, 26); - this.btnCancel.TabIndex = 11; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 32.06997F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.93003F)); - this.tableLayoutPanel1.Controls.Add(this.label5, 1, 4); - this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.label3, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.tbSSURL, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.cbUseSSO, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.tbUsername, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.tbPassword, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.label6, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.tbOTP, 1, 3); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 5; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 159); - this.tableLayoutPanel1.TabIndex = 12; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Dock = System.Windows.Forms.DockStyle.Fill; - this.label5.Location = new System.Drawing.Point(260, 124); - this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(536, 35); - this.label5.TabIndex = 15; - this.label5.Text = "For SSO to work, additional IIS configuration is required!"; - this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Dock = System.Windows.Forms.DockStyle.Fill; - this.label1.Location = new System.Drawing.Point(4, 0); - this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(248, 31); - this.label1.TabIndex = 2; - this.label1.Text = "Secret Server URL"; - this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Dock = System.Windows.Forms.DockStyle.Fill; - this.label2.Location = new System.Drawing.Point(4, 31); - this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(248, 31); - this.label2.TabIndex = 4; - this.label2.Text = "DOMAIN\\Username"; - this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // cbUseSSO - // - this.cbUseSSO.AutoSize = true; - this.cbUseSSO.Location = new System.Drawing.Point(4, 128); - this.cbUseSSO.Margin = new System.Windows.Forms.Padding(4, 4, 4, 0); - this.cbUseSSO.Name = "cbUseSSO"; - this.cbUseSSO.Size = new System.Drawing.Size(69, 19); - this.cbUseSSO.TabIndex = 14; - this.cbUseSSO.Text = "Use SSO"; - this.cbUseSSO.UseVisualStyleBackColor = true; - this.cbUseSSO.CheckedChanged += new System.EventHandler(this.cbUseSSO_CheckedChanged); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Dock = System.Windows.Forms.DockStyle.Fill; - this.label6.Location = new System.Drawing.Point(3, 93); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(250, 31); - this.label6.TabIndex = 15; - this.label6.Text = "2FA OTP (Optional)"; - // - // tbOTP - // - this.tbOTP.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbOTP.Location = new System.Drawing.Point(259, 96); - this.tbOTP.Name = "tbOTP"; - this.tbOTP.Size = new System.Drawing.Size(538, 23); - this.tbOTP.TabIndex = 5; - // - // tableLayoutPanel2 - // - this.tableLayoutPanel2.ColumnCount = 5; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 23F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F)); - this.tableLayoutPanel2.Controls.Add(this.btnOK, 1, 0); - this.tableLayoutPanel2.Controls.Add(this.btnCancel, 3, 0); - this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom; - this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 225); - this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 1; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(800, 50); - this.tableLayoutPanel2.TabIndex = 13; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Dock = System.Windows.Forms.DockStyle.Fill; - this.label4.Location = new System.Drawing.Point(0, 159); - this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(341, 15); - this.label4.TabIndex = 14; - this.label4.Text = "URL is the base URL, like https://cred.domain.local/SecretServer"; - this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // SSConnectionForm - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 275); - this.Controls.Add(this.label4); - this.Controls.Add(this.tableLayoutPanel2); - this.Controls.Add(this.tableLayoutPanel1); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(4); - this.Name = "SSConnectionForm"; - this.Text = "Secret Server API Login Data"; - this.Activated += new System.EventHandler(this.SSConnectionForm_Activated); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.tableLayoutPanel2.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.Label label3; - - public System.Windows.Forms.TextBox tbSSURL; - public System.Windows.Forms.TextBox tbUsername; - public System.Windows.Forms.TextBox tbPassword; - private System.Windows.Forms.Button btnOK; - private System.Windows.Forms.Button btnCancel; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - public System.Windows.Forms.CheckBox cbUseSSO; - private System.Windows.Forms.Label label4; - private Label label5; - private Label label6; - public TextBox tbOTP; - } -} \ No newline at end of file diff --git a/ExternalConnectors/TSS/SSConnectionForm.cs b/ExternalConnectors/TSS/SSConnectionForm.cs deleted file mode 100644 index be3a5a3e0..000000000 --- a/ExternalConnectors/TSS/SSConnectionForm.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace ExternalConnectors.TSS -{ - public partial class SSConnectionForm : Form - { - public SSConnectionForm() - { - InitializeComponent(); - } - - private void SSConnectionForm_Activated(object sender, EventArgs e) - { - SetVisibility(); - if (cbUseSSO.Checked) - btnOK.Focus(); - else - tbPassword.Focus(); - } - - private void cbUseSSO_CheckedChanged(object sender, EventArgs e) - { - SetVisibility(); - } - private void SetVisibility() - { - bool ch = cbUseSSO.Checked; - tbPassword.Enabled = !ch; - tbUsername.Enabled = !ch; - } - } -} diff --git a/ExternalConnectors/TSS/SSConnectionForm.resx b/ExternalConnectors/TSS/SSConnectionForm.resx deleted file mode 100644 index 8e9a84b99..000000000 --- a/ExternalConnectors/TSS/SSConnectionForm.resx +++ /dev/null @@ -1,615 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - AAABAAQAQEAAAAEAIAAoQAAARgAAACAgAAABACAAKBAAAG5AAAAYGAAAAQAgACgJAACWUAAAEBAAAAEA - IAAoBAAAvlkAACgAAABAAAAAgAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD9/f3e/f397vz9 - /e79/f3u7ezr7p6Xju5XTEHuNScV7i8hCe4rHwjuKx8I7isfCO4rHwjuKx8I7isfCO4rHwjuKx8I7isf - CO4rHwjuKx8I7isfCO4rHwjuKx8I7isfCO4rHwjuKx8I7isfCO4rHwjuKx8I7isfCO4rHwjuKx8I7isf - CO4rHwjuKx8I7isfCO4rHwjuKx8I7isfCO4rHwjuKx8I7isfCO4rHwjuKx8I7isfCO4rHwjuKx8I7isf - CO4rHwjuKx8I7isfCO4rHwjuKx8I7isfCO4rHAjuKx8I7jYoFu5XTUHumJGO7u3r6+79/f3u/f397v39 - /e79/f3e/f399P//////////u7Wy/0M1KP8jEwD/KRgA/ywdBv8tHwj/LiAJ/y4gCf8uIAn/LiAJ/y4g - Cf8uIAn/LiAJ/y4gCf8uIAn/LiAJ/y4gCf8u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AAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - - - \ No newline at end of file diff --git a/ExternalConnectors/TSS/SecretServerAuthentication.cs b/ExternalConnectors/TSS/SecretServerAuthentication.cs deleted file mode 100644 index c41922224..000000000 --- a/ExternalConnectors/TSS/SecretServerAuthentication.cs +++ /dev/null @@ -1,383 +0,0 @@ -//---------------------- -// -// Generated using the NSwag toolchain v13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" - -namespace SecretServerAuthentication.TSS -{ - using System = global::System; - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class OAuth2ServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public OAuth2ServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Retrieve or Refresh Access Token - /// Authentication grant type. Use 'password' when authenticating, and 'refresh_token' when refreshing a token. - /// Secret Server authentication username. Required when authenticating. - /// Secret Server authentication password. Required when authenticating. - /// The refresh token. Required when refreshing a token. - /// Successful retrieval of an access token - /// A server side error occurred. - public System.Threading.Tasks.Task AuthorizeAsync(Grant_type grant_type, string username, string password, string refresh_token, string OTP) - { - return AuthorizeAsync(grant_type, username, password, refresh_token, System.Threading.CancellationToken.None, OTP); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Retrieve or Refresh Access Token - /// Authentication grant type. Use 'password' when authenticating, and 'refresh_token' when refreshing a token. - /// Secret Server authentication username. Required when authenticating. - /// Secret Server authentication password. Required when authenticating. - /// The refresh token. Required when refreshing a token. - /// Successful retrieval of an access token - /// A server side error occurred. - public async System.Threading.Tasks.Task AuthorizeAsync(Grant_type grant_type, string username, string password, string refresh_token, System.Threading.CancellationToken cancellationToken, string OTP) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/oauth2/token"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var keyValues_ = new System.Collections.Generic.List>(); - if (grant_type == null) - throw new System.ArgumentNullException("grant_type"); - else - keyValues_.Add(new System.Collections.Generic.KeyValuePair("grant_type", ConvertToString(grant_type, System.Globalization.CultureInfo.InvariantCulture))); - if (username != null) - keyValues_.Add(new System.Collections.Generic.KeyValuePair("username", ConvertToString(username, System.Globalization.CultureInfo.InvariantCulture))); - if (password != null) - keyValues_.Add(new System.Collections.Generic.KeyValuePair("password", ConvertToString(password, System.Globalization.CultureInfo.InvariantCulture))); - if (refresh_token != null) - keyValues_.Add(new System.Collections.Generic.KeyValuePair("refresh_token", ConvertToString(refresh_token, System.Globalization.CultureInfo.InvariantCulture))); - if (OTP != null) - request_.Headers.Add("OTP", ConvertToString(OTP, System.Globalization.CultureInfo.InvariantCulture)); - - request_.Content = new System.Net.Http.FormUrlEncodedContent(keyValues_); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("An error occurred", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - /// API access token response - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TokenResponse - { - /// Authentication token - [Newtonsoft.Json.JsonProperty("access_token", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Access_token { get; set; } - - /// Authentication token type - [Newtonsoft.Json.JsonProperty("token_type", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public TokenResponseToken_type Token_type { get; set; } - - - private string _Expires_in; - /// Authentication token expiration time, in seconds - [Newtonsoft.Json.JsonProperty("expires_in", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - // public string Expires_in { get; set; } - - public string Expires_in - { - get { return _Expires_in; } - set - { - _Expires_in = value; - Expires_on = DateTime.UtcNow.AddSeconds(Double.Parse(value) - 60); - } - } - - /// Authentication token expiration time in UTC - public DateTime Expires_on { get; set; } - - /// Refresh token. This is only provided when the server is set to allow refresh tokens for web services and when the session timeout duration is not set to Unlimited. - [Newtonsoft.Json.JsonProperty("refresh_token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Refresh_token { get; set; } - - - } - - /// API access token error response - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TokenErrorResponse - { - /// Authentication token - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Message { get; set; } - - - } - - /// Authentication grant type. Use 'password' when authenticating, and 'refresh_token' when refreshing a token. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum Grant_type - { - [System.Runtime.Serialization.EnumMember(Value = @"password")] - Password = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"refresh_token")] - Refresh_token = 1, - - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum TokenResponseToken_type - { - [System.Runtime.Serialization.EnumMember(Value = @"bearer")] - Bearer = 0, - - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ApiException : System.Exception - { - public int StatusCode { get; private set; } - - public string Response { get; private set; } - - public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } - - public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException) - : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) - { - StatusCode = statusCode; - Response = response; - Headers = headers; - } - - public override string ToString() - { - return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ApiException : ApiException - { - public TResult Result { get; private set; } - - public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException) - : base(message, statusCode, response, headers, innerException) - { - Result = result; - } - } - -} - -#pragma warning restore 1591 -#pragma warning restore 1573 -#pragma warning restore 472 -#pragma warning restore 114 -#pragma warning restore 108 -#pragma warning restore 3016 \ No newline at end of file diff --git a/ExternalConnectors/TSS/SecretServerInterface.cs b/ExternalConnectors/TSS/SecretServerInterface.cs deleted file mode 100644 index 7aba78d07..000000000 --- a/ExternalConnectors/TSS/SecretServerInterface.cs +++ /dev/null @@ -1,239 +0,0 @@ -using Microsoft.Win32; -using SecretServerAuthentication.TSS; -using SecretServerRestClient.TSS; - -namespace ExternalConnectors.TSS -{ - public class SecretServerInterface - { - private static class SSConnectionData - { - public static string ssUsername = ""; - public static string ssPassword = ""; - public static string ssUrl = ""; - public static string ssOTP = ""; - public static bool ssSSO = false; - public static bool initdone = false; - - //token - public static string ssTokenBearer = ""; - public static DateTime ssTokenExpiresOn = DateTime.UtcNow; - public static string ssTokenRefresh = ""; - - public static void Init() - { - if (ssPassword != "" || initdone == true) - return; - - RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\mRemoteSSInterface"); - try - { - // display gui and ask for data - SSConnectionForm f = new SSConnectionForm(); - string? un = key.GetValue("Username") as string; - f.tbUsername.Text = un ?? ""; - - string? url = key.GetValue("URL") as string; - if (url == null || !url.Contains("://")) - url = "https://cred.domain.local/SecretServer"; - f.tbSSURL.Text = url; - - var b = key.GetValue("SSO"); - if (b == null || (string)b != "True") - ssSSO = false; - else - { - ssSSO = true; - initdone = true; - } - f.cbUseSSO.Checked = ssSSO; - - // show dialog - while (true) - { - _ = f.ShowDialog(); - - if (f.DialogResult != DialogResult.OK) - return; - - // store values to memory - ssUsername = f.tbUsername.Text; - ssPassword = f.tbPassword.Text; - ssUrl = f.tbSSURL.Text; - ssSSO = f.cbUseSSO.Checked; - ssOTP = f.tbOTP.Text; - // check connection first - try - { - if (TestCredentials() == true) - break; - } - catch (Exception) - { - MessageBox.Show("Test Credentials failed - please check your credentials"); - } - } - - - // write values to registry - key.SetValue("Username", ssUsername); - key.SetValue("URL", ssUrl); - key.SetValue("SSO", ssSSO); - } - catch (Exception) - { - throw; - } - finally - { - key.Close(); - } - - } - } - - private static bool TestCredentials() - { - if (SSConnectionData.ssSSO) - { - // checking creds doesn't really make sense here, as we can't modify them anyway if something is wrong - return true; - } - else - { - - if (!String.IsNullOrEmpty(GetToken())) - { - return true; - } - else - { - return false; - } - } - } - - private static void FetchSecret(int secretID, out string secretUsername, out string secretPassword, out string secretDomain) - { - string baseURL = SSConnectionData.ssUrl; - - SecretModel secret; - if (SSConnectionData.ssSSO) - { - // REQUIRES IIS CONFIG! https://docs.thycotic.com/ss/11.0.0/api-scripting/webservice-iwa-powershell - var handler = new HttpClientHandler() { UseDefaultCredentials = true }; - using (var httpClient = new HttpClient(handler)) - { - // Call REST API: - var client = new SecretsServiceClient($"{baseURL}/winauthwebservices/api", httpClient); - secret = client.GetSecretAsync(false, true, secretID, null).Result; - } - } - else - { - using (var httpClient = new HttpClient()) - { - - var token = GetToken(); - // Set credentials (token): - httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token); - - // Call REST API: - var client = new SecretsServiceClient($"{baseURL}/api", httpClient); - secret = client.GetSecretAsync(false, true, secretID, null).Result; - } - } - - // clear return variables - secretDomain = ""; - secretUsername = ""; - secretPassword = ""; - - // parse data and extract what we need - foreach (var item in secret.Items) - { - if (item.FieldName.ToLower().Equals("domain")) - secretDomain = item.ItemValue; - else if (item.FieldName.ToLower().Equals("username")) - secretUsername = item.ItemValue; - else if (item.FieldName.ToLower().Equals("password")) - secretPassword = item.ItemValue; - } - - } - - private static string GetToken() - { - - string authUsername = SSConnectionData.ssUsername; - string authPassword = SSConnectionData.ssPassword; - string baseURL = SSConnectionData.ssUrl; - string OTP = SSConnectionData.ssOTP; - string Bearer = SSConnectionData.ssTokenBearer; - string Refresh = SSConnectionData.ssTokenRefresh; - DateTime ExpiresOn = SSConnectionData.ssTokenExpiresOn; - - - // Check if current token is valid - if (!String.IsNullOrEmpty(Bearer)) - { - if (ExpiresOn >= DateTime.UtcNow) - { - return Bearer; - } - else - { - //try using refresh token - using (var httpClient = new HttpClient()) - { - var tokenClient = new OAuth2ServiceClient(baseURL, httpClient); - var token = tokenClient.AuthorizeAsync(Grant_type.Refresh_token, null, null, Refresh, null).Result; - var tokenResult = token.Access_token; - - SSConnectionData.ssTokenBearer = tokenResult; - SSConnectionData.ssTokenRefresh = token.Refresh_token; - SSConnectionData.ssTokenExpiresOn = token.Expires_on; - return tokenResult; - } - } - - } - else - { - using (var httpClient = new HttpClient()) - { - // Authenticate: - var tokenClient = new OAuth2ServiceClient(baseURL, httpClient); - // call below will throw an exception if the creds are invalid - var token = tokenClient.AuthorizeAsync(Grant_type.Password, authUsername, authPassword, null, OTP).Result; - // here we can be sure the creds are ok - return success state - var tokenResult = token.Access_token; - - SSConnectionData.ssTokenBearer = tokenResult; - SSConnectionData.ssTokenRefresh = token.Refresh_token; - SSConnectionData.ssTokenExpiresOn = token.Expires_on; - return tokenResult; - - - } - } - } - - - - // input must be in form "SSAPI:xxxx" where xxx is the secret id to fetch - public static void FetchSecretFromServer(string input, out string username, out string password, out string domain) - { - // get secret id - if (!input.StartsWith("SSAPI:")) - throw new Exception("calling this function requires SSAPI: input"); - int secretID = Int32.Parse(input.Substring(6)); - - // init connection credentials, display popup if necessary - SSConnectionData.Init(); - - // get the secret - FetchSecret(secretID, out username, out password, out domain); - } - } -} diff --git a/ExternalConnectors/TSS/SecretServerRestClient.cs b/ExternalConnectors/TSS/SecretServerRestClient.cs deleted file mode 100644 index 47c0d4834..000000000 --- a/ExternalConnectors/TSS/SecretServerRestClient.cs +++ /dev/null @@ -1,130342 +0,0 @@ -//---------------------- -// -// Generated using the NSwag toolchain v13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) -// -//---------------------- - -#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." -#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." -#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' -#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... -#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." -#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" -#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" - -namespace SecretServerRestClient.TSS -{ - using System = global::System; - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ActivationsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ActivationsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Perform an online activation of Secret Server - /// args - /// Activation result object - /// A server side error occurred. - public System.Threading.Tasks.Task ActivateAsync(OnlineActivationArgs args) - { - return ActivateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Perform an online activation of Secret Server - /// args - /// Activation result object - /// A server side error occurred. - public async System.Threading.Tasks.Task ActivateAsync(OnlineActivationArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/activations"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ActiveDirectoryServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ActiveDirectoryServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Synchronize Active Directory Groups and Users - /// Bool - /// A server side error occurred. - public System.Threading.Tasks.Task SynchronizeAsync() - { - return SynchronizeAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Synchronize Active Directory Groups and Users - /// Bool - /// A server side error occurred. - public async System.Threading.Tasks.Task SynchronizeAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/active-directory/synchronize"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ApiTokenServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ApiTokenServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Generate API Token - /// Generated API Token - /// A server side error occurred. - public System.Threading.Tasks.Task GetTokenAsync() - { - return GetTokenAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Generate API Token - /// Generated API Token - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTokenAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/-token/generate-token"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class AppClientsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public AppClientsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get App Client - /// Whether to include inactive app clients - /// App client ID - /// App client object - /// A server side error occurred. - public System.Threading.Tasks.Task GetClientAsync(bool? includeInactive, int id) - { - return GetClientAsync(includeInactive, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get App Client - /// Whether to include inactive app clients - /// App client ID - /// App client object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetClientAsync(bool? includeInactive, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/app-clients/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update App Client - /// App client update options - /// App client ID - /// App client object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateClientAsync(AppClientUpdateArgs args, int id) - { - return UpdateClientAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update App Client - /// App client update options - /// App client ID - /// App client object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateClientAsync(AppClientUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/app-clients/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete App Client - /// App client ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteClientAsync(int id) - { - return DeleteClientAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete App Client - /// App client ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteClientAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/app-clients/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get App Client Stub - /// App client object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get App Client Stub - /// App client object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/app-clients/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create App Client - /// App client creation options - /// App client object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateClientAsync(AppClientCreateArgs args) - { - return CreateClientAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create App Client - /// App client creation options - /// App client object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateClientAsync(AppClientCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/app-clients"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ApplicationAccountsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ApplicationAccountsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Lookup Application Accounts - /// IncludeAll - /// Include inactive application accounts in the results. Inactive application accounts are included by default. - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User search result object - /// A server side error occurred. - public System.Threading.Tasks.Task LookupAccountAsync(bool? filter_includeAll, bool? filter_includeInactive, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return LookupAccountAsync(filter_includeAll, filter_includeInactive, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lookup Application Accounts - /// IncludeAll - /// Include inactive application accounts in the results. Inactive application accounts are included by default. - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task LookupAccountAsync(bool? filter_includeAll, bool? filter_includeInactive, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/application-accounts/lookup?"); - if (filter_includeAll != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeAll") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeAll, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ApplicationRequestServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ApplicationRequestServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Application Access Requests by Status for Current User. - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Access Model - /// A server side error occurred. - public System.Threading.Tasks.Task SearchRequestsByStatusAsync(string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchRequestsByStatusAsync(filter_status, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Application Access Requests by Status for Current User. - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Access Model - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchRequestsByStatusAsync(string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/application-access-requests?"); - if (filter_status != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.status") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_status, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Application Access Requests by Device Id. - /// deviceId - /// Secret Access Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetRequestByDeviceIdAsync(int deviceId) - { - return GetRequestByDeviceIdAsync(deviceId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Application Access Requests by Device Id. - /// deviceId - /// Secret Access Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRequestByDeviceIdAsync(int deviceId, System.Threading.CancellationToken cancellationToken) - { - if (deviceId == null) - throw new System.ArgumentNullException("deviceId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/application-access-request/{deviceId}"); - urlBuilder_.Replace("{deviceId}", System.Uri.EscapeDataString(ConvertToString(deviceId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Application Access Requests by Device Id. - /// args - /// deviceId - /// Secret Access Model - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateRequestAsync(ApplicationAccessRequestUpdateArgs args, int deviceId) - { - return UpdateRequestAsync(args, deviceId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Application Access Requests by Device Id. - /// args - /// deviceId - /// Secret Access Model - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateRequestAsync(ApplicationAccessRequestUpdateArgs args, int deviceId, System.Threading.CancellationToken cancellationToken) - { - if (deviceId == null) - throw new System.ArgumentNullException("deviceId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/application-access-request/{deviceId}"); - urlBuilder_.Replace("{deviceId}", System.Uri.EscapeDataString(ConvertToString(deviceId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Application Access Request Audits by Device Id. - /// DeviceId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Application Access Request Audit View Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetAuditsAsync(int? filter_deviceId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAuditsAsync(filter_deviceId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Application Access Request Audits by Device Id. - /// DeviceId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Application Access Request Audit View Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAuditsAsync(int? filter_deviceId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/application-access-request-audits?"); - if (filter_deviceId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.deviceId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_deviceId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class CategorizedListsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public CategorizedListsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get a list - /// List ID - /// The list with provided ID - /// A server side error occurred. - public System.Threading.Tasks.Task GetListAsync(System.Guid categorizedListId) - { - return GetListAsync(categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a list - /// List ID - /// The list with provided ID - /// A server side error occurred. - public async System.Threading.Tasks.Task GetListAsync(System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a list - /// List to be updated - /// List ID - /// The updated list - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateListAsync(CategorizedListUpdateArgs args, System.Guid categorizedListId) - { - return UpdateListAsync(args, categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a list - /// List to be updated - /// List ID - /// The updated list - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateListAsync(CategorizedListUpdateArgs args, System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete List - /// ID of list to be deleted - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteListAsync(System.Guid categorizedListId) - { - return DeleteListAsync(categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete List - /// ID of list to be deleted - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteListAsync(System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a list's items - /// List ID - /// Category text to filter by. Use null to return uncategorized. - /// If true and Category value is null or an empty string, will return uncategorized items; otherwise, a null or empty category filter is treated as no category filter. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list's options - /// A server side error occurred. - public System.Threading.Tasks.Task GetListItemsAsync(System.Guid categorizedListId, string filter_category, bool? filter_nullCategoryIsUncategorized, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetListItemsAsync(categorizedListId, filter_category, filter_nullCategoryIsUncategorized, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a list's items - /// List ID - /// Category text to filter by. Use null to return uncategorized. - /// If true and Category value is null or an empty string, will return uncategorized items; otherwise, a null or empty category filter is treated as no category filter. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list's options - /// A server side error occurred. - public async System.Threading.Tasks.Task GetListItemsAsync(System.Guid categorizedListId, string filter_category, bool? filter_nullCategoryIsUncategorized, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/options?"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_category != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.category") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_category, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_nullCategoryIsUncategorized != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.nullCategoryIsUncategorized") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_nullCategoryIsUncategorized, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Updates options in a list - /// List options to be added - /// List ID - /// The updated options in the list - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateItemsInListAsync(CategorizedListItemUpdateArgs args, System.Guid categorizedListId) - { - return UpdateItemsInListAsync(args, categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates options in a list - /// List options to be added - /// List ID - /// The updated options in the list - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateItemsInListAsync(CategorizedListItemUpdateArgs args, System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/options"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Adds options to a list - /// List options to be added - /// List ID - /// The new options in the list - /// A server side error occurred. - public System.Threading.Tasks.Task AddItemsToListAsync(CategorizedListItemCreateArgs args, System.Guid categorizedListId) - { - return AddItemsToListAsync(args, categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Adds options to a list - /// List options to be added - /// List ID - /// The new options in the list - /// A server side error occurred. - public async System.Threading.Tasks.Task AddItemsToListAsync(CategorizedListItemCreateArgs args, System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/options"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete all list options from a list - /// List ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task RemoveItemsFromListAsync(System.Guid categorizedListId) - { - return RemoveItemsFromListAsync(categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete all list options from a list - /// List ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task RemoveItemsFromListAsync(System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/options"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete a list option from a list - /// List id - /// List option id - /// List option deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task RemoveItemFromListAsync(System.Guid listId, System.Guid optionId) - { - return RemoveItemFromListAsync(listId, optionId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete a list option from a list - /// List id - /// List option id - /// List option deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task RemoveItemFromListAsync(System.Guid listId, System.Guid optionId, System.Threading.CancellationToken cancellationToken) - { - if (listId == null) - throw new System.ArgumentNullException("listId"); - - if (optionId == null) - throw new System.ArgumentNullException("optionId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{listId}/options/{optionId}"); - urlBuilder_.Replace("{listId}", System.Uri.EscapeDataString(ConvertToString(listId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{optionId}", System.Uri.EscapeDataString(ConvertToString(optionId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Lists - /// Whether to include active lists in results (when excluded equals true) - /// Whether to include inactive lists in results - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// List search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(bool? filter_includeActive, bool? filter_includeInactive, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_includeActive, filter_includeInactive, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Lists - /// Whether to include active lists in results (when excluded equals true) - /// Whether to include inactive lists in results - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// List search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(bool? filter_includeActive, bool? filter_includeInactive, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists?"); - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a list - /// List be added - /// The new list - /// A server side error occurred. - public System.Threading.Tasks.Task CreateListAsync(CategorizedListCreateArgs args) - { - return CreateListAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a list - /// List be added - /// The new list - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateListAsync(CategorizedListCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a list of lists available to current user - /// A list of lists for the current user - /// A server side error occurred. - public System.Threading.Tasks.Task GetAllListsUserMaySeeAsync() - { - return GetAllListsUserMaySeeAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a list of lists available to current user - /// A list of lists for the current user - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllListsUserMaySeeAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/summary"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a list's current categories - /// List ID - /// The list's categories - /// A server side error occurred. - public System.Threading.Tasks.Task GetCategoriesForListAsync(System.Guid categorizedListId) - { - return GetCategoriesForListAsync(categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a list's current categories - /// List ID - /// The list's categories - /// A server side error occurred. - public async System.Threading.Tasks.Task GetCategoriesForListAsync(System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/categories"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Audits for List - /// List Id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paginated list of Audits for List. - /// A server side error occurred. - public System.Threading.Tasks.Task SearchListAuditAsync(System.Guid categorizedListId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchListAuditAsync(categorizedListId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Audits for List - /// List Id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paginated list of Audits for List. - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchListAuditAsync(System.Guid categorizedListId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/audits?"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Adds options to the list with the specified category - /// List options to be added - /// List ID - /// Category to assign - /// The new options in the list - /// A server side error occurred. - public System.Threading.Tasks.Task AddItemsToListWithCategoryAsync(CategorizedListItemCreateArgs args, System.Guid categorizedListId, string category) - { - return AddItemsToListWithCategoryAsync(args, categorizedListId, category, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Adds options to the list with the specified category - /// List options to be added - /// List ID - /// Category to assign - /// The new options in the list - /// A server side error occurred. - public async System.Threading.Tasks.Task AddItemsToListWithCategoryAsync(CategorizedListItemCreateArgs args, System.Guid categorizedListId, string category, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - if (category == null) - throw new System.ArgumentNullException("category"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/options/{category}"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{category}", System.Uri.EscapeDataString(ConvertToString(category, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Upload a file of list options - /// File containing list options to add - /// List ID - /// The new options in the list - /// A server side error occurred. - public System.Threading.Tasks.Task AddItemsToListFromFileAsync(CategorizedListItemCreateWithFileArgs args, System.Guid categorizedListId) - { - return AddItemsToListFromFileAsync(args, categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Upload a file of list options - /// File containing list options to add - /// List ID - /// The new options in the list - /// A server side error occurred. - public async System.Threading.Tasks.Task AddItemsToListFromFileAsync(CategorizedListItemCreateWithFileArgs args, System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/options/file"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Replaces options in a list - /// List options to be added - /// List ID - /// The new item in the list - /// A server side error occurred. - public System.Threading.Tasks.Task ReplaceItemsInListAsync(CategorizedListItemCreateArgs args, System.Guid categorizedListId) - { - return ReplaceItemsInListAsync(args, categorizedListId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Replaces options in a list - /// List options to be added - /// List ID - /// The new item in the list - /// A server side error occurred. - public async System.Threading.Tasks.Task ReplaceItemsInListAsync(CategorizedListItemCreateArgs args, System.Guid categorizedListId, System.Threading.CancellationToken cancellationToken) - { - if (categorizedListId == null) - throw new System.ArgumentNullException("categorizedListId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/lists/{categorizedListId}/options/replace"); - urlBuilder_.Replace("{categorizedListId}", System.Uri.EscapeDataString(ConvertToString(categorizedListId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ConfigurationServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ConfigurationServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Audit of system configuration changes - /// SearchTerm - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Configuration audit items - /// A server side error occurred. - public System.Threading.Tasks.Task GetConfigurationAuditAsync(string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetConfigurationAuditAsync(filter_searchTerm, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Audit of system configuration changes - /// SearchTerm - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Configuration audit items - /// A server side error occurred. - public async System.Threading.Tasks.Task GetConfigurationAuditAsync(string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/audit?"); - if (filter_searchTerm != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchTerm") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchTerm, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get the general configuration - /// Load all configuration sections - /// Load application settings section - /// Load email section - /// Load folder configuration section - /// Load launcher settings section - /// Load local user passwords section - /// Load permission options configuration section - /// Load user experience configuration section - /// Load user interface section - /// Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetGeneralConfigurationAsync(bool? loadAll, bool? loadApplicationSettings, bool? loadEmail, bool? loadFolders, bool? loadLauncherSettings, bool? loadLocalUserPasswords, bool? loadPermissionOptions, bool? loadUserExperience, bool? loadUserInterface) - { - return GetGeneralConfigurationAsync(loadAll, loadApplicationSettings, loadEmail, loadFolders, loadLauncherSettings, loadLocalUserPasswords, loadPermissionOptions, loadUserExperience, loadUserInterface, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the general configuration - /// Load all configuration sections - /// Load application settings section - /// Load email section - /// Load folder configuration section - /// Load launcher settings section - /// Load local user passwords section - /// Load permission options configuration section - /// Load user experience configuration section - /// Load user interface section - /// Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetGeneralConfigurationAsync(bool? loadAll, bool? loadApplicationSettings, bool? loadEmail, bool? loadFolders, bool? loadLauncherSettings, bool? loadLocalUserPasswords, bool? loadPermissionOptions, bool? loadUserExperience, bool? loadUserInterface, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/general?"); - if (loadAll != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadAll") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadAll, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadApplicationSettings != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadApplicationSettings") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadApplicationSettings, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadEmail != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadEmail") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadEmail, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadFolders != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadFolders") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadFolders, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadLauncherSettings != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadLauncherSettings") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadLauncherSettings, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadLocalUserPasswords != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadLocalUserPasswords") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadLocalUserPasswords, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadPermissionOptions != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadPermissionOptions") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadPermissionOptions, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadUserExperience != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadUserExperience") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadUserExperience, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadUserInterface != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadUserInterface") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadUserInterface, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update general configuration - /// Local user password update args - /// Updated Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchGeneralConfigurationAsync(ConfigurationGeneralPatchArgs args) - { - return PatchGeneralConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update general configuration - /// Local user password update args - /// Updated Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchGeneralConfigurationAsync(ConfigurationGeneralPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/general"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get the local user password configuration - /// Local User Password Configuration Settings - /// A server side error occurred. - public System.Threading.Tasks.Task GetLocalPasswordConfigurationAsync() - { - return GetLocalPasswordConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the local user password configuration - /// Local User Password Configuration Settings - /// A server side error occurred. - public async System.Threading.Tasks.Task GetLocalPasswordConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/local-user-passwords"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the local user password configuration - /// Local user password update args - /// Local User Password Configuration Settings - /// A server side error occurred. - public System.Threading.Tasks.Task PatchLocalPasswordConfigurationAsync(ConfigurationLocalPasswordPatchArgs args) - { - return PatchLocalPasswordConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the local user password configuration - /// Local user password update args - /// Local User Password Configuration Settings - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchLocalPasswordConfigurationAsync(ConfigurationLocalPasswordPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/local-user-passwords"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Security configuration - /// Security Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecurityConfigurationAsync() - { - return GetSecurityConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Security configuration - /// Security Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecurityConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/security"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Security configuration - /// Security update args - /// Security configuration after updates - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSecurityConfigurationAsync(ConfigurationSecurityPatchArgs args) - { - return PatchSecurityConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Security configuration - /// Security update args - /// Security configuration after updates - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSecurityConfigurationAsync(ConfigurationSecurityPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/security"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Login configuration - /// Login Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetLoginConfigurationAsync() - { - return GetLoginConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Login configuration - /// Login Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetLoginConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/login"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Login configuration - /// Login update args - /// Login configuration after updates - /// A server side error occurred. - public System.Threading.Tasks.Task PatchLoginConfigurationAsync(ConfigurationLoginPatchArgs args) - { - return PatchLoginConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Login configuration - /// Login update args - /// Login configuration after updates - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchLoginConfigurationAsync(ConfigurationLoginPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/login"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Saml configuration - /// Saml Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetSamlConfigurationAsync() - { - return GetSamlConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Saml configuration - /// Saml Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSamlConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/saml"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Saml configuration - /// Saml update args - /// Saml configuration after updates - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSamlConfigurationAsync(ConfigurationSamlPatchArgs args) - { - return PatchSamlConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Saml configuration - /// Saml update args - /// Saml configuration after updates - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSamlConfigurationAsync(ConfigurationSamlPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/saml"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Saml Identity Provider configuration - /// Saml Identity Provider Id - /// Saml Identity Provider configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetSamlIdentityProviderConfigurationAsync(int id) - { - return GetSamlIdentityProviderConfigurationAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Saml Identity Provider configuration - /// Saml Identity Provider Id - /// Saml Identity Provider configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSamlIdentityProviderConfigurationAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/saml/identity-provider/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get RPC configuration - /// RPC Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetRpcConfigurationAsync() - { - return GetRpcConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get RPC configuration - /// RPC Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRpcConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/rpc"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update RPC configuration - /// Local user password update args - /// RPC configuration after updates - /// A server side error occurred. - public System.Threading.Tasks.Task PatchRpcConfigurationAsync(ConfigurationRpcPatchArgs args) - { - return PatchRpcConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update RPC configuration - /// Local user password update args - /// RPC configuration after updates - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchRpcConfigurationAsync(ConfigurationRpcPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/rpc"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Site Connectors - /// includeInactive - /// Site Connectors - /// A server side error occurred. - public System.Threading.Tasks.Task> GetSiteConnectorsAsync(bool? includeInactive) - { - return GetSiteConnectorsAsync(includeInactive, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Site Connectors - /// includeInactive - /// Site Connectors - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetSiteConnectorsAsync(bool? includeInactive, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/site-connector?"); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Internal Site Connector Configuration - /// Internal Site Connector Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetInternalSiteConfigurationAsync() - { - return GetInternalSiteConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Internal Site Connector Configuration - /// Internal Site Connector Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetInternalSiteConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/internal-site-connector"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Internal Site Connector - /// Internal Site Connector Update Options - /// Internal Site Connector Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchInternalSiteConfigurationAsync(ConfigurationInternalSiteConnectorPatchArgs args) - { - return PatchInternalSiteConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Internal Site Connector - /// Internal Site Connector Update Options - /// Internal Site Connector Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchInternalSiteConfigurationAsync(ConfigurationInternalSiteConnectorPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/internal-site-connector"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Secret Search Indexer Configuration - /// Secret Search Indexer Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretSearchIndexerConfigurationAsync() - { - return GetSecretSearchIndexerConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Secret Search Indexer Configuration - /// Secret Search Indexer Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretSearchIndexerConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/secret-search-indexer"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Search Indexer Configuration - /// Secret Search Indexer Configuration Update Settings - /// Updated Secret Search Indexer Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSecretSearchIndexerConfigurationAsync(SearchIndexerUpdateArgs args) - { - return PatchSecretSearchIndexerConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Search Indexer Configuration - /// Secret Search Indexer Configuration Update Settings - /// Updated Secret Search Indexer Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSecretSearchIndexerConfigurationAsync(SearchIndexerUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/secret-search-indexer"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Automatic Export Configuration - /// Automatic Export Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetAutoExportConfigurationAsync() - { - return GetAutoExportConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Automatic Export Configuration - /// Automatic Export Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAutoExportConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/auto-export"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Automatic Export Configuration - /// Automatic Export Update Settings - /// Updated Automatic Export Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchAutomaticExportConfigurationAsync(AutoExportConfigurationArgs args) - { - return PatchAutomaticExportConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Automatic Export Configuration - /// Automatic Export Update Settings - /// Updated Automatic Export Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchAutomaticExportConfigurationAsync(AutoExportConfigurationArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/auto-export"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Automatic Export Configuration Audits - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Automatic Export Configuration Audits - /// A server side error occurred. - public System.Threading.Tasks.Task GetAutoExportConfigurationAuditsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAutoExportConfigurationAuditsAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Automatic Export Configuration Audits - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Automatic Export Configuration Audits - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAutoExportConfigurationAuditsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/auto-export-audits?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Automatic Export Logs - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Automatic Export Logs - /// A server side error occurred. - public System.Threading.Tasks.Task GetAutoExportLogsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAutoExportLogsAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Automatic Export Logs - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Automatic Export Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAutoExportLogsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/auto-export-logs?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Automatic Export Storage Items - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Automatic Export Storage Items - /// A server side error occurred. - public System.Threading.Tasks.Task GetAutoExportStorageItemsDefaultAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAutoExportStorageItemsDefaultAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Automatic Export Storage Items - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Automatic Export Storage Items - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAutoExportStorageItemsDefaultAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/auto-export-storage?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Automatic Export Storage Items For Configuration - /// id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Automatic Export Storage Items For Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetAutoExportStorageItemsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAutoExportStorageItemsAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Automatic Export Storage Items For Configuration - /// id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Automatic Export Storage Items For Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAutoExportStorageItemsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/auto-export-storage/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Automatic Export Storage Item - /// id - /// Automatic Export Storage Item - /// A server side error occurred. - public System.Threading.Tasks.Task GetAutoExportStorageItemAsync(int id) - { - return GetAutoExportStorageItemAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Automatic Export Storage Item - /// id - /// Automatic Export Storage Item - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAutoExportStorageItemAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/auto-export-storage/item/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Database Backup Configuration - /// Database Backup Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetDatabaseBackupConfigurationAsync() - { - return GetDatabaseBackupConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Database Backup Configuration - /// Database Backup Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDatabaseBackupConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/backup"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Backup Configuration - /// Backup Configuration Update Settings - /// Updated Backup Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchDatabaseBackupConfigurationAsync(BackupConfigurationArgs args) - { - return PatchDatabaseBackupConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Backup Configuration - /// Backup Configuration Update Settings - /// Updated Backup Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchDatabaseBackupConfigurationAsync(BackupConfigurationArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/backup"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Backup Logs - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Backup Logs - /// A server side error occurred. - public System.Threading.Tasks.Task GetBackupLogsV2Async(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetBackupLogsV2Async(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Backup Logs - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Backup Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetBackupLogsV2Async(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/configuration/backup-logs?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get system log configuration - /// System log configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetSystemLogConfigurationAsync() - { - return GetSystemLogConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get system log configuration - /// System log configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSystemLogConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/system-log"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch system log configuration - /// args - /// System log configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSystemLogConfigurationAsync(SystemLogConfigurationUpdateArgs args) - { - return PatchSystemLogConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch system log configuration - /// args - /// System log configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSystemLogConfigurationAsync(SystemLogConfigurationUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/system-log"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Clear system log - /// Cleared System Log Result - /// A server side error occurred. - public System.Threading.Tasks.Task ClearSystemLogAsync() - { - return ClearSystemLogAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Clear system log - /// Cleared System Log Result - /// A server side error occurred. - public async System.Threading.Tasks.Task ClearSystemLogAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/system-log/clear"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Public SSH Key Expiration - /// Public SSH Key Expiration Result - /// A server side error occurred. - public System.Threading.Tasks.Task GetPublicSshKeyExpirationAsync() - { - return GetPublicSshKeyExpirationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Public SSH Key Expiration - /// Public SSH Key Expiration Result - /// A server side error occurred. - public async System.Threading.Tasks.Task GetPublicSshKeyExpirationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/public-ssh-key"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get the ticket system configuration - /// Ticket System Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetTicketSystemConfigurationAsync() - { - return GetTicketSystemConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the ticket system configuration - /// Ticket System Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTicketSystemConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/ticket-system"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the ticket system configuration - /// Ticket System update args - /// Ticket System Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchTicketSystemConfigurationAsync(ConfigurationTicketSystemArgs args) - { - return PatchTicketSystemConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the ticket system configuration - /// Ticket System update args - /// Ticket System Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchTicketSystemConfigurationAsync(ConfigurationTicketSystemArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/ticket-system"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Saml configuration - /// Saml create args - /// Saml configuration after create - /// A server side error occurred. - public System.Threading.Tasks.Task PostSamlConfigurationAsync(ConfigurationSamlIdentityProviderCreateArgs args) - { - return PostSamlConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Saml configuration - /// Saml create args - /// Saml configuration after create - /// A server side error occurred. - public async System.Threading.Tasks.Task PostSamlConfigurationAsync(ConfigurationSamlIdentityProviderCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/saml/identity-provider"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Saml Identity Provider configuration - /// Saml Identity Provider update args - /// Saml Identity Provider configuration after updates - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSamlIdentityProviderConfigurationAsync(ConfigurationSamlIdentityProviderPatchArgs args) - { - return PatchSamlIdentityProviderConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Saml Identity Provider configuration - /// Saml Identity Provider update args - /// Saml Identity Provider configuration after updates - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSamlIdentityProviderConfigurationAsync(ConfigurationSamlIdentityProviderPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/saml/identity-provider"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Session Recording - /// Local user password update args - /// Session Recording Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSessionRecordingConfigurationAsync(ConfigurationSessionRecordingPatchArgs args) - { - return PatchSessionRecordingConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Session Recording - /// Local user password update args - /// Session Recording Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSessionRecordingConfigurationAsync(ConfigurationSessionRecordingPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/sessionrecording"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Folder - /// Folders configuration args - /// Folder Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchFolderConfigurationAsync(ConfigurationFoldersPatchArgs args) - { - return PatchFolderConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Folder - /// Folders configuration args - /// Folder Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchFolderConfigurationAsync(ConfigurationFoldersPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/folder"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Unlimited Admin - /// Unlimited Admin Update Options - /// Success - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateUnlimitedAdminAsync(UnlimitedAdminUpdateArgs args) - { - return UpdateUnlimitedAdminAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Unlimited Admin - /// Unlimited Admin Update Options - /// Success - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateUnlimitedAdminAsync(UnlimitedAdminUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/unlimited-admin"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the application settings configuration - /// Application settings update args - /// Application Settings Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchApplicationSettingsConfigurationAsync(ConfigurationApplicationSettingsPatchArgs args) - { - return PatchApplicationSettingsConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the application settings configuration - /// Application settings update args - /// Application Settings Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchApplicationSettingsConfigurationAsync(ConfigurationApplicationSettingsPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/application-settings"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the permission options configuration - /// Permission options update args - /// Permission Options Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchPermissionOptionsConfigurationAsync(ConfigurationPermissionOptionsPatchArgs args) - { - return PatchPermissionOptionsConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the permission options configuration - /// Permission options update args - /// Permission Options Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchPermissionOptionsConfigurationAsync(ConfigurationPermissionOptionsPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/permission-options"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the launcher settings configuration - /// Launcher settings update args - /// launcher settings Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchLauncherSettingsConfigurationAsync(ConfigurationLauncherSettingsPatchArgs args) - { - return PatchLauncherSettingsConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the launcher settings configuration - /// Launcher settings update args - /// launcher settings Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchLauncherSettingsConfigurationAsync(ConfigurationLauncherSettingsPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/launcher-settings"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the protocol handler settings configuration - /// Protocol handler settings update args - /// protocol handler settings Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchProtocolHandlerSettingsConfigurationAsync(ConfigurationProtocolHandlerSettingsPatchArgs args) - { - return PatchProtocolHandlerSettingsConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the protocol handler settings configuration - /// Protocol handler settings update args - /// protocol handler settings Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchProtocolHandlerSettingsConfigurationAsync(ConfigurationProtocolHandlerSettingsPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/protocol-handler-settings"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the user experience configuration - /// User experience update args - /// User Experience Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchUserExperienceConfigurationAsync(ConfigurationUserExperiencePatchArgs args) - { - return PatchUserExperienceConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the user experience configuration - /// User experience update args - /// User Experience Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchUserExperienceConfigurationAsync(ConfigurationUserExperiencePatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/user-experience"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the user interface configuration - /// User interface update args - /// User Interface Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchUserInterfaceConfigurationAsync(ConfigurationUserInterfacePatchArgs args) - { - return PatchUserInterfaceConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the user interface configuration - /// User interface update args - /// User Interface Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchUserInterfaceConfigurationAsync(ConfigurationUserInterfacePatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/user-interface"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the email configuration - /// Email update args - /// Email Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchEmailConfigurationAsync(ConfigurationEmailPatchArgs args) - { - return PatchEmailConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the email configuration - /// Email update args - /// Email Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchEmailConfigurationAsync(ConfigurationEmailPatchArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/email"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Rebuild Secret Search Index - /// true if the job was queued - /// A server side error occurred. - public System.Threading.Tasks.Task RebuildSecretSearchIndexerConfigurationAsync() - { - return RebuildSecretSearchIndexerConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Rebuild Secret Search Index - /// true if the job was queued - /// A server side error occurred. - public async System.Threading.Tasks.Task RebuildSecretSearchIndexerConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/secret-search-indexer/rebuild-index"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Start Automatic Export - /// True if the job was queued - /// A server side error occurred. - public System.Threading.Tasks.Task RunAutoExportNowAsync() - { - return RunAutoExportNowAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Start Automatic Export - /// True if the job was queued - /// A server side error occurred. - public async System.Threading.Tasks.Task RunAutoExportNowAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/auto-export/run-now"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Start Database Backup - /// true if the job was queued - /// A server side error occurred. - public System.Threading.Tasks.Task RunBackupNowAsync() - { - return RunBackupNowAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Start Database Backup - /// true if the job was queued - /// A server side error occurred. - public async System.Threading.Tasks.Task RunBackupNowAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/configuration/backup/run-now"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ConnectionManagerSettingsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ConnectionManagerSettingsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Connection Manager Settings - /// Connection Manager Settings - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync() - { - return GetAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Connection Manager Settings - /// Connection Manager Settings - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/connection-manager-settings"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DevOpsSecretsVaultSyncServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DevOpsSecretsVaultSyncServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Information about secrets syncing. - /// If inactive sync maps should be returned. - /// Search by the secret being synced. - /// Search by the tenant being pushed to. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A list of statuses for secret syncing. - /// A server side error occurred. - public System.Threading.Tasks.Task GetSyncStatusesAsync(bool? filter_includeInactive, int? filter_secretId, int? filter_tenantId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetSyncStatusesAsync(filter_includeInactive, filter_secretId, filter_tenantId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Information about secrets syncing. - /// If inactive sync maps should be returned. - /// Search by the secret being synced. - /// Search by the tenant being pushed to. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A list of statuses for secret syncing. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSyncStatusesAsync(bool? filter_includeInactive, int? filter_secretId, int? filter_tenantId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/sync/status?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_secretId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_tenantId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.tenantId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_tenantId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Information about secret syncing. - /// syncMapId - /// The status of a secret syncing to a tenant. - /// A server side error occurred. - public System.Threading.Tasks.Task GetSyncStatusAsync(int syncMapId) - { - return GetSyncStatusAsync(syncMapId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Information about secret syncing. - /// syncMapId - /// The status of a secret syncing to a tenant. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSyncStatusAsync(int syncMapId, System.Threading.CancellationToken cancellationToken) - { - if (syncMapId == null) - throw new System.ArgumentNullException("syncMapId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/sync/status/{syncMapId}"); - urlBuilder_.Replace("{syncMapId}", System.Uri.EscapeDataString(ConvertToString(syncMapId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a DevOps sync for a secret. - /// args - /// The status of the secret's sync. - /// A server side error occurred. - public System.Threading.Tasks.Task CreateSyncAsync(DevOpsSecretsVaultCreateSyncArgs args) - { - return CreateSyncAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a DevOps sync for a secret. - /// args - /// The status of the secret's sync. - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateSyncAsync(DevOpsSecretsVaultCreateSyncArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/add-sync"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Sync a secret. - /// args - /// The status of the secret's sync. - /// A server side error occurred. - public System.Threading.Tasks.Task> SyncSecretAsync(DevOpsSecretsVaultSyncSecretsArgs args) - { - return SyncSecretAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Sync a secret. - /// args - /// The status of the secret's sync. - /// A server side error occurred. - public async System.Threading.Tasks.Task> SyncSecretAsync(DevOpsSecretsVaultSyncSecretsArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/sync"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a secret sync. - /// args - /// syncSecretMapId - /// The status of the secret's sync. - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSyncAsync(DevOpsSecretsVaultCreateSyncArgs args, int syncSecretMapId) - { - return UpdateSyncAsync(args, syncSecretMapId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a secret sync. - /// args - /// syncSecretMapId - /// The status of the secret's sync. - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSyncAsync(DevOpsSecretsVaultCreateSyncArgs args, int syncSecretMapId, System.Threading.CancellationToken cancellationToken) - { - if (syncSecretMapId == null) - throw new System.ArgumentNullException("syncSecretMapId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/sync/{syncSecretMapId}"); - urlBuilder_.Replace("{syncSecretMapId}", System.Uri.EscapeDataString(ConvertToString(syncSecretMapId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DevOpsSecretsVaultTenantServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DevOpsSecretsVaultTenantServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get DevOps Secrets Vault Tenants. - /// If inactive tenants should be returned. Defaulted to false. - /// Search by tenant names. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The DevOps Secrets Vault Tenants that were found. - /// A server side error occurred. - public System.Threading.Tasks.Task GetListAsync(bool? filter_includeInactive, string filter_nameSearch, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetListAsync(filter_includeInactive, filter_nameSearch, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get DevOps Secrets Vault Tenants. - /// If inactive tenants should be returned. Defaulted to false. - /// Search by tenant names. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The DevOps Secrets Vault Tenants that were found. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetListAsync(bool? filter_includeInactive, string filter_nameSearch, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/tenant?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_nameSearch != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.nameSearch") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_nameSearch, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Save a DevOps Secrets Vault Tenant. - /// args - /// The DevOps Secrets Vault Tenant Id. - /// A server side error occurred. - public System.Threading.Tasks.Task CreateAsync(DevOpsSecretsVaultCreateTenantArgs args) - { - return CreateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Save a DevOps Secrets Vault Tenant. - /// args - /// The DevOps Secrets Vault Tenant Id. - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateAsync(DevOpsSecretsVaultCreateTenantArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/tenant"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a DevOps Secrets Vault Tenant. - /// id - /// The DevOps Secrets Vault Tenant model. - /// A server side error occurred. - public System.Threading.Tasks.Task GetTenantAsync(int id) - { - return GetTenantAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a DevOps Secrets Vault Tenant. - /// id - /// The DevOps Secrets Vault Tenant model. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTenantAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/tenant/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a DevOps Secrets Vault Tenant. - /// args - /// id - /// The DevOps Secrets Vault Tenant Id. - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(DevOpsSecretsVaultUpdateTenantArgs args, int id) - { - return UpdateAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a DevOps Secrets Vault Tenant. - /// args - /// id - /// The DevOps Secrets Vault Tenant Id. - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(DevOpsSecretsVaultUpdateTenantArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/tenant/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// DevOps Secrets Vault Tenant Model. - /// A DevOps Secrets Vault Tenant with no values. - /// A server side error occurred. - public System.Threading.Tasks.Task GetTenantStubAsync() - { - return GetTenantStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// DevOps Secrets Vault Tenant Model. - /// A DevOps Secrets Vault Tenant with no values. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTenantStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/tenant/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// DSV Tenant Audits. - /// Search for text in the audit log. - /// Optional filter by tenant id. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The paginated list of DSV Tenant audits. - /// A server side error occurred. - public System.Threading.Tasks.Task GetTenantAuditsAsync(string filter_searchText, int? filter_tenantId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetTenantAuditsAsync(filter_searchText, filter_tenantId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// DSV Tenant Audits. - /// Search for text in the audit log. - /// Optional filter by tenant id. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The paginated list of DSV Tenant audits. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTenantAuditsAsync(string filter_searchText, int? filter_tenantId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/devops-secrets-vault/tenant/audits?"); - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_tenantId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.tenantId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_tenantId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DiagnosticsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DiagnosticsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Diagnostic Information - /// Diagnostics Info object - /// A server side error occurred. - public System.Threading.Tasks.Task GetDiagnosticInformationAsync() - { - return GetDiagnosticInformationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Diagnostic Information - /// Diagnostics Info object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDiagnosticInformationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Background Processes - /// Background Process Enumerable - /// A server side error occurred. - public System.Threading.Tasks.Task> GetBackgroundProcessesAsync() - { - return GetBackgroundProcessesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Background Processes - /// Background Process Enumerable - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetBackgroundProcessesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/background-processes"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Connectivity Report - /// Connectivity Report - /// A server side error occurred. - public System.Threading.Tasks.Task GetConnectivityReportAsync() - { - return GetConnectivityReportAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Connectivity Report - /// Connectivity Report - /// A server side error occurred. - public async System.Threading.Tasks.Task GetConnectivityReportAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/connectivity-report"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get App Settings - /// App Setting Dictionary - /// A server side error occurred. - public System.Threading.Tasks.Task GetAppSettingsAsync() - { - return GetAppSettingsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get App Settings - /// App Setting Dictionary - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAppSettingsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/app-settings"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Quartz Jobs - /// Enumerable of Quartz Jobs - /// A server side error occurred. - public System.Threading.Tasks.Task> GetQuartzJobsAsync() - { - return GetQuartzJobsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Quartz Jobs - /// Enumerable of Quartz Jobs - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetQuartzJobsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/quartz-jobs"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get General Logs - /// Get General Logs - /// A server side error occurred. - public System.Threading.Tasks.Task GetGeneralLogsAsync() - { - return GetGeneralLogsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get General Logs - /// Get General Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetGeneralLogsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/general-logs"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get System Logs - /// Get System Logs - /// A server side error occurred. - public System.Threading.Tasks.Task GetSystemLogsAsync() - { - return GetSystemLogsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get System Logs - /// Get System Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSystemLogsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/system-logs"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Discovery Logs - /// Get Discovery Logs - /// A server side error occurred. - public System.Threading.Tasks.Task GetDiscoveryLogsAsync() - { - return GetDiscoveryLogsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Discovery Logs - /// Get Discovery Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDiscoveryLogsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/discovery-logs"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get ComputerScan Logs - /// Get ComputerScan Logs - /// A server side error occurred. - public System.Threading.Tasks.Task GetComputerScanLogsAsync() - { - return GetComputerScanLogsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get ComputerScan Logs - /// Get ComputerScan Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetComputerScanLogsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/computer-scan-logs"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get RPC Logs - /// Get RPC Logs - /// A server side error occurred. - public System.Threading.Tasks.Task GetRPCLogsAsync() - { - return GetRPCLogsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get RPC Logs - /// Get RPC Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRPCLogsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/rpc-logs"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Heartbeat Logs - /// Get Heartbeat Logs - /// A server side error occurred. - public System.Threading.Tasks.Task GetHeartbeatLogsAsync() - { - return GetHeartbeatLogsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Heartbeat Logs - /// Get Heartbeat Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetHeartbeatLogsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/heartbeat-logs"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Clear Quartz Job Errors - /// Clear Quartz Job Errors Success - /// A server side error occurred. - public System.Threading.Tasks.Task ClearQuartzJobErrorsAsync() - { - return ClearQuartzJobErrorsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Clear Quartz Job Errors - /// Clear Quartz Job Errors Success - /// A server side error occurred. - public async System.Threading.Tasks.Task ClearQuartzJobErrorsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/clear-quartz-job-errors"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Clear Upgrade In Progress - /// Clear Upgrade In Progress Success - /// A server side error occurred. - public System.Threading.Tasks.Task ClearUpgradeInProgressAsync() - { - return ClearUpgradeInProgressAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Clear Upgrade In Progress - /// Clear Upgrade In Progress Success - /// A server side error occurred. - public async System.Threading.Tasks.Task ClearUpgradeInProgressAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/clear-upgrade-in-progress"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Test Event Log - /// Test Event Log Success - /// A server side error occurred. - public System.Threading.Tasks.Task TestEventLogAsync() - { - return TestEventLogAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Test Event Log - /// Test Event Log Success - /// A server side error occurred. - public async System.Threading.Tasks.Task TestEventLogAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/diagnostics/test-event-log"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DirectoryServicesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DirectoryServicesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Unlink a group from domain - /// domainId - /// groupId - /// Success status - /// A server side error occurred. - public System.Threading.Tasks.Task UnlinkDomainGroupAsync(int domainId, int groupId) - { - return UnlinkDomainGroupAsync(domainId, groupId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Unlink a group from domain - /// domainId - /// groupId - /// Success status - /// A server side error occurred. - public async System.Threading.Tasks.Task UnlinkDomainGroupAsync(int domainId, int groupId, System.Threading.CancellationToken cancellationToken) - { - if (domainId == null) - throw new System.ArgumentNullException("domainId"); - - if (groupId == null) - throw new System.ArgumentNullException("groupId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/{domainId}/group/{groupId}"); - urlBuilder_.Replace("{domainId}", System.Uri.EscapeDataString(ConvertToString(domainId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{groupId}", System.Uri.EscapeDataString(ConvertToString(groupId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Synchronization Log - /// paging - /// Synchronization log entries - /// A server side error occurred. - public System.Threading.Tasks.Task GetSynchronizationLogAsync(object paging) - { - return GetSynchronizationLogAsync(paging, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Synchronization Log - /// paging - /// Synchronization log entries - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSynchronizationLogAsync(object paging, System.Threading.CancellationToken cancellationToken) - { - if (paging == null) - throw new System.ArgumentNullException("paging"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/synchronization/log"); - urlBuilder_.Replace("{paging}", System.Uri.EscapeDataString(ConvertToString(paging, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Directory Services Sync Status - /// Whether or not the sync has started - /// A server side error occurred. - public System.Threading.Tasks.Task GetSynchronizationStatusAsync() - { - return GetSynchronizationStatusAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Directory Services Sync Status - /// Whether or not the sync has started - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSynchronizationStatusAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/synchronization"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Domains - /// DomainName - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Domains that matched - /// A server side error occurred. - public System.Threading.Tasks.Task SearchDomainsAsync(string filter_domainName, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchDomainsAsync(filter_domainName, filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Domains - /// DomainName - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Domains that matched - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchDomainsAsync(string filter_domainName, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains?"); - if (filter_domainName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.domainName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_domainName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Domain - /// args - /// Domain that was just created - /// A server side error occurred. - public System.Threading.Tasks.Task CreateDomainAsync(DomainCreateArgs args) - { - return CreateDomainAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Domain - /// args - /// Domain that was just created - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateDomainAsync(DomainCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Domain - /// id - /// Domain that was found - /// A server side error occurred. - public System.Threading.Tasks.Task GetDomainAsync(int id) - { - return GetDomainAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Domain - /// id - /// Domain that was found - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDomainAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Ldap synchronization settings for a domain - /// id - /// Ldap synchronization settings for the domain - /// A server side error occurred. - public System.Threading.Tasks.Task GetLdapSyncSettingsAsync(int id) - { - return GetLdapSyncSettingsAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Ldap synchronization settings for a domain - /// id - /// Ldap synchronization settings for the domain - /// A server side error occurred. - public async System.Threading.Tasks.Task GetLdapSyncSettingsAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/ldap-settings/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Domain Stub - /// domainType - /// Domain Stub - /// A server side error occurred. - public System.Threading.Tasks.Task GetDomainStubAsync(string domainType) - { - return GetDomainStubAsync(domainType, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Domain Stub - /// domainType - /// Domain Stub - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDomainStubAsync(string domainType, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/stub?"); - if (domainType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("domainType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(domainType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search in the directory for groups - /// domainId - /// Search text. Use * for wildcards, ex: Admin*. Leave empty to return all. - /// Array of groups matching search criteria - /// A server side error occurred. - public System.Threading.Tasks.Task SearchDirectoryForGroupsAsync(int domainId, string searchText) - { - return SearchDirectoryForGroupsAsync(domainId, searchText, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search in the directory for groups - /// domainId - /// Search text. Use * for wildcards, ex: Admin*. Leave empty to return all. - /// Array of groups matching search criteria - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchDirectoryForGroupsAsync(int domainId, string searchText, System.Threading.CancellationToken cancellationToken) - { - if (domainId == null) - throw new System.ArgumentNullException("domainId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/{domainId}/groups/search-directory?"); - urlBuilder_.Replace("{domainId}", System.Uri.EscapeDataString(ConvertToString(domainId, System.Globalization.CultureInfo.InvariantCulture))); - if (searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search in the directory for members of a group - /// domainId - /// The unique directory identifier for the group to be linked. For example, this is ADGuid in Active Directory - /// Name of the Group - /// Array of users in the passed in group - /// A server side error occurred. - public System.Threading.Tasks.Task GetDirectoryGroupMembersAsync(int domainId, string domainIdentifier, string groupName) - { - return GetDirectoryGroupMembersAsync(domainId, domainIdentifier, groupName, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search in the directory for members of a group - /// domainId - /// The unique directory identifier for the group to be linked. For example, this is ADGuid in Active Directory - /// Name of the Group - /// Array of users in the passed in group - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDirectoryGroupMembersAsync(int domainId, string domainIdentifier, string groupName, System.Threading.CancellationToken cancellationToken) - { - if (domainId == null) - throw new System.ArgumentNullException("domainId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/{domainId}/members?"); - urlBuilder_.Replace("{domainId}", System.Uri.EscapeDataString(ConvertToString(domainId, System.Globalization.CultureInfo.InvariantCulture))); - if (domainIdentifier != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("domainIdentifier") + "=").Append(System.Uri.EscapeDataString(ConvertToString(domainIdentifier, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (groupName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("groupName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(groupName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Directory Services Configuration - /// Directory Services Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetDirectoryServicesConfigurationAsync() - { - return GetDirectoryServicesConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Directory Services Configuration - /// Directory Services Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDirectoryServicesConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Directory Services Configuration - /// args - /// Updated Directory Services Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchDirectoryServicesConfigurationAsync(DirectoryServicesConfigurationUpdateArgs args) - { - return PatchDirectoryServicesConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Directory Services Configuration - /// args - /// Updated Directory Services Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchDirectoryServicesConfigurationAsync(DirectoryServicesConfigurationUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Ldap Sync Settings for a domain - /// args - /// domainId - /// Domain that was just updated - /// A server side error occurred. - public System.Threading.Tasks.Task PatchLdapSyncSettingsAsync(object args, int domainId) - { - return PatchLdapSyncSettingsAsync(args, domainId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Ldap Sync Settings for a domain - /// args - /// domainId - /// Domain that was just updated - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchLdapSyncSettingsAsync(object args, int domainId, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - if (domainId == null) - throw new System.ArgumentNullException("domainId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/ldap-settings/{domainId}"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{domainId}", System.Uri.EscapeDataString(ConvertToString(domainId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch a domain - /// args - /// domainId - /// Domain that was just updated - /// A server side error occurred. - public System.Threading.Tasks.Task PatchDomainAsync(object args, int domainId) - { - return PatchDomainAsync(args, domainId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch a domain - /// args - /// domainId - /// Domain that was just updated - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchDomainAsync(object args, int domainId, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - if (domainId == null) - throw new System.ArgumentNullException("domainId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/{domainId}"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{domainId}", System.Uri.EscapeDataString(ConvertToString(domainId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Synchronize all directory services - /// True if the command was initiated successfully - /// A server side error occurred. - public System.Threading.Tasks.Task SynchronizeNowAsync() - { - return SynchronizeNowAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Synchronize all directory services - /// True if the command was initiated successfully - /// A server side error occurred. - public async System.Threading.Tasks.Task SynchronizeNowAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/synchronization-now"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Link a group from the directory - /// args - /// domainId - /// Success status - /// A server side error occurred. - public System.Threading.Tasks.Task LinkDomainGroupAsync(LinkDomainGroupArgs args, int domainId) - { - return LinkDomainGroupAsync(args, domainId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Link a group from the directory - /// args - /// domainId - /// Success status - /// A server side error occurred. - public async System.Threading.Tasks.Task LinkDomainGroupAsync(LinkDomainGroupArgs args, int domainId, System.Threading.CancellationToken cancellationToken) - { - if (domainId == null) - throw new System.ArgumentNullException("domainId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/directory-services/domains/{domainId}/group"); - urlBuilder_.Replace("{domainId}", System.Uri.EscapeDataString(ConvertToString(domainId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DiscoveryServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DiscoveryServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get discovery sources - /// DiscoverySourceName - /// DiscoverySourceType - /// IncludeActive - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The Discovery Source Views - /// A server side error occurred. - public System.Threading.Tasks.Task SearchDiscoverySourcesAsync(string filter_discoverySourceName, string filter_discoverySourceType, bool? filter_includeActive, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchDiscoverySourcesAsync(filter_discoverySourceName, filter_discoverySourceType, filter_includeActive, filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get discovery sources - /// DiscoverySourceName - /// DiscoverySourceType - /// IncludeActive - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The Discovery Source Views - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchDiscoverySourcesAsync(string filter_discoverySourceName, string filter_discoverySourceType, bool? filter_includeActive, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/sources?"); - if (filter_discoverySourceName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.discoverySourceName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_discoverySourceName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_discoverySourceType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.discoverySourceType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_discoverySourceType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get discovery source - /// Discovery Source ID - /// The Discovery Source View - /// A server side error occurred. - public System.Threading.Tasks.Task GetDiscoverySourceAsync(int id) - { - return GetDiscoverySourceAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get discovery source - /// Discovery Source ID - /// The Discovery Source View - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDiscoverySourceAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a discovery source - /// args - /// Discovery Source ID - /// The updated discovery source - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateDiscoverySourceAsync(DiscoverySourceUpdateArgs args, int id) - { - return UpdateDiscoverySourceAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a discovery source - /// args - /// Discovery Source ID - /// The updated discovery source - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateDiscoverySourceAsync(DiscoverySourceUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Discovery Source Stub - /// Discovery Source Type ID - /// Discovery Source Stub - /// A server side error occurred. - public System.Threading.Tasks.Task GetDiscoverySourceStubAsync(int typeId) - { - return GetDiscoverySourceStubAsync(typeId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Discovery Source Stub - /// Discovery Source Type ID - /// Discovery Source Stub - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDiscoverySourceStubAsync(int typeId, System.Threading.CancellationToken cancellationToken) - { - if (typeId == null) - throw new System.ArgumentNullException("typeId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/stub/{typeId}"); - urlBuilder_.Replace("{typeId}", System.Uri.EscapeDataString(ConvertToString(typeId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Discovery Configuration - /// Discovery Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetDiscoveryConfigurationAsync() - { - return GetDiscoveryConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Discovery Configuration - /// Discovery Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDiscoveryConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update discovery configuration - /// args - /// The updated discovery configuration - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateDiscoveryConfigurationAsync(DiscoveryConfigurationUpdateArgs args) - { - return UpdateDiscoveryConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update discovery configuration - /// args - /// The updated discovery configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateDiscoveryConfigurationAsync(DiscoveryConfigurationUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Discovery Status - /// Discovery Status - /// A server side error occurred. - public System.Threading.Tasks.Task GetDiscoveryStatusAsync() - { - return GetDiscoveryStatusAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Discovery Status - /// Discovery Status - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDiscoveryStatusAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/status"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Discovery Source Available Scanners - /// discoverySourceId - /// Discovery Scanner Types - /// A server side error occurred. - public System.Threading.Tasks.Task> GetAvailableDiscoverySourceScannersAsync(int discoverySourceId) - { - return GetAvailableDiscoverySourceScannersAsync(discoverySourceId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Discovery Source Available Scanners - /// discoverySourceId - /// Discovery Scanner Types - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetAvailableDiscoverySourceScannersAsync(int discoverySourceId, System.Threading.CancellationToken cancellationToken) - { - if (discoverySourceId == null) - throw new System.ArgumentNullException("discoverySourceId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{discoverySourceId}/available-scanners"); - urlBuilder_.Replace("{discoverySourceId}", System.Uri.EscapeDataString(ConvertToString(discoverySourceId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Scanner Settings - /// discoverySourceId - /// Collection of scanner settings - /// A server side error occurred. - public System.Threading.Tasks.Task> SearchDiscoverySourceScannerSettingsAsync(int discoverySourceId) - { - return SearchDiscoverySourceScannerSettingsAsync(discoverySourceId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Scanner Settings - /// discoverySourceId - /// Collection of scanner settings - /// A server side error occurred. - public async System.Threading.Tasks.Task> SearchDiscoverySourceScannerSettingsAsync(int discoverySourceId, System.Threading.CancellationToken cancellationToken) - { - if (discoverySourceId == null) - throw new System.ArgumentNullException("discoverySourceId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{discoverySourceId}/scanner-settings/search"); - urlBuilder_.Replace("{discoverySourceId}", System.Uri.EscapeDataString(ConvertToString(discoverySourceId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Discovery Scan Types - /// Discovery Scan Types - /// A server side error occurred. - public System.Threading.Tasks.Task> GetScanTypesAsync() - { - return GetScanTypesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Discovery Scan Types - /// Discovery Scan Types - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetScanTypesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/scan-types"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Discovery Source Audits - /// DiscoverySourceId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Discovery Source Audits - /// A server side error occurred. - public System.Threading.Tasks.Task GetDiscoverySourceAuditsAsync(int? filter_discoverySourceId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetDiscoverySourceAuditsAsync(filter_discoverySourceId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Discovery Source Audits - /// DiscoverySourceId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Discovery Source Audits - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDiscoverySourceAuditsAsync(int? filter_discoverySourceId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery-source/audit?"); - if (filter_discoverySourceId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.discoverySourceId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_discoverySourceId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get and include or exclude for discovery - /// discoverySourceId - /// Only return items that can be included - /// Search for OU items containing this text - /// When include is false only include items within these exisitng IDs - /// The number of items to return - /// The Discovery OU - /// A server side error occurred. - public System.Threading.Tasks.Task> SearchForDomainOuAsync(int discoverySourceId, bool? include, string searchText, System.Collections.Generic.IEnumerable selectedIds, int? take) - { - return SearchForDomainOuAsync(discoverySourceId, include, searchText, selectedIds, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get and include or exclude for discovery - /// discoverySourceId - /// Only return items that can be included - /// Search for OU items containing this text - /// When include is false only include items within these exisitng IDs - /// The number of items to return - /// The Discovery OU - /// A server side error occurred. - public async System.Threading.Tasks.Task> SearchForDomainOuAsync(int discoverySourceId, bool? include, string searchText, System.Collections.Generic.IEnumerable selectedIds, int? take, System.Threading.CancellationToken cancellationToken) - { - if (discoverySourceId == null) - throw new System.ArgumentNullException("discoverySourceId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{discoverySourceId}/ou?"); - urlBuilder_.Replace("{discoverySourceId}", System.Uri.EscapeDataString(ConvertToString(discoverySourceId, System.Globalization.CultureInfo.InvariantCulture))); - if (include != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("include") + "=").Append(System.Uri.EscapeDataString(ConvertToString(include, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (selectedIds != null) - { - foreach (var item_ in selectedIds) { urlBuilder_.Append(System.Uri.EscapeDataString("selectedIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get the source filter for a discovery source - /// id - /// The source filter for a discovery source - /// A server side error occurred. - public System.Threading.Tasks.Task GetDiscoverySourceFilterAsync(int id) - { - return GetDiscoverySourceFilterAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the source filter for a discovery source - /// id - /// The source filter for a discovery source - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDiscoverySourceFilterAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{id}/filter"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patches discovery source filter - /// args - /// memberId - /// True - /// A server side error occurred. - public System.Threading.Tasks.Task PatchDiscoverySourceFilterAsync(DiscoverySourceFilterPatchArgs args, int memberId) - { - return PatchDiscoverySourceFilterAsync(args, memberId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patches discovery source filter - /// args - /// memberId - /// True - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchDiscoverySourceFilterAsync(DiscoverySourceFilterPatchArgs args, int memberId, System.Threading.CancellationToken cancellationToken) - { - if (memberId == null) - throw new System.ArgumentNullException("memberId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{discoverySourceId}/filter/{memberId}"); - urlBuilder_.Replace("{memberId}", System.Uri.EscapeDataString(ConvertToString(memberId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a new discovery source - /// args - /// The new discovery source - /// A server side error occurred. - public System.Threading.Tasks.Task CreateDiscoverySourceAsync(DiscoverySourceCreateArgs args) - { - return CreateDiscoverySourceAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a new discovery source - /// args - /// The new discovery source - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateDiscoverySourceAsync(DiscoverySourceCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Run a discovery command - /// args - /// true to indicate the command was triggered - /// A server side error occurred. - public System.Threading.Tasks.Task RunDiscoveryNowAsync(DiscoveryRunArgs args) - { - return RunDiscoveryNowAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Run a discovery command - /// args - /// true to indicate the command was triggered - /// A server side error occurred. - public async System.Threading.Tasks.Task RunDiscoveryNowAsync(DiscoveryRunArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/run"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create scanner setting - /// args - /// discoverySourceId - /// New scanner setting - /// A server side error occurred. - public System.Threading.Tasks.Task CreateDiscoverySourceScannerSettingsAsync(DiscoveryScannerSettingCreateArgs args, int discoverySourceId) - { - return CreateDiscoverySourceScannerSettingsAsync(args, discoverySourceId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create scanner setting - /// args - /// discoverySourceId - /// New scanner setting - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateDiscoverySourceScannerSettingsAsync(DiscoveryScannerSettingCreateArgs args, int discoverySourceId, System.Threading.CancellationToken cancellationToken) - { - if (discoverySourceId == null) - throw new System.ArgumentNullException("discoverySourceId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{discoverySourceId}/scanner-settings"); - urlBuilder_.Replace("{discoverySourceId}", System.Uri.EscapeDataString(ConvertToString(discoverySourceId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Updates discovery source filters - /// args - /// discoverySourceId - /// The source filter for a discovery source - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateDiscoverySourceFiltersAsync(DiscoverySourceFiltersUpdateArgs args, int discoverySourceId) - { - return UpdateDiscoverySourceFiltersAsync(args, discoverySourceId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates discovery source filters - /// args - /// discoverySourceId - /// The source filter for a discovery source - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateDiscoverySourceFiltersAsync(DiscoverySourceFiltersUpdateArgs args, int discoverySourceId, System.Threading.CancellationToken cancellationToken) - { - if (discoverySourceId == null) - throw new System.ArgumentNullException("discoverySourceId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/discovery/source/{discoverySourceId}/filters"); - urlBuilder_.Replace("{discoverySourceId}", System.Uri.EscapeDataString(ConvertToString(discoverySourceId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DistributedEngineServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DistributedEngineServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Distributed Engine Configuration - /// Distributed Engines Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetDistributedEngineConfigurationAsync() - { - return GetDistributedEngineConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Distributed Engine Configuration - /// Distributed Engines Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDistributedEngineConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Distributed Engine Configuration - /// args - /// Updated Distributed Engine Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchDistributedEngineConfigurationAsync(DistributedEngineConfigurationUpdateArgs args) - { - return PatchDistributedEngineConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Distributed Engine Configuration - /// args - /// Updated Distributed Engine Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchDistributedEngineConfigurationAsync(DistributedEngineConfigurationUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Site Connectors - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Site Connectors that matched - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSiteConnectorsAsync(bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSiteConnectorsAsync(filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Site Connectors - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Site Connectors that matched - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSiteConnectorsAsync(bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site-connectors?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Site Connector - /// id - /// Site Connector if found - /// A server side error occurred. - public System.Threading.Tasks.Task GetSiteConnectorAsync(int id) - { - return GetSiteConnectorAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Site Connector - /// id - /// Site Connector if found - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSiteConnectorAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site-connector/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Site Connector - /// args - /// id - /// Updated Site Connector object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSiteConnectorAsync(SiteConnectorUpdateArgs args, int id) - { - return UpdateSiteConnectorAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Site Connector - /// args - /// id - /// Updated Site Connector object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSiteConnectorAsync(SiteConnectorUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site-connector/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Site Connector Stub - /// QueueType - /// Stub of a Site Connector model - /// A server side error occurred. - public System.Threading.Tasks.Task GetSiteConnectorStubAsync(string queueType) - { - return GetSiteConnectorStubAsync(queueType, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Site Connector Stub - /// QueueType - /// Stub of a Site Connector model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSiteConnectorStubAsync(string queueType, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site-connector/stub?"); - if (queueType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("queueType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(queueType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Site Connector Credentials - /// siteConnectorId - /// Site Connector Credentials - /// A server side error occurred. - public System.Threading.Tasks.Task GetSiteConnectorCredentialsAsync(int siteConnectorId) - { - return GetSiteConnectorCredentialsAsync(siteConnectorId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Site Connector Credentials - /// siteConnectorId - /// Site Connector Credentials - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSiteConnectorCredentialsAsync(int siteConnectorId, System.Threading.CancellationToken cancellationToken) - { - if (siteConnectorId == null) - throw new System.ArgumentNullException("siteConnectorId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site-connector/{siteConnectorId}/credentials"); - urlBuilder_.Replace("{siteConnectorId}", System.Uri.EscapeDataString(ConvertToString(siteConnectorId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Engines - /// Only return engines with this activation status - /// Only return engines with this connection status - /// Only return engines with a friendly name that contains this text - /// Only include engines that require action. For example, pending but not deleted or no site assigned. - /// Only return engines for this site - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Engines that matched - /// A server side error occurred. - public System.Threading.Tasks.Task SearchEnginesAsync(string filter_activationStatus, string filter_connectionStatus, string filter_friendlyName, bool? filter_onlyIncludeRequiringAction, int? filter_siteId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchEnginesAsync(filter_activationStatus, filter_connectionStatus, filter_friendlyName, filter_onlyIncludeRequiringAction, filter_siteId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Engines - /// Only return engines with this activation status - /// Only return engines with this connection status - /// Only return engines with a friendly name that contains this text - /// Only include engines that require action. For example, pending but not deleted or no site assigned. - /// Only return engines for this site - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Engines that matched - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchEnginesAsync(string filter_activationStatus, string filter_connectionStatus, string filter_friendlyName, bool? filter_onlyIncludeRequiringAction, int? filter_siteId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/engines?"); - if (filter_activationStatus != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.activationStatus") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_activationStatus, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_connectionStatus != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.connectionStatus") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_connectionStatus, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_friendlyName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.friendlyName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_friendlyName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlyIncludeRequiringAction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlyIncludeRequiringAction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlyIncludeRequiringAction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_siteId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.siteId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_siteId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Sites - /// Include inactive sites - /// When true metrics are included for returned sites such as how many inactive or active sites - /// Only returns sites that can have new engines added - /// Return the site with this ID - /// Return sites that partially match this name - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Sites that matched - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSitesAsync(bool? filter_includeInactive, bool? filter_includeSiteMetrics, bool? filter_onlyIncludeSitesThatCanAddNewEngines, int? filter_siteId, string filter_siteName, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSitesAsync(filter_includeInactive, filter_includeSiteMetrics, filter_onlyIncludeSitesThatCanAddNewEngines, filter_siteId, filter_siteName, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Sites - /// Include inactive sites - /// When true metrics are included for returned sites such as how many inactive or active sites - /// Only returns sites that can have new engines added - /// Return the site with this ID - /// Return sites that partially match this name - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Sites that matched - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSitesAsync(bool? filter_includeInactive, bool? filter_includeSiteMetrics, bool? filter_onlyIncludeSitesThatCanAddNewEngines, int? filter_siteId, string filter_siteName, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/sites?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeSiteMetrics != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeSiteMetrics") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeSiteMetrics, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlyIncludeSitesThatCanAddNewEngines != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlyIncludeSitesThatCanAddNewEngines") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlyIncludeSitesThatCanAddNewEngines, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_siteId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.siteId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_siteId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_siteName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.siteName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_siteName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Site - /// id - /// Site if found - /// A server side error occurred. - public System.Threading.Tasks.Task GetSiteAsync(int id) - { - return GetSiteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Site - /// id - /// Site if found - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSiteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Site - /// args - /// id - /// Patch Site object - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSiteAsync(SiteUpdateArgs args, int id) - { - return PatchSiteAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Site - /// args - /// id - /// Patch Site object - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSiteAsync(SiteUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Site Stub - /// Stub of a Site model - /// A server side error occurred. - public System.Threading.Tasks.Task GetSiteStubAsync() - { - return GetSiteStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Site Stub - /// Stub of a Site model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSiteStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// GetSiteAudits - /// id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged List of Audits - /// A server side error occurred. - public System.Threading.Tasks.Task GetSiteAuditsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetSiteAuditsAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// GetSiteAudits - /// id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged List of Audits - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSiteAuditsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site/{id}/audit?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// SearchSiteLogs - /// id - /// Filter by a specific engine ID - /// Term used to search the Engine Name and/or the Message of the Site Log - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged List of Logs - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSiteLogsAsync(int id, int? filter_engineId, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSiteLogsAsync(id, filter_engineId, filter_searchTerm, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// SearchSiteLogs - /// id - /// Filter by a specific engine ID - /// Term used to search the Engine Name and/or the Message of the Site Log - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged List of Logs - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSiteLogsAsync(int id, int? filter_engineId, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site/{id}/logs?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_engineId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.engineId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_engineId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchTerm != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchTerm") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchTerm, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Download Memory MQ - /// id - /// MemoryMQ File Download - /// A server side error occurred. - public System.Threading.Tasks.Task DownloadMemoryMqAsync(int id) - { - return DownloadMemoryMqAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Download Memory MQ - /// id - /// MemoryMQ File Download - /// A server side error occurred. - public async System.Threading.Tasks.Task DownloadMemoryMqAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site-connector/{id}/download-memorymq"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Server Capabilities - /// id - /// Returns the server capabilities of an engine's server - /// A server side error occurred. - public System.Threading.Tasks.Task> GetServerCapabilitiesAsync(int id) - { - return GetServerCapabilitiesAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Server Capabilities - /// id - /// Returns the server capabilities of an engine's server - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetServerCapabilitiesAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/{id}/server-capabilities"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Download Distributed Engine - /// is64Bit - /// siteId - /// DistributedEngine File Download - /// A server side error occurred. - public System.Threading.Tasks.Task DownloadDistributedEngineAsync(bool is64Bit, int siteId) - { - return DownloadDistributedEngineAsync(is64Bit, siteId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Download Distributed Engine - /// is64Bit - /// siteId - /// DistributedEngine File Download - /// A server side error occurred. - public async System.Threading.Tasks.Task DownloadDistributedEngineAsync(bool is64Bit, int siteId, System.Threading.CancellationToken cancellationToken) - { - if (is64Bit == null) - throw new System.ArgumentNullException("is64Bit"); - - if (siteId == null) - throw new System.ArgumentNullException("siteId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/download-distributed-engine"); - urlBuilder_.Replace("{is64Bit}", System.Uri.EscapeDataString(ConvertToString(is64Bit, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{siteId}", System.Uri.EscapeDataString(ConvertToString(siteId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Site Connector - /// args - /// Site Connector object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateSiteConnectorAsync(SiteConnectorCreateArgs args) - { - return CreateSiteConnectorAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Site Connector - /// args - /// Site Connector object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateSiteConnectorAsync(SiteConnectorCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site-connector"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Validate Site Connector - /// siteConnectorId - /// Site Connector validation result - /// A server side error occurred. - public System.Threading.Tasks.Task ValidateSiteConnectorAsync(int siteConnectorId) - { - return ValidateSiteConnectorAsync(siteConnectorId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Validate Site Connector - /// siteConnectorId - /// Site Connector validation result - /// A server side error occurred. - public async System.Threading.Tasks.Task ValidateSiteConnectorAsync(int siteConnectorId, System.Threading.CancellationToken cancellationToken) - { - if (siteConnectorId == null) - throw new System.ArgumentNullException("siteConnectorId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site-connector/{siteConnectorId}/validate"); - urlBuilder_.Replace("{siteConnectorId}", System.Uri.EscapeDataString(ConvertToString(siteConnectorId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Activate Engine - /// args - /// Engine Activation Result Model - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEngineStatusAsync(EngineActivationRequestArgs args) - { - return UpdateEngineStatusAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Activate Engine - /// args - /// Engine Activation Result Model - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEngineStatusAsync(EngineActivationRequestArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/update-engine-status"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Site - /// args - /// Site object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateSiteAsync(SiteCreateArgs args) - { - return CreateSiteAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Site - /// args - /// Site object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateSiteAsync(SiteCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Reassign Secrets From the Site - /// args - /// id - /// The site model - /// A server side error occurred. - public System.Threading.Tasks.Task ReassignSecretsAsync(ReassignSecretsArgs args, int id) - { - return ReassignSecretsAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Reassign Secrets From the Site - /// args - /// id - /// The site model - /// A server side error occurred. - public async System.Threading.Tasks.Task ReassignSecretsAsync(ReassignSecretsArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/distributed-engine/site/{id}/reassign"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DomainNameIndexServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DomainNameIndexServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Delete all domain name index records - /// Delete success - /// A server side error occurred. - public System.Threading.Tasks.Task TruncateDomainNameIndexAsync() - { - return TruncateDomainNameIndexAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete all domain name index records - /// Delete success - /// A server side error occurred. - public async System.Threading.Tasks.Task TruncateDomainNameIndexAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/domain-index/delete-all"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a domain name index - /// DiscoverySourceIdScanned - /// DomainName - /// DomainResolveType - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The Domain Name Index View - /// A server side error occurred. - public System.Threading.Tasks.Task GetDomainNameIndexAsync(int? filter_discoverySourceIdScanned, string filter_domainName, string filter_domainResolveType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetDomainNameIndexAsync(filter_discoverySourceIdScanned, filter_domainName, filter_domainResolveType, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a domain name index - /// DiscoverySourceIdScanned - /// DomainName - /// DomainResolveType - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The Domain Name Index View - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDomainNameIndexAsync(int? filter_discoverySourceIdScanned, string filter_domainName, string filter_domainResolveType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/domain-index?"); - if (filter_discoverySourceIdScanned != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.discoverySourceIdScanned") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_discoverySourceIdScanned, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_domainName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.domainName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_domainName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_domainResolveType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.domainResolveType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_domainResolveType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a domain name index - /// args - /// Domain Name Index ID - /// The updated domain name index - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateDomainNameIndexAsync(DomainNameIndexUpdateArgs args, int id) - { - return UpdateDomainNameIndexAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a domain name index - /// args - /// Domain Name Index ID - /// The updated domain name index - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateDomainNameIndexAsync(DomainNameIndexUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/domain-index/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a new domain name index - /// args - /// The new domain name index - /// A server side error occurred. - public System.Threading.Tasks.Task CreateDomainNameIndexAsync(DomainNameIndexCreateArgs args) - { - return CreateDomainNameIndexAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a new domain name index - /// args - /// The new domain name index - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateDomainNameIndexAsync(DomainNameIndexCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/domain-index/create"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Expire a domain name index - /// Domain Name Index ID - /// The updated domain name index - /// A server side error occurred. - public System.Threading.Tasks.Task ExpireSingleDomainNameIndexAsync(int id) - { - return ExpireSingleDomainNameIndexAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Expire a domain name index - /// Domain Name Index ID - /// The updated domain name index - /// A server side error occurred. - public async System.Threading.Tasks.Task ExpireSingleDomainNameIndexAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/domain-index/expire/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Expire all domain name index records - /// args - /// Expire success - /// A server side error occurred. - public System.Threading.Tasks.Task ExpireAllDomainNameIndexAsync(DomainNameIndexExpireUpdateArgs args) - { - return ExpireAllDomainNameIndexAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Expire all domain name index records - /// args - /// Expire success - /// A server side error occurred. - public async System.Threading.Tasks.Task ExpireAllDomainNameIndexAsync(DomainNameIndexExpireUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/domain-index/expire-all"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete a domain name index - /// Delete success - /// Delete success - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteSingleDomainNameIndexAsync(int id) - { - return DeleteSingleDomainNameIndexAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete a domain name index - /// Delete success - /// Delete success - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteSingleDomainNameIndexAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/domain-index/delete/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DualControlsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DualControlsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Dual Control - /// Dual control ID - /// Dual control object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(int id) - { - return GetAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Dual Control - /// Dual control ID - /// Dual control object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Dual Control - /// Dual control update options - /// Dual control ID - /// Dual control object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(DualControlUpdateArgs args, int id) - { - return UpdateAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Dual Control - /// Dual control update options - /// Dual control ID - /// Dual control object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(DualControlUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Dual Control - /// Dual control ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Dual Control - /// Dual control ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get dual control state for the current item - /// dualControlType - /// id - /// Dual Control State - /// A server side error occurred. - public System.Threading.Tasks.Task GetAllReportsAsync(string dualControlType, int id) - { - return GetAllReportsAsync(dualControlType, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get dual control state for the current item - /// dualControlType - /// id - /// Dual Control State - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllReportsAsync(string dualControlType, int id, System.Threading.CancellationToken cancellationToken) - { - if (dualControlType == null) - throw new System.ArgumentNullException("dualControlType"); - - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls/state/{dualControlType}/{id}"); - urlBuilder_.Replace("{dualControlType}", System.Uri.EscapeDataString(ConvertToString(dualControlType, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Dual Controls - /// Whether to include inactive items - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Dual control search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchDualControlsAsync(bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchDualControlsAsync(filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Dual Controls - /// Whether to include inactive items - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Dual control search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchDualControlsAsync(bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Dual Control - /// Dual control creation options - /// Dual control object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateAsync(DualControlCreateArgs args) - { - return CreateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Dual Control - /// Dual control creation options - /// Dual control object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateAsync(DualControlCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Dual Control Types - /// Dual control type objects - /// A server side error occurred. - public System.Threading.Tasks.Task> GetTypesAsync() - { - return GetTypesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Dual Control Types - /// Dual control type objects - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetTypesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls/types"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Dual Control Stub - /// Dual control object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Dual Control Stub - /// Dual control object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Authorize a dual control - /// args - /// dualControlType - /// id - /// Dual control authorization result - /// A server side error occurred. - public System.Threading.Tasks.Task AuthorizeDualControlAsync(DualControlAuthArgs args, string dualControlType, int id) - { - return AuthorizeDualControlAsync(args, dualControlType, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Authorize a dual control - /// args - /// dualControlType - /// id - /// Dual control authorization result - /// A server side error occurred. - public async System.Threading.Tasks.Task AuthorizeDualControlAsync(DualControlAuthArgs args, string dualControlType, int id, System.Threading.CancellationToken cancellationToken) - { - if (dualControlType == null) - throw new System.ArgumentNullException("dualControlType"); - - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/dual-controls/auth/{dualControlType}/{id}"); - urlBuilder_.Replace("{dualControlType}", System.Uri.EscapeDataString(ConvertToString(dualControlType, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class EnterpriseServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public EnterpriseServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// GetRequestData - /// requestId - /// EnterpriseSummaryModel for given TaskId - /// A server side error occurred. - public System.Threading.Tasks.Task GetRequestDataAsync(int requestId) - { - return GetRequestDataAsync(requestId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// GetRequestData - /// requestId - /// EnterpriseSummaryModel for given TaskId - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRequestDataAsync(int requestId, System.Threading.CancellationToken cancellationToken) - { - if (requestId == null) - throw new System.ArgumentNullException("requestId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/enterprise/search-request/{requestId}"); - urlBuilder_.Replace("{requestId}", System.Uri.EscapeDataString(ConvertToString(requestId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Request Enterprise Data - /// args - /// Model of request - /// A server side error occurred. - public System.Threading.Tasks.Task SearchRequestDataAsync(object args) - { - return SearchRequestDataAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Request Enterprise Data - /// args - /// Model of request - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchRequestDataAsync(object args, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/enterprise/search-request"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class EventPipelineAuditServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public EventPipelineAuditServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Pipeline / Policy Audits - /// EventPipelinePolicyId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paged list of audit entries - /// A server side error occurred. - public System.Threading.Tasks.Task GetAllPipelineAndPolicyAuditsAsync(int? filter_eventPipelinePolicyId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAllPipelineAndPolicyAuditsAsync(filter_eventPipelinePolicyId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Pipeline / Policy Audits - /// EventPipelinePolicyId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paged list of audit entries - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllPipelineAndPolicyAuditsAsync(int? filter_eventPipelinePolicyId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-audit?"); - if (filter_eventPipelinePolicyId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class EventPipelineServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public EventPipelineServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get an Event Pipeline - /// Event Pipeline ID - /// The Event Pipeline View - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelineAsync(int id) - { - return GetEventPipelineAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get an Event Pipeline - /// Event Pipeline ID - /// The Event Pipeline View - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelineAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update an Event Pipeline - /// args - /// Event Pipeline ID - /// The updated Event Pipeline - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEventPipelinesAsync(EventPipelineUpdateArgs args, int id) - { - return UpdateEventPipelinesAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update an Event Pipeline - /// args - /// Event Pipeline ID - /// The updated Event Pipeline - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEventPipelinesAsync(EventPipelineUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a list of Event Pipelines - /// EventEntityTypeId - /// EventPipelineName - /// EventPipelinePolicyId - /// IncludeActive - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list of Event Pipelines - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelinesAsync(int? filter_eventEntityTypeId, string filter_eventPipelineName, int? filter_eventPipelinePolicyId, bool? filter_includeActive, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetEventPipelinesAsync(filter_eventEntityTypeId, filter_eventPipelineName, filter_eventPipelinePolicyId, filter_includeActive, filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a list of Event Pipelines - /// EventEntityTypeId - /// EventPipelineName - /// EventPipelinePolicyId - /// IncludeActive - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list of Event Pipelines - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelinesAsync(int? filter_eventEntityTypeId, string filter_eventPipelineName, int? filter_eventPipelinePolicyId, bool? filter_includeActive, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/list?"); - if (filter_eventEntityTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventEntityTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventEntityTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_eventPipelineName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelineName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelineName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_eventPipelinePolicyId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get summaries of Event Pipelines - /// EventEntityTypeId - /// EventPipelineName - /// EventPipelinePolicyId - /// IncludeActive - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The summaries of Event Pipelines - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelineSummariesAsync(int? filter_eventEntityTypeId, string filter_eventPipelineName, int? filter_eventPipelinePolicyId, bool? filter_includeActive, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetEventPipelineSummariesAsync(filter_eventEntityTypeId, filter_eventPipelineName, filter_eventPipelinePolicyId, filter_includeActive, filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get summaries of Event Pipelines - /// EventEntityTypeId - /// EventPipelineName - /// EventPipelinePolicyId - /// IncludeActive - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The summaries of Event Pipelines - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelineSummariesAsync(int? filter_eventEntityTypeId, string filter_eventPipelineName, int? filter_eventPipelinePolicyId, bool? filter_includeActive, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/summaries?"); - if (filter_eventEntityTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventEntityTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventEntityTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_eventPipelineName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelineName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelineName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_eventPipelinePolicyId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Stub an empty Event Pipeline - /// An empty Event Pipeline - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelineStubAsync() - { - return GetEventPipelineStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Stub an empty Event Pipeline - /// An empty Event Pipeline - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelineStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Event Pipeline Runs - /// EventPipelineId - /// EventPipelinePolicyRunId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged list of pipeline runs - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelineRunsAsync(int? filter_eventPipelineId, System.Guid? filter_eventPipelinePolicyRunId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetEventPipelineRunsAsync(filter_eventPipelineId, filter_eventPipelinePolicyRunId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Event Pipeline Runs - /// EventPipelineId - /// EventPipelinePolicyRunId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged list of pipeline runs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelineRunsAsync(int? filter_eventPipelineId, System.Guid? filter_eventPipelinePolicyRunId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/runs?"); - if (filter_eventPipelineId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelineId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelineId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_eventPipelinePolicyRunId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyRunId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyRunId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a new Event Pipeline - /// args - /// The new Event Pipeline - /// A server side error occurred. - public System.Threading.Tasks.Task CreateEventPipelinesAsync(EventPipelineCreateArgs args) - { - return CreateEventPipelinesAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a new Event Pipeline - /// args - /// The new Event Pipeline - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateEventPipelinesAsync(EventPipelineCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Reorder an Event Pipeline - /// args - /// Event Pipeline Id - /// Event Pipeline Policy Map - /// A server side error occurred. - public System.Threading.Tasks.Task> ReorderPipelineAsync(EventPipelineOrderUpdateArgs args, int id) - { - return ReorderPipelineAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Reorder an Event Pipeline - /// args - /// Event Pipeline Id - /// Event Pipeline Policy Map - /// A server side error occurred. - public async System.Threading.Tasks.Task> ReorderPipelineAsync(EventPipelineOrderUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/{id}/order"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update an Event Pipeline active value - /// args - /// Event Pipeline Id - /// The Active value - /// A server side error occurred. - public System.Threading.Tasks.Task TogglePipelineActiveAsync(EventPipelineActivateUpdateArgs args, int id) - { - return TogglePipelineActiveAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update an Event Pipeline active value - /// args - /// Event Pipeline Id - /// The Active value - /// A server side error occurred. - public async System.Threading.Tasks.Task TogglePipelineActiveAsync(EventPipelineActivateUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/{id}/activate"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class EventPipelinePolicyServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public EventPipelinePolicyServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Remove Event Pipeline From Policy - /// Event Pipeline ID - /// Event Pipeline Policy ID - /// boolean indicating success - /// A server side error occurred. - public System.Threading.Tasks.Task RemoveEventPipelineFromPolicyAsync(int pipelineId, int policyId) - { - return RemoveEventPipelineFromPolicyAsync(pipelineId, policyId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Remove Event Pipeline From Policy - /// Event Pipeline ID - /// Event Pipeline Policy ID - /// boolean indicating success - /// A server side error occurred. - public async System.Threading.Tasks.Task RemoveEventPipelineFromPolicyAsync(int pipelineId, int policyId, System.Threading.CancellationToken cancellationToken) - { - if (pipelineId == null) - throw new System.ArgumentNullException("pipelineId"); - - if (policyId == null) - throw new System.ArgumentNullException("policyId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{policyId}/pipeline/{pipelineId}"); - urlBuilder_.Replace("{pipelineId}", System.Uri.EscapeDataString(ConvertToString(pipelineId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{policyId}", System.Uri.EscapeDataString(ConvertToString(policyId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Event Pipeline Policy - /// Event Pipeline Policy ID - /// Policy details - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelinePolicyAsync(int id) - { - return GetEventPipelinePolicyAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Event Pipeline Policy - /// Event Pipeline Policy ID - /// Policy details - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelinePolicyAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Event Pipeline Policy - /// args - /// Event Pipeline Policy ID - /// The update policy - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEventPipelinePolicyAsync(EventPipelinePolicyUpdateArgs args, int id) - { - return UpdateEventPipelinePolicyAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Event Pipeline Policy - /// args - /// Event Pipeline Policy ID - /// The update policy - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEventPipelinePolicyAsync(EventPipelinePolicyUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add Pipeline To Event Pipeline Policy - /// eventPipelinePolicyAddPipelineArgs - /// Event Pipeline Policy ID - /// Pipeline policy children - /// A server side error occurred. - public System.Threading.Tasks.Task AddPipelineToEventPipelinePolicyAsync(EventPipelinePolicyAddPipelineArgs eventPipelinePolicyAddPipelineArgs, int id) - { - return AddPipelineToEventPipelinePolicyAsync(eventPipelinePolicyAddPipelineArgs, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add Pipeline To Event Pipeline Policy - /// eventPipelinePolicyAddPipelineArgs - /// Event Pipeline Policy ID - /// Pipeline policy children - /// A server side error occurred. - public async System.Threading.Tasks.Task AddPipelineToEventPipelinePolicyAsync(EventPipelinePolicyAddPipelineArgs eventPipelinePolicyAddPipelineArgs, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(eventPipelinePolicyAddPipelineArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Event Pipeline Policies - /// EventPipelineId - /// EventPipelinePolicyName - /// FolderId - /// IncludeActive - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paged list of all policies - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelinePoliciesAsync(int? filter_eventPipelineId, string filter_eventPipelinePolicyName, int? filter_folderId, bool? filter_includeActive, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetEventPipelinePoliciesAsync(filter_eventPipelineId, filter_eventPipelinePolicyName, filter_folderId, filter_includeActive, filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Event Pipeline Policies - /// EventPipelineId - /// EventPipelinePolicyName - /// FolderId - /// IncludeActive - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paged list of all policies - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelinePoliciesAsync(int? filter_eventPipelineId, string filter_eventPipelinePolicyName, int? filter_folderId, bool? filter_includeActive, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/list?"); - if (filter_eventPipelineId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelineId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelineId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_eventPipelinePolicyName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_folderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Event Pipeline Policy Runs - /// EventPipelinePolicyId - /// EventPipelinePolicyRunId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged list of policy runs - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelinePolicyRunsAsync(int? filter_eventPipelinePolicyId, System.Guid? filter_eventPipelinePolicyRunId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetEventPipelinePolicyRunsAsync(filter_eventPipelinePolicyId, filter_eventPipelinePolicyRunId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Event Pipeline Policy Runs - /// EventPipelinePolicyId - /// EventPipelinePolicyRunId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged list of policy runs - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelinePolicyRunsAsync(int? filter_eventPipelinePolicyId, System.Guid? filter_eventPipelinePolicyRunId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/runs?"); - if (filter_eventPipelinePolicyId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_eventPipelinePolicyRunId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyRunId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyRunId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Event Pipeline Policy Run Activity - /// eventPipelineId - /// Event Pipeline Policy Run ID - /// Details for a specific run - /// A server side error occurred. - public System.Threading.Tasks.Task> GetEventPipelinePolicyRunActivityAsync(int eventPipelineId, System.Guid eventPipelinePolicyRunId) - { - return GetEventPipelinePolicyRunActivityAsync(eventPipelineId, eventPipelinePolicyRunId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Event Pipeline Policy Run Activity - /// eventPipelineId - /// Event Pipeline Policy Run ID - /// Details for a specific run - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetEventPipelinePolicyRunActivityAsync(int eventPipelineId, System.Guid eventPipelinePolicyRunId, System.Threading.CancellationToken cancellationToken) - { - if (eventPipelineId == null) - throw new System.ArgumentNullException("eventPipelineId"); - - if (eventPipelinePolicyRunId == null) - throw new System.ArgumentNullException("eventPipelinePolicyRunId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/activity"); - urlBuilder_.Replace("{eventPipelineId}", System.Uri.EscapeDataString(ConvertToString(eventPipelineId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{eventPipelinePolicyRunId}", System.Uri.EscapeDataString(ConvertToString(eventPipelinePolicyRunId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Policies For Pipeline Policies - /// Event Pipeline Policy ID - /// EventPipelinePolicyId - /// EventPipelinePolicyName - /// IncludeActive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged list of secret policies - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretPoliciesForPipelinePoliciesAsync(int id, int? filter_eventPipelinePolicyId, string filter_eventPipelinePolicyName, bool? filter_includeActive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetSecretPoliciesForPipelinePoliciesAsync(id, filter_eventPipelinePolicyId, filter_eventPipelinePolicyName, filter_includeActive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Policies For Pipeline Policies - /// Event Pipeline Policy ID - /// EventPipelinePolicyId - /// EventPipelinePolicyName - /// IncludeActive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged list of secret policies - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretPoliciesForPipelinePoliciesAsync(int id, int? filter_eventPipelinePolicyId, string filter_eventPipelinePolicyName, bool? filter_includeActive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/secretpolicies?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_eventPipelinePolicyId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_eventPipelinePolicyName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventPipelinePolicyName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventPipelinePolicyName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Folders For Pipeline Policies - /// Event Pipeline Policy ID - /// List of all folders to which this policy is applied - /// A server side error occurred. - public System.Threading.Tasks.Task> GetFoldersForPipelinePoliciesAsync(int id) - { - return GetFoldersForPipelinePoliciesAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Folders For Pipeline Policies - /// Event Pipeline Policy ID - /// List of all folders to which this policy is applied - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetFoldersForPipelinePoliciesAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/folders"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Event Pipeline Policy Folder Maps - /// eventPipelinePolicyFolderMaps - /// Event Pipeline Policy ID - /// boolean indicating success - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEventPipelinePolicyFolderMapsAsync(EventPipelinePolicyFolderMapUpdateArgs eventPipelinePolicyFolderMaps, int id) - { - return UpdateEventPipelinePolicyFolderMapsAsync(eventPipelinePolicyFolderMaps, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Event Pipeline Policy Folder Maps - /// eventPipelinePolicyFolderMaps - /// Event Pipeline Policy ID - /// boolean indicating success - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEventPipelinePolicyFolderMapsAsync(EventPipelinePolicyFolderMapUpdateArgs eventPipelinePolicyFolderMaps, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/folders"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(eventPipelinePolicyFolderMaps, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Groups For Pipeline Policies - /// Event Pipeline Policy ID - /// List of all groups - /// A server side error occurred. - public System.Threading.Tasks.Task> GetGroupsForPipelinePoliciesAsync(int id) - { - return GetGroupsForPipelinePoliciesAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Groups For Pipeline Policies - /// Event Pipeline Policy ID - /// List of all groups - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetGroupsForPipelinePoliciesAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/groups"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Event Pipeline Policy Group Maps - /// eventPipelinePolicyGroupMaps - /// Event Pipeline Policy ID - /// boolean indicating success - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEventPipelinePolicyGroupMapsAsync(EventPipelinePolicyGroupMapUpdateArgs eventPipelinePolicyGroupMaps, int id) - { - return UpdateEventPipelinePolicyGroupMapsAsync(eventPipelinePolicyGroupMaps, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Event Pipeline Policy Group Maps - /// eventPipelinePolicyGroupMaps - /// Event Pipeline Policy ID - /// boolean indicating success - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEventPipelinePolicyGroupMapsAsync(EventPipelinePolicyGroupMapUpdateArgs eventPipelinePolicyGroupMaps, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/groups"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(eventPipelinePolicyGroupMaps, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Group Count For Pipeline Policy - /// Event Pipeline Policy ID - /// Number of groups affected - /// A server side error occurred. - public System.Threading.Tasks.Task GetGroupCountForPipelinePolicyAsync(int id) - { - return GetGroupCountForPipelinePolicyAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Group Count For Pipeline Policy - /// Event Pipeline Policy ID - /// Number of groups affected - /// A server side error occurred. - public async System.Threading.Tasks.Task GetGroupCountForPipelinePolicyAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/groups/count"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Child Folder Data For Pipeline Policy Folder - /// Folder ID - /// Event Pipeline Policy ID - /// List of child data - /// A server side error occurred. - public System.Threading.Tasks.Task> GetChildFolderDataForPipelinePolicyFolderAsync(int folderId, int id) - { - return GetChildFolderDataForPipelinePolicyFolderAsync(folderId, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Child Folder Data For Pipeline Policy Folder - /// Folder ID - /// Event Pipeline Policy ID - /// List of child data - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetChildFolderDataForPipelinePolicyFolderAsync(int folderId, int id, System.Threading.CancellationToken cancellationToken) - { - if (folderId == null) - throw new System.ArgumentNullException("folderId"); - - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/folders/{folderId}/childdata"); - urlBuilder_.Replace("{folderId}", System.Uri.EscapeDataString(ConvertToString(folderId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Export Event Pipeline Policy - /// Event Pipeline Policy ID - /// the exported json of the policy - /// A server side error occurred. - public System.Threading.Tasks.Task ExportEventPipelinePolicyAsync(int id) - { - return ExportEventPipelinePolicyAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Export Event Pipeline Policy - /// Event Pipeline Policy ID - /// the exported json of the policy - /// A server side error occurred. - public async System.Threading.Tasks.Task ExportEventPipelinePolicyAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/export/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Pipeline Policy - /// eventPipelinePolicy - /// Newly created model - /// A server side error occurred. - public System.Threading.Tasks.Task CreateEventPipelinePolicyAsync(EventPipelinePolicyCreateArgs eventPipelinePolicy) - { - return CreateEventPipelinePolicyAsync(eventPipelinePolicy, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Pipeline Policy - /// eventPipelinePolicy - /// Newly created model - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateEventPipelinePolicyAsync(EventPipelinePolicyCreateArgs eventPipelinePolicy, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(eventPipelinePolicy, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Duplicate Event Pipeline Policy - /// importPolicy - /// The duplicated model - /// A server side error occurred. - public System.Threading.Tasks.Task DuplicateEventPipelinePolicyAsync(EventPipelinePolicyImportArgs importPolicy) - { - return DuplicateEventPipelinePolicyAsync(importPolicy, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Duplicate Event Pipeline Policy - /// importPolicy - /// The duplicated model - /// A server side error occurred. - public async System.Threading.Tasks.Task DuplicateEventPipelinePolicyAsync(EventPipelinePolicyImportArgs importPolicy, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/duplicate"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(importPolicy, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Import Event Pipeline Policy - /// importPolicy - /// The imported policy model - /// A server side error occurred. - public System.Threading.Tasks.Task ImportEventPipelinePolicyAsync(EventPipelinePolicyImportArgs importPolicy) - { - return ImportEventPipelinePolicyAsync(importPolicy, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Import Event Pipeline Policy - /// importPolicy - /// The imported policy model - /// A server side error occurred. - public async System.Threading.Tasks.Task ImportEventPipelinePolicyAsync(EventPipelinePolicyImportArgs importPolicy, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/import"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(importPolicy, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Event Pipeline Policy Sort Order - /// args - /// Event Pipeline Policy ID - /// updated policy - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEventPipelinePolicySortOrderAsync(EventPipelinePolicySortOrderUpdateArgs args, int id) - { - return UpdateEventPipelinePolicySortOrderAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Event Pipeline Policy Sort Order - /// args - /// Event Pipeline Policy ID - /// updated policy - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEventPipelinePolicySortOrderAsync(EventPipelinePolicySortOrderUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/order"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Activate Event Pipeline Policy - /// args - /// Event Pipeline Policy ID - /// boolean indicating success - /// A server side error occurred. - public System.Threading.Tasks.Task ActivateEventPipelinePolicyAsync(EventPipelinePolicyActivateArgs args, int id) - { - return ActivateEventPipelinePolicyAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Activate Event Pipeline Policy - /// args - /// Event Pipeline Policy ID - /// boolean indicating success - /// A server side error occurred. - public async System.Threading.Tasks.Task ActivateEventPipelinePolicyAsync(EventPipelinePolicyActivateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-policy/{id}/activate"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class EventPipelineSettingsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public EventPipelineSettingsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Event Pipeline Tasks - /// EventActionId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged list of tasks - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelineTasksAsync(int? filter_eventActionId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetEventPipelineTasksAsync(filter_eventActionId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Event Pipeline Tasks - /// EventActionId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged list of tasks - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelineTasksAsync(int? filter_eventActionId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-settings/task/list?"); - if (filter_eventActionId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.eventActionId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_eventActionId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Event Pipeline Task Settings - /// Event Pipeline Task ID - /// Pipeline task settings - /// A server side error occurred. - public System.Threading.Tasks.Task> GetEventPipelineTaskSettingsAsync(int id) - { - return GetEventPipelineTaskSettingsAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Event Pipeline Task Settings - /// Event Pipeline Task ID - /// Pipeline task settings - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetEventPipelineTaskSettingsAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-settings/task-settings/list/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Event Pipeline Filter Settings - /// Event Pipeline Filter ID - /// filter settings - /// A server side error occurred. - public System.Threading.Tasks.Task> GetEventPipelineFilterSettingsAsync(int? id) - { - return GetEventPipelineFilterSettingsAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Event Pipeline Filter Settings - /// Event Pipeline Filter ID - /// filter settings - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetEventPipelineFilterSettingsAsync(int? id, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-settings/filter-settings/list/{id}?"); - if (id != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("id") + "=").Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Pipeline Task Options - /// eventEntityTypeId - /// List of task options - /// A server side error occurred. - public System.Threading.Tasks.Task> GetPipelineTaskOptionsAsync(int eventEntityTypeId) - { - return GetPipelineTaskOptionsAsync(eventEntityTypeId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Pipeline Task Options - /// eventEntityTypeId - /// List of task options - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetPipelineTaskOptionsAsync(int eventEntityTypeId, System.Threading.CancellationToken cancellationToken) - { - if (eventEntityTypeId == null) - throw new System.ArgumentNullException("eventEntityTypeId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-settings/tasks/options"); - urlBuilder_.Replace("{eventEntityTypeId}", System.Uri.EscapeDataString(ConvertToString(eventEntityTypeId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Pipeline Filter Options - /// eventEntityTypeId - /// List of filter options - /// A server side error occurred. - public System.Threading.Tasks.Task> GetPipelineFilterOptionsAsync(int eventEntityTypeId) - { - return GetPipelineFilterOptionsAsync(eventEntityTypeId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Pipeline Filter Options - /// eventEntityTypeId - /// List of filter options - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetPipelineFilterOptionsAsync(int eventEntityTypeId, System.Threading.CancellationToken cancellationToken) - { - if (eventEntityTypeId == null) - throw new System.ArgumentNullException("eventEntityTypeId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline-settings/filter/options"); - urlBuilder_.Replace("{eventEntityTypeId}", System.Uri.EscapeDataString(ConvertToString(eventEntityTypeId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class EventPipelineTriggerServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public EventPipelineTriggerServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get the triggers for an Event Pipeline - /// Event Pipeline ID - /// The list of Event Pipeline Triggers - /// A server side error occurred. - public System.Threading.Tasks.Task> GetEventPipelineTriggersAsync(int id) - { - return GetEventPipelineTriggersAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the triggers for an Event Pipeline - /// Event Pipeline ID - /// The list of Event Pipeline Triggers - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetEventPipelineTriggersAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/{id}/trigger"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Stub an Event Pipeline Trigger - /// The empty Event Pipeline Trigger - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventPipelineStubAsync() - { - return GetEventPipelineStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Stub an Event Pipeline Trigger - /// The empty Event Pipeline Trigger - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventPipelineStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/trigger/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Pipeline Trigger Options - /// eventEntityTypeId - /// List of triggers - /// A server side error occurred. - public System.Threading.Tasks.Task> GetEventPipelineTriggerOptionsAsync(int eventEntityTypeId) - { - return GetEventPipelineTriggerOptionsAsync(eventEntityTypeId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Pipeline Trigger Options - /// eventEntityTypeId - /// List of triggers - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetEventPipelineTriggerOptionsAsync(int eventEntityTypeId, System.Threading.CancellationToken cancellationToken) - { - if (eventEntityTypeId == null) - throw new System.ArgumentNullException("eventEntityTypeId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-pipeline/trigger/options"); - urlBuilder_.Replace("{eventEntityTypeId}", System.Uri.EscapeDataString(ConvertToString(eventEntityTypeId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class EventSubscriptionsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public EventSubscriptionsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get an empty event subscription - /// An empty event subscription - /// A server side error occurred. - public System.Threading.Tasks.Task GetSubscriptionStubAsync() - { - return GetSubscriptionStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get an empty event subscription - /// An empty event subscription - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSubscriptionStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-subscriptions/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get an Event Subscription Types and Actions - /// The Event Subscription Types and Actions View - /// A server side error occurred. - public System.Threading.Tasks.Task> GetSubscriptionEntityTypesAsync() - { - return GetSubscriptionEntityTypesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get an Event Subscription Types and Actions - /// The Event Subscription Types and Actions View - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetSubscriptionEntityTypesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-subscriptions/event-types"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search event subscriptions - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// event subscriptions results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchEventSubscriptionsAsync(bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchEventSubscriptionsAsync(filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search event subscriptions - /// IncludeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// event subscriptions results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchEventSubscriptionsAsync(bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-subscriptions?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create event subscription - /// args - /// Details for a specific event subscription - /// A server side error occurred. - public System.Threading.Tasks.Task CreateEventSubscriptionAsync(EventSubscriptionCreateArgs args) - { - return CreateEventSubscriptionAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create event subscription - /// args - /// Details for a specific event subscription - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateEventSubscriptionAsync(EventSubscriptionCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-subscriptions"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// event subscription - /// eventSubscriptionId - /// Details for a specific event subscription - /// A server side error occurred. - public System.Threading.Tasks.Task GetEventSubscriptionAsync(int eventSubscriptionId) - { - return GetEventSubscriptionAsync(eventSubscriptionId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// event subscription - /// eventSubscriptionId - /// Details for a specific event subscription - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEventSubscriptionAsync(int eventSubscriptionId, System.Threading.CancellationToken cancellationToken) - { - if (eventSubscriptionId == null) - throw new System.ArgumentNullException("eventSubscriptionId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-subscriptions/{eventSubscriptionId}"); - urlBuilder_.Replace("{eventSubscriptionId}", System.Uri.EscapeDataString(ConvertToString(eventSubscriptionId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update event subscription - /// args - /// eventSubscriptionId - /// Details for a specific event subscription - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEventSubscriptionAsync(EventSubscriptionUpdateArgs args, int eventSubscriptionId) - { - return UpdateEventSubscriptionAsync(args, eventSubscriptionId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update event subscription - /// args - /// eventSubscriptionId - /// Details for a specific event subscription - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEventSubscriptionAsync(EventSubscriptionUpdateArgs args, int eventSubscriptionId, System.Threading.CancellationToken cancellationToken) - { - if (eventSubscriptionId == null) - throw new System.ArgumentNullException("eventSubscriptionId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/event-subscriptions/{eventSubscriptionId}"); - urlBuilder_.Replace("{eventSubscriptionId}", System.Uri.EscapeDataString(ConvertToString(eventSubscriptionId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ExtendedFieldsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ExtendedFieldsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Extended Regex values by Secret - /// secretId - /// Regex Values Summary - /// A server side error occurred. - public System.Threading.Tasks.Task GetRegexBySecretAsync(int secretId) - { - return GetRegexBySecretAsync(secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Extended Regex values by Secret - /// secretId - /// Regex Values Summary - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRegexBySecretAsync(int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/extended-fields/regex/{secretId}"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class FolderPermissionsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public FolderPermissionsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Folder Permission - /// Whether to include inactive folder permissions in the results - /// Folder permission ID - /// Folder permission object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(bool? includeInactive, int id) - { - return GetAsync(includeInactive, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Folder Permission - /// Whether to include inactive folder permissions in the results - /// Folder permission ID - /// Folder permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(bool? includeInactive, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folder-permissions/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Folder Permission - /// Folder permission update options - /// Folder permission ID - /// Folder permission object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(FolderPermissionUpdateArgs args, int id) - { - return UpdateAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Folder Permission - /// Folder permission update options - /// Folder permission ID - /// Folder permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(FolderPermissionUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folder-permissions/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Folder Permission - /// Include to remove permission inheritance - /// Folder permission ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(bool? breakInheritance, int id) - { - return DeleteAsync(breakInheritance, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Folder Permission - /// Include to remove permission inheritance - /// Folder permission ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(bool? breakInheritance, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folder-permissions/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (breakInheritance != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("breakInheritance") + "=").Append(System.Uri.EscapeDataString(ConvertToString(breakInheritance, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Folder Permissions - /// Limit results to a certain folder - /// Limit results to a certain group - /// Limit results to a certain user - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Folder permission search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(int? filter_folderId, int? filter_groupId, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_folderId, filter_groupId, filter_userId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Folder Permissions - /// Limit results to a certain folder - /// Limit results to a certain group - /// Limit results to a certain user - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Folder permission search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(int? filter_folderId, int? filter_groupId, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folder-permissions?"); - if (filter_folderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_groupId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.groupId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_groupId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Folder Permission - /// Folder permission creation options - /// Folder permission object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateAsync(FolderPermissionCreateArgs args) - { - return CreateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Folder Permission - /// Folder permission creation options - /// Folder permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateAsync(FolderPermissionCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folder-permissions"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Folder Permission Stub - /// Folder for which to generate a permission stub - /// Folder permission object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync(int folderId) - { - return StubAsync(folderId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Folder Permission Stub - /// Folder for which to generate a permission stub - /// Folder permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(int folderId, System.Threading.CancellationToken cancellationToken) - { - if (folderId == null) - throw new System.ArgumentNullException("folderId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folder-permissions/stub?"); - urlBuilder_.Append(System.Uri.EscapeDataString("folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class FoldersServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public FoldersServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Folder - /// Whether to retrieve all child folders of the requested folder - /// Whether to list associated secret templates - /// A full path to a folder including the folder name can be passed as a query string parameter when the folder ID is set to 0. This will lookup the folder ID by path. - /// Folder ID - /// Folder object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(bool? getAllChildren, bool? includeAssociatedTemplates, string folderPath, int id) - { - return GetAsync(getAllChildren, includeAssociatedTemplates, folderPath, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Folder - /// Whether to retrieve all child folders of the requested folder - /// Whether to list associated secret templates - /// A full path to a folder including the folder name can be passed as a query string parameter when the folder ID is set to 0. This will lookup the folder ID by path. - /// Folder ID - /// Folder object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(bool? getAllChildren, bool? includeAssociatedTemplates, string folderPath, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (getAllChildren != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("getAllChildren") + "=").Append(System.Uri.EscapeDataString(ConvertToString(getAllChildren, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (includeAssociatedTemplates != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeAssociatedTemplates") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeAssociatedTemplates, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (folderPath != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("folderPath") + "=").Append(System.Uri.EscapeDataString(ConvertToString(folderPath, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Folder - /// Folder update options - /// Folder ID - /// Folder object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(FolderUpdateArgs args, int id) - { - return UpdateAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Folder - /// Folder update options - /// Folder ID - /// Folder object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(FolderUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Folder - /// Folder ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Folder - /// Folder ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Disassociate Template from Folder - /// Folder ID - /// Template ID - /// Folder object - /// A server side error occurred. - public System.Threading.Tasks.Task DissassociateTemplateToFolderAsync(int id, int templateId) - { - return DissassociateTemplateToFolderAsync(id, templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Disassociate Template from Folder - /// Folder ID - /// Template ID - /// Folder object - /// A server side error occurred. - public async System.Threading.Tasks.Task DissassociateTemplateToFolderAsync(int id, int templateId, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders/{id}/templates/{templateId}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Folders - /// The icon to display for the folder. Depricated in latest UI. Use 1 when setting this value. - /// Only returns folders that are children of the specified folder. - /// Specify whether to filter by Owner, Edit, AddSecret, View folder permission. Default is View. - /// Search term to match against folder names. Search returns any folder where the search term is contained in the folder name. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Folder search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(int? filter_folderTypeId, int? filter_parentFolderId, string filter_permissionRequired, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_folderTypeId, filter_parentFolderId, filter_permissionRequired, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Folders - /// The icon to display for the folder. Depricated in latest UI. Use 1 when setting this value. - /// Only returns folders that are children of the specified folder. - /// Specify whether to filter by Owner, Edit, AddSecret, View folder permission. Default is View. - /// Search term to match against folder names. Search returns any folder where the search term is contained in the folder name. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Folder search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(int? filter_folderTypeId, int? filter_parentFolderId, string filter_permissionRequired, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders?"); - if (filter_folderTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.folderTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_folderTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_parentFolderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.parentFolderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_parentFolderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_permissionRequired != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.permissionRequired") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_permissionRequired, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Folder - /// Folder creation options - /// Folder object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateAsync(FolderCreateArgs args) - { - return CreateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Folder - /// Folder creation options - /// Folder object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateAsync(FolderCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Lookup Folders - /// The icon to display for the folder. Depricated in latest UI. Use 1 when setting this value. - /// Only returns folders that are children of the specified folder. - /// Specify whether to filter by Owner, Edit, AddSecret, View folder permission. Default is View. - /// Search term to match against folder names. Search returns any folder where the search term is contained in the folder name. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Folder search result object - /// A server side error occurred. - public System.Threading.Tasks.Task LookupAsync(int? filter_folderTypeId, int? filter_parentFolderId, string filter_permissionRequired, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return LookupAsync(filter_folderTypeId, filter_parentFolderId, filter_permissionRequired, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lookup Folders - /// The icon to display for the folder. Depricated in latest UI. Use 1 when setting this value. - /// Only returns folders that are children of the specified folder. - /// Specify whether to filter by Owner, Edit, AddSecret, View folder permission. Default is View. - /// Search term to match against folder names. Search returns any folder where the search term is contained in the folder name. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Folder search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task LookupAsync(int? filter_folderTypeId, int? filter_parentFolderId, string filter_permissionRequired, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders/lookup?"); - if (filter_folderTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.folderTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_folderTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_parentFolderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.parentFolderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_parentFolderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_permissionRequired != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.permissionRequired") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_permissionRequired, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Folder Stub - /// Folder object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Folder Stub - /// Folder object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Folder Audits - /// Folder ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Specify paging and sorting options for querying records and returning results - /// A server side error occurred. - public System.Threading.Tasks.Task GetAuditsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAuditsAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Folder Audits - /// Folder ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Specify paging and sorting options for querying records and returning results - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAuditsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders/{id}/audit?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Folder Details - /// id - /// returnEmptyInsteadOfNoAccessException - /// Folder Details - /// A server side error occurred. - public System.Threading.Tasks.Task GetFolderDetailAsync(int id, bool? returnEmptyInsteadOfNoAccessException) - { - return GetFolderDetailAsync(id, returnEmptyInsteadOfNoAccessException, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Folder Details - /// id - /// returnEmptyInsteadOfNoAccessException - /// Folder Details - /// A server side error occurred. - public async System.Threading.Tasks.Task GetFolderDetailAsync(int id, bool? returnEmptyInsteadOfNoAccessException, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folder-details/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (returnEmptyInsteadOfNoAccessException != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("returnEmptyInsteadOfNoAccessException") + "=").Append(System.Uri.EscapeDataString(ConvertToString(returnEmptyInsteadOfNoAccessException, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch a Folder - /// Folder update options - /// Folder ID - /// Folder object - /// A server side error occurred. - public System.Threading.Tasks.Task PatchFolderAsync(FolderPatchArgs args, int id) - { - return PatchFolderAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch a Folder - /// Folder update options - /// Folder ID - /// Folder object - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchFolderAsync(FolderPatchArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folder/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Associate Template to Folder - /// Folder template association options - /// Folder ID - /// Folder object - /// A server side error occurred. - public System.Threading.Tasks.Task AssociateTemplateToFolderAsync(FolderTemplateArgs args, int id) - { - return AssociateTemplateToFolderAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Associate Template to Folder - /// Folder template association options - /// Folder ID - /// Folder object - /// A server side error occurred. - public async System.Threading.Tasks.Task AssociateTemplateToFolderAsync(FolderTemplateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/folders/{id}/templates"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class GroupsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public GroupsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Group - /// Group ID - /// Group object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(int id) - { - return GetAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Group - /// Group ID - /// Group object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Group - /// Group update options - /// Group ID - /// Group object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(GroupUpdateArgs args, int id) - { - return UpdateAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Group - /// Group update options - /// Group ID - /// Group object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(GroupUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Group - /// Group ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Group - /// Group ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get User In Group - /// Group ID - /// User ID - /// User group membership object - /// A server side error occurred. - public System.Threading.Tasks.Task GetGroupUserAsync(int id, int userId) - { - return GetGroupUserAsync(id, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User In Group - /// Group ID - /// User ID - /// User group membership object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetGroupUserAsync(int id, int userId, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/users/{userId}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Remove User From Group - /// Group ID - /// User ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task RemoveUserFromGroupAsync(int id, int userId) - { - return RemoveUserFromGroupAsync(id, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Remove User From Group - /// Group ID - /// User ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task RemoveUserFromGroupAsync(int id, int userId, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/users/{userId}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Gets roles for group - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task GetRolesAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int id) - { - return GetRolesAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets roles for group - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRolesAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/roles?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update all roles on group - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateUserRolesAsync(RoleAssignments args, int id) - { - return UpdateUserRolesAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update all roles on group - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateUserRolesAsync(RoleAssignments args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/roles"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add roles to existing group - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task CreateUserRolesAsync(RoleAssignments args, int id) - { - return CreateUserRolesAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add roles to existing group - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateUserRolesAsync(RoleAssignments args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/roles"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Remove roles from existing group - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteUserRolesAsync(RoleRemovals args, int id) - { - return DeleteUserRolesAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Remove roles from existing group - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteUserRolesAsync(RoleRemovals args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/roles"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Groups - /// Active Directory domain ID - /// Do not include any groups already subscribed this inbox notification rule - /// Whether to include inactive groups in the results - /// Limit groups to groups that current user can view details of - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(int? filter_domainId, int? filter_excludeInboxRuleIdSubscribers, bool? filter_includeInactive, bool? filter_limitToViewableGroups, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_domainId, filter_excludeInboxRuleIdSubscribers, filter_includeInactive, filter_limitToViewableGroups, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Groups - /// Active Directory domain ID - /// Do not include any groups already subscribed this inbox notification rule - /// Whether to include inactive groups in the results - /// Limit groups to groups that current user can view details of - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(int? filter_domainId, int? filter_excludeInboxRuleIdSubscribers, bool? filter_includeInactive, bool? filter_limitToViewableGroups, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups?"); - if (filter_domainId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.domainId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_domainId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_excludeInboxRuleIdSubscribers != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.excludeInboxRuleIdSubscribers") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_excludeInboxRuleIdSubscribers, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_limitToViewableGroups != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.limitToViewableGroups") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_limitToViewableGroups, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Group - /// Group creation options - /// Group object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateAsync(GroupCreateArgs args) - { - return CreateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Group - /// Group creation options - /// Group object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateAsync(GroupCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Lookup Groups - /// Active Directory domain ID - /// Do not include any groups already subscribed this inbox notification rule - /// Whether to include inactive groups in the results - /// Limit groups to groups that current user can view details of - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group search result object - /// A server side error occurred. - public System.Threading.Tasks.Task LookupAsync(int? filter_domainId, int? filter_excludeInboxRuleIdSubscribers, bool? filter_includeInactive, bool? filter_limitToViewableGroups, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return LookupAsync(filter_domainId, filter_excludeInboxRuleIdSubscribers, filter_includeInactive, filter_limitToViewableGroups, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lookup Groups - /// Active Directory domain ID - /// Do not include any groups already subscribed this inbox notification rule - /// Whether to include inactive groups in the results - /// Limit groups to groups that current user can view details of - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task LookupAsync(int? filter_domainId, int? filter_excludeInboxRuleIdSubscribers, bool? filter_includeInactive, bool? filter_limitToViewableGroups, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/lookup?"); - if (filter_domainId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.domainId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_domainId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_excludeInboxRuleIdSubscribers != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.excludeInboxRuleIdSubscribers") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_excludeInboxRuleIdSubscribers, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_limitToViewableGroups != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.limitToViewableGroups") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_limitToViewableGroups, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Group Stub - /// Group object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Group Stub - /// Group object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Group Membership - /// Group ID - /// Whether to include inactive users in the results - /// Filter only users in a specific domain - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group membership results - /// A server side error occurred. - public System.Threading.Tasks.Task GetGroupMembershipAsync(int id, bool? filter_includeInactiveUsersForGroup, int? filter_userDomainId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetGroupMembershipAsync(id, filter_includeInactiveUsersForGroup, filter_userDomainId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Group Membership - /// Group ID - /// Whether to include inactive users in the results - /// Filter only users in a specific domain - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group membership results - /// A server side error occurred. - public async System.Threading.Tasks.Task GetGroupMembershipAsync(int id, bool? filter_includeInactiveUsersForGroup, int? filter_userDomainId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/users?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_includeInactiveUsersForGroup != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactiveUsersForGroup") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactiveUsersForGroup, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userDomainId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userDomainId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userDomainId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add User To Group - /// Group user add options - /// Group ID - /// User group membership object - /// A server side error occurred. - public System.Threading.Tasks.Task AddUserToGroupAsync(GroupUserCreateArgs args, int id) - { - return AddUserToGroupAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add User To Group - /// Group user add options - /// Group ID - /// User group membership object - /// A server side error occurred. - public async System.Threading.Tasks.Task AddUserToGroupAsync(GroupUserCreateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/users"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Group Membership - /// Group update options - /// Group ID - /// Group model - /// A server side error occurred. - public System.Threading.Tasks.Task PatchGroupMembershipAsync(GroupMembershipPatchModel args, int id) - { - return PatchGroupMembershipAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Group Membership - /// Group update options - /// Group ID - /// Group model - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchGroupMembershipAsync(GroupMembershipPatchModel args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/users"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get group audits - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Audit records for group assignments - /// A server side error occurred. - public System.Threading.Tasks.Task GetAuditGroupAssignmentsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAuditGroupAssignmentsAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get group audits - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Audit records for group assignments - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAuditGroupAssignmentsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/audit?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Group - /// Group update options - /// Group ID - /// Group object - /// A server side error occurred. - public System.Threading.Tasks.Task PatchGroupAsync(GroupPatchArgs args, int groupId) - { - return PatchGroupAsync(args, groupId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Group - /// Group update options - /// Group ID - /// Group object - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchGroupAsync(GroupPatchArgs args, int groupId, System.Threading.CancellationToken cancellationToken) - { - if (groupId == null) - throw new System.ArgumentNullException("groupId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{groupId}"); - urlBuilder_.Replace("{groupId}", System.Uri.EscapeDataString(ConvertToString(groupId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update all members of a group - /// args - /// groupId - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateGroupMembersAsync(GroupMemberAssignmentRequest args, int? groupId) - { - return UpdateGroupMembersAsync(args, groupId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update all members of a group - /// args - /// groupId - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateGroupMembersAsync(GroupMemberAssignmentRequest args, int? groupId, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{groupId}/users?"); - if (groupId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("groupId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(groupId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class HealthCheckServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public HealthCheckServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Health Check - /// The heatlth status - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync() - { - return GetAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Health Check - /// The heatlth status - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/healthcheck"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class HsmConfigurationServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public HsmConfigurationServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Audit of hsm configuration changes - /// SearchTerm - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Hsm Configuration audit items - /// A server side error occurred. - public System.Threading.Tasks.Task GetHsmConfigurationAuditAsync(string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetHsmConfigurationAuditAsync(filter_searchTerm, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Audit of hsm configuration changes - /// SearchTerm - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Hsm Configuration audit items - /// A server side error occurred. - public async System.Threading.Tasks.Task GetHsmConfigurationAuditAsync(string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/hsm-configuration/audit?"); - if (filter_searchTerm != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchTerm") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchTerm, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class InboxServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public InboxServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Delete inbox resource - /// id - /// Success message - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteResourceAsync(int id) - { - return DeleteResourceAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete inbox resource - /// id - /// Success message - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteResourceAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/resources/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get inbox message types - /// When true the number of each message type the current user has will be added to the response and only message types with a count > 0 will be returned. - /// Message Types - /// A server side error occurred. - public System.Threading.Tasks.Task> GetInboxMessageTypesAsync(bool? includeCurrentUserMessageCounts) - { - return GetInboxMessageTypesAsync(includeCurrentUserMessageCounts, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get inbox message types - /// When true the number of each message type the current user has will be added to the response and only message types with a count > 0 will be returned. - /// Message Types - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetInboxMessageTypesAsync(bool? includeCurrentUserMessageCounts, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/message-types?"); - if (includeCurrentUserMessageCounts != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeCurrentUserMessageCounts") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeCurrentUserMessageCounts, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get inbox resources - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Resource Results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchResourcesAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchResourcesAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get inbox resources - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Resource Results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchResourcesAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/resources?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Upload an embedded resource - /// args - /// True or an error - /// A server side error occurred. - public System.Threading.Tasks.Task UploadResourceAsync(InboxResourceUploadArgs args) - { - return UploadResourceAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Upload an embedded resource - /// args - /// True or an error - /// A server side error occurred. - public async System.Threading.Tasks.Task UploadResourceAsync(InboxResourceUploadArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/resources"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search inbox messages - /// messageTypeId - /// EndDate - /// Search specifically display values - /// Which field is being searched - /// Search specifically for boolean values - /// Search specifically for date values less than this date - /// Search specifically for date values greater than this date - /// Search specifically for int values - /// Search specifically for string values - /// MessageTypeIds - /// ReadStatusFilter - /// StartDate - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Message results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchInboxMessagesAsync(int? messageTypeId, System.DateTimeOffset? filter_endDate, string messageDataFilters0_displayValue, string messageDataFilters0_inboxDataName, bool? messageDataFilters0_valueBool, System.DateTimeOffset? messageDataFilters0_valueDateTimeEnd, System.DateTimeOffset? messageDataFilters0_valueDateTimeStart, int? messageDataFilters0_valueInt, string messageDataFilters0_valueString, System.Collections.Generic.IEnumerable filter_messageTypeIds, string filter_readStatusFilter, System.DateTimeOffset? filter_startDate, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchInboxMessagesAsync(messageTypeId, filter_endDate, messageDataFilters0_displayValue, messageDataFilters0_inboxDataName, messageDataFilters0_valueBool, messageDataFilters0_valueDateTimeEnd, messageDataFilters0_valueDateTimeStart, messageDataFilters0_valueInt, messageDataFilters0_valueString, filter_messageTypeIds, filter_readStatusFilter, filter_startDate, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search inbox messages - /// messageTypeId - /// EndDate - /// Search specifically display values - /// Which field is being searched - /// Search specifically for boolean values - /// Search specifically for date values less than this date - /// Search specifically for date values greater than this date - /// Search specifically for int values - /// Search specifically for string values - /// MessageTypeIds - /// ReadStatusFilter - /// StartDate - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Message results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchInboxMessagesAsync(int? messageTypeId, System.DateTimeOffset? filter_endDate, string messageDataFilters0_displayValue, string messageDataFilters0_inboxDataName, bool? messageDataFilters0_valueBool, System.DateTimeOffset? messageDataFilters0_valueDateTimeEnd, System.DateTimeOffset? messageDataFilters0_valueDateTimeStart, int? messageDataFilters0_valueInt, string messageDataFilters0_valueString, System.Collections.Generic.IEnumerable filter_messageTypeIds, string filter_readStatusFilter, System.DateTimeOffset? filter_startDate, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/messages/{messageTypeId?}?"); - if (messageTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("messageTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(messageTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_endDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.endDate") + "=").Append(System.Uri.EscapeDataString(filter_endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (messageDataFilters0_displayValue != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("messageDataFilters[0].displayValue") + "=").Append(System.Uri.EscapeDataString(ConvertToString(messageDataFilters0_displayValue, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (messageDataFilters0_inboxDataName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("messageDataFilters[0].inboxDataName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(messageDataFilters0_inboxDataName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (messageDataFilters0_valueBool != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("messageDataFilters[0].valueBool") + "=").Append(System.Uri.EscapeDataString(ConvertToString(messageDataFilters0_valueBool, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (messageDataFilters0_valueDateTimeEnd != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("messageDataFilters[0].valueDateTimeEnd") + "=").Append(System.Uri.EscapeDataString(messageDataFilters0_valueDateTimeEnd.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (messageDataFilters0_valueDateTimeStart != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("messageDataFilters[0].valueDateTimeStart") + "=").Append(System.Uri.EscapeDataString(messageDataFilters0_valueDateTimeStart.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (messageDataFilters0_valueInt != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("messageDataFilters[0].valueInt") + "=").Append(System.Uri.EscapeDataString(ConvertToString(messageDataFilters0_valueInt, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (messageDataFilters0_valueString != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("messageDataFilters[0].valueString") + "=").Append(System.Uri.EscapeDataString(ConvertToString(messageDataFilters0_valueString, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_messageTypeIds != null) - { - foreach (var item_ in filter_messageTypeIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.messageTypeIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_readStatusFilter != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.readStatusFilter") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_readStatusFilter, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_startDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.startDate") + "=").Append(System.Uri.EscapeDataString(filter_startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Inbox Message by Id - /// messageId - /// Inbox Message - /// A server side error occurred. - public System.Threading.Tasks.Task GetInboxMessageAsync(int messageId) - { - return GetInboxMessageAsync(messageId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Inbox Message by Id - /// messageId - /// Inbox Message - /// A server side error occurred. - public async System.Threading.Tasks.Task GetInboxMessageAsync(int messageId, System.Threading.CancellationToken cancellationToken) - { - if (messageId == null) - throw new System.ArgumentNullException("messageId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/message/{messageId}"); - urlBuilder_.Replace("{messageId}", System.Uri.EscapeDataString(ConvertToString(messageId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Inbox Message Type Data Names - /// messageTypeIds - /// Inbox Message results - /// A server side error occurred. - public System.Threading.Tasks.Task> GetInboxMessageDataNamesAsync(System.Collections.Generic.IEnumerable messageTypeIds) - { - return GetInboxMessageDataNamesAsync(messageTypeIds, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Inbox Message Type Data Names - /// messageTypeIds - /// Inbox Message results - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetInboxMessageDataNamesAsync(System.Collections.Generic.IEnumerable messageTypeIds, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/data-names?"); - if (messageTypeIds != null) - { - foreach (var item_ in messageTypeIds) { urlBuilder_.Append(System.Uri.EscapeDataString("messageTypeIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get inbox templates - /// Only return templates of this type. When null returns all types - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Template results - /// A server side error occurred. - public System.Threading.Tasks.Task GetInboxTemplatesAsync(string filter_templateType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetInboxTemplatesAsync(filter_templateType, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get inbox templates - /// Only return templates of this type. When null returns all types - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Template results - /// A server side error occurred. - public async System.Threading.Tasks.Task GetInboxTemplatesAsync(string filter_templateType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates?"); - if (filter_templateType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.templateType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_templateType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create inbox template - /// args - /// Inbox Template Details - /// A server side error occurred. - public System.Threading.Tasks.Task CreateInboxTemplateAsync(InboxTemplateCreateArgs args) - { - return CreateInboxTemplateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create inbox template - /// args - /// Inbox Template Details - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateInboxTemplateAsync(InboxTemplateCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get inbox template - /// templateId - /// Inbox Template Details - /// A server side error occurred. - public System.Threading.Tasks.Task GetInboxTemplateAsync(int templateId) - { - return GetInboxTemplateAsync(templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get inbox template - /// templateId - /// Inbox Template Details - /// A server side error occurred. - public async System.Threading.Tasks.Task GetInboxTemplateAsync(int templateId, System.Threading.CancellationToken cancellationToken) - { - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/{templateId}"); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch inbox template - /// args - /// templateId - /// Inbox Template Details - /// A server side error occurred. - public System.Threading.Tasks.Task PatchInboxTemplateAsync(InboxTemplateUpdateArgs args, int templateId) - { - return PatchInboxTemplateAsync(args, templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch inbox template - /// args - /// templateId - /// Inbox Template Details - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchInboxTemplateAsync(InboxTemplateUpdateArgs args, int templateId, System.Threading.CancellationToken cancellationToken) - { - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/{templateId}"); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get inbox template locale - /// localeId - /// templateId - /// Inbox Template Locale - /// A server side error occurred. - public System.Threading.Tasks.Task GetInboxTemplateLocaleAsync(int localeId, int templateId) - { - return GetInboxTemplateLocaleAsync(localeId, templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get inbox template locale - /// localeId - /// templateId - /// Inbox Template Locale - /// A server side error occurred. - public async System.Threading.Tasks.Task GetInboxTemplateLocaleAsync(int localeId, int templateId, System.Threading.CancellationToken cancellationToken) - { - if (localeId == null) - throw new System.ArgumentNullException("localeId"); - - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/{templateId}/locales/{localeId}"); - urlBuilder_.Replace("{localeId}", System.Uri.EscapeDataString(ConvertToString(localeId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch inbox template locale - /// args - /// localeId - /// templateId - /// Inbox Template Locale - /// A server side error occurred. - public System.Threading.Tasks.Task PatchInboxTemplateLocaleAsync(InboxTemplateLocaleUpdateArgs args, int localeId, int templateId) - { - return PatchInboxTemplateLocaleAsync(args, localeId, templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch inbox template locale - /// args - /// localeId - /// templateId - /// Inbox Template Locale - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchInboxTemplateLocaleAsync(InboxTemplateLocaleUpdateArgs args, int localeId, int templateId, System.Threading.CancellationToken cancellationToken) - { - if (localeId == null) - throw new System.ArgumentNullException("localeId"); - - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/{templateId}/locales/{localeId}"); - urlBuilder_.Replace("{localeId}", System.Uri.EscapeDataString(ConvertToString(localeId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Mark messages read or unread - /// args - /// True or an error - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateMessageReadStatusAsync(InboxMessageSetMessageReadStatusArgs args) - { - return UpdateMessageReadStatusAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Mark messages read or unread - /// args - /// True or an error - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateMessageReadStatusAsync(InboxMessageSetMessageReadStatusArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/update-read"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Send Test Inbox Message - /// args - /// Success if the message was published for processing - /// A server side error occurred. - public System.Threading.Tasks.Task SendTestMessageAsync(InboxTestMessageArgs args) - { - return SendTestMessageAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Send Test Inbox Message - /// args - /// Success if the message was published for processing - /// A server side error occurred. - public async System.Threading.Tasks.Task SendTestMessageAsync(InboxTestMessageArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/send-test-message"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Copy an inbox template - /// args - /// Inbox Template Details - /// A server side error occurred. - public System.Threading.Tasks.Task CopyInboxTemplateAsync(InboxTemplateCopyArgs args) - { - return CopyInboxTemplateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Copy an inbox template - /// args - /// Inbox Template Details - /// A server side error occurred. - public async System.Threading.Tasks.Task CopyInboxTemplateAsync(InboxTemplateCopyArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/copy"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create inbox template locale - /// args - /// Inbox Template Locale - /// A server side error occurred. - public System.Threading.Tasks.Task CreateInboxTemplateLocaleAsync(InboxTemplateLocaleCreateArgs args) - { - return CreateInboxTemplateLocaleAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create inbox template locale - /// args - /// Inbox Template Locale - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateInboxTemplateLocaleAsync(InboxTemplateLocaleCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox/templates/template-locale"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class InboxRulesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public InboxRulesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Subscribe Current User - /// ruleId - /// Response if successful - /// A server side error occurred. - public System.Threading.Tasks.Task SubscribeCurrentUserToRuleAsync(int ruleId) - { - return SubscribeCurrentUserToRuleAsync(ruleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Subscribe Current User - /// ruleId - /// Response if successful - /// A server side error occurred. - public async System.Threading.Tasks.Task SubscribeCurrentUserToRuleAsync(int ruleId, System.Threading.CancellationToken cancellationToken) - { - if (ruleId == null) - throw new System.ArgumentNullException("ruleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{ruleId}/subscribe"); - urlBuilder_.Replace("{ruleId}", System.Uri.EscapeDataString(ConvertToString(ruleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Unsubscribe current user - /// ruleId - /// Response if successful - /// A server side error occurred. - public System.Threading.Tasks.Task UnsubscribeCurrentUserFromRuleAsync(int ruleId) - { - return UnsubscribeCurrentUserFromRuleAsync(ruleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Unsubscribe current user - /// ruleId - /// Response if successful - /// A server side error occurred. - public async System.Threading.Tasks.Task UnsubscribeCurrentUserFromRuleAsync(int ruleId, System.Threading.CancellationToken cancellationToken) - { - if (ruleId == null) - throw new System.ArgumentNullException("ruleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{ruleId}/subscribe"); - urlBuilder_.Replace("{ruleId}", System.Uri.EscapeDataString(ConvertToString(ruleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search inbox rules - /// Return the subscription status of the current user whether subscribed directly or via a group. - /// Include inactive rules. - /// Only return rules that run immediately or on a schedule, depending on value. - /// Return all rules that will apply to this message id, does not account for time or schedule. - /// Only return rules that apply to this message type. If a MessageId is passed then this value will be replaced with that message's MessageTypeId. - /// Search specifically display values - /// Which field is being searched. This value can be null if InboxDataName is passed instead. - /// Which field is being searched. If InboxDataId is passed this value is ignored. - /// Search specifically for boolean values - /// Search specifically for int values - /// Search specifically for string values with a partial match - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Rules results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchInboxRulesAsync(bool? filter_includeCurrentUserSubscriptionStatus, bool? filter_includeInactive, bool? filter_isImmediate, int? filter_messageId, int? filter_messageTypeId, string ruleConditionFilters0_displayValue, int? ruleConditionFilters0_inboxDataId, string ruleConditionFilters0_inboxDataName, bool? ruleConditionFilters0_valueBool, int? ruleConditionFilters0_valueInt, string ruleConditionFilters0_valueString, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchInboxRulesAsync(filter_includeCurrentUserSubscriptionStatus, filter_includeInactive, filter_isImmediate, filter_messageId, filter_messageTypeId, ruleConditionFilters0_displayValue, ruleConditionFilters0_inboxDataId, ruleConditionFilters0_inboxDataName, ruleConditionFilters0_valueBool, ruleConditionFilters0_valueInt, ruleConditionFilters0_valueString, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search inbox rules - /// Return the subscription status of the current user whether subscribed directly or via a group. - /// Include inactive rules. - /// Only return rules that run immediately or on a schedule, depending on value. - /// Return all rules that will apply to this message id, does not account for time or schedule. - /// Only return rules that apply to this message type. If a MessageId is passed then this value will be replaced with that message's MessageTypeId. - /// Search specifically display values - /// Which field is being searched. This value can be null if InboxDataName is passed instead. - /// Which field is being searched. If InboxDataId is passed this value is ignored. - /// Search specifically for boolean values - /// Search specifically for int values - /// Search specifically for string values with a partial match - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Rules results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchInboxRulesAsync(bool? filter_includeCurrentUserSubscriptionStatus, bool? filter_includeInactive, bool? filter_isImmediate, int? filter_messageId, int? filter_messageTypeId, string ruleConditionFilters0_displayValue, int? ruleConditionFilters0_inboxDataId, string ruleConditionFilters0_inboxDataName, bool? ruleConditionFilters0_valueBool, int? ruleConditionFilters0_valueInt, string ruleConditionFilters0_valueString, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules?"); - if (filter_includeCurrentUserSubscriptionStatus != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeCurrentUserSubscriptionStatus") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeCurrentUserSubscriptionStatus, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_isImmediate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.isImmediate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_isImmediate, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_messageId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.messageId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_messageId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_messageTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.messageTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_messageTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (ruleConditionFilters0_displayValue != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("ruleConditionFilters[0].displayValue") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ruleConditionFilters0_displayValue, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (ruleConditionFilters0_inboxDataId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("ruleConditionFilters[0].inboxDataId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ruleConditionFilters0_inboxDataId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (ruleConditionFilters0_inboxDataName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("ruleConditionFilters[0].inboxDataName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ruleConditionFilters0_inboxDataName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (ruleConditionFilters0_valueBool != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("ruleConditionFilters[0].valueBool") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ruleConditionFilters0_valueBool, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (ruleConditionFilters0_valueInt != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("ruleConditionFilters[0].valueInt") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ruleConditionFilters0_valueInt, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (ruleConditionFilters0_valueString != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("ruleConditionFilters[0].valueString") + "=").Append(System.Uri.EscapeDataString(ConvertToString(ruleConditionFilters0_valueString, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Inbox Rule - /// args - /// Inbox Rule - /// A server side error occurred. - public System.Threading.Tasks.Task CreateInboxRuleAsync(object args) - { - return CreateInboxRuleAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Inbox Rule - /// args - /// Inbox Rule - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateInboxRuleAsync(object args, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Inbox Rule - /// id - /// Inbox Rule - /// A server side error occurred. - public System.Threading.Tasks.Task GetInboxRuleAsync(int id) - { - return GetInboxRuleAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Inbox Rule - /// id - /// Inbox Rule - /// A server side error occurred. - public async System.Threading.Tasks.Task GetInboxRuleAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Inbox Rule - /// args - /// id - /// Inbox Rule - /// A server side error occurred. - public System.Threading.Tasks.Task PatchInboxRuleAsync(object args, int id) - { - return PatchInboxRuleAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Inbox Rule - /// args - /// id - /// Inbox Rule - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchInboxRuleAsync(object args, int id, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{id}"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Inbox Rule Stub - /// Inbox Rule - /// A server side error occurred. - public System.Threading.Tasks.Task GetInboxRuleStubAsync() - { - return GetInboxRuleStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Inbox Rule Stub - /// Inbox Rule - /// A server side error occurred. - public async System.Threading.Tasks.Task GetInboxRuleStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Inbox Rule Condition - /// id - /// Inbox Rule Condition - /// A server side error occurred. - public System.Threading.Tasks.Task GetInboxRuleConditionAsync(int id) - { - return GetInboxRuleConditionAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Inbox Rule Condition - /// id - /// Inbox Rule Condition - /// A server side error occurred. - public async System.Threading.Tasks.Task GetInboxRuleConditionAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/conditions/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Inbox Rule Conditions - /// id - /// Inbox Rule Conditions - /// A server side error occurred. - public System.Threading.Tasks.Task SearchInboxRuleConditionsAsync(int id) - { - return SearchInboxRuleConditionsAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Inbox Rule Conditions - /// id - /// Inbox Rule Conditions - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchInboxRuleConditionsAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{id}/conditions"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search inbox rule subscribers - /// inboxRuleId - /// AccountTypes - /// This will ignore most other filters and return only User accounts that belong to groups that are subscribed. The results will not include users that are directly subscribed as they must be removed from the subscription, not unsubscribed. - /// Search text to filter users from the unsubscribable users - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Rule Subscriber results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSubscribersAsync(int inboxRuleId, string filter_accountTypes, bool? filter_onlyIncludeUnsubscribableUsers, string filter_searchText, string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSubscribersAsync(inboxRuleId, filter_accountTypes, filter_onlyIncludeUnsubscribableUsers, filter_searchText, filter_status, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search inbox rule subscribers - /// inboxRuleId - /// AccountTypes - /// This will ignore most other filters and return only User accounts that belong to groups that are subscribed. The results will not include users that are directly subscribed as they must be removed from the subscription, not unsubscribed. - /// Search text to filter users from the unsubscribable users - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Rule Subscriber results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSubscribersAsync(int inboxRuleId, string filter_accountTypes, bool? filter_onlyIncludeUnsubscribableUsers, string filter_searchText, string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (inboxRuleId == null) - throw new System.ArgumentNullException("inboxRuleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{inboxRuleId}/subscribers?"); - urlBuilder_.Replace("{inboxRuleId}", System.Uri.EscapeDataString(ConvertToString(inboxRuleId, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_accountTypes != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.accountTypes") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_accountTypes, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlyIncludeUnsubscribableUsers != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlyIncludeUnsubscribableUsers") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlyIncludeUnsubscribableUsers, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_status != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.status") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_status, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Inbox Rule Logs By Inbox Rule Id - /// inboxRuleId - /// EndDate - /// RuleActionStatus - /// StartDate - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Rule Log results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchLogAsync(int inboxRuleId, System.DateTimeOffset? filter_endDate, string filter_ruleActionStatus, System.DateTimeOffset? filter_startDate, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchLogAsync(inboxRuleId, filter_endDate, filter_ruleActionStatus, filter_startDate, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Inbox Rule Logs By Inbox Rule Id - /// inboxRuleId - /// EndDate - /// RuleActionStatus - /// StartDate - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Inbox Rule Log results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchLogAsync(int inboxRuleId, System.DateTimeOffset? filter_endDate, string filter_ruleActionStatus, System.DateTimeOffset? filter_startDate, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (inboxRuleId == null) - throw new System.ArgumentNullException("inboxRuleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{inboxRuleId}/action-log?"); - urlBuilder_.Replace("{inboxRuleId}", System.Uri.EscapeDataString(ConvertToString(inboxRuleId, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_endDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.endDate") + "=").Append(System.Uri.EscapeDataString(filter_endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_ruleActionStatus != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.ruleActionStatus") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_ruleActionStatus, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_startDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.startDate") + "=").Append(System.Uri.EscapeDataString(filter_startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Inbox Rule Actions - /// args - /// id - /// Inbox Rule - /// A server side error occurred. - public System.Threading.Tasks.Task PatchInboxRuleActionsAsync(object args, int id) - { - return PatchInboxRuleActionsAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Inbox Rule Actions - /// args - /// id - /// Inbox Rule - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchInboxRuleActionsAsync(object args, int id, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{id}/actions"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Inbox Rule Subscribers - /// args - /// ruleId - /// Success - /// A server side error occurred. - public System.Threading.Tasks.Task PatchInboxRuleSubscribersAsync(InboxRuleSubscribersPatchArgs args, int ruleId) - { - return PatchInboxRuleSubscribersAsync(args, ruleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Inbox Rule Subscribers - /// args - /// ruleId - /// Success - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchInboxRuleSubscribersAsync(InboxRuleSubscribersPatchArgs args, int ruleId, System.Threading.CancellationToken cancellationToken) - { - if (ruleId == null) - throw new System.ArgumentNullException("ruleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{ruleId}/subscribers"); - urlBuilder_.Replace("{ruleId}", System.Uri.EscapeDataString(ConvertToString(ruleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Copy Inbox Rule - /// args - /// Inbox Rule - /// A server side error occurred. - public System.Threading.Tasks.Task CopyInboxRuleAsync(object args) - { - return CopyInboxRuleAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Copy Inbox Rule - /// args - /// Inbox Rule - /// A server side error occurred. - public async System.Threading.Tasks.Task CopyInboxRuleAsync(object args, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/copy"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Inbox Rule Condition - /// args - /// inboxRuleId - /// Inbox Rule - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateInboxRuleConditionAsync(object args, int inboxRuleId) - { - return UpdateInboxRuleConditionAsync(args, inboxRuleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Inbox Rule Condition - /// args - /// inboxRuleId - /// Inbox Rule - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateInboxRuleConditionAsync(object args, int inboxRuleId, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - if (inboxRuleId == null) - throw new System.ArgumentNullException("inboxRuleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{inboxRuleId}/conditions"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{inboxRuleId}", System.Uri.EscapeDataString(ConvertToString(inboxRuleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Inbox Rule Condition - /// args - /// inboxRuleId - /// Inbox Rule Condition - /// A server side error occurred. - public System.Threading.Tasks.Task CreateInboxRuleConditionAsync(object args, int inboxRuleId) - { - return CreateInboxRuleConditionAsync(args, inboxRuleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Inbox Rule Condition - /// args - /// inboxRuleId - /// Inbox Rule Condition - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateInboxRuleConditionAsync(object args, int inboxRuleId, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - if (inboxRuleId == null) - throw new System.ArgumentNullException("inboxRuleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/inbox-rules/{inboxRuleId}/conditions"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{inboxRuleId}", System.Uri.EscapeDataString(ConvertToString(inboxRuleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class IpAddressRestrictionsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public IpAddressRestrictionsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get IP Address restriction - /// IP Address restriction ID - /// IP Address restriction object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(int id) - { - return GetAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get IP Address restriction - /// IP Address restriction ID - /// IP Address restriction object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update IP Address restriction - /// IP Address restriction - /// IP Address restriction Id - /// IP Address restriction object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(IpAddressRestrictionUpdateArgs args, int id) - { - return UpdateAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update IP Address restriction - /// IP Address restriction - /// IP Address restriction Id - /// IP Address restriction object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(IpAddressRestrictionUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete IP Address restriction - /// IP Address restriction Id - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete IP Address restriction - /// IP Address restriction Id - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Group IP Address restriction - /// Group ID - /// IP Address restriction ID - /// Group and IP Address restriction object - /// A server side error occurred. - public System.Threading.Tasks.Task GetGroupAsync(int groupId, int id) - { - return GetGroupAsync(groupId, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Group IP Address restriction - /// Group ID - /// IP Address restriction ID - /// Group and IP Address restriction object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetGroupAsync(int groupId, int id, System.Threading.CancellationToken cancellationToken) - { - if (groupId == null) - throw new System.ArgumentNullException("groupId"); - - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}/groups/{groupId}"); - urlBuilder_.Replace("{groupId}", System.Uri.EscapeDataString(ConvertToString(groupId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Group IP Address restriction - /// Group ID - /// IP Address restriction Id - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteGroupIpRestrictionAsync(int groupId, int id) - { - return DeleteGroupIpRestrictionAsync(groupId, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Group IP Address restriction - /// Group ID - /// IP Address restriction Id - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteGroupIpRestrictionAsync(int groupId, int id, System.Threading.CancellationToken cancellationToken) - { - if (groupId == null) - throw new System.ArgumentNullException("groupId"); - - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}/groups/{groupId}"); - urlBuilder_.Replace("{groupId}", System.Uri.EscapeDataString(ConvertToString(groupId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get User IP Address restriction - /// IP Address restriction ID - /// User ID - /// User and IP Address restriction object - /// A server side error occurred. - public System.Threading.Tasks.Task GetUserIpRestrictionAsync(int id, int userId) - { - return GetUserIpRestrictionAsync(id, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User IP Address restriction - /// IP Address restriction ID - /// User ID - /// User and IP Address restriction object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetUserIpRestrictionAsync(int id, int userId, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}/users/{userId}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete User IP Address restriction - /// IP Address restriction Id - /// User ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteUserIpRestrictionAsync(int id, int userId) - { - return DeleteUserIpRestrictionAsync(id, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete User IP Address restriction - /// IP Address restriction Id - /// User ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteUserIpRestrictionAsync(int id, int userId, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}/users/{userId}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search IP Address restrictions - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// IP Address restriction search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search IP Address restrictions - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// IP Address restriction search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create IP Address restriction - /// IP Address restriction - /// IP Address restriction object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateAsync(IpAddressRestrictionCreateArgs args) - { - return CreateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create IP Address restriction - /// IP Address restriction - /// IP Address restriction object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateAsync(IpAddressRestrictionCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search groups assigned to an IP Address restriction - /// IP Address restriction ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group and IP Address restriction search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchGroupsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchGroupsAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search groups assigned to an IP Address restriction - /// IP Address restriction ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group and IP Address restriction search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchGroupsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}/groups?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Group IP Address restriction - /// Group IP Address restriction - /// IP Address restriction ID - /// Group IP Address restriction object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateGroupIpRestrictionAsync(GroupIpAddressRestrictionCreateArgs args, int id) - { - return CreateGroupIpRestrictionAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Group IP Address restriction - /// Group IP Address restriction - /// IP Address restriction ID - /// Group IP Address restriction object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateGroupIpRestrictionAsync(GroupIpAddressRestrictionCreateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}/groups"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search IP Address restrictions assigned to a group - /// Group ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group and IP Address restriction search result object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAllByGroupAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAllByGroupAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search IP Address restrictions assigned to a group - /// Group ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group and IP Address restriction search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllByGroupAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/groups/{id}/ipaddress-restrictions?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search users assigned to an IP Address restriction - /// IP Address restriction ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User and IP Address restriction search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchUsersAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchUsersAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search users assigned to an IP Address restriction - /// IP Address restriction ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User and IP Address restriction search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchUsersAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}/users?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create User IP Address restriction - /// User IP Address restriction - /// IP Address restriction ID - /// User IP Address restriction object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateUserIpRestrictionAsync(UserIpAddressRestrictionCreateArgs args, int id) - { - return CreateUserIpRestrictionAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create User IP Address restriction - /// User IP Address restriction - /// IP Address restriction ID - /// User IP Address restriction object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateUserIpRestrictionAsync(UserIpAddressRestrictionCreateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ipaddress-restrictions/{id}/users"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search IP Address restrictions assigned to a user - /// User ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User and IP Address restriction search result object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAllByUserAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAllByUserAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search IP Address restrictions assigned to a user - /// User ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User and IP Address restriction search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllByUserAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/ipaddress-restrictions?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class KeyManagementServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public KeyManagementServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Key Management Configuration - /// KeyManagementConfigModel object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync() - { - return GetAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Key Management Configuration - /// KeyManagementConfigModel object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/key-management"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Key Management Configuration - /// Key Management Config update options - /// KeyManagementConfigModel object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(KeyManagementConfigUpdateArgs args) - { - return UpdateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Key Management Configuration - /// Key Management Config update options - /// KeyManagementConfigModel object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(KeyManagementConfigUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/key-management"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Key Management Config Stub - /// KeyManagementConfigModel object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Key Management Config Stub - /// KeyManagementConfigModel object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/key-management/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class LauncherAgentsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public LauncherAgentsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search Launcher Agent Collections - /// Whether to include inactive Launcher Agent Collections in the results - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher Agent Collection search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchCollectionsAsync(bool? filter_includeInactive, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchCollectionsAsync(filter_includeInactive, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Launcher Agent Collections - /// Whether to include inactive Launcher Agent Collections in the results - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher Agent Collection search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchCollectionsAsync(bool? filter_includeInactive, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents/collections?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Launcher Agent Collection - /// Launcher Agent Collection creation options - /// Launcher Agent Collection object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateCollectionAsync(LauncherAgentCollectionCreateArgs args) - { - return CreateCollectionAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Launcher Agent Collection - /// Launcher Agent Collection creation options - /// Launcher Agent Collection object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateCollectionAsync(LauncherAgentCollectionCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents/collections"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Launcher Agent Collection Stub - /// IncludeInactive - /// SearchText - /// Launcher Agent Collection object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync(bool? includeInactive, string searchText) - { - return StubAsync(includeInactive, searchText, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Launcher Agent Collection Stub - /// IncludeInactive - /// SearchText - /// Launcher Agent Collection object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(bool? includeInactive, string searchText, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents/collections/stub?"); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Launcher Agent Collection - /// Whether to include inactive Launcher Agent Collections in the results - /// Launcher Agent Collection ID - /// LauncherAgentCollection object - /// A server side error occurred. - public System.Threading.Tasks.Task GetByCollectionIdAsync(bool? includeInactive, int id) - { - return GetByCollectionIdAsync(includeInactive, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Launcher Agent Collection - /// Whether to include inactive Launcher Agent Collections in the results - /// Launcher Agent Collection ID - /// LauncherAgentCollection object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetByCollectionIdAsync(bool? includeInactive, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents/collections/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Launcher Agent Collection - /// Launcher Agent Collection update options - /// Launcher Agent Collection ID - /// Launcher Agent Collection object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateCollectionAsync(LauncherAgentCollectionUpdateArgs args, int id) - { - return UpdateCollectionAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Launcher Agent Collection - /// Launcher Agent Collection update options - /// Launcher Agent Collection ID - /// Launcher Agent Collection object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateCollectionAsync(LauncherAgentCollectionUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents/collections/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Launcher Agents with Issues - /// LauncherAgentCollectionId - /// SearchText - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher Agent search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAgentsWithIssuesAsync(int? filter_launcherAgentCollectionId, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAgentsWithIssuesAsync(filter_launcherAgentCollectionId, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Launcher Agents with Issues - /// LauncherAgentCollectionId - /// SearchText - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher Agent search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAgentsWithIssuesAsync(int? filter_launcherAgentCollectionId, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents/issues?"); - if (filter_launcherAgentCollectionId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.launcherAgentCollectionId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_launcherAgentCollectionId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Launcher Agents - /// IncludeInactive - /// LauncherAgentCollectionId - /// OutOfDate - /// SearchText - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher Agent search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(bool? filter_includeInactive, int? filter_launcherAgentCollectionId, bool? filter_outOfDate, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_includeInactive, filter_launcherAgentCollectionId, filter_outOfDate, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Launcher Agents - /// IncludeInactive - /// LauncherAgentCollectionId - /// OutOfDate - /// SearchText - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher Agent search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(bool? filter_includeInactive, int? filter_launcherAgentCollectionId, bool? filter_outOfDate, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_launcherAgentCollectionId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.launcherAgentCollectionId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_launcherAgentCollectionId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_outOfDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.outOfDate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_outOfDate, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Launcher Agent - /// Whether to include inactive Launcher Agents in the results - /// Launcher Agent ID - /// LauncherAgent object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(bool? includeInactive, int id) - { - return GetAsync(includeInactive, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Launcher Agent - /// Whether to include inactive Launcher Agents in the results - /// Launcher Agent ID - /// LauncherAgent object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(bool? includeInactive, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Launcher Agent - /// Launcher Agent update options - /// Launcher Agent ID - /// Launcher Agent object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(LauncherAgentUpdateArgs args, int id) - { - return UpdateAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Launcher Agent - /// Launcher Agent update options - /// Launcher Agent ID - /// Launcher Agent object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(LauncherAgentUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launcheragents/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class LaunchersServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public LaunchersServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search Launchers - /// Associated application - /// Whether to include inactive launchers - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchLaunchersAsync(string filter_application, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchLaunchersAsync(filter_application, filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Launchers - /// Associated application - /// Whether to include inactive launchers - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchLaunchersAsync(string filter_application, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launchers?"); - if (filter_application != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.application") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_application, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Lookup Launchers - /// Associated application - /// Whether to include inactive launchers - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher search result object - /// A server side error occurred. - public System.Threading.Tasks.Task LookupAsync(string filter_application, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return LookupAsync(filter_application, filter_includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lookup Launchers - /// Associated application - /// Whether to include inactive launchers - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Launcher search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task LookupAsync(string filter_application, bool? filter_includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launchers/lookup?"); - if (filter_application != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.application") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_application, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Launcher - /// Launcher ID - /// Launcher object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(int id) - { - return GetAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Launcher - /// Launcher ID - /// Launcher object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launchers/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get secret launcher details. - /// The secret to get launch information about - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret's Launcher details - /// A server side error occurred. - public System.Threading.Tasks.Task SearchLauncherDetailsV2Async(int? filter_secretId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchLauncherDetailsV2Async(filter_secretId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get secret launcher details. - /// The secret to get launch information about - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret's Launcher details - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchLauncherDetailsV2Async(int? filter_secretId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/launchers/secret?"); - if (filter_secretId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Triggers a download of the Protocol Handler - /// forceMsi - /// is32Bit - /// Unknown or empty response - /// A server side error occurred. - public System.Threading.Tasks.Task TriggerDownloadAsync(bool? forceMsi, bool? is32Bit) - { - return TriggerDownloadAsync(forceMsi, is32Bit, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Triggers a download of the Protocol Handler - /// forceMsi - /// is32Bit - /// Unknown or empty response - /// A server side error occurred. - public async System.Threading.Tasks.Task TriggerDownloadAsync(bool? forceMsi, bool? is32Bit, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launchers/protocol-handler?"); - if (forceMsi != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("forceMsi") + "=").Append(System.Uri.EscapeDataString(ConvertToString(forceMsi, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (is32Bit != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("is32Bit") + "=").Append(System.Uri.EscapeDataString(ConvertToString(is32Bit, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - return; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Launch a secret. - /// args - /// Launched Secret details - /// A server side error occurred. - public System.Threading.Tasks.Task CreateAsync(LaunchSecretArgs args) - { - return CreateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Launch a secret. - /// args - /// Launched Secret details - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateAsync(LaunchSecretArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/launchers/secret"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class LicenseServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public LicenseServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Valid License - /// License information to determine if the license is valid - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync() - { - return GetAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Valid License - /// License information to determine if the license is valid - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/license/validforconnectionmanager"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class MetadataServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public MetadataServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Delete Metadata - /// The item ID of the entity to which this metadata is associated - /// The type of entity to which this metadata is associated - /// The sequence ID of the metadata record to delete - /// Success message - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteMetadataAsync(int itemId, string itemType, int metadataItemDataId) - { - return DeleteMetadataAsync(itemId, itemType, metadataItemDataId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Metadata - /// The item ID of the entity to which this metadata is associated - /// The type of entity to which this metadata is associated - /// The sequence ID of the metadata record to delete - /// Success message - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteMetadataAsync(int itemId, string itemType, int metadataItemDataId, System.Threading.CancellationToken cancellationToken) - { - if (itemId == null) - throw new System.ArgumentNullException("itemId"); - - if (itemType == null) - throw new System.ArgumentNullException("itemType"); - - if (metadataItemDataId == null) - throw new System.ArgumentNullException("metadataItemDataId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/metadata/{itemType}/{itemId}/{metadataItemDataId}"); - urlBuilder_.Replace("{itemId}", System.Uri.EscapeDataString(ConvertToString(itemId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{itemType}", System.Uri.EscapeDataString(ConvertToString(itemType, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{metadataItemDataId}", System.Uri.EscapeDataString(ConvertToString(metadataItemDataId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search metadata - /// Will only return metadata for this entity ID. MetadataType will also be required. - /// Return a specific metadata field - /// Will only return metadata for this type. ItemId will also be required. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Metadata results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchMetadataAsync(int? filter_itemId, int? filter_metaDataFieldId, string filter_metadataType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchMetadataAsync(filter_itemId, filter_metaDataFieldId, filter_metadataType, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search metadata - /// Will only return metadata for this entity ID. MetadataType will also be required. - /// Return a specific metadata field - /// Will only return metadata for this type. ItemId will also be required. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Metadata results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchMetadataAsync(int? filter_itemId, int? filter_metaDataFieldId, string filter_metadataType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/metadata?"); - if (filter_itemId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.itemId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_itemId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_metaDataFieldId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.metaDataFieldId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_metaDataFieldId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_metadataType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.metadataType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_metadataType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search metadata history - /// Only return history metadata values that were entered before this time - /// Will only return metadata for this entity ID. MetadataType will also be required. - /// Return a specific metadata field - /// Will only return metadata for this type. ItemId will also be required. - /// Only return history metadata values that were entered after this time - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Metadata history results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchMetadataHistoryAsync(System.DateTimeOffset? filter_endDate, int? filter_itemId, int? filter_metaDataFieldId, string filter_metadataType, System.DateTimeOffset? filter_startDate, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchMetadataHistoryAsync(filter_endDate, filter_itemId, filter_metaDataFieldId, filter_metadataType, filter_startDate, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search metadata history - /// Only return history metadata values that were entered before this time - /// Will only return metadata for this entity ID. MetadataType will also be required. - /// Return a specific metadata field - /// Will only return metadata for this type. ItemId will also be required. - /// Only return history metadata values that were entered after this time - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Metadata history results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchMetadataHistoryAsync(System.DateTimeOffset? filter_endDate, int? filter_itemId, int? filter_metaDataFieldId, string filter_metadataType, System.DateTimeOffset? filter_startDate, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/metadata/history?"); - if (filter_endDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.endDate") + "=").Append(System.Uri.EscapeDataString(filter_endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_itemId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.itemId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_itemId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_metaDataFieldId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.metaDataFieldId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_metaDataFieldId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_metadataType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.metadataType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_metadataType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_startDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.startDate") + "=").Append(System.Uri.EscapeDataString(filter_startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// MetadataFieldSectionSummaryModel - /// Return sections that have metadata for this specific item id. MetadataType will be required. - /// Return a specific Metadata Section Field ID. - /// Only return metadata for a specific type of item. Will also required an ItemId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// MetadataFieldSectionSummaryModel - /// A server side error occurred. - public System.Threading.Tasks.Task GetFieldSectionsAsync(int? filter_itemId, int? filter_metadataSectionFilterId, string filter_metadataType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetFieldSectionsAsync(filter_itemId, filter_metadataSectionFilterId, filter_metadataType, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// MetadataFieldSectionSummaryModel - /// Return sections that have metadata for this specific item id. MetadataType will be required. - /// Return a specific Metadata Section Field ID. - /// Only return metadata for a specific type of item. Will also required an ItemId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// MetadataFieldSectionSummaryModel - /// A server side error occurred. - public async System.Threading.Tasks.Task GetFieldSectionsAsync(int? filter_itemId, int? filter_metadataSectionFilterId, string filter_metadataType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/metadata/field-sections?"); - if (filter_itemId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.itemId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_itemId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_metadataSectionFilterId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.metadataSectionFilterId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_metadataSectionFilterId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_metadataType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.metadataType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_metadataType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// MetadataFieldSummaryModel - /// MetadataFieldSummaryModel - /// A server side error occurred. - public System.Threading.Tasks.Task GetFieldsAsync() - { - return GetFieldsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// MetadataFieldSummaryModel - /// MetadataFieldSummaryModel - /// A server side error occurred. - public async System.Threading.Tasks.Task GetFieldsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/metadata/fields"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Metadata - /// args - /// itemId - /// itemType - /// Newly created or updated MetadataModel - /// A server side error occurred. - public System.Threading.Tasks.Task CreateMetadataAsync(MetadataCreateArgs args, int itemId, string itemType) - { - return CreateMetadataAsync(args, itemId, itemType, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Metadata - /// args - /// itemId - /// itemType - /// Newly created or updated MetadataModel - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateMetadataAsync(MetadataCreateArgs args, int itemId, string itemType, System.Threading.CancellationToken cancellationToken) - { - if (itemId == null) - throw new System.ArgumentNullException("itemId"); - - if (itemType == null) - throw new System.ArgumentNullException("itemType"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/metadata/{itemType}/{itemId}"); - urlBuilder_.Replace("{itemId}", System.Uri.EscapeDataString(ConvertToString(itemId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{itemType}", System.Uri.EscapeDataString(ConvertToString(itemType, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update or create a metadata field for an item - /// args - /// itemId - /// itemType - /// Newly created or updated MetadataModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateMetadataAsync(MetadataUpdateArgs args, int itemId, string itemType) - { - return UpdateMetadataAsync(args, itemId, itemType, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update or create a metadata field for an item - /// args - /// itemId - /// itemType - /// Newly created or updated MetadataModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateMetadataAsync(MetadataUpdateArgs args, int itemId, string itemType, System.Threading.CancellationToken cancellationToken) - { - if (itemId == null) - throw new System.ArgumentNullException("itemId"); - - if (itemType == null) - throw new System.ArgumentNullException("itemType"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/metadata/{itemType}/{itemId}"); - urlBuilder_.Replace("{itemId}", System.Uri.EscapeDataString(ConvertToString(itemId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{itemType}", System.Uri.EscapeDataString(ConvertToString(itemType, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a metadata field section - /// args - /// fieldSectionId - /// itemId - /// itemType - /// updated MetadataFieldSectionSummaryModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateMetadataFieldSectionAsync(MetadataFieldSectionUpdateArgs args, int fieldSectionId, int? itemId, string itemType) - { - return UpdateMetadataFieldSectionAsync(args, fieldSectionId, itemId, itemType, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a metadata field section - /// args - /// fieldSectionId - /// itemId - /// itemType - /// updated MetadataFieldSectionSummaryModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateMetadataFieldSectionAsync(MetadataFieldSectionUpdateArgs args, int fieldSectionId, int? itemId, string itemType, System.Threading.CancellationToken cancellationToken) - { - if (fieldSectionId == null) - throw new System.ArgumentNullException("fieldSectionId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/metadata/field-sections/{fieldSectionId}?"); - urlBuilder_.Replace("{fieldSectionId}", System.Uri.EscapeDataString(ConvertToString(fieldSectionId, System.Globalization.CultureInfo.InvariantCulture))); - if (itemId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("itemId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(itemId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (itemType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("itemType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(itemType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class MobileServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public MobileServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get the mobile configuration - /// Mobile Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetMobileConfigurationAsync() - { - return GetMobileConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the mobile configuration - /// Mobile Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetMobileConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/mobile-configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class OAuthExpirationServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public OAuthExpirationServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Expire Session - /// Whether the expiration succeeded - /// A server side error occurred. - public System.Threading.Tasks.Task ExpireSessionAsync() - { - return ExpireSessionAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Expire Session - /// Whether the expiration succeeded - /// A server side error occurred. - public async System.Threading.Tasks.Task ExpireSessionAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/oauth-expiration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class OneTimePasswordCodeServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public OneTimePasswordCodeServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get one time password code and seconds - /// NumberOfCodesToGenerate - /// Secret ID - /// One time password code model - /// A server side error occurred. - public System.Threading.Tasks.Task> GetAsync(int? numberOfCodesToGenerate, int id) - { - return GetAsync(numberOfCodesToGenerate, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get one time password code and seconds - /// NumberOfCodesToGenerate - /// Secret ID - /// One time password code model - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetAsync(int? numberOfCodesToGenerate, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/one-time-password-code/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (numberOfCodesToGenerate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("numberOfCodesToGenerate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(numberOfCodesToGenerate, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class PbaConfigurationServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public PbaConfigurationServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Pba Configuration - /// Pba Configuration object - /// A server side error occurred. - public System.Threading.Tasks.Task GetPbaConfigurationAsync() - { - return GetPbaConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Pba Configuration - /// Pba Configuration object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetPbaConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/pba-configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Pba Configuration - /// Pba Configuration Update Options - /// Pba Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task UpdatePbaConfigurationAsync(PbaConfigurationUpdateArgs args) - { - return UpdatePbaConfigurationAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Pba Configuration - /// Pba Configuration Update Options - /// Pba Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdatePbaConfigurationAsync(PbaConfigurationUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/pba-configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Process Pba Historical Import - /// Pba Historical Import Options - /// Pba Historical Import - /// A server side error occurred. - public System.Threading.Tasks.Task ProcessPbaHistoryImportAsync(PbaHistoricalImportArgs args) - { - return ProcessPbaHistoryImportAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Process Pba Historical Import - /// Pba Historical Import Options - /// Pba Historical Import - /// A server side error occurred. - public async System.Threading.Tasks.Task ProcessPbaHistoryImportAsync(PbaHistoricalImportArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/pba-history-import"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Test Pba Connection - /// Success - /// A server side error occurred. - public System.Threading.Tasks.Task TestPbaConnectionAsync() - { - return TestPbaConnectionAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Test Pba Connection - /// Success - /// A server side error occurred. - public async System.Threading.Tasks.Task TestPbaConnectionAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/pba-test-connection"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Confirm Pba Pair - /// Pba Confirm Pair Model - /// A server side error occurred. - public System.Threading.Tasks.Task ConfirmPbaPairAsync() - { - return ConfirmPbaPairAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Confirm Pba Pair - /// Pba Confirm Pair Model - /// A server side error occurred. - public async System.Threading.Tasks.Task ConfirmPbaPairAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/pba-confirm-pair"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Sync Pba Metadata - /// Success - /// A server side error occurred. - public System.Threading.Tasks.Task SyncPbaMetadataAsync() - { - return SyncPbaMetadataAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Sync Pba Metadata - /// Success - /// A server side error occurred. - public async System.Threading.Tasks.Task SyncPbaMetadataAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/pba-sync-metadata"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ProxyServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ProxyServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Deletes SSH Terminal client overrides - /// clientOverrideId - /// A list of SSH Terminal client overrides - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteTerminalClientOverridesAsync(int clientOverrideId) - { - return DeleteTerminalClientOverridesAsync(clientOverrideId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Deletes SSH Terminal client overrides - /// clientOverrideId - /// A list of SSH Terminal client overrides - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteTerminalClientOverridesAsync(int clientOverrideId, System.Threading.CancellationToken cancellationToken) - { - if (clientOverrideId == null) - throw new System.ArgumentNullException("clientOverrideId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/client-overrides/{clientOverrideId}"); - urlBuilder_.Replace("{clientOverrideId}", System.Uri.EscapeDataString(ConvertToString(clientOverrideId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Updates SSH Terminal client overrides - /// clientOverride - /// clientOverrideId - /// A list of SSH Terminal client overrides - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateTerminalClientOverridesAsync(ProxyClientOverrideSummary clientOverride, int clientOverrideId) - { - return UpdateTerminalClientOverridesAsync(clientOverride, clientOverrideId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates SSH Terminal client overrides - /// clientOverride - /// clientOverrideId - /// A list of SSH Terminal client overrides - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateTerminalClientOverridesAsync(ProxyClientOverrideSummary clientOverride, int clientOverrideId, System.Threading.CancellationToken cancellationToken) - { - if (clientOverrideId == null) - throw new System.ArgumentNullException("clientOverrideId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/client-overrides/{clientOverrideId}"); - urlBuilder_.Replace("{clientOverrideId}", System.Uri.EscapeDataString(ConvertToString(clientOverrideId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(clientOverride, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get the SSH proxy configuration - /// SSH Proxy Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshProxyConfigurationAsync() - { - return GetSshProxyConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the SSH proxy configuration - /// SSH Proxy Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshProxyConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/config"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the SSH proxy configuration - /// viewModel - /// SSH Proxy Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSshProxyConfigurationAsync(SshProxyConfigurationViewModel viewModel) - { - return PatchSshProxyConfigurationAsync(viewModel, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the SSH proxy configuration - /// viewModel - /// SSH Proxy Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSshProxyConfigurationAsync(SshProxyConfigurationViewModel viewModel, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/config"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(viewModel, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get the RDP proxy configuration - /// RDP Proxy Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetRdpProxyConfigurationAsync() - { - return GetRdpProxyConfigurationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the RDP proxy configuration - /// RDP Proxy Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRdpProxyConfigurationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/rdp/config"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update the RDP proxy configuration - /// viewModel - /// RDP Proxy Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchRdpProxyConfigurationAsync(RdpProxyConfigurationViewModel viewModel) - { - return PatchRdpProxyConfigurationAsync(viewModel, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update the RDP proxy configuration - /// viewModel - /// RDP Proxy Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchRdpProxyConfigurationAsync(RdpProxyConfigurationViewModel viewModel, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/rdp/config"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(viewModel, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Proxy Explanations - /// Explanations - /// A server side error occurred. - public System.Threading.Tasks.Task GetExplanationsAsync() - { - return GetExplanationsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Proxy Explanations - /// Explanations - /// A server side error occurred. - public async System.Threading.Tasks.Task GetExplanationsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/explanation"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get the Proxy Audit List - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paginated list of Proxy Audits. - /// A server side error occurred. - public System.Threading.Tasks.Task GetAuditsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAuditsAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the Proxy Audit List - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paginated list of Proxy Audits. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAuditsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/audit?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get the proxy endpoints list - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public System.Threading.Tasks.Task GetEndpointsAsync() - { - return GetEndpointsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get the proxy endpoints list - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEndpointsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/endpoints"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a notification of where the SSH proxy is running - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshEndpointNotificationAsync() - { - return GetSshEndpointNotificationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a notification of where the SSH proxy is running - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshEndpointNotificationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/notification"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a notification of where the RDP proxy is running - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public System.Threading.Tasks.Task GetRdpEndpointNotificationAsync() - { - return GetRdpEndpointNotificationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a notification of where the RDP proxy is running - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRdpEndpointNotificationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/rdp/notification"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get endpoint warnings - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public System.Threading.Tasks.Task GetEndpointNotificationAsync() - { - return GetEndpointNotificationAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get endpoint warnings - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEndpointNotificationAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/endpoints/notification"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get SSH Terminal clients - /// IpAddress - /// TerminalClientType - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A list of SSH Terminal clients - /// A server side error occurred. - public System.Threading.Tasks.Task GetTerminalClientsAsync(string filter_ipAddress, string filter_terminalClientType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetTerminalClientsAsync(filter_ipAddress, filter_terminalClientType, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SSH Terminal clients - /// IpAddress - /// TerminalClientType - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A list of SSH Terminal clients - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTerminalClientsAsync(string filter_ipAddress, string filter_terminalClientType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/clients?"); - if (filter_ipAddress != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.ipAddress") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_ipAddress, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_terminalClientType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.terminalClientType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_terminalClientType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get SSH Terminal client history - /// AuthenticateResult - /// EndDate - /// EngineIdentityGuid - /// IpAddress - /// StartDate - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A list of SSH Terminal client history - /// A server side error occurred. - public System.Threading.Tasks.Task GetTerminalClientHistoryAsync(string filter_authenticateResult, string filter_endDate, string filter_engineIdentityGuid, string filter_ipAddress, string filter_startDate, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetTerminalClientHistoryAsync(filter_authenticateResult, filter_endDate, filter_engineIdentityGuid, filter_ipAddress, filter_startDate, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SSH Terminal client history - /// AuthenticateResult - /// EndDate - /// EngineIdentityGuid - /// IpAddress - /// StartDate - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A list of SSH Terminal client history - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTerminalClientHistoryAsync(string filter_authenticateResult, string filter_endDate, string filter_engineIdentityGuid, string filter_ipAddress, string filter_startDate, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/clienthistory?"); - if (filter_authenticateResult != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.authenticateResult") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_authenticateResult, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_endDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.endDate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_endDate, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_engineIdentityGuid != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.engineIdentityGuid") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_engineIdentityGuid, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_ipAddress != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.ipAddress") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_ipAddress, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_startDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.startDate") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_startDate, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get SSH Terminal client overrides - /// A list of SSH Terminal client overrides - /// A server side error occurred. - public System.Threading.Tasks.Task> GetTerminalClientOverridesAsync() - { - return GetTerminalClientOverridesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SSH Terminal client overrides - /// A list of SSH Terminal client overrides - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetTerminalClientOverridesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/client-overrides"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Creates SSH Terminal client overrides - /// clientOverride - /// A list of SSH Terminal client overrides - /// A server side error occurred. - public System.Threading.Tasks.Task CreateTerminalClientOverridesAsync(ProxyClientOverrideSummary clientOverride) - { - return CreateTerminalClientOverridesAsync(clientOverride, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Creates SSH Terminal client overrides - /// clientOverride - /// A list of SSH Terminal client overrides - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateTerminalClientOverridesAsync(ProxyClientOverrideSummary clientOverride, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/client-overrides"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(clientOverride, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get proxy state - /// Proxy state - /// A server side error occurred. - public System.Threading.Tasks.Task GetProxyingStateAsync() - { - return GetProxyingStateAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get proxy state - /// Proxy state - /// A server side error occurred. - public async System.Threading.Tasks.Task GetProxyingStateAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/state"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a node proxy configuration - /// id - /// node - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public System.Threading.Tasks.Task PatchNodeAsync(int id, ProxyNodeViewModel node) - { - return PatchNodeAsync(id, node, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a node proxy configuration - /// id - /// node - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchNodeAsync(int id, ProxyNodeViewModel node, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/endpoints/nodes/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(node, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a site proxy configuration - /// id - /// site - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSiteAsync(int id, ProxySiteViewModel site) - { - return PatchSiteAsync(id, site, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a site proxy configuration - /// id - /// site - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSiteAsync(int id, ProxySiteViewModel site, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/endpoints/sites/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(site, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update an engine proxy configuration - /// engine - /// id - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public System.Threading.Tasks.Task PatchEngineAsync(ProxyEngineViewModel engine, int id) - { - return PatchEngineAsync(engine, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update an engine proxy configuration - /// engine - /// id - /// A list of nodes, sites, and engines with proxy configurations - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchEngineAsync(ProxyEngineViewModel engine, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/endpoints/engines/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(engine, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Updates a SSH Terminal client type - /// client - /// clientId - /// A list of SSH Terminal clients - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateTerminalClientTypeAsync(ProxyClientSummary client, int clientId) - { - return UpdateTerminalClientTypeAsync(client, clientId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates a SSH Terminal client type - /// client - /// clientId - /// A list of SSH Terminal clients - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateTerminalClientTypeAsync(ProxyClientSummary client, int clientId, System.Threading.CancellationToken cancellationToken) - { - if (clientId == null) - throw new System.ArgumentNullException("clientId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/clients/{clientId}"); - urlBuilder_.Replace("{clientId}", System.Uri.EscapeDataString(ConvertToString(clientId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(client, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Generate SSH Host Key - /// SSH Proxy Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GenerateSshHostKeyAsync() - { - return GenerateSshHostKeyAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Generate SSH Host Key - /// SSH Proxy Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GenerateSshHostKeyAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/ssh/generate-key"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Generate RDP server certificate - /// args - /// RDP Proxy Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GenerateRdpProxyCertificateAsync(GenerateRdpCertificateArgs args) - { - return GenerateRdpProxyCertificateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Generate RDP server certificate - /// args - /// RDP Proxy Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GenerateRdpProxyCertificateAsync(GenerateRdpCertificateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/proxy/rdp/generate-certificate"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class RemotePasswordChangingServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public RemotePasswordChangingServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Password Type By Id - /// Password Type Id - /// PasswordType - /// A server side error occurred. - public System.Threading.Tasks.Task GetPasswordTypeAsync(int id) - { - return GetPasswordTypeAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Password Type By Id - /// Password Type Id - /// PasswordType - /// A server side error occurred. - public async System.Threading.Tasks.Task GetPasswordTypeAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/password-types/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Password Type - /// Password Type Id - /// Password Type update options - /// Updated Password Type - /// A server side error occurred. - public System.Threading.Tasks.Task UpdatePasswordTypeAsync(int id, PasswordTypeUpdateArgs updateArgs) - { - return UpdatePasswordTypeAsync(id, updateArgs, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Password Type - /// Password Type Id - /// Password Type update options - /// Updated Password Type - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdatePasswordTypeAsync(int id, PasswordTypeUpdateArgs updateArgs, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/password-types/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(updateArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Password Type - /// Password Type Id - /// Delete Password Type Response - /// A server side error occurred. - public System.Threading.Tasks.Task DeletePasswordTypeAsync(int id) - { - return DeletePasswordTypeAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Password Type - /// Password Type Id - /// Delete Password Type Response - /// A server side error occurred. - public async System.Threading.Tasks.Task DeletePasswordTypeAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/password-types/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Custom Command List - /// Password Type Id - /// CommandTypeCode - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Custom Command List result for Password Type - /// A server side error occurred. - public System.Threading.Tasks.Task GetCustomCommandsAsync(int id, int? filter_commandTypeCode, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetCustomCommandsAsync(id, filter_commandTypeCode, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Custom Command List - /// Password Type Id - /// CommandTypeCode - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Custom Command List result for Password Type - /// A server side error occurred. - public async System.Threading.Tasks.Task GetCustomCommandsAsync(int id, int? filter_commandTypeCode, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/custom-commands/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_commandTypeCode != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.commandTypeCode") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_commandTypeCode, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Custom Command - /// Custom Command Id - /// Custom Command update options - /// Updated Custom Command - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateCustomCommandAsync(int id, CustomCommandUpdateArgs updateArgs) - { - return UpdateCustomCommandAsync(id, updateArgs, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Custom Command - /// Custom Command Id - /// Custom Command update options - /// Updated Custom Command - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateCustomCommandAsync(int id, CustomCommandUpdateArgs updateArgs, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/custom-commands/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(updateArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Custom Command - /// Custom Command Id - /// Delete Password Custom Command - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteCustomCommandAsync(int id) - { - return DeleteCustomCommandAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Custom Command - /// Custom Command Id - /// Delete Password Custom Command - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteCustomCommandAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/custom-commands/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Password Type List - /// Whether to include inactive Password Types in the results - /// SearchTerm - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// PasswordType List result - /// A server side error occurred. - public System.Threading.Tasks.Task GetPasswordTypeListAsync(bool? filter_includeInactive, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetPasswordTypeListAsync(filter_includeInactive, filter_searchTerm, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Password Type List - /// Whether to include inactive Password Types in the results - /// SearchTerm - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// PasswordType List result - /// A server side error occurred. - public async System.Threading.Tasks.Task GetPasswordTypeListAsync(bool? filter_includeInactive, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/password-types?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchTerm != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchTerm") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchTerm, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Password Type - /// Password Type creation options - /// Created Password Type - /// A server side error occurred. - public System.Threading.Tasks.Task CreatePasswordTypeAsync(PasswordTypeCreateArgs passwordTypeCreateArgs) - { - return CreatePasswordTypeAsync(passwordTypeCreateArgs, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Password Type - /// Password Type creation options - /// Created Password Type - /// A server side error occurred. - public async System.Threading.Tasks.Task CreatePasswordTypeAsync(PasswordTypeCreateArgs passwordTypeCreateArgs, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/password-types"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(passwordTypeCreateArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Custom Command - /// Custom Command creation options - /// Created Custom Command - /// A server side error occurred. - public System.Threading.Tasks.Task CreateCustomCommandAsync(CustomCommandCreateArgs createArgs) - { - return CreateCustomCommandAsync(createArgs, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Custom Command - /// Custom Command creation options - /// Created Custom Command - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateCustomCommandAsync(CustomCommandCreateArgs createArgs, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/remote-password-changing/custom-commands"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(createArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ReportsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ReportsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Report - /// Report ID - /// Report object - /// A server side error occurred. - public System.Threading.Tasks.Task GetReportDetailAsync(int id) - { - return GetReportDetailAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Report - /// Report ID - /// Report object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetReportDetailAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Report - /// Report update options - /// Report ID - /// Report object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateReportAsync(ReportUpdateArgs args, int id) - { - return UpdateReportAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Report - /// Report update options - /// Report ID - /// Report object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateReportAsync(ReportUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Report - /// Report ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Report - /// Report ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Report Category - /// reportCategoryId - /// Report Category - /// A server side error occurred. - public System.Threading.Tasks.Task GetReportCategoryAsync(int reportCategoryId) - { - return GetReportCategoryAsync(reportCategoryId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Report Category - /// reportCategoryId - /// Report Category - /// A server side error occurred. - public async System.Threading.Tasks.Task GetReportCategoryAsync(int reportCategoryId, System.Threading.CancellationToken cancellationToken) - { - if (reportCategoryId == null) - throw new System.ArgumentNullException("reportCategoryId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/categories/{reportCategoryId}"); - urlBuilder_.Replace("{reportCategoryId}", System.Uri.EscapeDataString(ConvertToString(reportCategoryId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Report Category - /// reportCategoryId - /// true if success - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteReportCategoryAsync(int reportCategoryId) - { - return DeleteReportCategoryAsync(reportCategoryId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Report Category - /// reportCategoryId - /// true if success - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteReportCategoryAsync(int reportCategoryId, System.Threading.CancellationToken cancellationToken) - { - if (reportCategoryId == null) - throw new System.ArgumentNullException("reportCategoryId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/categories/{reportCategoryId}"); - urlBuilder_.Replace("{reportCategoryId}", System.Uri.EscapeDataString(ConvertToString(reportCategoryId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Report Category - /// args - /// reportCategoryId - /// Report Category - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateReportCategoryAsync(ReportCategoryUpdateArgs args, int reportCategoryId) - { - return UpdateReportCategoryAsync(args, reportCategoryId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Report Category - /// args - /// reportCategoryId - /// Report Category - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateReportCategoryAsync(ReportCategoryUpdateArgs args, int reportCategoryId, System.Threading.CancellationToken cancellationToken) - { - if (reportCategoryId == null) - throw new System.ArgumentNullException("reportCategoryId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/categories/{reportCategoryId}"); - urlBuilder_.Replace("{reportCategoryId}", System.Uri.EscapeDataString(ConvertToString(reportCategoryId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Report Schedule - /// reportScheduleId - /// Report Schedule - /// A server side error occurred. - public System.Threading.Tasks.Task GetReportScheduleAsync(int reportScheduleId) - { - return GetReportScheduleAsync(reportScheduleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Report Schedule - /// reportScheduleId - /// Report Schedule - /// A server side error occurred. - public async System.Threading.Tasks.Task GetReportScheduleAsync(int reportScheduleId, System.Threading.CancellationToken cancellationToken) - { - if (reportScheduleId == null) - throw new System.ArgumentNullException("reportScheduleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules/{reportScheduleId}"); - urlBuilder_.Replace("{reportScheduleId}", System.Uri.EscapeDataString(ConvertToString(reportScheduleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Report Schedule - /// reportScheduleId - /// Success - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteReportScheduleAsync(int reportScheduleId) - { - return DeleteReportScheduleAsync(reportScheduleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Report Schedule - /// reportScheduleId - /// Success - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteReportScheduleAsync(int reportScheduleId, System.Threading.CancellationToken cancellationToken) - { - if (reportScheduleId == null) - throw new System.ArgumentNullException("reportScheduleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules/{reportScheduleId}"); - urlBuilder_.Replace("{reportScheduleId}", System.Uri.EscapeDataString(ConvertToString(reportScheduleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Report Schedule - /// args - /// reportScheduleId - /// Report Schedule - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateReportScheduleAsync(ReportScheduleUpdateArgs args, int reportScheduleId) - { - return UpdateReportScheduleAsync(args, reportScheduleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Report Schedule - /// args - /// reportScheduleId - /// Report Schedule - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateReportScheduleAsync(ReportScheduleUpdateArgs args, int reportScheduleId, System.Threading.CancellationToken cancellationToken) - { - if (reportScheduleId == null) - throw new System.ArgumentNullException("reportScheduleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules/{reportScheduleId}"); - urlBuilder_.Replace("{reportScheduleId}", System.Uri.EscapeDataString(ConvertToString(reportScheduleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Report Audits - /// id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Report Audit Summaries - /// A server side error occurred. - public System.Threading.Tasks.Task GetReportAuditsByIdAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetReportAuditsByIdAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Report Audits - /// id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Report Audit Summaries - /// A server side error occurred. - public async System.Threading.Tasks.Task GetReportAuditsByIdAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/{id}/audits?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get All Report Audits - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Report Audit Summaries - /// A server side error occurred. - public System.Threading.Tasks.Task GetReportAuditsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetReportAuditsAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get All Report Audits - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Report Audit Summaries - /// A server side error occurred. - public async System.Threading.Tasks.Task GetReportAuditsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/audits?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Reports - /// Category ID - /// Whether to include inactive Reports in the results - /// Report Name - Searching by report name ignores other filters - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Report search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchReportSummaryAsync(int? filter_categoryId, bool? filter_includeInactive, string filter_reportName, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchReportSummaryAsync(filter_categoryId, filter_includeInactive, filter_reportName, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Reports - /// Category ID - /// Whether to include inactive Reports in the results - /// Report Name - Searching by report name ignores other filters - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Report search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchReportSummaryAsync(int? filter_categoryId, bool? filter_includeInactive, string filter_reportName, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports?"); - if (filter_categoryId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.categoryId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_categoryId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_reportName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.reportName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_reportName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Report - /// Report create options - /// Report object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateReportAsync(ReportCreateArgs args) - { - return CreateReportAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Report - /// Report create options - /// Report object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateReportAsync(ReportCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Lookup Reports - /// Category ID - /// Whether to include inactive Reports in the results - /// Report Name - Searching by report name ignores other filters - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Reports search result object - /// A server side error occurred. - public System.Threading.Tasks.Task LookupAsync(int? filter_categoryId, bool? filter_includeInactive, string filter_reportName, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return LookupAsync(filter_categoryId, filter_includeInactive, filter_reportName, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lookup Reports - /// Category ID - /// Whether to include inactive Reports in the results - /// Report Name - Searching by report name ignores other filters - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Reports search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task LookupAsync(int? filter_categoryId, bool? filter_includeInactive, string filter_reportName, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/lookup?"); - if (filter_categoryId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.categoryId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_categoryId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_reportName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.reportName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_reportName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// List Report Categories - /// Report categories array - /// A server side error occurred. - public System.Threading.Tasks.Task> GetCategoriesAsync() - { - return GetCategoriesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// List Report Categories - /// Report categories array - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetCategoriesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/categories"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Report Category - /// args - /// Report Category - /// A server side error occurred. - public System.Threading.Tasks.Task CreateReportCategoryAsync(ReportCategoryCreateArgs args) - { - return CreateReportCategoryAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Report Category - /// args - /// Report Category - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateReportCategoryAsync(ReportCategoryCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/categories"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// List Report Chart Types - /// Report chart types array - /// A server side error occurred. - public System.Threading.Tasks.Task> GetChartTypesAsync() - { - return GetChartTypesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// List Report Chart Types - /// Report chart types array - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetChartTypesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/charttypes"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Report Parameters - /// Report ID - /// Report Parameters - /// A server side error occurred. - public System.Threading.Tasks.Task GetDefaultParametersAsync(int id) - { - return GetDefaultParametersAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Report Parameters - /// Report ID - /// Report Parameters - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDefaultParametersAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/{id}/defaultparameters"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Report Schedules - /// When set, deleted reports will be included - /// Report Id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Report Schedules that matched - /// A server side error occurred. - public System.Threading.Tasks.Task SearchReportSchedulesAsync(bool? filter_includeDeleted, int? filter_reportId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchReportSchedulesAsync(filter_includeDeleted, filter_reportId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Report Schedules - /// When set, deleted reports will be included - /// Report Id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Report Schedules that matched - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchReportSchedulesAsync(bool? filter_includeDeleted, int? filter_reportId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules?"); - if (filter_includeDeleted != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeDeleted") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeDeleted, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_reportId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.reportId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_reportId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Report Schedule - /// args - /// Report Schedule - /// A server side error occurred. - public System.Threading.Tasks.Task CreateReportScheduleAsync(ReportScheduleCreateArgs args) - { - return CreateReportScheduleAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Report Schedule - /// args - /// Report Schedule - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateReportScheduleAsync(ReportScheduleCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Stub Report Schedule - /// reportId - /// Report Schedule - /// A server side error occurred. - public System.Threading.Tasks.Task StubReportScheduleAsync(int reportId) - { - return StubReportScheduleAsync(reportId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Stub Report Schedule - /// reportId - /// Report Schedule - /// A server side error occurred. - public async System.Threading.Tasks.Task StubReportScheduleAsync(int reportId, System.Threading.CancellationToken cancellationToken) - { - if (reportId == null) - throw new System.ArgumentNullException("reportId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules/stub/{reportId}"); - urlBuilder_.Replace("{reportId}", System.Uri.EscapeDataString(ConvertToString(reportId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Report Schedule History - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// reportScheduleId - /// Report Schedule History for a particular Id - /// A server side error occurred. - public System.Threading.Tasks.Task SearchReportScheduleHistoryAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int reportScheduleId) - { - return SearchReportScheduleHistoryAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, reportScheduleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Report Schedule History - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// reportScheduleId - /// Report Schedule History for a particular Id - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchReportScheduleHistoryAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int reportScheduleId, System.Threading.CancellationToken cancellationToken) - { - if (reportScheduleId == null) - throw new System.ArgumentNullException("reportScheduleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules/{reportScheduleId}/history/search?"); - urlBuilder_.Replace("{reportScheduleId}", System.Uri.EscapeDataString(ConvertToString(reportScheduleId, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Report Schedule History - /// reportScheduleHistoryId - /// Report Schedule History for a ScheduleReportHistoryId - /// A server side error occurred. - public System.Threading.Tasks.Task GetReportScheduleHistoryAsync(int reportScheduleHistoryId) - { - return GetReportScheduleHistoryAsync(reportScheduleHistoryId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Report Schedule History - /// reportScheduleHistoryId - /// Report Schedule History for a ScheduleReportHistoryId - /// A server side error occurred. - public async System.Threading.Tasks.Task GetReportScheduleHistoryAsync(int reportScheduleHistoryId, System.Threading.CancellationToken cancellationToken) - { - if (reportScheduleHistoryId == null) - throw new System.ArgumentNullException("reportScheduleHistoryId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules/{reportScheduleHistoryId}/history"); - urlBuilder_.Replace("{reportScheduleHistoryId}", System.Uri.EscapeDataString(ConvertToString(reportScheduleHistoryId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Export Report - /// Report execute options - /// Report object - /// A server side error occurred. - public System.Threading.Tasks.Task ExportAsync(ReportExportArgs args) - { - return ExportAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Export Report - /// Report execute options - /// Report object - /// A server side error occurred. - public async System.Threading.Tasks.Task ExportAsync(ReportExportArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/export"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Execute Report - /// Report execute options - /// Report object - /// A server side error occurred. - public System.Threading.Tasks.Task ExecuteAsync(ReportExecuteArgs args) - { - return ExecuteAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Execute Report - /// Report execute options - /// Report object - /// A server side error occurred. - public async System.Threading.Tasks.Task ExecuteAsync(ReportExecuteArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/execute"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Email Report - /// Report email options - /// Report Id - /// Object email result - /// A server side error occurred. - public System.Threading.Tasks.Task EmailAsync(ReportEmailArgs args, int id) - { - return EmailAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Email Report - /// Report email options - /// Report Id - /// Object email result - /// A server side error occurred. - public async System.Threading.Tasks.Task EmailAsync(ReportEmailArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/{id}/email"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Download Historical Report - /// reportScheduleHistoryId - /// Report object - /// A server side error occurred. - public System.Threading.Tasks.Task DownloadHistoricalReportAsync(int reportScheduleHistoryId) - { - return DownloadHistoricalReportAsync(reportScheduleHistoryId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Download Historical Report - /// reportScheduleHistoryId - /// Report object - /// A server side error occurred. - public async System.Threading.Tasks.Task DownloadHistoricalReportAsync(int reportScheduleHistoryId, System.Threading.CancellationToken cancellationToken) - { - if (reportScheduleHistoryId == null) - throw new System.ArgumentNullException("reportScheduleHistoryId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules/{reportScheduleHistoryId}/history/download"); - urlBuilder_.Replace("{reportScheduleHistoryId}", System.Uri.EscapeDataString(ConvertToString(reportScheduleHistoryId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Undelete Report Schedule - /// reportScheduleId - /// Success - /// A server side error occurred. - public System.Threading.Tasks.Task UndeleteReportScheduleAsync(int reportScheduleId) - { - return UndeleteReportScheduleAsync(reportScheduleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Undelete Report Schedule - /// reportScheduleId - /// Success - /// A server side error occurred. - public async System.Threading.Tasks.Task UndeleteReportScheduleAsync(int reportScheduleId, System.Threading.CancellationToken cancellationToken) - { - if (reportScheduleId == null) - throw new System.ArgumentNullException("reportScheduleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/schedules/{reportScheduleId}/undelete"); - urlBuilder_.Replace("{reportScheduleId}", System.Uri.EscapeDataString(ConvertToString(reportScheduleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Undelete System Report - /// reportId - /// Returns success/fail model - /// A server side error occurred. - public System.Threading.Tasks.Task UndeleteSystemReportAsync(int reportId) - { - return UndeleteSystemReportAsync(reportId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Undelete System Report - /// reportId - /// Returns success/fail model - /// A server side error occurred. - public async System.Threading.Tasks.Task UndeleteSystemReportAsync(int reportId, System.Threading.CancellationToken cancellationToken) - { - if (reportId == null) - throw new System.ArgumentNullException("reportId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/reports/{reportId}/undelete"); - urlBuilder_.Replace("{reportId}", System.Uri.EscapeDataString(ConvertToString(reportId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class RolePermissionsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public RolePermissionsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Permissions not assigned to any Role - /// Names of all unassigned Permissions - /// A server side error occurred. - public System.Threading.Tasks.Task GetUnassignedAsync() - { - return GetUnassignedAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Permissions not assigned to any Role - /// Names of all unassigned Permissions - /// A server side error occurred. - public async System.Threading.Tasks.Task GetUnassignedAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/rolepermissions/unassigned"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class RolesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public RolesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search roles - /// Only return roles assigned to this group id. Will be ignored if UserId is set - /// Whether to include inactive Roles in the results - /// Only return roles assigned to this user id. Will supercede GroupId if set - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Role search result object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAllAsync(int? filter_groupId, bool? filter_includeInactive, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetAllAsync(filter_groupId, filter_includeInactive, filter_userId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search roles - /// Only return roles assigned to this group id. Will be ignored if UserId is set - /// Whether to include inactive Roles in the results - /// Only return roles assigned to this user id. Will supercede GroupId if set - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Role search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAllAsync(int? filter_groupId, bool? filter_includeInactive, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/roles?"); - if (filter_groupId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.groupId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_groupId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ScheduleServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ScheduleServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Recurring schedule - /// scheduleId - /// The recurring schedule details - /// A server side error occurred. - public System.Threading.Tasks.Task GetScheduleAsync(int scheduleId) - { - return GetScheduleAsync(scheduleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Recurring schedule - /// scheduleId - /// The recurring schedule details - /// A server side error occurred. - public async System.Threading.Tasks.Task GetScheduleAsync(int scheduleId, System.Threading.CancellationToken cancellationToken) - { - if (scheduleId == null) - throw new System.ArgumentNullException("scheduleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/schedules/{scheduleId}"); - urlBuilder_.Replace("{scheduleId}", System.Uri.EscapeDataString(ConvertToString(scheduleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a Recurring Schedule - /// args - /// scheduleId - /// The updated recurring schedule details - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateScheduleAsync(RecurringScheduleUpdateArgs args, int scheduleId) - { - return UpdateScheduleAsync(args, scheduleId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a Recurring Schedule - /// args - /// scheduleId - /// The updated recurring schedule details - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateScheduleAsync(RecurringScheduleUpdateArgs args, int scheduleId, System.Threading.CancellationToken cancellationToken) - { - if (scheduleId == null) - throw new System.ArgumentNullException("scheduleId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/schedules/{scheduleId}"); - urlBuilder_.Replace("{scheduleId}", System.Uri.EscapeDataString(ConvertToString(scheduleId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a Recurring Schedule - /// args - /// The saved recurring schedule details - /// A server side error occurred. - public System.Threading.Tasks.Task CreateScheduleAsync(RecurringScheduleCreateArgs args) - { - return CreateScheduleAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a Recurring Schedule - /// args - /// The saved recurring schedule details - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateScheduleAsync(RecurringScheduleCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/schedules"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ScriptServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ScriptServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search scripts - /// Whether to include inactive scripts in the results - /// Search Text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// scripts search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(bool? filter_includeInactive, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_includeInactive, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search scripts - /// Whether to include inactive scripts in the results - /// Search Text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// scripts search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(bool? filter_includeInactive, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/userscripts?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Script - /// Script creation options - /// Secret Template object - /// A server side error occurred. - public System.Threading.Tasks.Task PostAsync(ScriptCreateArgs args) - { - return PostAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Script - /// Script creation options - /// Secret Template object - /// A server side error occurred. - public async System.Threading.Tasks.Task PostAsync(ScriptCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/userscripts"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Script - /// Script ID - /// Script object - /// A server side error occurred. - public System.Threading.Tasks.Task LoadAsync(int id) - { - return LoadAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Script - /// Script ID - /// Script object - /// A server side error occurred. - public async System.Threading.Tasks.Task LoadAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/userscripts/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SdkClientAccountsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SdkClientAccountsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search SDK Client Accounts - /// Operator - /// SearchText - /// UserId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SDK Client Account search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchClientAccountsAsync(string filter_operator, string filter_searchText, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchClientAccountsAsync(filter_operator, filter_searchText, filter_userId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search SDK Client Accounts - /// Operator - /// SearchText - /// UserId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SDK Client Account search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchClientAccountsAsync(string filter_operator, string filter_searchText, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-accounts?"); - if (filter_operator != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.operator") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_operator, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create SDK Client Account - /// SDK Client Account creation options - /// SdkClientAccountModel - /// A server side error occurred. - public System.Threading.Tasks.Task CreateClientAccountAsync(SdkClientAccountCreateArgs args) - { - return CreateClientAccountAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create SDK Client Account - /// SDK Client Account creation options - /// SdkClientAccountModel - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateClientAccountAsync(SdkClientAccountCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-accounts"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get SDK Client Account - /// SDK Client Account Id - /// SdkClientAccountModel - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(int id) - { - return GetAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SDK Client Account - /// SDK Client Account Id - /// SdkClientAccountModel - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-accounts/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update SDK Client Account - /// SDK Client Account update options - /// SDK Client Account Id - /// SdkClientAccountModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateClientAccountAsync(SdkClientAccountUpdateArgs args, int id) - { - return UpdateClientAccountAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update SDK Client Account - /// SDK Client Account update options - /// SDK Client Account Id - /// SdkClientAccountModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateClientAccountAsync(SdkClientAccountUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-accounts/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Current State - /// bool - /// A server side error occurred. - public System.Threading.Tasks.Task GetEnabledAsync() - { - return GetEnabledAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Current State - /// bool - /// A server side error occurred. - public async System.Threading.Tasks.Task GetEnabledAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-accounts/enabled"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Toggle Current State - /// bool - /// A server side error occurred. - public System.Threading.Tasks.Task ToggleEnabledAsync() - { - return ToggleEnabledAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Toggle Current State - /// bool - /// A server side error occurred. - public async System.Threading.Tasks.Task ToggleEnabledAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-accounts/enabled"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Revoke SDK Client Account - /// SDK Client Account Id - /// bool - /// A server side error occurred. - public System.Threading.Tasks.Task RevokeAsync(int id) - { - return RevokeAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Revoke SDK Client Account - /// SDK Client Account Id - /// bool - /// A server side error occurred. - public async System.Threading.Tasks.Task RevokeAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-accounts/{id}/revoke"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SdkClientAuditsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SdkClientAuditsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search SDK Client Audits - /// Operator - /// SearchText - /// UserId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SDK Client Audit search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchClientAuditAsync(string filter_operator, string filter_searchText, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchClientAuditAsync(filter_operator, filter_searchText, filter_userId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search SDK Client Audits - /// Operator - /// SearchText - /// UserId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SDK Client Audit search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchClientAuditAsync(string filter_operator, string filter_searchText, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-audits?"); - if (filter_operator != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.operator") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_operator, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SdkClientRulesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SdkClientRulesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get SDK Client Rule - /// SDK Client Rule Id - /// SdkClientRuleModel - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(int id) - { - return GetAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SDK Client Rule - /// SDK Client Rule Id - /// SdkClientRuleModel - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-rules/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update SDK Client Rule - /// SDK Client Rule update options - /// SDK Client Rule Id - /// SdkClientRuleModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateClientRuleAsync(SdkClientRuleUpdateArgs args, int id) - { - return UpdateClientRuleAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update SDK Client Rule - /// SDK Client Rule update options - /// SDK Client Rule Id - /// SdkClientRuleModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateClientRuleAsync(SdkClientRuleUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-rules/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete SDK Client Rule - /// SDK Client Rule Id - /// DeletedModel - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete SDK Client Rule - /// SDK Client Rule Id - /// DeletedModel - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-rules/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search SDK Client Rules - /// Operator - /// SearchText - /// UserId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SDK Client Rule search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchClientRulesAsync(string filter_operator, string filter_searchText, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchClientRulesAsync(filter_operator, filter_searchText, filter_userId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search SDK Client Rules - /// Operator - /// SearchText - /// UserId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SDK Client Rule search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchClientRulesAsync(string filter_operator, string filter_searchText, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-rules?"); - if (filter_operator != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.operator") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_operator, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create New SDK Client Rule - /// SDK Client Rule creation options - /// SdkClientRuleModel - /// A server side error occurred. - public System.Threading.Tasks.Task CreateClientRuleAsync(SdkClientRuleCreateArgs args) - { - return CreateClientRuleAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create New SDK Client Rule - /// SDK Client Rule creation options - /// SdkClientRuleModel - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateClientRuleAsync(SdkClientRuleCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-rules"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Onboarding Key for SDK Client Rule - /// SDK Client Rule Id - /// SdkClientRuleModel - /// A server side error occurred. - public System.Threading.Tasks.Task GetOnboardingKeyAsync(int id) - { - return GetOnboardingKeyAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Onboarding Key for SDK Client Rule - /// SDK Client Rule Id - /// SdkClientRuleModel - /// A server side error occurred. - public async System.Threading.Tasks.Task GetOnboardingKeyAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-rules/{id}/onboarding-key"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get SDK Client Rule Stub - /// SdkClientRuleModel - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SDK Client Rule Stub - /// SdkClientRuleModel - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sdk-client-rules/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretAccessRequestsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretAccessRequestsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search Secret Access Requests by Status for Current User. - /// IsMyRequest - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Access Model - /// A server side error occurred. - public System.Threading.Tasks.Task SearchRequestsAsync(bool? filter_isMyRequest, string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchRequestsAsync(filter_isMyRequest, filter_status, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secret Access Requests by Status for Current User. - /// IsMyRequest - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Access Model - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchRequestsAsync(bool? filter_isMyRequest, string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-access-requests?"); - if (filter_isMyRequest != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.isMyRequest") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_isMyRequest, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_status != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.status") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_status, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a Secret Access Request - /// args - /// Secret Access Model - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateRequestAsync(SecretAccessUpdateArgs args) - { - return UpdateRequestAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a Secret Access Request - /// args - /// Secret Access Model - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateRequestAsync(SecretAccessUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-access-requests"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a new Secret Access Request - /// args - /// Secret Access Model - /// A server side error occurred. - public System.Threading.Tasks.Task CreateRequestAsync(SecretAccessCreateArgs args) - { - return CreateRequestAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a new Secret Access Request - /// args - /// Secret Access Model - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateRequestAsync(SecretAccessCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-access-requests"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret access request history for the user that created the request. - /// Secret Access Request Id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Access Request History Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetHistoryAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetHistoryAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret access request history for the user that created the request. - /// Secret Access Request Id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Access Request History Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetHistoryAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-access-requests/{id}/history?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Access Requests by Status for Current User. - /// Secret ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Access Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetRequestsForSecretAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetRequestsForSecretAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Access Requests by Status for Current User. - /// Secret ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Access Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRequestsForSecretAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-access-requests/secrets/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Access Request by ID - /// Secret Access ID - /// Secret Access Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetRequestAsync(int id) - { - return GetRequestAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Access Request by ID - /// Secret Access ID - /// Secret Access Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRequestAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-access-requests/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Access Options by Secret ID - /// Secret ID - /// Secret Access Request Options - /// A server side error occurred. - public System.Threading.Tasks.Task GetOptionsBySecretAsync(int id) - { - return GetOptionsBySecretAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Access Options by Secret ID - /// Secret ID - /// Secret Access Request Options - /// A server side error occurred. - public async System.Threading.Tasks.Task GetOptionsBySecretAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-access-requests/secrets/{id}/options"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a new View Comment on a secret. - /// args - /// Secret ID - /// Success or Failure of the save. - /// A server side error occurred. - public System.Threading.Tasks.Task CreateViewCommentAsync(SecretAccessViewCommentArgs args, int id) - { - return CreateViewCommentAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a new View Comment on a secret. - /// args - /// Secret ID - /// Success or Failure of the save. - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateViewCommentAsync(SecretAccessViewCommentArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-access-requests/secrets/{id}/view-comment"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretDependenciesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretDependenciesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Secret Dependency - /// Secret Dependency ID - /// Secret Dependency object - /// A server side error occurred. - public System.Threading.Tasks.Task GetDependencyAsync(int id) - { - return GetDependencyAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Dependency - /// Secret Dependency ID - /// Secret Dependency object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDependencyAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Dependency - /// Secret Dependency update options - /// Secret Dependency ID - /// SecretDependencyModel object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateDependencyAsync(SecretDependencyUpdateArgs args, int id) - { - return UpdateDependencyAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Dependency - /// Secret Dependency update options - /// Secret Dependency ID - /// SecretDependencyModel object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateDependencyAsync(SecretDependencyUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Secret Dependency - /// Secret Dependency ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Secret Dependency - /// Secret Dependency ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Dependency Groups for a Secret - /// Secret ID - /// Secret Dependency Group array - /// A server side error occurred. - public System.Threading.Tasks.Task GetGroupsAsync(int secretId) - { - return GetGroupsAsync(secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Dependency Groups for a Secret - /// Secret ID - /// Secret Dependency Group array - /// A server side error occurred. - public async System.Threading.Tasks.Task GetGroupsAsync(int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/groups/{secretId}"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Secret Dependency Group - /// Secret Dependency create options - /// Secret ID - /// Secret Dependency Group object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateDependencyGroupAsync(SecretDependencyGroupCreateArgs args, int secretId) - { - return CreateDependencyGroupAsync(args, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Secret Dependency Group - /// Secret Dependency create options - /// Secret ID - /// Secret Dependency Group object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateDependencyGroupAsync(SecretDependencyGroupCreateArgs args, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/groups/{secretId}"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Scripts that are possible to use for Dependencies - /// Dependency Script array - /// A server side error occurred. - public System.Threading.Tasks.Task> GetScriptsAsync() - { - return GetScriptsAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Scripts that are possible to use for Dependencies - /// Dependency Script array - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetScriptsAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/scripts"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Dependency Templates - /// Dependency Template array - /// A server side error occurred. - public System.Threading.Tasks.Task> GetTemplatesAsync() - { - return GetTemplatesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Dependency Templates - /// Dependency Template array - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetTemplatesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/templates"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Secret Dependencies - /// Filter by group id - /// Whether or not to include inactive Secret Depenencies - /// Filter by last dependency result status - /// Search in the title / name and machine fields - /// The Secret Id to filter on - /// Filter by dependency template id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SecretDependency search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchDependencySummaryAsync(int? filter_groupId, bool? filter_includeInactive, string filter_lastRunStatus, string filter_searchText, int filter_secretId, int? filter_templateId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchDependencySummaryAsync(filter_groupId, filter_includeInactive, filter_lastRunStatus, filter_searchText, filter_secretId, filter_templateId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secret Dependencies - /// Filter by group id - /// Whether or not to include inactive Secret Depenencies - /// Filter by last dependency result status - /// Search in the title / name and machine fields - /// The Secret Id to filter on - /// Filter by dependency template id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SecretDependency search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchDependencySummaryAsync(int? filter_groupId, bool? filter_includeInactive, string filter_lastRunStatus, string filter_searchText, int filter_secretId, int? filter_templateId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (filter_secretId == null) - throw new System.ArgumentNullException("filter_secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies?"); - if (filter_groupId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.groupId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_groupId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_lastRunStatus != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.lastRunStatus") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_lastRunStatus, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - if (filter_templateId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.templateId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_templateId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Secret Dependency - /// Secret Dependency create options - /// Secret Dependency object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateDependencyAsync(SecretDependencyCreateArgs args) - { - return CreateDependencyAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Secret Dependency - /// Secret Dependency create options - /// Secret Dependency object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateDependencyAsync(SecretDependencyCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Dependency run task status - /// Task identifier - /// Task Status - /// A server side error occurred. - public System.Threading.Tasks.Task GetDependencyRunTaskStatusAsync(string identifier) - { - return GetDependencyRunTaskStatusAsync(identifier, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Dependency run task status - /// Task identifier - /// Task Status - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDependencyRunTaskStatusAsync(string identifier, System.Threading.CancellationToken cancellationToken) - { - if (identifier == null) - throw new System.ArgumentNullException("identifier"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/run/{identifier}"); - urlBuilder_.Replace("{identifier}", System.Uri.EscapeDataString(ConvertToString(identifier, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Dependency Stub - /// The Id of the Script that this Dependency will Run. Only provide this value if the Dependency is running a script directly, and ensure that the type of the script matches the TypeId value passed in. - /// The Id of the Secret that this Dependency will appear on - /// The Id of the Dependency Template that this Dependecy will be modeled on. Only provide this value if the Dependency is based on a Template. - /// The Id of the Dependency Type that this Dependecy will be modeled on. Only provide this value if the Dependency is a running a script directly and is NOT based on a Dependency Template. Valid Values: PowershellScript = 7, SshScript = 8, SqlScript = 9 - /// SecretDependencyModel - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync(int? scriptId, int? secretId, int? templateId, int? typeId) - { - return StubAsync(scriptId, secretId, templateId, typeId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Dependency Stub - /// The Id of the Script that this Dependency will Run. Only provide this value if the Dependency is running a script directly, and ensure that the type of the script matches the TypeId value passed in. - /// The Id of the Secret that this Dependency will appear on - /// The Id of the Dependency Template that this Dependecy will be modeled on. Only provide this value if the Dependency is based on a Template. - /// The Id of the Dependency Type that this Dependecy will be modeled on. Only provide this value if the Dependency is a running a script directly and is NOT based on a Dependency Template. Valid Values: PowershellScript = 7, SshScript = 8, SqlScript = 9 - /// SecretDependencyModel - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(int? scriptId, int? secretId, int? templateId, int? typeId, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/stub?"); - if (scriptId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("scriptId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(scriptId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (secretId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (templateId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("templateId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (typeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("typeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(typeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Run Dependencies - /// Dependency Id array - /// Identifier of the task - /// A server side error occurred. - public System.Threading.Tasks.Task ExecuteAsync(System.Collections.Generic.IEnumerable dependencyIds) - { - return ExecuteAsync(dependencyIds, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Run Dependencies - /// Dependency Id array - /// Identifier of the task - /// A server side error occurred. - public async System.Threading.Tasks.Task ExecuteAsync(System.Collections.Generic.IEnumerable dependencyIds, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-dependencies/run"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(dependencyIds, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretEraseRequestsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretEraseRequestsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Secret Erase History by Secret Erase Request ID - /// Secret Erase Request ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Erase Request Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetHistoryAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetHistoryAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Erase History by Secret Erase Request ID - /// Secret Erase Request ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Erase Request Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetHistoryAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-erase-requests/{id}/history?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Erase Request by ID - /// Secret Erase Request ID - /// Secret Erase Request Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetRequestAsync(int id) - { - return GetRequestAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Erase Request by ID - /// Secret Erase Request ID - /// Secret Erase Request Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRequestAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-erase-requests/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Erase Request Secrets by Secret Erase Request ID - /// Erased - /// SecretEraseRequestId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Erase Request Secret Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetRequestSecretsAsync(bool? filter_erased, int? filter_secretEraseRequestId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetRequestSecretsAsync(filter_erased, filter_secretEraseRequestId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Erase Request Secrets by Secret Erase Request ID - /// Erased - /// SecretEraseRequestId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Erase Request Secret Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRequestSecretsAsync(bool? filter_erased, int? filter_secretEraseRequestId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-erase-requests/secrets?"); - if (filter_erased != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.erased") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_erased, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_secretEraseRequestId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretEraseRequestId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretEraseRequestId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Erase Requests by Status for Current User. - /// IsMyRequest - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Erase Request Model - /// A server side error occurred. - public System.Threading.Tasks.Task InboxSearchAsync(bool? filter_isMyRequest, string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return InboxSearchAsync(filter_isMyRequest, filter_status, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Erase Requests by Status for Current User. - /// IsMyRequest - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Erase Request Model - /// A server side error occurred. - public async System.Threading.Tasks.Task InboxSearchAsync(bool? filter_isMyRequest, string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-erase-requests/inbox?"); - if (filter_isMyRequest != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.isMyRequest") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_isMyRequest, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_status != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.status") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_status, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Secret Erase Requests by Status for Current User. - /// IsMyRequest - /// SecretId - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Erase Request Model - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(bool? filter_isMyRequest, int? filter_secretId, string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_isMyRequest, filter_secretId, filter_status, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secret Erase Requests by Status for Current User. - /// IsMyRequest - /// SecretId - /// Status - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Erase Request Model - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(bool? filter_isMyRequest, int? filter_secretId, string filter_status, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-erase-requests/search?"); - if (filter_isMyRequest != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.isMyRequest") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_isMyRequest, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_secretId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_status != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.status") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_status, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Process approved SecretEraseRequests whose EraseAfter time has passed. - /// Attempt to process ready requests. - /// A server side error occurred. - public System.Threading.Tasks.Task ProcessNowAsync() - { - return ProcessNowAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Process approved SecretEraseRequests whose EraseAfter time has passed. - /// Attempt to process ready requests. - /// A server side error occurred. - public async System.Threading.Tasks.Task ProcessNowAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-erase-requests/run-now"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a Secret Erase Request - /// args - /// Secret Erase Request Model - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateRequestAsync(SecretEraseRequestUpdateArgs args) - { - return UpdateRequestAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a Secret Erase Request - /// args - /// Secret Erase Request Model - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateRequestAsync(SecretEraseRequestUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-erase-requests"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a new Secret Erase Request - /// args - /// Secret Erase Request Model - /// A server side error occurred. - public System.Threading.Tasks.Task CreateRequestAsync(SecretEraseRequestCreateArgs args) - { - return CreateRequestAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a new Secret Erase Request - /// args - /// Secret Erase Request Model - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateRequestAsync(SecretEraseRequestCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-erase-requests"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretExtensionsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretExtensionsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Secret Templates - /// List of Secret Templates - /// A server side error occurred. - public System.Threading.Tasks.Task> GetWebSecretTemplatesAsync() - { - return GetWebSecretTemplatesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Templates - /// List of Secret Templates - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetWebSecretTemplatesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-extensions/web-secret-templates"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Secrets by Url - /// url - /// Secret search result object - /// A server side error occurred. - public System.Threading.Tasks.Task> SearchAsync(string url) - { - return SearchAsync(url, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secrets by Url - /// url - /// Secret search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task> SearchAsync(string url, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-extensions/search-by-url"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(url, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Secrets by Domain - /// domain - /// Secret search result object - /// A server side error occurred. - public System.Threading.Tasks.Task> SearchActiveDirectorySecretsAsync(string domain) - { - return SearchActiveDirectorySecretsAsync(domain, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secrets by Domain - /// domain - /// Secret search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task> SearchActiveDirectorySecretsAsync(string domain, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-extensions/search-ad-secrets-by-domain"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(domain, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Secrets by Computer Name - /// computerName - /// Secret search result object - /// A server side error occurred. - public System.Threading.Tasks.Task> SearchWindowsAccountSecretsAsync(string computerName) - { - return SearchWindowsAccountSecretsAsync(computerName, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secrets by Computer Name - /// computerName - /// Secret search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task> SearchWindowsAccountSecretsAsync(string computerName, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-extensions/search-windows-account-secrets-by-computer-name"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(computerName, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get AutoFill values for Url by SecretId - /// args - /// Autofill values result object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAutoFillValuesAsync(ExtensionAutoFillValueArgs args) - { - return GetAutoFillValuesAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get AutoFill values for Url by SecretId - /// args - /// Autofill values result object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAutoFillValuesAsync(ExtensionAutoFillValueArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-extensions/autofill-values"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretHealthServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretHealthServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Check exposure of Secret since last password change - /// SecretId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretExposureAsync(int? filter_secretId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetSecretExposureAsync(filter_secretId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Check exposure of Secret since last password change - /// SecretId - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretExposureAsync(int? filter_secretId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrethealth/exposure?"); - if (filter_secretId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretHooksServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretHooksServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Update Secret Hook - /// args - /// secretHookId - /// secretId - /// Secret hook retrieved after updates - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateHookAsync(SecretDetailHookUpdateArgs args, int secretHookId, int secretId) - { - return UpdateHookAsync(args, secretHookId, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Hook - /// args - /// secretHookId - /// secretId - /// Secret hook retrieved after updates - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateHookAsync(SecretDetailHookUpdateArgs args, int secretHookId, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretHookId == null) - throw new System.ArgumentNullException("secretHookId"); - - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-detail/{secretId}/hook/{secretHookId}"); - urlBuilder_.Replace("{secretHookId}", System.Uri.EscapeDataString(ConvertToString(secretHookId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Secret Hook - /// secretHookId - /// secretId - /// Success or failure - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteHookAsync(int secretHookId, int secretId) - { - return DeleteHookAsync(secretHookId, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Secret Hook - /// secretHookId - /// secretId - /// Success or failure - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteHookAsync(int secretHookId, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretHookId == null) - throw new System.ArgumentNullException("secretHookId"); - - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-detail/{secretId}/hook/{secretHookId}"); - urlBuilder_.Replace("{secretHookId}", System.Uri.EscapeDataString(ConvertToString(secretHookId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Hooks - /// secretId - /// A collection - /// A server side error occurred. - public System.Threading.Tasks.Task> GetHooksAsync(int secretId) - { - return GetHooksAsync(secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Hooks - /// secretId - /// A collection - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetHooksAsync(int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-detail/{secretId}/hooks"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Stub Hook - /// scriptId - /// secretId - /// Stub for a new Secret hook - /// A server side error occurred. - public System.Threading.Tasks.Task StubHookAsync(int scriptId, int secretId) - { - return StubHookAsync(scriptId, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Stub Hook - /// scriptId - /// secretId - /// Stub for a new Secret hook - /// A server side error occurred. - public async System.Threading.Tasks.Task StubHookAsync(int scriptId, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (scriptId == null) - throw new System.ArgumentNullException("scriptId"); - - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-detail/{secretId}/hook/stub/{scriptId}"); - urlBuilder_.Replace("{scriptId}", System.Uri.EscapeDataString(ConvertToString(scriptId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret hook details - /// secretHookId - /// secretId - /// Secret hook details - /// A server side error occurred. - public System.Threading.Tasks.Task GetHookAsync(int secretHookId, int secretId) - { - return GetHookAsync(secretHookId, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret hook details - /// secretHookId - /// secretId - /// Secret hook details - /// A server side error occurred. - public async System.Threading.Tasks.Task GetHookAsync(int secretHookId, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretHookId == null) - throw new System.ArgumentNullException("secretHookId"); - - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-detail/{secretId}/hook/get/{secretHookId}"); - urlBuilder_.Replace("{secretHookId}", System.Uri.EscapeDataString(ConvertToString(secretHookId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Hooks - /// secretId - /// A collection - /// A server side error occurred. - public System.Threading.Tasks.Task> GetHooksV2Async(int secretId) - { - return GetHooksV2Async(secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Hooks - /// secretId - /// A collection - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetHooksV2Async(int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secret-detail/{secretId}/hooks"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Stub Hook - /// scriptId - /// secretId - /// Stub for a new Secret hook - /// A server side error occurred. - public System.Threading.Tasks.Task StubHookV2Async(int scriptId, int secretId) - { - return StubHookV2Async(scriptId, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Stub Hook - /// scriptId - /// secretId - /// Stub for a new Secret hook - /// A server side error occurred. - public async System.Threading.Tasks.Task StubHookV2Async(int scriptId, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (scriptId == null) - throw new System.ArgumentNullException("scriptId"); - - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secret-detail/{secretId}/hook/stub/{scriptId}"); - urlBuilder_.Replace("{scriptId}", System.Uri.EscapeDataString(ConvertToString(scriptId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret hook details - /// secretHookId - /// secretId - /// Secret hook details - /// A server side error occurred. - public System.Threading.Tasks.Task GetHookV2Async(int secretHookId, int secretId) - { - return GetHookV2Async(secretHookId, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret hook details - /// secretHookId - /// secretId - /// Secret hook details - /// A server side error occurred. - public async System.Threading.Tasks.Task GetHookV2Async(int secretHookId, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretHookId == null) - throw new System.ArgumentNullException("secretHookId"); - - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secret-detail/{secretId}/hook/get/{secretHookId}"); - urlBuilder_.Replace("{secretHookId}", System.Uri.EscapeDataString(ConvertToString(secretHookId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Secret hook - /// args - /// secretId - /// Newly created Secret hook - /// A server side error occurred. - public System.Threading.Tasks.Task CreateHookAsync(SecretDetailHookCreateArgs args, int secretId) - { - return CreateHookAsync(args, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Secret hook - /// args - /// secretId - /// Newly created Secret hook - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateHookAsync(SecretDetailHookCreateArgs args, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-detail/{secretId}/hook"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Secret hook v2 - /// args - /// secretId - /// Newly created Secret hook - /// A server side error occurred. - public System.Threading.Tasks.Task CreateHookV2Async(SecretDetailHookCreateArgs args, int secretId) - { - return CreateHookV2Async(args, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Secret hook v2 - /// args - /// secretId - /// Newly created Secret hook - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateHookV2Async(SecretDetailHookCreateArgs args, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secret-detail/{secretId}/hook"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Hook - /// args - /// secretHookId - /// secretId - /// Secret hook retrieved after updates - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateHookV2Async(SecretDetailHookUpdateArgs args, int secretHookId, int secretId) - { - return UpdateHookV2Async(args, secretHookId, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Hook - /// args - /// secretHookId - /// secretId - /// Secret hook retrieved after updates - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateHookV2Async(SecretDetailHookUpdateArgs args, int secretHookId, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretHookId == null) - throw new System.ArgumentNullException("secretHookId"); - - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secret-detail/{secretId}/hook/{secretHookId}"); - urlBuilder_.Replace("{secretHookId}", System.Uri.EscapeDataString(ConvertToString(secretHookId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretPermissionsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretPermissionsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Secret Permission - /// Whether to include inactive permissions in the results - /// Secret permission ID - /// Secret permission object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(bool? includeInactive, int id) - { - return GetAsync(includeInactive, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Permission - /// Whether to include inactive permissions in the results - /// Secret permission ID - /// Secret permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(bool? includeInactive, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-permissions/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Permission - /// Secret permission update options - /// Secret permission ID - /// Secret permission object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecretPermissionAsync(SecretPermissionUpdateArgs args, int id) - { - return UpdateSecretPermissionAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Permission - /// Secret permission update options - /// Secret permission ID - /// Secret permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecretPermissionAsync(SecretPermissionUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-permissions/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Secret Permission - /// Secret permission ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Secret Permission - /// Secret permission ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-permissions/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Secret Permissions - /// DomainName - /// Filter by group ID - /// GroupName - /// Filter by secret ID - /// Filter by user ID - /// UserName - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret permissions search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSecretPermissionsAsync(string filter_domainName, int? filter_groupId, string filter_groupName, int? filter_secretId, int? filter_userId, string filter_userName, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSecretPermissionsAsync(filter_domainName, filter_groupId, filter_groupName, filter_secretId, filter_userId, filter_userName, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secret Permissions - /// DomainName - /// Filter by group ID - /// GroupName - /// Filter by secret ID - /// Filter by user ID - /// UserName - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret permissions search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSecretPermissionsAsync(string filter_domainName, int? filter_groupId, string filter_groupName, int? filter_secretId, int? filter_userId, string filter_userName, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-permissions?"); - if (filter_domainName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.domainName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_domainName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_groupId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.groupId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_groupId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_groupName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.groupName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_groupName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_secretId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Secret Permission - /// Secret permission creation options - /// Secret permission object - /// A server side error occurred. - public System.Threading.Tasks.Task AddSecretPermissionAsync(SecretPermissionCreateArgs args) - { - return AddSecretPermissionAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Secret Permission - /// Secret permission creation options - /// Secret permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task AddSecretPermissionAsync(SecretPermissionCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-permissions"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Permission Stub - /// Options for generating a secret permission stub - /// Secret permission object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync(int secretId) - { - return StubAsync(secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Permission Stub - /// Options for generating a secret permission stub - /// Secret permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-permissions/stub?"); - urlBuilder_.Append(System.Uri.EscapeDataString("secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret share inherit - /// Secret share update options - /// Secret ID - /// Secret share inheritance result - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecretShareAsync(SecretShareUpdateArgs args, int secretId) - { - return UpdateSecretShareAsync(args, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret share inherit - /// Secret share update options - /// Secret ID - /// Secret share inheritance result - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecretShareAsync(SecretShareUpdateArgs args, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{secretId}/share"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretPolicyServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretPolicyServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search Secret Policies - /// Whether or not to include inactive secret policies - /// Results will contain this text in the policy name - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Policies that matched - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSecretPoliciesAsync(bool? filter_includeInactive, string filter_secretPolicyName, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSecretPoliciesAsync(filter_includeInactive, filter_secretPolicyName, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secret Policies - /// Whether or not to include inactive secret policies - /// Results will contain this text in the policy name - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Policies that matched - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSecretPoliciesAsync(bool? filter_includeInactive, string filter_secretPolicyName, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-policy/search?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_secretPolicyName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretPolicyName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretPolicyName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Policy - /// id - /// Secret Policy if found - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretPolicyAsync(int id) - { - return GetSecretPolicyAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Policy - /// id - /// Secret Policy if found - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretPolicyAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-policy/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a Secret Policy - /// args - /// id - /// Secret Policy that was updated - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecretPolicyAsync(SecretPolicyUpdateArgs args, int id) - { - return UpdateSecretPolicyAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a Secret Policy - /// args - /// id - /// Secret Policy that was updated - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecretPolicyAsync(SecretPolicyUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-policy/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Policy Stub - /// Stub of a Secret Policy Detail model - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretPolicyStubAsync() - { - return GetSecretPolicyStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Policy Stub - /// Stub of a Secret Policy Detail model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretPolicyStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-policy/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a Secret Policy - /// args - /// Secret Policy that was created - /// A server side error occurred. - public System.Threading.Tasks.Task CreateSecretPolicyAsync(SecretPolicyCreateArgs args) - { - return CreateSecretPolicyAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a Secret Policy - /// args - /// Secret Policy that was created - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateSecretPolicyAsync(SecretPolicyCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-policy"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - settings.DateParseHandling = Newtonsoft.Json.DateParseHandling.None; - //settings.DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc; - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Secret - /// Whether to include inactive secrets in the results - /// Don't check out the secret if needed - /// Secret ID - /// A full path including folder and secret name can be passed as a query string parameter when the secret ID is set to 0. This will lookup the secret ID by path. - /// Secret object - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretAsync(bool? includeInactive, bool? noAutoCheckout, int id, string secretPath) - { - return GetSecretAsync(includeInactive, noAutoCheckout, id, secretPath, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret - /// Whether to include inactive secrets in the results - /// Don't check out the secret if needed - /// Secret ID - /// A full path including folder and secret name can be passed as a query string parameter when the secret ID is set to 0. This will lookup the secret ID by path. - /// Secret object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretAsync(bool? includeInactive, bool? noAutoCheckout, int id, string secretPath, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (noAutoCheckout != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("noAutoCheckout") + "=").Append(System.Uri.EscapeDataString(ConvertToString(noAutoCheckout, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (secretPath != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("secretPath") + "=").Append(System.Uri.EscapeDataString(ConvertToString(secretPath, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret - /// Secret update options - /// Secret ID - /// Secret object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecretAsync(SecretUpdateArgs args, int id) - { - return UpdateSecretAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret - /// Secret update options - /// Secret ID - /// Secret object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecretAsync(SecretUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Deactivate a Secret - /// Secret ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Deactivate a Secret - /// Secret ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret List Field List Data - /// Secret ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The field slug name of the list field. This is the fieldSlugName property of the SecretField object. By default, it is the lower-case field name with all spaces replaced with dashes (-). - /// Combined summary of all lists assigned to the secret field. - /// A server side error occurred. - public System.Threading.Tasks.Task GetListFieldListDefinitionsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, string slug) - { - return GetListFieldListDefinitionsAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, slug, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret List Field List Data - /// Secret ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The field slug name of the list field. This is the fieldSlugName property of the SecretField object. By default, it is the lower-case field name with all spaces replaced with dashes (-). - /// Combined summary of all lists assigned to the secret field. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetListFieldListDefinitionsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, string slug, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (slug == null) - throw new System.ArgumentNullException("slug"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/fields/{slug}/listdetails?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{slug}", System.Uri.EscapeDataString(ConvertToString(slug, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret List Field List Data - /// Secret options - /// Secret ID - /// Secret field name - /// Combined summary of all lists assigned to the secret field. - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateListFieldListDefinitionsAsync(SecretListFieldListArgs args, int id, string slug) - { - return UpdateListFieldListDefinitionsAsync(args, id, slug, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret List Field List Data - /// Secret options - /// Secret ID - /// Secret field name - /// Combined summary of all lists assigned to the secret field. - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateListFieldListDefinitionsAsync(SecretListFieldListArgs args, int id, string slug, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (slug == null) - throw new System.ArgumentNullException("slug"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/fields/{slug}/listdetails"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{slug}", System.Uri.EscapeDataString(ConvertToString(slug, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete Secret List Field List Data - /// Secret ID - /// Secret options - /// Secret field name - /// Combined summary of all lists assigned to the secret field. - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteListFieldListDefinitionsAsync(int id, System.Guid? listGuid, string slug) - { - return DeleteListFieldListDefinitionsAsync(id, listGuid, slug, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete Secret List Field List Data - /// Secret ID - /// Secret options - /// Secret field name - /// Combined summary of all lists assigned to the secret field. - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteListFieldListDefinitionsAsync(int id, System.Guid? listGuid, string slug, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (slug == null) - throw new System.ArgumentNullException("slug"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/fields/{slug}/listdetails?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{slug}", System.Uri.EscapeDataString(ConvertToString(slug, System.Globalization.CultureInfo.InvariantCulture))); - if (listGuid != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("listGuid") + "=").Append(System.Uri.EscapeDataString(ConvertToString(listGuid, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Secrets - /// Whether to allow DoubleLocks as part of the search. True by default. - /// Whether to return the total number of secrets matching the filters. False by default. If false, the total can be retrieved separately by calling /v1/secrets/search-total with the same arguments used in the search. - /// Only include Secrets with this DoubleLock ID assigned in the search results. - /// An array of names of Secret Template fields to return. Only exposed fields can be returned. - /// If not null, return only secrets matching the specified extended mapping type as defined on the secret’s template. - /// If not null, returns only secrets within the specified folder. - /// If not null, returns only secrets with a certain heartbeat status. - /// Whether to include active secrets in results (when excluded equals true). - /// Whether to include inactive secrets in results. - /// Whether to include restricted secrets in results. Restricted secrets are secrets that are DoubleLocked, require approval, or require a comment to view. - /// Whether to include secrets in subfolders of the specified folder. - /// Whether to do an exact match of the search text or a partial match. If an exact match, the entire secret name, field value, or list option in a list field must match the search text. - /// Whether to only include secrets whose template has Remote Password Changing enabled. - /// When true only Secrets where you are not the owner and the Secret was shared explicitly with your user id will be returned. - /// If not null, returns only secrets matching the specified password types. - /// Specify whether to filter by List, View, Edit, or Owner permission. Default is List. - /// Specify whether to search All, Recent, or Favorites - /// If set, restricts the search to only match secrets where the value of the field specified by name contains the search text. - /// If set, restricts the search to only match secrets where the value of the field specified by the slug name contains the search text. This will override SearchField. - /// The text to match in the secret name, field value, or list field contents. - /// If not null, returns only secrets matching the specified template. - /// If not null, returns only secrets within a the specified site. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(bool? filter_allowDoubleLocks, bool? filter_doNotCalculateTotal, int? filter_doubleLockId, System.Collections.Generic.IEnumerable filter_extendedFields, int? filter_extendedTypeId, int? filter_folderId, string filter_heartbeatStatus, bool? filter_includeActive, bool? filter_includeInactive, bool? filter_includeRestricted, bool? filter_includeSubFolders, bool? filter_isExactMatch, bool? filter_onlyRPCEnabled, bool? filter_onlySharedWithMe, System.Collections.Generic.IEnumerable filter_passwordTypeIds, string filter_permissionRequired, string filter_scope, string filter_searchField, string filter_searchFieldSlug, string filter_searchText, int? filter_secretTemplateId, int? filter_siteId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_allowDoubleLocks, filter_doNotCalculateTotal, filter_doubleLockId, filter_extendedFields, filter_extendedTypeId, filter_folderId, filter_heartbeatStatus, filter_includeActive, filter_includeInactive, filter_includeRestricted, filter_includeSubFolders, filter_isExactMatch, filter_onlyRPCEnabled, filter_onlySharedWithMe, filter_passwordTypeIds, filter_permissionRequired, filter_scope, filter_searchField, filter_searchFieldSlug, filter_searchText, filter_secretTemplateId, filter_siteId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secrets - /// Whether to allow DoubleLocks as part of the search. True by default. - /// Whether to return the total number of secrets matching the filters. False by default. If false, the total can be retrieved separately by calling /v1/secrets/search-total with the same arguments used in the search. - /// Only include Secrets with this DoubleLock ID assigned in the search results. - /// An array of names of Secret Template fields to return. Only exposed fields can be returned. - /// If not null, return only secrets matching the specified extended mapping type as defined on the secret’s template. - /// If not null, returns only secrets within the specified folder. - /// If not null, returns only secrets with a certain heartbeat status. - /// Whether to include active secrets in results (when excluded equals true). - /// Whether to include inactive secrets in results. - /// Whether to include restricted secrets in results. Restricted secrets are secrets that are DoubleLocked, require approval, or require a comment to view. - /// Whether to include secrets in subfolders of the specified folder. - /// Whether to do an exact match of the search text or a partial match. If an exact match, the entire secret name, field value, or list option in a list field must match the search text. - /// Whether to only include secrets whose template has Remote Password Changing enabled. - /// When true only Secrets where you are not the owner and the Secret was shared explicitly with your user id will be returned. - /// If not null, returns only secrets matching the specified password types. - /// Specify whether to filter by List, View, Edit, or Owner permission. Default is List. - /// Specify whether to search All, Recent, or Favorites - /// If set, restricts the search to only match secrets where the value of the field specified by name contains the search text. - /// If set, restricts the search to only match secrets where the value of the field specified by the slug name contains the search text. This will override SearchField. - /// The text to match in the secret name, field value, or list field contents. - /// If not null, returns only secrets matching the specified template. - /// If not null, returns only secrets within a the specified site. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(bool? filter_allowDoubleLocks, bool? filter_doNotCalculateTotal, int? filter_doubleLockId, System.Collections.Generic.IEnumerable filter_extendedFields, int? filter_extendedTypeId, int? filter_folderId, string filter_heartbeatStatus, bool? filter_includeActive, bool? filter_includeInactive, bool? filter_includeRestricted, bool? filter_includeSubFolders, bool? filter_isExactMatch, bool? filter_onlyRPCEnabled, bool? filter_onlySharedWithMe, System.Collections.Generic.IEnumerable filter_passwordTypeIds, string filter_permissionRequired, string filter_scope, string filter_searchField, string filter_searchFieldSlug, string filter_searchText, int? filter_secretTemplateId, int? filter_siteId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets?"); - if (filter_allowDoubleLocks != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.allowDoubleLocks") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_allowDoubleLocks, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_doNotCalculateTotal != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.doNotCalculateTotal") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_doNotCalculateTotal, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_doubleLockId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.doubleLockId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_doubleLockId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_extendedFields != null) - { - foreach (var item_ in filter_extendedFields) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.extendedFields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_extendedTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.extendedTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_extendedTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_folderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_heartbeatStatus != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.heartbeatStatus") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_heartbeatStatus, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeRestricted != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeRestricted") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeRestricted, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeSubFolders != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeSubFolders") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeSubFolders, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_isExactMatch != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.isExactMatch") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_isExactMatch, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlyRPCEnabled != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlyRPCEnabled") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlyRPCEnabled, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlySharedWithMe != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlySharedWithMe") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlySharedWithMe, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_passwordTypeIds != null) - { - foreach (var item_ in filter_passwordTypeIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.passwordTypeIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_permissionRequired != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.permissionRequired") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_permissionRequired, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_scope != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.scope") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_scope, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchField != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchField") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchField, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchFieldSlug != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchFieldSlug") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchFieldSlug, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_secretTemplateId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretTemplateId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretTemplateId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_siteId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.siteId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_siteId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Secret - /// Secret creation options - /// Secret object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateSecretAsync(SecretCreateArgs secretCreateArgs) - { - return CreateSecretAsync(secretCreateArgs, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Secret - /// Secret creation options - /// Secret object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateSecretAsync(SecretCreateArgs secretCreateArgs, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(secretCreateArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Search Total - /// Whether to allow DoubleLocks as part of the search. True by default. - /// Whether to return the total number of secrets matching the filters. False by default. If false, the total can be retrieved separately by calling /v1/secrets/search-total with the same arguments used in the search. - /// Only include Secrets with this DoubleLock ID assigned in the search results. - /// An array of names of Secret Template fields to return. Only exposed fields can be returned. - /// If not null, return only secrets matching the specified extended mapping type as defined on the secret’s template. - /// If not null, returns only secrets within the specified folder. - /// If not null, returns only secrets with a certain heartbeat status. - /// Whether to include active secrets in results (when excluded equals true). - /// Whether to include inactive secrets in results. - /// Whether to include restricted secrets in results. Restricted secrets are secrets that are DoubleLocked, require approval, or require a comment to view. - /// Whether to include secrets in subfolders of the specified folder. - /// Whether to do an exact match of the search text or a partial match. If an exact match, the entire secret name, field value, or list option in a list field must match the search text. - /// Whether to only include secrets whose template has Remote Password Changing enabled. - /// When true only Secrets where you are not the owner and the Secret was shared explicitly with your user id will be returned. - /// If not null, returns only secrets matching the specified password types. - /// Specify whether to filter by List, View, Edit, or Owner permission. Default is List. - /// Specify whether to search All, Recent, or Favorites - /// If set, restricts the search to only match secrets where the value of the field specified by name contains the search text. - /// If set, restricts the search to only match secrets where the value of the field specified by the slug name contains the search text. This will override SearchField. - /// The text to match in the secret name, field value, or list field contents. - /// If not null, returns only secrets matching the specified template. - /// If not null, returns only secrets within a the specified site. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Integer number of matching secrets - /// A server side error occurred. - public System.Threading.Tasks.Task SearchTotalAsync(bool? filter_allowDoubleLocks, bool? filter_doNotCalculateTotal, int? filter_doubleLockId, System.Collections.Generic.IEnumerable filter_extendedFields, int? filter_extendedTypeId, int? filter_folderId, string filter_heartbeatStatus, bool? filter_includeActive, bool? filter_includeInactive, bool? filter_includeRestricted, bool? filter_includeSubFolders, bool? filter_isExactMatch, bool? filter_onlyRPCEnabled, bool? filter_onlySharedWithMe, System.Collections.Generic.IEnumerable filter_passwordTypeIds, string filter_permissionRequired, string filter_scope, string filter_searchField, string filter_searchFieldSlug, string filter_searchText, int? filter_secretTemplateId, int? filter_siteId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchTotalAsync(filter_allowDoubleLocks, filter_doNotCalculateTotal, filter_doubleLockId, filter_extendedFields, filter_extendedTypeId, filter_folderId, filter_heartbeatStatus, filter_includeActive, filter_includeInactive, filter_includeRestricted, filter_includeSubFolders, filter_isExactMatch, filter_onlyRPCEnabled, filter_onlySharedWithMe, filter_passwordTypeIds, filter_permissionRequired, filter_scope, filter_searchField, filter_searchFieldSlug, filter_searchText, filter_secretTemplateId, filter_siteId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Search Total - /// Whether to allow DoubleLocks as part of the search. True by default. - /// Whether to return the total number of secrets matching the filters. False by default. If false, the total can be retrieved separately by calling /v1/secrets/search-total with the same arguments used in the search. - /// Only include Secrets with this DoubleLock ID assigned in the search results. - /// An array of names of Secret Template fields to return. Only exposed fields can be returned. - /// If not null, return only secrets matching the specified extended mapping type as defined on the secret’s template. - /// If not null, returns only secrets within the specified folder. - /// If not null, returns only secrets with a certain heartbeat status. - /// Whether to include active secrets in results (when excluded equals true). - /// Whether to include inactive secrets in results. - /// Whether to include restricted secrets in results. Restricted secrets are secrets that are DoubleLocked, require approval, or require a comment to view. - /// Whether to include secrets in subfolders of the specified folder. - /// Whether to do an exact match of the search text or a partial match. If an exact match, the entire secret name, field value, or list option in a list field must match the search text. - /// Whether to only include secrets whose template has Remote Password Changing enabled. - /// When true only Secrets where you are not the owner and the Secret was shared explicitly with your user id will be returned. - /// If not null, returns only secrets matching the specified password types. - /// Specify whether to filter by List, View, Edit, or Owner permission. Default is List. - /// Specify whether to search All, Recent, or Favorites - /// If set, restricts the search to only match secrets where the value of the field specified by name contains the search text. - /// If set, restricts the search to only match secrets where the value of the field specified by the slug name contains the search text. This will override SearchField. - /// The text to match in the secret name, field value, or list field contents. - /// If not null, returns only secrets matching the specified template. - /// If not null, returns only secrets within a the specified site. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Integer number of matching secrets - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchTotalAsync(bool? filter_allowDoubleLocks, bool? filter_doNotCalculateTotal, int? filter_doubleLockId, System.Collections.Generic.IEnumerable filter_extendedFields, int? filter_extendedTypeId, int? filter_folderId, string filter_heartbeatStatus, bool? filter_includeActive, bool? filter_includeInactive, bool? filter_includeRestricted, bool? filter_includeSubFolders, bool? filter_isExactMatch, bool? filter_onlyRPCEnabled, bool? filter_onlySharedWithMe, System.Collections.Generic.IEnumerable filter_passwordTypeIds, string filter_permissionRequired, string filter_scope, string filter_searchField, string filter_searchFieldSlug, string filter_searchText, int? filter_secretTemplateId, int? filter_siteId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/search-total?"); - if (filter_allowDoubleLocks != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.allowDoubleLocks") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_allowDoubleLocks, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_doNotCalculateTotal != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.doNotCalculateTotal") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_doNotCalculateTotal, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_doubleLockId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.doubleLockId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_doubleLockId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_extendedFields != null) - { - foreach (var item_ in filter_extendedFields) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.extendedFields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_extendedTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.extendedTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_extendedTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_folderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_heartbeatStatus != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.heartbeatStatus") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_heartbeatStatus, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeRestricted != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeRestricted") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeRestricted, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeSubFolders != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeSubFolders") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeSubFolders, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_isExactMatch != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.isExactMatch") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_isExactMatch, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlyRPCEnabled != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlyRPCEnabled") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlyRPCEnabled, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlySharedWithMe != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlySharedWithMe") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlySharedWithMe, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_passwordTypeIds != null) - { - foreach (var item_ in filter_passwordTypeIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.passwordTypeIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_permissionRequired != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.permissionRequired") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_permissionRequired, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_scope != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.scope") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_scope, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchField != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchField") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchField, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchFieldSlug != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchFieldSlug") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchFieldSlug, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_secretTemplateId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretTemplateId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretTemplateId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_siteId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.siteId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_siteId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Lookup Secrets with Search - /// Whether to allow DoubleLocks as part of the search. True by default. - /// Whether to return the total number of secrets matching the filters. False by default. If false, the total can be retrieved separately by calling /v1/secrets/search-total with the same arguments used in the search. - /// Only include Secrets with this DoubleLock ID assigned in the search results. - /// An array of names of Secret Template fields to return. Only exposed fields can be returned. - /// If not null, return only secrets matching the specified extended mapping type as defined on the secret’s template. - /// If not null, returns only secrets within the specified folder. - /// If not null, returns only secrets with a certain heartbeat status. - /// Whether to include active secrets in results (when excluded equals true). - /// Whether to include inactive secrets in results. - /// Whether to include restricted secrets in results. Restricted secrets are secrets that are DoubleLocked, require approval, or require a comment to view. - /// Whether to include secrets in subfolders of the specified folder. - /// Whether to do an exact match of the search text or a partial match. If an exact match, the entire secret name, field value, or list option in a list field must match the search text. - /// Whether to only include secrets whose template has Remote Password Changing enabled. - /// When true only Secrets where you are not the owner and the Secret was shared explicitly with your user id will be returned. - /// If not null, returns only secrets matching the specified password types. - /// Specify whether to filter by List, View, Edit, or Owner permission. Default is List. - /// Specify whether to search All, Recent, or Favorites - /// If set, restricts the search to only match secrets where the value of the field specified by name contains the search text. - /// If set, restricts the search to only match secrets where the value of the field specified by the slug name contains the search text. This will override SearchField. - /// The text to match in the secret name, field value, or list field contents. - /// If not null, returns only secrets matching the specified template. - /// If not null, returns only secrets within a the specified site. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSecretLookupAsync(bool? filter_allowDoubleLocks, bool? filter_doNotCalculateTotal, int? filter_doubleLockId, System.Collections.Generic.IEnumerable filter_extendedFields, int? filter_extendedTypeId, int? filter_folderId, string filter_heartbeatStatus, bool? filter_includeActive, bool? filter_includeInactive, bool? filter_includeRestricted, bool? filter_includeSubFolders, bool? filter_isExactMatch, bool? filter_onlyRPCEnabled, bool? filter_onlySharedWithMe, System.Collections.Generic.IEnumerable filter_passwordTypeIds, string filter_permissionRequired, string filter_scope, string filter_searchField, string filter_searchFieldSlug, string filter_searchText, int? filter_secretTemplateId, int? filter_siteId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSecretLookupAsync(filter_allowDoubleLocks, filter_doNotCalculateTotal, filter_doubleLockId, filter_extendedFields, filter_extendedTypeId, filter_folderId, filter_heartbeatStatus, filter_includeActive, filter_includeInactive, filter_includeRestricted, filter_includeSubFolders, filter_isExactMatch, filter_onlyRPCEnabled, filter_onlySharedWithMe, filter_passwordTypeIds, filter_permissionRequired, filter_scope, filter_searchField, filter_searchFieldSlug, filter_searchText, filter_secretTemplateId, filter_siteId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lookup Secrets with Search - /// Whether to allow DoubleLocks as part of the search. True by default. - /// Whether to return the total number of secrets matching the filters. False by default. If false, the total can be retrieved separately by calling /v1/secrets/search-total with the same arguments used in the search. - /// Only include Secrets with this DoubleLock ID assigned in the search results. - /// An array of names of Secret Template fields to return. Only exposed fields can be returned. - /// If not null, return only secrets matching the specified extended mapping type as defined on the secret’s template. - /// If not null, returns only secrets within the specified folder. - /// If not null, returns only secrets with a certain heartbeat status. - /// Whether to include active secrets in results (when excluded equals true). - /// Whether to include inactive secrets in results. - /// Whether to include restricted secrets in results. Restricted secrets are secrets that are DoubleLocked, require approval, or require a comment to view. - /// Whether to include secrets in subfolders of the specified folder. - /// Whether to do an exact match of the search text or a partial match. If an exact match, the entire secret name, field value, or list option in a list field must match the search text. - /// Whether to only include secrets whose template has Remote Password Changing enabled. - /// When true only Secrets where you are not the owner and the Secret was shared explicitly with your user id will be returned. - /// If not null, returns only secrets matching the specified password types. - /// Specify whether to filter by List, View, Edit, or Owner permission. Default is List. - /// Specify whether to search All, Recent, or Favorites - /// If set, restricts the search to only match secrets where the value of the field specified by name contains the search text. - /// If set, restricts the search to only match secrets where the value of the field specified by the slug name contains the search text. This will override SearchField. - /// The text to match in the secret name, field value, or list field contents. - /// If not null, returns only secrets matching the specified template. - /// If not null, returns only secrets within a the specified site. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSecretLookupAsync(bool? filter_allowDoubleLocks, bool? filter_doNotCalculateTotal, int? filter_doubleLockId, System.Collections.Generic.IEnumerable filter_extendedFields, int? filter_extendedTypeId, int? filter_folderId, string filter_heartbeatStatus, bool? filter_includeActive, bool? filter_includeInactive, bool? filter_includeRestricted, bool? filter_includeSubFolders, bool? filter_isExactMatch, bool? filter_onlyRPCEnabled, bool? filter_onlySharedWithMe, System.Collections.Generic.IEnumerable filter_passwordTypeIds, string filter_permissionRequired, string filter_scope, string filter_searchField, string filter_searchFieldSlug, string filter_searchText, int? filter_secretTemplateId, int? filter_siteId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/lookup?"); - if (filter_allowDoubleLocks != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.allowDoubleLocks") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_allowDoubleLocks, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_doNotCalculateTotal != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.doNotCalculateTotal") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_doNotCalculateTotal, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_doubleLockId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.doubleLockId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_doubleLockId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_extendedFields != null) - { - foreach (var item_ in filter_extendedFields) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.extendedFields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_extendedTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.extendedTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_extendedTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_folderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_heartbeatStatus != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.heartbeatStatus") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_heartbeatStatus, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeRestricted != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeRestricted") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeRestricted, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeSubFolders != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeSubFolders") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeSubFolders, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_isExactMatch != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.isExactMatch") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_isExactMatch, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlyRPCEnabled != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlyRPCEnabled") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlyRPCEnabled, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_onlySharedWithMe != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.onlySharedWithMe") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_onlySharedWithMe, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_passwordTypeIds != null) - { - foreach (var item_ in filter_passwordTypeIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.passwordTypeIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_permissionRequired != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.permissionRequired") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_permissionRequired, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_scope != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.scope") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_scope, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchField != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchField") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchField, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchFieldSlug != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchFieldSlug") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchFieldSlug, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_secretTemplateId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretTemplateId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretTemplateId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_siteId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.siteId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_siteId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Lookup Secret - /// Secret ID - /// Secret lookup result object - /// A server side error occurred. - public System.Threading.Tasks.Task GetLookupAsync(int id) - { - return GetLookupAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lookup Secret - /// Secret ID - /// Secret lookup result object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetLookupAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/lookup/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Stub - /// Containing folder ID. May be null unless secrets are required to be in folders. - /// Secret template ID - /// Secret object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync(int? folderId, int secretTemplateId) - { - return StubAsync(folderId, secretTemplateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Stub - /// Containing folder ID. May be null unless secrets are required to be in folders. - /// Secret template ID - /// Secret object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(int? folderId, int secretTemplateId, System.Threading.CancellationToken cancellationToken) - { - if (secretTemplateId == null) - throw new System.ArgumentNullException("secretTemplateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/stub?"); - if (folderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Append(System.Uri.EscapeDataString("secretTemplateId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(secretTemplateId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Summary - /// Secret ID - /// Secret summary object - /// A server side error occurred. - public System.Threading.Tasks.Task GetSummaryAsync(int id) - { - return GetSummaryAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Summary - /// Secret ID - /// Secret summary object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSummaryAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/summary"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Field - /// Whether to include inactive secrets in the results - /// Don't check out the secret if needed - /// Secret ID - /// Secret field name - /// Secret field value. If the field is a file attachment, the content type will be `application/octet-stream` and the response body will be the file contents. - /// A server side error occurred. - public System.Threading.Tasks.Task GetFieldAsync(bool? includeInactive, bool? noAutoCheckout, int id, string slug) - { - return GetFieldAsync(includeInactive, noAutoCheckout, id, slug, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Field - /// Whether to include inactive secrets in the results - /// Don't check out the secret if needed - /// Secret ID - /// Secret field name - /// Secret field value. If the field is a file attachment, the content type will be `application/octet-stream` and the response body will be the file contents. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetFieldAsync(bool? includeInactive, bool? noAutoCheckout, int id, string slug, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (slug == null) - throw new System.ArgumentNullException("slug"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/fields/{slug}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{slug}", System.Uri.EscapeDataString(ConvertToString(slug, System.Globalization.CultureInfo.InvariantCulture))); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (noAutoCheckout != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("noAutoCheckout") + "=").Append(System.Uri.EscapeDataString(ConvertToString(noAutoCheckout, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Field - /// Secret options - /// Secret ID - /// Secret field name - /// The updated value, or 'true' if the field is a file attachment - /// A server side error occurred. - public System.Threading.Tasks.Task PutFieldAsync(SecretItemUpdateArgs args, int id, string slug) - { - return PutFieldAsync(args, id, slug, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Field - /// Secret options - /// Secret ID - /// Secret field name - /// The updated value, or 'true' if the field is a file attachment - /// A server side error occurred. - public async System.Threading.Tasks.Task PutFieldAsync(SecretItemUpdateArgs args, int id, string slug, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (slug == null) - throw new System.ArgumentNullException("slug"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/fields/{slug}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{slug}", System.Uri.EscapeDataString(ConvertToString(slug, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret List Field - /// Secret ID - /// Secret field name - /// Combined contents of all lists assigned to the secret field. - /// A server side error occurred. - public System.Threading.Tasks.Task GetListFieldAsync(int id, string slug) - { - return GetListFieldAsync(id, slug, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret List Field - /// Secret ID - /// Secret field name - /// Combined contents of all lists assigned to the secret field. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetListFieldAsync(int id, string slug, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (slug == null) - throw new System.ArgumentNullException("slug"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/fields/{slug}/list"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{slug}", System.Uri.EscapeDataString(ConvertToString(slug, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// List a User's Favorite Secrets - /// Identifying information for each secret favorited - /// A server side error occurred. - public System.Threading.Tasks.Task> GetFavoritesAsync() - { - return GetFavoritesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// List a User's Favorite Secrets - /// Identifying information for each secret favorited - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetFavoritesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/favorite"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Audits by Filter - /// id - /// Whether or not to include password changes in data - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Audit Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretAuditsAsync(int id, bool? filter_includePasswordChangeLog, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetSecretAuditsAsync(id, filter_includePasswordChangeLog, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Audits by Filter - /// id - /// Whether or not to include password changes in data - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Audit Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretAuditsAsync(int id, bool? filter_includePasswordChangeLog, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/audits?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_includePasswordChangeLog != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includePasswordChangeLog") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includePasswordChangeLog, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret State - /// id - /// Secret Detail State View Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretStateAsync(int id) - { - return GetSecretStateAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret State - /// id - /// Secret Detail State View Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretStateAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/state"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Settings - /// id - /// Secret Settings - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretSettingsAsync(int id) - { - return GetSecretSettingsAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Settings - /// id - /// Secret Settings - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretSettingsAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/settings"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Launcher Sessions By Id - /// The Id of the associated Secret. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Launcher Sessions - /// A server side error occurred. - public System.Threading.Tasks.Task GetActiveSecretSessionsAsync(int? filter_secretId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetActiveSecretSessionsAsync(filter_secretId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Launcher Sessions By Id - /// The Id of the associated Secret. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret Launcher Sessions - /// A server side error occurred. - public async System.Threading.Tasks.Task GetActiveSecretSessionsAsync(int? filter_secretId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/launcher-sessions?"); - if (filter_secretId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_secretId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Launcher Sessions - /// args - /// Result of the update Secret Launcher Session Request - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecretSessionAsync(SecretLauncherSessionArgs args) - { - return UpdateSecretSessionAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Launcher Sessions - /// args - /// Result of the update Secret Launcher Session Request - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecretSessionAsync(SecretLauncherSessionArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/launcher-sessions"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret General Information - /// args - /// id - /// Secret General Information - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateGeneralAsync(SecretDetailUpdateGeneralArgs args, int id) - { - return UpdateGeneralAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret General Information - /// args - /// id - /// Secret General Information - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateGeneralAsync(SecretDetailUpdateGeneralArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/general"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update User Secret Email Settings - /// args - /// id - /// SecretDetailSettingsViewModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEmailAsync(SecretDetailUpdateEmailArgs args, int id) - { - return UpdateEmailAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update User Secret Email Settings - /// args - /// id - /// SecretDetailSettingsViewModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEmailAsync(SecretDetailUpdateEmailArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/email"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Security General Options - /// args - /// id - /// SecretDetailSecurityViewModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecurityAsync(SecretDetailUpdateSecurityGeneralArgs args, int id) - { - return UpdateSecurityAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Security General Options - /// args - /// id - /// SecretDetailSecurityViewModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecurityAsync(SecretDetailUpdateSecurityGeneralArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/security-general"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret General Information - /// args - /// id - /// Secret General Information - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateGeneralV2Async(SecretDetailUpdateGeneralArgs args, int id) - { - return UpdateGeneralV2Async(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret General Information - /// args - /// id - /// Secret General Information - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateGeneralV2Async(SecretDetailUpdateGeneralArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secrets/{id}/general"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update User Secret Email Settings - /// args - /// id - /// SecretDetailSettingsViewModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateEmailV2Async(SecretDetailUpdateEmailArgs args, int id) - { - return UpdateEmailV2Async(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update User Secret Email Settings - /// args - /// id - /// SecretDetailSettingsViewModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateEmailV2Async(SecretDetailUpdateEmailArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secrets/{id}/email"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Security Checkout Options - /// args - /// id - /// A model with the updated security options if available and a success code - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecurityCheckoutV3Async(SecretDetailUpdateSecurityCheckoutArgs args, int id) - { - return UpdateSecurityCheckoutV3Async(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Security Checkout Options - /// args - /// id - /// A model with the updated security options if available and a success code - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecurityCheckoutV3Async(SecretDetailUpdateSecurityCheckoutArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v3/secrets/{id}/security-checkout"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Security General Options - /// args - /// id - /// SecretDetailSecurityViewModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecurityV2Async(SecretDetailUpdateSecurityGeneralArgs args, int id) - { - return UpdateSecurityV2Async(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Security General Options - /// args - /// id - /// SecretDetailSecurityViewModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecurityV2Async(SecretDetailUpdateSecurityGeneralArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secrets/{id}/security-general"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Restricted Secret - /// Secret options - /// Secret ID - /// Secret object - /// A server side error occurred. - public System.Threading.Tasks.Task GetRestrictedAsync(SecretRestrictedArgs args, int id) - { - return GetRestrictedAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Restricted Secret - /// Secret options - /// Secret ID - /// Secret object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRestrictedAsync(SecretRestrictedArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/restricted"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Run Secret Heartbeat - /// Secret ID - /// Secret summary object - /// A server side error occurred. - public System.Threading.Tasks.Task RunHeartBeatAsync(int id) - { - return RunHeartBeatAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Run Secret Heartbeat - /// Secret ID - /// Secret summary object - /// A server side error occurred. - public async System.Threading.Tasks.Task RunHeartBeatAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/heartbeat"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Expire Secret - /// Secret ID - /// Secret options - /// Secret summary object - /// A server side error occurred. - public System.Threading.Tasks.Task ExpireAsync(int id, SecretRestrictedArgs restrictedArgs) - { - return ExpireAsync(id, restrictedArgs, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Expire Secret - /// Secret ID - /// Secret options - /// Secret summary object - /// A server side error occurred. - public async System.Threading.Tasks.Task ExpireAsync(int id, SecretRestrictedArgs restrictedArgs, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/expire"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(restrictedArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Change Secret Password - /// Secret options - /// Secret ID - /// Secret summary object - /// A server side error occurred. - public System.Threading.Tasks.Task ChangePasswordAsync(SecretChangePasswordArgs changePasswordArgs, int id) - { - return ChangePasswordAsync(changePasswordArgs, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Change Secret Password - /// Secret options - /// Secret ID - /// Secret summary object - /// A server side error occurred. - public async System.Threading.Tasks.Task ChangePasswordAsync(SecretChangePasswordArgs changePasswordArgs, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/change-password"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(changePasswordArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Check In Secret - /// Secret ID - /// Secret options - /// Secret summary object - /// A server side error occurred. - public System.Threading.Tasks.Task CheckInAsync(int id, SecretRestrictedArgs restrictedArgs) - { - return CheckInAsync(id, restrictedArgs, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Check In Secret - /// Secret ID - /// Secret options - /// Secret summary object - /// A server side error occurred. - public async System.Threading.Tasks.Task CheckInAsync(int id, SecretRestrictedArgs restrictedArgs, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/check-in"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(restrictedArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Check Out Secret - /// Secret ID - /// Secret Response Code Model object - /// A server side error occurred. - public System.Threading.Tasks.Task CheckOutAsync(int id) - { - return CheckOutAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Check Out Secret - /// Secret ID - /// Secret Response Code Model object - /// A server side error occurred. - public async System.Threading.Tasks.Task CheckOutAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/check-out"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Restricted Secret Field - /// Secret options - /// Secret ID - /// Secret field name - /// Secret field value. If the field is a file attachment, the content type will be `application/octet-stream` and the response body will be the file contents. - /// A server side error occurred. - public System.Threading.Tasks.Task RestrictedFieldAsync(SecretRestrictedArgs args, int id, string slug) - { - return RestrictedFieldAsync(args, id, slug, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Restricted Secret Field - /// Secret options - /// Secret ID - /// Secret field name - /// Secret field value. If the field is a file attachment, the content type will be `application/octet-stream` and the response body will be the file contents. - /// A server side error occurred. - public async System.Threading.Tasks.Task RestrictedFieldAsync(SecretRestrictedArgs args, int id, string slug, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (slug == null) - throw new System.ArgumentNullException("slug"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/restricted/fields/{slug}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{slug}", System.Uri.EscapeDataString(ConvertToString(slug, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get RDP Proxy Information - /// args - /// RDP Proxy Information - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretRdpProxyInfoAsync(SecretProxyArgs args) - { - return GetSecretRdpProxyInfoAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get RDP Proxy Information - /// args - /// RDP Proxy Information - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretRdpProxyInfoAsync(SecretProxyArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/rdpproxy"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get SSH Proxy Information - /// args - /// SSH Proxy Information - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretSshProxyInfoAsync(SecretProxyArgs args) - { - return GetSecretSshProxyInfoAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SSH Proxy Information - /// args - /// SSH Proxy Information - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretSshProxyInfoAsync(SecretProxyArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/sshproxy"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get SSH Terminal Details - /// args - /// SSH Terminal Details - /// A server side error occurred. - public System.Threading.Tasks.Task GetSecretSshTerminalDetailsAsync(SecretSshTerminalArgs args) - { - return GetSecretSshTerminalDetailsAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SSH Terminal Details - /// args - /// SSH Terminal Details - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSecretSshTerminalDetailsAsync(SecretSshTerminalArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/sshterminal"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Favorite a Secret - /// args - /// The secret to favorite or unfavorite. - /// Whether or not the secret is now favorited by the user. - /// A server side error occurred. - public System.Threading.Tasks.Task FavoriteAsync(FavoriteSecretArgs args, int secretId) - { - return FavoriteAsync(args, secretId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Favorite a Secret - /// args - /// The secret to favorite or unfavorite. - /// Whether or not the secret is now favorited by the user. - /// A server side error occurred. - public async System.Threading.Tasks.Task FavoriteAsync(FavoriteSecretArgs args, int secretId, System.Threading.CancellationToken cancellationToken) - { - if (secretId == null) - throw new System.ArgumentNullException("secretId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{secretId}/favorite"); - urlBuilder_.Replace("{secretId}", System.Uri.EscapeDataString(ConvertToString(secretId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Attempt to stop a password change - /// id - /// Attempt to stop a password change - /// A server side error occurred. - public System.Threading.Tasks.Task StopPasswordChangeAsync(int id) - { - return StopPasswordChangeAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Attempt to stop a password change - /// id - /// Attempt to stop a password change - /// A server side error occurred. - public async System.Threading.Tasks.Task StopPasswordChangeAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/stop-password-change"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update which Secrets are available for RPC scripts - /// args - /// id - /// SecretDetailRpcViewModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateRpcScriptSecretsAsync(SecretDetailUpdateRpcScriptSecretsArgs args, int id) - { - return UpdateRpcScriptSecretsAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update which Secrets are available for RPC scripts - /// args - /// id - /// SecretDetailRpcViewModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateRpcScriptSecretsAsync(SecretDetailUpdateRpcScriptSecretsArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/rpc-script-secrets"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Undelete a Secret - /// id - /// Secret - /// A server side error occurred. - public System.Threading.Tasks.Task UndeleteSecretAsync(int id) - { - return UndeleteSecretAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Undelete a Secret - /// id - /// Secret - /// A server side error occurred. - public async System.Threading.Tasks.Task UndeleteSecretAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/activate"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update which Secrets are available for RPC scripts - /// args - /// id - /// SecretDetailRpcViewModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateRpcScriptSecretsV2Async(SecretDetailUpdateRpcScriptSecretsArgs args, int id) - { - return UpdateRpcScriptSecretsV2Async(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update which Secrets are available for RPC scripts - /// args - /// id - /// SecretDetailRpcViewModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateRpcScriptSecretsV2Async(SecretDetailUpdateRpcScriptSecretsArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secrets/{id}/rpc-script-secrets"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Security Approval Options - /// args - /// id - /// SecretDetailSecurityViewModel - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSecurityApprovalV3Async(SecretDetailUpdateSecurityApprovalArgs args, int id) - { - return UpdateSecurityApprovalV3Async(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Security Approval Options - /// args - /// id - /// SecretDetailSecurityViewModel - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSecurityApprovalV3Async(SecretDetailUpdateSecurityApprovalArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v3/secrets/{id}/security-approval"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Undelete a Secret - /// id - /// Secret - /// A server side error occurred. - public System.Threading.Tasks.Task UndeleteSecretV2Async(int id) - { - return UndeleteSecretV2Async(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Undelete a Secret - /// id - /// Secret - /// A server side error occurred. - public async System.Threading.Tasks.Task UndeleteSecretV2Async(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/secrets/{id}/activate"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a Secret expiration - /// args - /// id - /// Updated secret settings - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateExpirationAsync(SecretDetailUpdateExpirationArgs args, int id) - { - return UpdateExpirationAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a Secret expiration - /// args - /// id - /// Updated secret settings - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateExpirationAsync(SecretDetailUpdateExpirationArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secrets/{id}/expiration"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - - // RR fix date conversion exception - serializer.DateParseHandling = Newtonsoft.Json.DateParseHandling.None; - serializer.Converters.Add(new Newtonsoft.Json.Converters.IsoDateTimeConverter { DateTimeStyles = System.Globalization.DateTimeStyles.AssumeUniversal }); - // END - - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretServerSettingsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretServerSettingsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Secret Server Settings - /// LoadAdvancedSettings - /// LoadAll - /// LoadApplicationSettings - /// LoadEmail - /// LoadFolderSettings - /// LoadLauncherSettings - /// LoadLicenses - /// LoadLocalUserPasswords - /// LoadLogin - /// LoadPermissionOptions - /// LoadProtocolHandlerSettings - /// LoadSaml - /// LoadSecurity - /// LoadSessionRecording - /// LoadSshCommands - /// LoadTicketSystem - /// LoadUserExperience - /// LoadUserInterface - /// Secret Server Settings - /// A server side error occurred. - public System.Threading.Tasks.Task GetExportAsync(bool? loadAdvancedSettings, bool? loadAll, bool? loadApplicationSettings, bool? loadEmail, bool? loadFolderSettings, bool? loadLauncherSettings, bool? loadLicenses, bool? loadLocalUserPasswords, bool? loadLogin, bool? loadPermissionOptions, bool? loadProtocolHandlerSettings, bool? loadSaml, bool? loadSecurity, bool? loadSessionRecording, bool? loadSshCommands, bool? loadTicketSystem, bool? loadUserExperience, bool? loadUserInterface) - { - return GetExportAsync(loadAdvancedSettings, loadAll, loadApplicationSettings, loadEmail, loadFolderSettings, loadLauncherSettings, loadLicenses, loadLocalUserPasswords, loadLogin, loadPermissionOptions, loadProtocolHandlerSettings, loadSaml, loadSecurity, loadSessionRecording, loadSshCommands, loadTicketSystem, loadUserExperience, loadUserInterface, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Server Settings - /// LoadAdvancedSettings - /// LoadAll - /// LoadApplicationSettings - /// LoadEmail - /// LoadFolderSettings - /// LoadLauncherSettings - /// LoadLicenses - /// LoadLocalUserPasswords - /// LoadLogin - /// LoadPermissionOptions - /// LoadProtocolHandlerSettings - /// LoadSaml - /// LoadSecurity - /// LoadSessionRecording - /// LoadSshCommands - /// LoadTicketSystem - /// LoadUserExperience - /// LoadUserInterface - /// Secret Server Settings - /// A server side error occurred. - public async System.Threading.Tasks.Task GetExportAsync(bool? loadAdvancedSettings, bool? loadAll, bool? loadApplicationSettings, bool? loadEmail, bool? loadFolderSettings, bool? loadLauncherSettings, bool? loadLicenses, bool? loadLocalUserPasswords, bool? loadLogin, bool? loadPermissionOptions, bool? loadProtocolHandlerSettings, bool? loadSaml, bool? loadSecurity, bool? loadSessionRecording, bool? loadSshCommands, bool? loadTicketSystem, bool? loadUserExperience, bool? loadUserInterface, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secretserversettings/export?"); - if (loadAdvancedSettings != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadAdvancedSettings") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadAdvancedSettings, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadAll != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadAll") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadAll, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadApplicationSettings != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadApplicationSettings") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadApplicationSettings, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadEmail != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadEmail") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadEmail, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadFolderSettings != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadFolderSettings") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadFolderSettings, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadLauncherSettings != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadLauncherSettings") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadLauncherSettings, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadLicenses != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadLicenses") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadLicenses, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadLocalUserPasswords != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadLocalUserPasswords") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadLocalUserPasswords, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadLogin != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadLogin") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadLogin, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadPermissionOptions != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadPermissionOptions") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadPermissionOptions, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadProtocolHandlerSettings != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadProtocolHandlerSettings") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadProtocolHandlerSettings, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadSaml != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadSaml") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadSaml, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadSecurity != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadSecurity") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadSecurity, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadSessionRecording != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadSessionRecording") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadSessionRecording, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadSshCommands != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadSshCommands") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadSshCommands, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadTicketSystem != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadTicketSystem") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadTicketSystem, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadUserExperience != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadUserExperience") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadUserExperience, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (loadUserInterface != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("loadUserInterface") + "=").Append(System.Uri.EscapeDataString(ConvertToString(loadUserInterface, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Stub an empty Secret Server Settings export - /// An empty Secret Server Settings export - /// A server side error occurred. - public System.Threading.Tasks.Task GetExportStubAsync() - { - return GetExportStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Stub an empty Secret Server Settings export - /// An empty Secret Server Settings export - /// A server side error occurred. - public async System.Threading.Tasks.Task GetExportStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secretserversettings/export/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Import/Export Capabilities - /// args - /// Capability model - /// A server side error occurred. - public System.Threading.Tasks.Task GetExportImportCapabilitiesAsync(SecretServerSettingsImportCapabilitiesArgs args) - { - return GetExportImportCapabilitiesAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Import/Export Capabilities - /// args - /// Capability model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetExportImportCapabilitiesAsync(SecretServerSettingsImportCapabilitiesArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secretserversettings/capabilities"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Import Secret Server Settings - /// args - /// The now active configuration. - /// A server side error occurred. - public System.Threading.Tasks.Task ImportSettingAsync(SecretServerSettingsImportArgs args) - { - return ImportSettingAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Import Secret Server Settings - /// args - /// The now active configuration. - /// A server side error occurred. - public async System.Threading.Tasks.Task ImportSettingAsync(SecretServerSettingsImportArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secretserversettings/import"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretSessionsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretSessionsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search Recorded Sessions - /// Filter by active or inactive status - /// Return sessions within a certain number of days - /// EndDate - /// EndTime - /// Filter by folder - /// Return sessions for specific groups - /// IncludeNonSecretServerSessions - /// Return only sessions that launched successfully - /// Whether to include restricted secret sessions - /// Whether to include subfolders in a folder search - /// Filter by launcher type - /// Search text - /// Specifies the sources of information you want to search across, can be many of (SecretItems, Username, Hostname, Domain, RdpKeystroke, RdpApplication, ProxyClient) - /// Return sessions for specific secrets - /// SiteId - /// StartDate - /// StartTime - /// Return sessions for specific users - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Recorded session search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSessionsAsync(bool? filter_active, System.TimeSpan? filter_dateRange, System.DateTimeOffset? filter_endDate, string filter_endTime, int? filter_folderId, System.Collections.Generic.IEnumerable filter_groupIds, bool? filter_includeNonSecretServerSessions, bool? filter_includeOnlyLaunchedSuccessfully, bool? filter_includeRestricted, bool? filter_includeSubFolders, int? filter_launcherTypeId, string filter_searchText, System.Collections.Generic.IEnumerable filter_searchTypes, System.Collections.Generic.IEnumerable filter_secretIds, int? filter_siteId, System.DateTimeOffset? filter_startDate, string filter_startTime, System.Collections.Generic.IEnumerable filter_userIds, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSessionsAsync(filter_active, filter_dateRange, filter_endDate, filter_endTime, filter_folderId, filter_groupIds, filter_includeNonSecretServerSessions, filter_includeOnlyLaunchedSuccessfully, filter_includeRestricted, filter_includeSubFolders, filter_launcherTypeId, filter_searchText, filter_searchTypes, filter_secretIds, filter_siteId, filter_startDate, filter_startTime, filter_userIds, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Recorded Sessions - /// Filter by active or inactive status - /// Return sessions within a certain number of days - /// EndDate - /// EndTime - /// Filter by folder - /// Return sessions for specific groups - /// IncludeNonSecretServerSessions - /// Return only sessions that launched successfully - /// Whether to include restricted secret sessions - /// Whether to include subfolders in a folder search - /// Filter by launcher type - /// Search text - /// Specifies the sources of information you want to search across, can be many of (SecretItems, Username, Hostname, Domain, RdpKeystroke, RdpApplication, ProxyClient) - /// Return sessions for specific secrets - /// SiteId - /// StartDate - /// StartTime - /// Return sessions for specific users - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Recorded session search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSessionsAsync(bool? filter_active, System.TimeSpan? filter_dateRange, System.DateTimeOffset? filter_endDate, string filter_endTime, int? filter_folderId, System.Collections.Generic.IEnumerable filter_groupIds, bool? filter_includeNonSecretServerSessions, bool? filter_includeOnlyLaunchedSuccessfully, bool? filter_includeRestricted, bool? filter_includeSubFolders, int? filter_launcherTypeId, string filter_searchText, System.Collections.Generic.IEnumerable filter_searchTypes, System.Collections.Generic.IEnumerable filter_secretIds, int? filter_siteId, System.DateTimeOffset? filter_startDate, string filter_startTime, System.Collections.Generic.IEnumerable filter_userIds, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/recorded-sessions?"); - if (filter_active != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.active") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_active, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_dateRange != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.dateRange") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_dateRange, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_endDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.endDate") + "=").Append(System.Uri.EscapeDataString(filter_endDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_endTime != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.endTime") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_endTime, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_folderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_groupIds != null) - { - foreach (var item_ in filter_groupIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.groupIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_includeNonSecretServerSessions != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeNonSecretServerSessions") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeNonSecretServerSessions, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeOnlyLaunchedSuccessfully != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeOnlyLaunchedSuccessfully") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeOnlyLaunchedSuccessfully, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeRestricted != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeRestricted") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeRestricted, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeSubFolders != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeSubFolders") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeSubFolders, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_launcherTypeId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.launcherTypeId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_launcherTypeId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchTypes != null) - { - foreach (var item_ in filter_searchTypes) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchTypes") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_secretIds != null) - { - foreach (var item_ in filter_secretIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.secretIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_siteId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.siteId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_siteId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_startDate != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.startDate") + "=").Append(System.Uri.EscapeDataString(filter_startDate.Value.ToString("s", System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_startTime != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.startTime") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_startTime, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userIds != null) - { - foreach (var item_ in filter_userIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.userIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Recorded Session - /// Recorded session ID - /// Recorded session object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(System.Guid id) - { - return GetAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Recorded Session - /// Recorded session ID - /// Recorded session object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/recorded-sessions/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Recorded Session Summary - /// Recorded session ID - /// Recorded session summary - /// A server side error occurred. - public System.Threading.Tasks.Task GetSummaryAsync(System.Guid id) - { - return GetSummaryAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Recorded Session Summary - /// Recorded session ID - /// Recorded session summary - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSummaryAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/recorded-sessions/{id}/summary"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Recorded Session Points of Interest - /// Recorded session ID - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Recorded session points of interest - /// A server side error occurred. - public System.Threading.Tasks.Task SearchPointsOfInterestAsync(System.Guid id, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchPointsOfInterestAsync(id, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Recorded Session Points of Interest - /// Recorded session ID - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Recorded session points of interest - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchPointsOfInterestAsync(System.Guid id, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/recorded-sessions/{id}/points-of-interest?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Recorded Session Points of Interest Summary - /// Recorded session ID - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Recorded session points of interest summary - /// A server side error occurred. - public System.Threading.Tasks.Task SearchPointsOfInterestSummaryAsync(System.Guid id, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchPointsOfInterestSummaryAsync(id, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Recorded Session Points of Interest Summary - /// Recorded session ID - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Recorded session points of interest summary - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchPointsOfInterestSummaryAsync(System.Guid id, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/recorded-sessions/{id}/points-of-interest-summary?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Recorded Session Video Stream - /// Recorded session ID - /// Recorded session video stream - /// A server side error occurred. - public System.Threading.Tasks.Task GetSessionRecordingAsync(System.Guid id) - { - return GetSessionRecordingAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Recorded Session Video Stream - /// Recorded session ID - /// Recorded session video stream - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSessionRecordingAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/recorded-sessions/{id}/session-recordings"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Request Immediate Session Processing - /// Recorded session ID - /// Unknown or empty response - /// A server side error occurred. - public System.Threading.Tasks.Task ProcessSessionAsync(System.Guid id) - { - return ProcessSessionAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Request Immediate Session Processing - /// Recorded session ID - /// Unknown or empty response - /// A server side error occurred. - public async System.Threading.Tasks.Task ProcessSessionAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/recorded-sessions/{id}/request-processing"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - return; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretTemplatePermissionsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretTemplatePermissionsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search Secret Template Permissions - /// GroupId - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret template permission search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(int? filter_groupId, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_groupId, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secret Template Permissions - /// GroupId - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret template permission search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(int? filter_groupId, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-template-permissions?"); - if (filter_groupId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.groupId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_groupId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Templates Permissions - /// Secret permission creation options - /// Secret permission object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateAsync(SecretTemplatePermissionsUpdateArgs args) - { - return UpdateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Templates Permissions - /// Secret permission creation options - /// Secret permission object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateAsync(SecretTemplatePermissionsUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-template-permissions"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecretTemplatesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecretTemplatesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Disable a Secret Template Field For Template - /// Secret Template Field to disable - /// Secret Template Field object - /// A server side error occurred. - public System.Threading.Tasks.Task DisableFieldAsync(int templateFieldId) - { - return DisableFieldAsync(templateFieldId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Disable a Secret Template Field For Template - /// Secret Template Field to disable - /// Secret Template Field object - /// A server side error occurred. - public async System.Threading.Tasks.Task DisableFieldAsync(int templateFieldId, System.Threading.CancellationToken cancellationToken) - { - if (templateFieldId == null) - throw new System.ArgumentNullException("templateFieldId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/fields/{templateFieldId}"); - urlBuilder_.Replace("{templateFieldId}", System.Uri.EscapeDataString(ConvertToString(templateFieldId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Gets a specific password dictionary by ID - /// id - /// The name and contents of the password dictionary - /// A server side error occurred. - public System.Threading.Tasks.Task GetPasswordDictionaryAsync(int id) - { - return GetPasswordDictionaryAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets a specific password dictionary by ID - /// id - /// The name and contents of the password dictionary - /// A server side error occurred. - public async System.Threading.Tasks.Task GetPasswordDictionaryAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/password-requirements/password-dictionaries/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Deletes a specific password dictionary by ID - /// id - /// true - /// A server side error occurred. - public System.Threading.Tasks.Task DeletePasswordDictionaryAsync(int id) - { - return DeletePasswordDictionaryAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Deletes a specific password dictionary by ID - /// id - /// true - /// A server side error occurred. - public async System.Threading.Tasks.Task DeletePasswordDictionaryAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/password-requirements/password-dictionaries/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Secret Templates - /// Whether to include inactive secret templates in the results - /// Whether to populate Secret count in the results - /// List of Password Type Ids - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret template search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(bool? filter_includeInactive, bool? filter_includeSecretCount, System.Collections.Generic.IEnumerable filter_passwordTypeIds, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_includeInactive, filter_includeSecretCount, filter_passwordTypeIds, filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Secret Templates - /// Whether to include inactive secret templates in the results - /// Whether to populate Secret count in the results - /// List of Password Type Ids - /// Search text - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Secret template search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(bool? filter_includeInactive, bool? filter_includeSecretCount, System.Collections.Generic.IEnumerable filter_passwordTypeIds, string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeSecretCount != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeSecretCount") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeSecretCount, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_passwordTypeIds != null) - { - foreach (var item_ in filter_passwordTypeIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.passwordTypeIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Secret Template - /// Secret Template creation options - /// Secret Template object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateTemplateAsync(SecretTemplateCreateArgs secretTemplateCreateArgs) - { - return CreateTemplateAsync(secretTemplateCreateArgs, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Secret Template - /// Secret Template creation options - /// Secret Template object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateTemplateAsync(SecretTemplateCreateArgs secretTemplateCreateArgs, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(secretTemplateCreateArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Template - /// Secret template ID - /// Secret template object - /// A server side error occurred. - public System.Threading.Tasks.Task LoadGETAsync(int id) - { - return LoadGETAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Template - /// Secret template ID - /// Secret template object - /// A server side error occurred. - public async System.Threading.Tasks.Task LoadGETAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get password dictionaries - /// A list of password dictionary ID and names. - /// A server side error occurred. - public System.Threading.Tasks.Task> GetPasswordDictionariesAsync() - { - return GetPasswordDictionariesAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get password dictionaries - /// A list of password dictionary ID and names. - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetPasswordDictionariesAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/password-requirements/password-dictionaries"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Updates a new password dictionary - /// The file of words - /// True - /// A server side error occurred. - public System.Threading.Tasks.Task UpdatePasswordDictionaryAsync(System.IO.Stream args) - { - return UpdatePasswordDictionaryAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates a new password dictionary - /// The file of words - /// True - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdatePasswordDictionaryAsync(System.IO.Stream args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/password-requirements/password-dictionaries"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StreamContent(args); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Creates new password dictionary - /// The file of words - /// True - /// A server side error occurred. - public System.Threading.Tasks.Task AddPasswordDictionaryAsync(System.IO.Stream args) - { - return AddPasswordDictionaryAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Creates new password dictionary - /// The file of words - /// True - /// A server side error occurred. - public async System.Threading.Tasks.Task AddPasswordDictionaryAsync(System.IO.Stream args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/password-requirements/password-dictionaries"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StreamContent(args); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Secret Templates - /// folderId - /// Secret Templates - /// A server side error occurred. - public System.Threading.Tasks.Task GetTemplatesAsync(int? folderId) - { - return GetTemplatesAsync(folderId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Secret Templates - /// folderId - /// Secret Templates - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTemplatesAsync(int? folderId, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/templates/{folderId?}?"); - if (folderId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("folderId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(folderId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Template Field - /// Secret Template Options - /// Secret Template ID - /// Secret Template Field - /// A server side error occurred. - public System.Threading.Tasks.Task PutAsync(SecretTemplateFieldUpdateArgs args, int templateId) - { - return PutAsync(args, templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Template Field - /// Secret Template Options - /// Secret Template ID - /// Secret Template Field - /// A server side error occurred. - public async System.Threading.Tasks.Task PutAsync(SecretTemplateFieldUpdateArgs args, int templateId, System.Threading.CancellationToken cancellationToken) - { - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/{templateId}"); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Secret Template Field For Template - /// Secret Template Field creation options - /// templateId - /// Secret Template Field object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateFieldAsync(SecretTemplateFieldCreateArgs secretTemplateFieldCreateArgs, int templateId) - { - return CreateFieldAsync(secretTemplateFieldCreateArgs, templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Secret Template Field For Template - /// Secret Template Field creation options - /// templateId - /// Secret Template Field object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateFieldAsync(SecretTemplateFieldCreateArgs secretTemplateFieldCreateArgs, int templateId, System.Threading.CancellationToken cancellationToken) - { - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/{templateId}"); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(secretTemplateFieldCreateArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Patch Secret Template - /// secretTemplatePatchArgs - /// templateId - /// Secret template object - /// A server side error occurred. - public System.Threading.Tasks.Task PatchAsync(SecretTemplatePatchArgs secretTemplatePatchArgs, int templateId) - { - return PatchAsync(secretTemplatePatchArgs, templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Patch Secret Template - /// secretTemplatePatchArgs - /// templateId - /// Secret template object - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchAsync(SecretTemplatePatchArgs secretTemplatePatchArgs, int templateId, System.Threading.CancellationToken cancellationToken) - { - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/{templateId}"); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(secretTemplatePatchArgs, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Generate Password - /// Secret field Id - /// Generate Password result - /// A server side error occurred. - public System.Threading.Tasks.Task GeneratePasswordAsync(int secretfieldId) - { - return GeneratePasswordAsync(secretfieldId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Generate Password - /// Secret field Id - /// Generate Password result - /// A server side error occurred. - public async System.Threading.Tasks.Task GeneratePasswordAsync(int secretfieldId, System.Threading.CancellationToken cancellationToken) - { - if (secretfieldId == null) - throw new System.ArgumentNullException("secretfieldId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/generate-password/{secretfieldId}"); - urlBuilder_.Replace("{secretfieldId}", System.Uri.EscapeDataString(ConvertToString(secretfieldId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Secret Templates Password Type - /// args - /// Secret template ID - /// Secret template object - /// A server side error occurred. - public System.Threading.Tasks.Task LoadPUTAsync(object args, int templateId) - { - return LoadPUTAsync(args, templateId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Secret Templates Password Type - /// args - /// Secret template ID - /// Secret template object - /// A server side error occurred. - public async System.Threading.Tasks.Task LoadPUTAsync(object args, int templateId, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - if (templateId == null) - throw new System.ArgumentNullException("templateId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/secret-templates/password-type/{templateId}"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{templateId}", System.Uri.EscapeDataString(ConvertToString(templateId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SecurityAuditLogsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SecurityAuditLogsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search Security Audit Logs - /// SearchText - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Security audit log search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchLogsAsync(string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchLogsAsync(filter_searchText, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Security Audit Logs - /// SearchText - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Security audit log search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchLogsAsync(string filter_searchText, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/security-audit-logs?"); - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ServerNodesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ServerNodesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Server Nodes - /// Server Node List - /// A server side error occurred. - public System.Threading.Tasks.Task> GetListAsync() - { - return GetListAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Server Nodes - /// Server Node List - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetListAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/nodes"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Server Node - /// nodeId - /// Server Node List - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(int nodeId) - { - return GetAsync(nodeId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Server Node - /// nodeId - /// Server Node List - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(int nodeId, System.Threading.CancellationToken cancellationToken) - { - if (nodeId == null) - throw new System.ArgumentNullException("nodeId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/nodes/{nodeId}"); - urlBuilder_.Replace("{nodeId}", System.Uri.EscapeDataString(ConvertToString(nodeId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Server Node Configuration - /// nodeConfiguration - /// nodeId - /// Unknown or empty response - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateNodeConfigurationAsync(ServerNodeConfigurationModel nodeConfiguration, int nodeId) - { - return UpdateNodeConfigurationAsync(nodeConfiguration, nodeId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Server Node Configuration - /// nodeConfiguration - /// nodeId - /// Unknown or empty response - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateNodeConfigurationAsync(ServerNodeConfigurationModel nodeConfiguration, int nodeId, System.Threading.CancellationToken cancellationToken) - { - if (nodeId == null) - throw new System.ArgumentNullException("nodeId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/nodes/{nodeId}/configuration"); - urlBuilder_.Replace("{nodeId}", System.Uri.EscapeDataString(ConvertToString(nodeId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(nodeConfiguration, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - return; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SitesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SitesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Sites - /// includeInactive - /// List of Sites - /// A server side error occurred. - public System.Threading.Tasks.Task> GetAsync(bool? includeInactive) - { - return GetAsync(includeInactive, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Sites - /// includeInactive - /// List of Sites - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetAsync(bool? includeInactive, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/sites?"); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SlackServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SlackServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Slack Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task GetConfigurationV2Async() - { - return GetConfigurationV2Async(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Slack Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task GetConfigurationV2Async(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/slack-configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Slack Configuration - /// Slack Configuration Update Options - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateConfigurationV2Async(SlackConfigurationUpdateArgsV2 args) - { - return UpdateConfigurationV2Async(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Slack Configuration - /// Slack Configuration Update Options - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateConfigurationV2Async(SlackConfigurationUpdateArgsV2 args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/slack-configuration"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Test Slack Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task SendTestSlackMessageAsync() - { - return SendTestSlackMessageAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Test Slack Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task SendTestSlackMessageAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/slack-test"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Slack Event - /// A server side error occurred. - public System.Threading.Tasks.Task HandleEventAsync() - { - return HandleEventAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Slack Event - /// A server side error occurred. - public async System.Threading.Tasks.Task HandleEventAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/slack/event"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Slack Interaction - /// A server side error occurred. - public System.Threading.Tasks.Task HandleInteractionAsync() - { - return HandleInteractionAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Slack Interaction - /// A server side error occurred. - public async System.Threading.Tasks.Task HandleInteractionAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/slack/interaction"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SshCommandBlocklistServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SshCommandBlocklistServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get an SSH Command Blocklist - /// SSH Command Blocklist ID - /// The SSH Command Blocklist View - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandBlocklistAsync(System.Guid id) - { - return GetSshCommandBlocklistAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get an SSH Command Blocklist - /// SSH Command Blocklist ID - /// The SSH Command Blocklist View - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandBlocklistAsync(System.Guid id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-blocklist/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a list of SSH Command Blocklist - /// IncludeActive - /// IncludeInactive - /// Name - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list of SSH Command Blocklists - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandBlocklistsAsync(bool? filter_includeActive, bool? filter_includeInactive, string filter_name, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetSshCommandBlocklistsAsync(filter_includeActive, filter_includeInactive, filter_name, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a list of SSH Command Blocklist - /// IncludeActive - /// IncludeInactive - /// Name - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list of SSH Command Blocklists - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandBlocklistsAsync(bool? filter_includeActive, bool? filter_includeInactive, string filter_name, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-blocklist/list?"); - if (filter_includeActive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeActive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeActive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Stub an empty SSH Command Blocklist - /// An empty SSH Command Blocklist - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandBlocklistStubAsync() - { - return GetSshCommandBlocklistStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Stub an empty SSH Command Blocklist - /// An empty SSH Command Blocklist - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandBlocklistStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-blocklist/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a list of Secret Policies that use the given blocklist - /// Results will be associated to the provided blocklist id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list of Secret Policies - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandBlocklistPoliciesAsync(System.Guid? filter_sshCommandBlocklistId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetSshCommandBlocklistPoliciesAsync(filter_sshCommandBlocklistId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a list of Secret Policies that use the given blocklist - /// Results will be associated to the provided blocklist id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list of Secret Policies - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandBlocklistPoliciesAsync(System.Guid? filter_sshCommandBlocklistId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-blocklist/policies?"); - if (filter_sshCommandBlocklistId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.sshCommandBlocklistId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_sshCommandBlocklistId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update an SSH Command Blocklist - /// SSH Command Blocklist Update Options - /// sshCommandBlocklistId - /// SSH Command Blocklist - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSshCommandBlocklistAsync(SshCommandBlocklistPatchArgs args, System.Guid sshCommandBlocklistId) - { - return PatchSshCommandBlocklistAsync(args, sshCommandBlocklistId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update an SSH Command Blocklist - /// SSH Command Blocklist Update Options - /// sshCommandBlocklistId - /// SSH Command Blocklist - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSshCommandBlocklistAsync(SshCommandBlocklistPatchArgs args, System.Guid sshCommandBlocklistId, System.Threading.CancellationToken cancellationToken) - { - if (sshCommandBlocklistId == null) - throw new System.ArgumentNullException("sshCommandBlocklistId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-blocklist/{sshCommandBlocklistId}"); - urlBuilder_.Replace("{sshCommandBlocklistId}", System.Uri.EscapeDataString(ConvertToString(sshCommandBlocklistId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add an SSH Command Blocklist - /// SSH Command Blocklist add options - /// SSH Command Blocklist - /// A server side error occurred. - public System.Threading.Tasks.Task CreateSshCommandBlocklistAsync(SshCommandBlocklistCreateArgs args) - { - return CreateSshCommandBlocklistAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add an SSH Command Blocklist - /// SSH Command Blocklist add options - /// SSH Command Blocklist - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateSshCommandBlocklistAsync(SshCommandBlocklistCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-blocklist"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SshCommandServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SshCommandServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get an SSH Command - /// SSH Command ID - /// The SSH Command View - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandAsync(int id) - { - return GetSshCommandAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get an SSH Command - /// SSH Command ID - /// The SSH Command View - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a list of SSH Commands - /// CommandPermissionType - /// NameOrCommand - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list of SSH Commands - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandsAsync(string filter_commandPermissionType, string filter_nameOrCommand, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetSshCommandsAsync(filter_commandPermissionType, filter_nameOrCommand, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a list of SSH Commands - /// CommandPermissionType - /// NameOrCommand - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// The list of SSH Commands - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandsAsync(string filter_commandPermissionType, string filter_nameOrCommand, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command/list?"); - if (filter_commandPermissionType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.commandPermissionType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_commandPermissionType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_nameOrCommand != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.nameOrCommand") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_nameOrCommand, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Stub an empty SSH Command - /// An empty SSH Command - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandStubAsync() - { - return GetSshCommandStubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Stub an empty SSH Command - /// An empty SSH Command - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandStubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update an SSH Command - /// SSH Command Update Options - /// sshCommandId - /// SSH Command - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateSshCommandAsync(SshCommandPatchArgs args, System.Guid sshCommandId) - { - return UpdateSshCommandAsync(args, sshCommandId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update an SSH Command - /// SSH Command Update Options - /// sshCommandId - /// SSH Command - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateSshCommandAsync(SshCommandPatchArgs args, System.Guid sshCommandId, System.Threading.CancellationToken cancellationToken) - { - if (sshCommandId == null) - throw new System.ArgumentNullException("sshCommandId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command/{sshCommandId}"); - urlBuilder_.Replace("{sshCommandId}", System.Uri.EscapeDataString(ConvertToString(sshCommandId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add an SSH Command - /// SSH Command add options - /// SSH Command - /// A server side error occurred. - public System.Threading.Tasks.Task CreateSshCommandAsync(SshCommandCreateArgs args) - { - return CreateSshCommandAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add an SSH Command - /// SSH Command add options - /// SSH Command - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateSshCommandAsync(SshCommandCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class SshCommandMenuServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public SshCommandMenuServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search SSH Commands - /// IncludeDisabled - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SSH Command Menu search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSshCommandMenuAsync(bool? filter_includeDisabled, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSshCommandMenuAsync(filter_includeDisabled, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search SSH Commands - /// IncludeDisabled - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SSH Command Menu search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSshCommandMenuAsync(bool? filter_includeDisabled, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-menu/search?"); - if (filter_includeDisabled != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeDisabled") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeDisabled, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Menu Audits - /// SshCommandMenuName - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Menu audit search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAuditsAsync(string filter_sshCommandMenuName, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAuditsAsync(filter_sshCommandMenuName, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Menu Audits - /// SshCommandMenuName - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Menu audit search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAuditsAsync(string filter_sshCommandMenuName, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-menu/audit/search?"); - if (filter_sshCommandMenuName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.sshCommandMenuName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_sshCommandMenuName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search SSH Command, Blocklist, and Menu Audits for audit item - /// SshCommandItemNameOrNotes - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SSH Command, Blocklist, and Menu search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchItemAuditsAsync(string filter_sshCommandItemNameOrNotes, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchItemAuditsAsync(filter_sshCommandItemNameOrNotes, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search SSH Command, Blocklist, and Menu Audits for audit item - /// SshCommandItemNameOrNotes - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// SSH Command, Blocklist, and Menu search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchItemAuditsAsync(string filter_sshCommandItemNameOrNotes, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-item/audit/search?"); - if (filter_sshCommandItemNameOrNotes != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.sshCommandItemNameOrNotes") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_sshCommandItemNameOrNotes, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get SSH Command Menu - /// sshCommandMenuId - /// SSH Command Menu - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandMenuAsync(int sshCommandMenuId) - { - return GetSshCommandMenuAsync(sshCommandMenuId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get SSH Command Menu - /// sshCommandMenuId - /// SSH Command Menu - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandMenuAsync(int sshCommandMenuId, System.Threading.CancellationToken cancellationToken) - { - if (sshCommandMenuId == null) - throw new System.ArgumentNullException("sshCommandMenuId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-menu/{sshCommandMenuId}"); - urlBuilder_.Replace("{sshCommandMenuId}", System.Uri.EscapeDataString(ConvertToString(sshCommandMenuId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update an SSH Command Menu - /// SSH Command Menu Update Options - /// sshCommandMenuId - /// SSH Command Menu - /// A server side error occurred. - public System.Threading.Tasks.Task PatchSshCommandMenuAsync(SshCommandMenuPatchArgs args, int sshCommandMenuId) - { - return PatchSshCommandMenuAsync(args, sshCommandMenuId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update an SSH Command Menu - /// SSH Command Menu Update Options - /// sshCommandMenuId - /// SSH Command Menu - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchSshCommandMenuAsync(SshCommandMenuPatchArgs args, int sshCommandMenuId, System.Threading.CancellationToken cancellationToken) - { - if (sshCommandMenuId == null) - throw new System.ArgumentNullException("sshCommandMenuId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-menu/{sshCommandMenuId}"); - urlBuilder_.Replace("{sshCommandMenuId}", System.Uri.EscapeDataString(ConvertToString(sshCommandMenuId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get user actions for SSH Commands - /// The list of actions - /// A server side error occurred. - public System.Threading.Tasks.Task GetSshCommandStateAsync() - { - return GetSshCommandStateAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get user actions for SSH Commands - /// The list of actions - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSshCommandStateAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-menu/state"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add an SSH Command Menu - /// SSH Command create options - /// SSH Command Menu - /// A server side error occurred. - public System.Threading.Tasks.Task AddSshCommandMenuAsync(SshCommandMenuCreateArgs args) - { - return AddSshCommandMenuAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add an SSH Command Menu - /// SSH Command create options - /// SSH Command Menu - /// A server side error occurred. - public async System.Threading.Tasks.Task AddSshCommandMenuAsync(SshCommandMenuCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ssh-command-menu"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class TeamsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public TeamsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search Teams - /// Include Inactive - /// Search Term - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Team search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchAsync(bool? filter_includeInactive, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchAsync(filter_includeInactive, filter_searchTerm, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Teams - /// Include Inactive - /// Search Term - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Team search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchAsync(bool? filter_includeInactive, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchTerm != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchTerm") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchTerm, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Team - /// Team creation options - /// New Team Id - /// A server side error occurred. - public System.Threading.Tasks.Task CreateTeamAsync(TeamCreateArgs args) - { - return CreateTeamAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Team - /// Team creation options - /// New Team Id - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateTeamAsync(TeamCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Team Stub - /// Team object - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Team Stub - /// Team object - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Team - /// Team ID - /// Team object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(int id) - { - return GetAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Team - /// Team ID - /// Team object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Team - /// Team update options - /// Team ID - /// Team object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateTeamAsync(TeamDetailUpdateModel args, int id) - { - return UpdateTeamAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Team - /// Team update options - /// Team ID - /// Team object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateTeamAsync(TeamDetailUpdateModel args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Team Audits - /// Team ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Team Audit search result object - /// A server side error occurred. - public System.Threading.Tasks.Task GetTeamAuditsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetTeamAuditsAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Team Audits - /// Team ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Team Audit search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTeamAuditsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}/audits?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Users In Team - /// Team ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Get Team membership. Includes Groups and Users. User will be their personal GroupId. - /// A server side error occurred. - public System.Threading.Tasks.Task> GetTeamMembersAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetTeamMembersAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Users In Team - /// Team ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Get Team membership. Includes Groups and Users. User will be their personal GroupId. - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetTeamMembersAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}/members?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Team Members - /// Team user add options - /// Team ID - /// Get Team membership. Includes Groups and Users. User will be their personal GroupId. - /// A server side error occurred. - public System.Threading.Tasks.Task> AddTeamMemberAsync(TeamMemberUpdateArgs args, int id) - { - return AddTeamMemberAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Team Members - /// Team user add options - /// Team ID - /// Get Team membership. Includes Groups and Users. User will be their personal GroupId. - /// A server side error occurred. - public async System.Threading.Tasks.Task> AddTeamMemberAsync(TeamMemberUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}/members"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Sites for a Team - /// Team ID - /// includeInactive - /// Get Team Sites. - /// A server side error occurred. - public System.Threading.Tasks.Task> GetTeamSitesAsync(int id, bool includeInactive) - { - return GetTeamSitesAsync(id, includeInactive, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Sites for a Team - /// Team ID - /// includeInactive - /// Get Team Sites. - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetTeamSitesAsync(int id, bool includeInactive, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (includeInactive == null) - throw new System.ArgumentNullException("includeInactive"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}/sites?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Team Sites - /// Team site add options - /// Team ID - /// Get Team Sites. - /// A server side error occurred. - public System.Threading.Tasks.Task> AddTeamSiteAsync(TeamSiteUpdateArgs args, int id) - { - return AddTeamSiteAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Team Sites - /// Team site add options - /// Team ID - /// Get Team Sites. - /// A server side error occurred. - public async System.Threading.Tasks.Task> AddTeamSiteAsync(TeamSiteUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}/sites"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Team's Lists - /// Team Id - /// Summary of a Team's Lists. - /// A server side error occurred. - public System.Threading.Tasks.Task GetTeamListsAsync(int id) - { - return GetTeamListsAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Team's Lists - /// Team Id - /// Summary of a Team's Lists. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTeamListsAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}/lists"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Team Lists - /// Team list - /// Team Id - /// Summary a Team's Lists. - /// A server side error occurred. - public System.Threading.Tasks.Task AddListsToTeamAsync(TeamCategorizedListUpdateArgs args, int id) - { - return AddListsToTeamAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Team Lists - /// Team list - /// Team Id - /// Summary a Team's Lists. - /// A server side error occurred. - public async System.Threading.Tasks.Task AddListsToTeamAsync(TeamCategorizedListUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/teams/{id}/lists"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class TicketSystemsServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public TicketSystemsServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Gets all ticket systems - /// includeInactive - /// Ticket System Models - /// A server side error occurred. - public System.Threading.Tasks.Task> GetTicketSystemsAsync(bool? includeInactive) - { - return GetTicketSystemsAsync(includeInactive, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets all ticket systems - /// includeInactive - /// Ticket System Models - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetTicketSystemsAsync(bool? includeInactive, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ticket-systems?"); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Creates a Ticket System - /// Ticket System Create Args - /// Ticket System Model - /// A server side error occurred. - public System.Threading.Tasks.Task CreateTicketSystemAsync(object args) - { - return CreateTicketSystemAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Creates a Ticket System - /// Ticket System Create Args - /// Ticket System Model - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateTicketSystemAsync(object args, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ticket-systems"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Gets a ticket system by ID - /// Ticket System ID - /// Ticket System Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetTicketSystemAsync(int id) - { - return GetTicketSystemAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets a ticket system by ID - /// Ticket System ID - /// Ticket System Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTicketSystemAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ticket-systems/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Updates a Ticket System - /// Ticket System Patch Args - /// id - /// Ticket System Model - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateTicketSystemAsync(object args, int id) - { - return UpdateTicketSystemAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Updates a Ticket System - /// Ticket System Patch Args - /// id - /// Ticket System Model - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateTicketSystemAsync(object args, int id, System.Threading.CancellationToken cancellationToken) - { - if (args == null) - throw new System.ArgumentNullException("args"); - - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/ticket-systems/{id}"); - urlBuilder_.Replace("{args}", System.Uri.EscapeDataString(ConvertToString(args, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Gets all ticket systems - /// includeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Ticket System Summaries - /// A server side error occurred. - public System.Threading.Tasks.Task GetTicketSystemsV2Async(bool? includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetTicketSystemsV2Async(includeInactive, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets all ticket systems - /// includeInactive - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Ticket System Summaries - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTicketSystemsV2Async(bool? includeInactive, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/ticket-systems?"); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Gets a ticket system by ID - /// Ticket System ID - /// Ticket System Model - /// A server side error occurred. - public System.Threading.Tasks.Task GetTicketSystemV2Async(int id) - { - return GetTicketSystemV2Async(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets a ticket system by ID - /// Ticket System ID - /// Ticket System Model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTicketSystemV2Async(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/ticket-systems/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class UsersServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public UsersServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get User - /// Whether to include inactive users in the results - /// User ID - /// User object - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync(bool? includeInactive, int id) - { - return GetAsync(includeInactive, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User - /// Whether to include inactive users in the results - /// User ID - /// User object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(bool? includeInactive, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update User - /// User update options - /// User ID - /// User object - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateUserAsync(UserUpdateArgs args, int id) - { - return UpdateUserAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update User - /// User update options - /// User ID - /// User object - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateUserAsync(UserUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete User - /// User ID - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteAsync(int id) - { - return DeleteAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete User - /// User ID - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update included properties for user by Id - /// id - /// patchModel - /// User Configuration - /// A server side error occurred. - public System.Threading.Tasks.Task PatchUserAsync(int id, PatchUserModel patchModel) - { - return PatchUserAsync(id, patchModel, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update included properties for user by Id - /// id - /// patchModel - /// User Configuration - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchUserAsync(int id, PatchUserModel patchModel, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(patchModel, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get User Owner - /// User ID - /// Owner ID - /// User owner object - /// A server side error occurred. - public System.Threading.Tasks.Task GetUserOwnerAsync(int id, int ownerId) - { - return GetUserOwnerAsync(id, ownerId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User Owner - /// User ID - /// Owner ID - /// User owner object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetUserOwnerAsync(int id, int ownerId, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (ownerId == null) - throw new System.ArgumentNullException("ownerId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/owners/{ownerId}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{ownerId}", System.Uri.EscapeDataString(ConvertToString(ownerId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Remove User Owner - /// User ID - /// Owner ID is the unique sequence for this specific owner. This is returned as ID on UserOwnerModel - /// Object deletion result - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteUserOwnerAsync(int id, int ownerId) - { - return DeleteUserOwnerAsync(id, ownerId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Remove User Owner - /// User ID - /// Owner ID is the unique sequence for this specific owner. This is returned as ID on UserOwnerModel - /// Object deletion result - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteUserOwnerAsync(int id, int ownerId, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (ownerId == null) - throw new System.ArgumentNullException("ownerId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/owners/{ownerId}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{ownerId}", System.Uri.EscapeDataString(ConvertToString(ownerId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Gets roles for user - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task GetRolesAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int id) - { - return GetRolesAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Gets roles for user - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task GetRolesAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/roles?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update all roles on user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateUserRolesAsync(RoleAssignments args, int id) - { - return UpdateUserRolesAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update all roles on user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateUserRolesAsync(RoleAssignments args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/roles"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add roles to existing user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task CreateUserRolesAsync(RoleAssignments args, int id) - { - return CreateUserRolesAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add roles to existing user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateUserRolesAsync(RoleAssignments args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/roles"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Remove roles from existing user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task DeleteUserRolesAsync(RoleRemovals args, int id) - { - return DeleteUserRolesAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Remove roles from existing user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task DeleteUserRolesAsync(RoleRemovals args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/roles"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get User Groups - /// User ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group membership results - /// A server side error occurred. - public System.Threading.Tasks.Task GetUserGroupsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetUserGroupsAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User Groups - /// User ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Group membership results - /// A server side error occurred. - public async System.Threading.Tasks.Task GetUserGroupsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/groups?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update all groups on user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateUserGroupsAsync(GroupAssignments args, int id) - { - return UpdateUserGroupsAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update all groups on user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateUserGroupsAsync(GroupAssignments args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/groups"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add groups to existing user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task AddUserToGroupsAsync(GroupAssignments args, int id) - { - return AddUserToGroupsAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add groups to existing user - /// args - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task AddUserToGroupsAsync(GroupAssignments args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/groups"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Remove groups from existing user - /// groupIds - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task RemoveUserGroupsAsync(System.Collections.Generic.IEnumerable groupIds, int id) - { - return RemoveUserGroupsAsync(groupIds, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Remove groups from existing user - /// groupIds - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task RemoveUserGroupsAsync(System.Collections.Generic.IEnumerable groupIds, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/groups?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (groupIds != null) - { - foreach (var item_ in groupIds) { urlBuilder_.Append(System.Uri.EscapeDataString("groupIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Search Users - /// If not null, filters users by Active Directory domain. - /// When set all subscribers not subscribed directly to this inbox notification rule will be excluded. - /// Whether to include inactive users in the results. - /// User fields to search. - /// The text to match in the username, display name, or email address. - /// User Ids to search. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User search result object - /// A server side error occurred. - public System.Threading.Tasks.Task SearchUsersAsync(int? filter_domainId, int? filter_excludeInboxRuleIdSubscribers, bool? filter_includeInactive, System.Collections.Generic.IEnumerable filter_searchFields, string filter_searchText, System.Collections.Generic.IEnumerable filter_userIds, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchUsersAsync(filter_domainId, filter_excludeInboxRuleIdSubscribers, filter_includeInactive, filter_searchFields, filter_searchText, filter_userIds, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search Users - /// If not null, filters users by Active Directory domain. - /// When set all subscribers not subscribed directly to this inbox notification rule will be excluded. - /// Whether to include inactive users in the results. - /// User fields to search. - /// The text to match in the username, display name, or email address. - /// User Ids to search. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchUsersAsync(int? filter_domainId, int? filter_excludeInboxRuleIdSubscribers, bool? filter_includeInactive, System.Collections.Generic.IEnumerable filter_searchFields, string filter_searchText, System.Collections.Generic.IEnumerable filter_userIds, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users?"); - if (filter_domainId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.domainId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_domainId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_excludeInboxRuleIdSubscribers != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.excludeInboxRuleIdSubscribers") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_excludeInboxRuleIdSubscribers, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchFields != null) - { - foreach (var item_ in filter_searchFields) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchFields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userIds != null) - { - foreach (var item_ in filter_userIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.userIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create User - /// User creation options - /// User object - /// A server side error occurred. - public System.Threading.Tasks.Task CreateUserAsync(UserCreateArgs args) - { - return CreateUserAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create User - /// User creation options - /// User object - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateUserAsync(UserCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Current User - /// Current user result object - /// A server side error occurred. - public System.Threading.Tasks.Task GetCurrentUserAsync() - { - return GetCurrentUserAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Current User - /// Current user result object - /// A server side error occurred. - public async System.Threading.Tasks.Task GetCurrentUserAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/current"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Lookup Users - /// If not null, filters users by Active Directory domain. - /// When set all subscribers not subscribed directly to this inbox notification rule will be excluded. - /// Whether to include inactive users in the results. - /// User fields to search. - /// The text to match in the username, display name, or email address. - /// User Ids to search. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User search result object - /// A server side error occurred. - public System.Threading.Tasks.Task LookupAsync(int? filter_domainId, int? filter_excludeInboxRuleIdSubscribers, bool? filter_includeInactive, System.Collections.Generic.IEnumerable filter_searchFields, string filter_searchText, System.Collections.Generic.IEnumerable filter_userIds, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return LookupAsync(filter_domainId, filter_excludeInboxRuleIdSubscribers, filter_includeInactive, filter_searchFields, filter_searchText, filter_userIds, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lookup Users - /// If not null, filters users by Active Directory domain. - /// When set all subscribers not subscribed directly to this inbox notification rule will be excluded. - /// Whether to include inactive users in the results. - /// User fields to search. - /// The text to match in the username, display name, or email address. - /// User Ids to search. - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User search result object - /// A server side error occurred. - public async System.Threading.Tasks.Task LookupAsync(int? filter_domainId, int? filter_excludeInboxRuleIdSubscribers, bool? filter_includeInactive, System.Collections.Generic.IEnumerable filter_searchFields, string filter_searchText, System.Collections.Generic.IEnumerable filter_userIds, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/lookup?"); - if (filter_domainId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.domainId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_domainId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_excludeInboxRuleIdSubscribers != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.excludeInboxRuleIdSubscribers") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_excludeInboxRuleIdSubscribers, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchFields != null) - { - foreach (var item_ in filter_searchFields) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchFields") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userIds != null) - { - foreach (var item_ in filter_userIds) { urlBuilder_.Append(System.Uri.EscapeDataString("filter.userIds") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get User Stub - /// Default User - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User Stub - /// Default User - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get User Public Ssh Keys - /// Whether to include expired user public ssh keys in the results - /// Whether to include inactive user public ssh keys in the results - /// Search text - /// An optional ID for a specific user's public ssh keys - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Public ssh key results - /// A server side error occurred. - public System.Threading.Tasks.Task GetUserPublicSshKeysAsync(bool? filter_includeExpired, bool? filter_includeInactive, string filter_searchText, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetUserPublicSshKeysAsync(filter_includeExpired, filter_includeInactive, filter_searchText, filter_userId, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User Public Ssh Keys - /// Whether to include expired user public ssh keys in the results - /// Whether to include inactive user public ssh keys in the results - /// Search text - /// An optional ID for a specific user's public ssh keys - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Public ssh key results - /// A server side error occurred. - public async System.Threading.Tasks.Task GetUserPublicSshKeysAsync(bool? filter_includeExpired, bool? filter_includeInactive, string filter_searchText, int? filter_userId, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/public-ssh-keys?"); - if (filter_includeExpired != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeExpired") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeExpired, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchText != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchText") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchText, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_userId != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.userId") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_userId, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a User Ssh Key - /// args - /// Private ssh key result - /// A server side error occurred. - public System.Threading.Tasks.Task CreateUserPublicSshKeyAsync(UserPublicSshKeyCreateArgs args) - { - return CreateUserPublicSshKeyAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a User Ssh Key - /// args - /// Private ssh key result - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateUserPublicSshKeyAsync(UserPublicSshKeyCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/public-ssh-keys"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get User Owners - /// User ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User owner results - /// A server side error occurred. - public System.Threading.Tasks.Task SearchUserOwnersAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchUserOwnersAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User Owners - /// User ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User owner results - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchUserOwnersAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/owners?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add User Owner - /// User owner add options - /// User ID - /// User owner object - /// A server side error occurred. - public System.Threading.Tasks.Task AddUserOwnerAsync(UserOwnerCreateArgs args, int id) - { - return AddUserOwnerAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add User Owner - /// User owner add options - /// User ID - /// User owner object - /// A server side error occurred. - public async System.Threading.Tasks.Task AddUserOwnerAsync(UserOwnerCreateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/owners"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Add and remove the owners on the user - /// id - /// patchModel - /// A list of all user owner objects for the user - /// A server side error occurred. - public System.Threading.Tasks.Task PatchUserOwnersAsync(int id, UserOwnerPatchUserModel patchModel) - { - return PatchUserOwnersAsync(id, patchModel, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Add and remove the owners on the user - /// id - /// patchModel - /// A list of all user owner objects for the user - /// A server side error occurred. - public async System.Threading.Tasks.Task PatchUserOwnersAsync(int id, UserOwnerPatchUserModel patchModel, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{id}/owners"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(patchModel, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Domains - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Domain summary list - /// A server side error occurred. - public System.Threading.Tasks.Task GetDomainsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetDomainsAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Domains - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Domain summary list - /// A server side error occurred. - public async System.Threading.Tasks.Task GetDomainsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/domains?"); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get User Roles - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User ID - /// User role summary - /// A server side error occurred. - public System.Threading.Tasks.Task GetUserRolesAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int userId) - { - return GetUserRolesAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get User Roles - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// User ID - /// User role summary - /// A server side error occurred. - public async System.Threading.Tasks.Task GetUserRolesAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int userId, System.Threading.CancellationToken cancellationToken) - { - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{userId}/roles-assigned?"); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// User Audits - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// userId - /// Paged List of Audits - /// A server side error occurred. - public System.Threading.Tasks.Task GetSiteAuditsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int userId) - { - return GetSiteAuditsAsync(skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// User Audits - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// userId - /// Paged List of Audits - /// A server side error occurred. - public async System.Threading.Tasks.Task GetSiteAuditsAsync(int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int userId, System.Threading.CancellationToken cancellationToken) - { - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{userId}/audit?"); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// User Audits by Action - /// actions - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged List of Audits - /// A server side error occurred. - public System.Threading.Tasks.Task GetUserActionAuditsAsync(System.Collections.Generic.IEnumerable actions, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetUserActionAuditsAsync(actions, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// User Audits by Action - /// actions - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// Paged List of Audits - /// A server side error occurred. - public async System.Threading.Tasks.Task GetUserActionAuditsAsync(System.Collections.Generic.IEnumerable actions, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/action/audit?"); - if (actions != null) - { - foreach (var item_ in actions) { urlBuilder_.Append(System.Uri.EscapeDataString("actions") + "=").Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); } - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// User Teams - /// Include Group Memberships - /// Include Inactive - /// Search Term - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// userId - /// Paged List of Team Summaries - /// A server side error occurred. - public System.Threading.Tasks.Task GetUserTeamsAsync(bool? filter_includeGroupMemberships, bool? filter_includeInactive, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int userId) - { - return GetUserTeamsAsync(filter_includeGroupMemberships, filter_includeInactive, filter_searchTerm, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// User Teams - /// Include Group Memberships - /// Include Inactive - /// Search Term - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// userId - /// Paged List of Team Summaries - /// A server side error occurred. - public async System.Threading.Tasks.Task GetUserTeamsAsync(bool? filter_includeGroupMemberships, bool? filter_includeInactive, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, int userId, System.Threading.CancellationToken cancellationToken) - { - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{userId}/teams?"); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - if (filter_includeGroupMemberships != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeGroupMemberships") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeGroupMemberships, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchTerm != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchTerm") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchTerm, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get Preference - /// Is Legacy - /// Setting Code - /// Setting Name - /// Preference - /// A server side error occurred. - public System.Threading.Tasks.Task GetPreferenceAsync(bool? isLegacy, string settingCode, string settingName) - { - return GetPreferenceAsync(isLegacy, settingCode, settingName, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Preference - /// Is Legacy - /// Setting Code - /// Setting Name - /// Preference - /// A server side error occurred. - public async System.Threading.Tasks.Task GetPreferenceAsync(bool? isLegacy, string settingCode, string settingName, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/preference?"); - if (isLegacy != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("isLegacy") + "=").Append(System.Uri.EscapeDataString(ConvertToString(isLegacy, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (settingCode != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("settingCode") + "=").Append(System.Uri.EscapeDataString(ConvertToString(settingCode, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (settingName != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("settingName") + "=").Append(System.Uri.EscapeDataString(ConvertToString(settingName, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Preference - /// args - /// Preference - /// A server side error occurred. - public System.Threading.Tasks.Task UpdatePreferenceAsync(RestPreferenceUpdateArgs args) - { - return UpdatePreferenceAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Preference - /// args - /// Preference - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdatePreferenceAsync(RestPreferenceUpdateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/preference"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Deactivate SSH Key - /// Public SSH Key ID - /// The ID if the key deactivated - /// A server side error occurred. - public System.Threading.Tasks.Task DeactivateUserPublicSshKeyAsync(int id) - { - return DeactivateUserPublicSshKeyAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Deactivate SSH Key - /// Public SSH Key ID - /// The ID if the key deactivated - /// A server side error occurred. - public async System.Threading.Tasks.Task DeactivateUserPublicSshKeyAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/public-ssh-keys/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("PATCH"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Change User Password - /// User password change options - /// User object - /// A server side error occurred. - public System.Threading.Tasks.Task ChangePasswordAsync(UserChangePasswordArgs args) - { - return ChangePasswordAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Change User Password - /// User password change options - /// User object - /// A server side error occurred. - public async System.Threading.Tasks.Task ChangePasswordAsync(UserChangePasswordArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/change-password"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Verify the Current User Password - /// User password verification options - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task VerifyPasswordAsync(UserPasswordVerifyArgs args) - { - return VerifyPasswordAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Verify the Current User Password - /// User password verification options - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task VerifyPasswordAsync(UserPasswordVerifyArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/verify-password"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Reset 2FA - /// args - /// userId - /// Result of 2FA reset - /// A server side error occurred. - public System.Threading.Tasks.Task ResetTwoFactorAsync(ResetTwoFactorArgs args, int userId) - { - return ResetTwoFactorAsync(args, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Reset 2FA - /// args - /// userId - /// Result of 2FA reset - /// A server side error occurred. - public async System.Threading.Tasks.Task ResetTwoFactorAsync(ResetTwoFactorArgs args, int userId, System.Threading.CancellationToken cancellationToken) - { - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{userId}/reset-two-factor"); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Reset a user password as an admin - /// args - /// userId - /// Password Reset Result - /// A server side error occurred. - public System.Threading.Tasks.Task ResetUserPasswordAsync(PasswordResetArgs args, int userId) - { - return ResetUserPasswordAsync(args, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Reset a user password as an admin - /// args - /// userId - /// Password Reset Result - /// A server side error occurred. - public async System.Threading.Tasks.Task ResetUserPasswordAsync(PasswordResetArgs args, int userId, System.Threading.CancellationToken cancellationToken) - { - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{userId}/password-reset"); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Delete a user's personally identifiable info - /// id - /// Success / Fail - /// A server side error occurred. - public System.Threading.Tasks.Task UserPersonalInfoDeleteCommandAsync(int id) - { - return UserPersonalInfoDeleteCommandAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Delete a user's personally identifiable info - /// id - /// Success / Fail - /// A server side error occurred. - public async System.Threading.Tasks.Task UserPersonalInfoDeleteCommandAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/delete-pii/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Lock Out - /// args - /// userId - /// Result of Lock Out - /// A server side error occurred. - public System.Threading.Tasks.Task LockOutAsync(LockOutArgs args, int userId) - { - return LockOutAsync(args, userId, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Lock Out - /// args - /// userId - /// Result of Lock Out - /// A server side error occurred. - public async System.Threading.Tasks.Task LockOutAsync(LockOutArgs args, int userId, System.Threading.CancellationToken cancellationToken) - { - if (userId == null) - throw new System.ArgumentNullException("userId"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/users/{userId}/lock-out"); - urlBuilder_.Replace("{userId}", System.Uri.EscapeDataString(ConvertToString(userId, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class VersionServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public VersionServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Secret Server Version - /// Unknown or empty response - /// A server side error occurred. - public System.Threading.Tasks.Task GetAsync() - { - return GetAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Secret Server Version - /// Unknown or empty response - /// A server side error occurred. - public async System.Threading.Tasks.Task GetAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/version"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - return; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class WorkflowInstancesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public WorkflowInstancesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Workflow Instances By Workflow Template Id. - /// Workflow Template ID - /// The active workflow instances that use the Workflow Template - /// A server side error occurred. - public System.Threading.Tasks.Task> GetByTemplateIdAsync(int id) - { - return GetByTemplateIdAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Workflow Instances By Workflow Template Id. - /// Workflow Template ID - /// The active workflow instances that use the Workflow Template - /// A server side error occurred. - public async System.Threading.Tasks.Task> GetByTemplateIdAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/instances/template/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class WorkflowStepTemplatesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public WorkflowStepTemplatesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get Workflow Template Steps - /// Workflow Template ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A list of workflow step models - /// A server side error occurred. - public System.Threading.Tasks.Task GetTemplateStepsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return GetTemplateStepsAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get Workflow Template Steps - /// Workflow Template ID - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A list of workflow step models - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTemplateStepsAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}/steps?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update Workflow Template Steps - /// Workflow Template Steps creation options - /// Workflow Template ID - /// The workflow template steps - /// A server side error occurred. - public System.Threading.Tasks.Task> UpdateStepAsync(WorkflowStepTemplateUpdateArgs args, int id) - { - return UpdateStepAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update Workflow Template Steps - /// Workflow Template Steps creation options - /// Workflow Template ID - /// The workflow template steps - /// A server side error occurred. - public async System.Threading.Tasks.Task> UpdateStepAsync(WorkflowStepTemplateUpdateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}/steps"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create Workflow Step - /// Workflow Template Step creation options - /// Workflow Template Id - /// New Workflow Template Steps ID - /// A server side error occurred. - public System.Threading.Tasks.Task CreateStepAsync(WorkflowStepTemplateCreateArgs args, int id) - { - return CreateStepAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create Workflow Step - /// Workflow Template Step creation options - /// Workflow Template Id - /// New Workflow Template Steps ID - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateStepAsync(WorkflowStepTemplateCreateArgs args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}/steps"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Workflow Template Step Stub - /// An empty workflow step - /// A server side error occurred. - public System.Threading.Tasks.Task StubAsync() - { - return StubAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Workflow Template Step Stub - /// An empty workflow step - /// A server side error occurred. - public async System.Threading.Tasks.Task StubAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/steps/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Workflow Template Step - /// Workflow Template Id - /// Workflow Step Number - /// A workflow step model - /// A server side error occurred. - public System.Threading.Tasks.Task GetTemplateStepAsync(int id, int stepNum) - { - return GetTemplateStepAsync(id, stepNum, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Workflow Template Step - /// Workflow Template Id - /// Workflow Step Number - /// A workflow step model - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTemplateStepAsync(int id, int stepNum, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (stepNum == null) - throw new System.ArgumentNullException("stepNum"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}/steps/{stepNum}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{stepNum}", System.Uri.EscapeDataString(ConvertToString(stepNum, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a Workflow Template Step - /// Workflow Template update options - /// Workflow Template ID - /// Workflow Step Number - /// Workflow Template Step - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateStepModelAsync(WorkflowStepTemplateUpdateModel args, int id, int stepNum) - { - return UpdateStepModelAsync(args, id, stepNum, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a Workflow Template Step - /// Workflow Template update options - /// Workflow Template ID - /// Workflow Step Number - /// Workflow Template Step - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateStepModelAsync(WorkflowStepTemplateUpdateModel args, int id, int stepNum, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (stepNum == null) - throw new System.ArgumentNullException("stepNum"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}/steps/{stepNum}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{stepNum}", System.Uri.EscapeDataString(ConvertToString(stepNum, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class WorkflowTemplatesServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public WorkflowTemplatesServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Get a Workflow Template List - /// IncludeInactive - /// WorkflowType - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paginated list of Workflow Templates. - /// A server side error occurred. - public System.Threading.Tasks.Task SearchWorkflowTemplatesAsync(bool? filter_includeInactive, string filter_workflowType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchWorkflowTemplatesAsync(filter_includeInactive, filter_workflowType, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Workflow Template List - /// IncludeInactive - /// WorkflowType - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paginated list of Workflow Templates. - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchWorkflowTemplatesAsync(bool? filter_includeInactive, string filter_workflowType, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates?"); - if (filter_includeInactive != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.includeInactive") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_includeInactive, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_workflowType != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.workflowType") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_workflowType, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Create a Workflow Template - /// Workflow Template creation options - /// The new Workflow Template's ID. - /// A server side error occurred. - public System.Threading.Tasks.Task CreateWorkflowTemplateAsync(WorkflowTemplateCreateArgs args) - { - return CreateWorkflowTemplateAsync(args, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Create a Workflow Template - /// Workflow Template creation options - /// The new Workflow Template's ID. - /// A server side error occurred. - public async System.Threading.Tasks.Task CreateWorkflowTemplateAsync(WorkflowTemplateCreateArgs args, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Workflow Template Stub - /// An Workflow Template. - /// A server side error occurred. - public System.Threading.Tasks.Task StubWorkflowTemplateAsync() - { - return StubWorkflowTemplateAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Workflow Template Stub - /// An Workflow Template. - /// A server side error occurred. - public async System.Threading.Tasks.Task StubWorkflowTemplateAsync(System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/stub"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Workflow Template - /// Workflow Template Id - /// The requested Workflow Template. - /// A server side error occurred. - public System.Threading.Tasks.Task GetTemplateAsync(int id) - { - return GetTemplateAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Workflow Template - /// Workflow Template Id - /// The requested Workflow Template. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetTemplateAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Update a Workflow Template - /// Workflow Template update options - /// Workflow Template ID - /// The updated Workflow Template. - /// A server side error occurred. - public System.Threading.Tasks.Task UpdateWorkflowTemplateAsync(WorkflowTemplateUpdateModel args, int id) - { - return UpdateWorkflowTemplateAsync(args, id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Update a Workflow Template - /// Workflow Template update options - /// Workflow Template ID - /// The updated Workflow Template. - /// A server side error occurred. - public async System.Threading.Tasks.Task UpdateWorkflowTemplateAsync(WorkflowTemplateUpdateModel args, int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var content_ = new System.Net.Http.StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(args, _settings.Value)); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Get a Workflow Template Audit List - /// Workflow Template Id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paginated list of Workflow Template Audits. - /// A server side error occurred. - public System.Threading.Tasks.Task SearchTemplateAuditAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchTemplateAuditAsync(id, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Get a Workflow Template Audit List - /// Workflow Template Id - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// A paginated list of Workflow Template Audits. - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchTemplateAuditAsync(int id, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}/audits?"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Count of Entities using a Workflow Template - /// Workflow Template Id - /// includeAll - /// The number of entities that use the workflow template. - /// A server side error occurred. - public System.Threading.Tasks.Task GetWorkflowEntitiesAsync(int id, bool includeAll) - { - return GetWorkflowEntitiesAsync(id, includeAll, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Count of Entities using a Workflow Template - /// Workflow Template Id - /// includeAll - /// The number of entities that use the workflow template. - /// A server side error occurred. - public async System.Threading.Tasks.Task GetWorkflowEntitiesAsync(int id, bool includeAll, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - if (includeAll == null) - throw new System.ArgumentNullException("includeAll"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}/entities/{includeAll}"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Replace("{includeAll}", System.Uri.EscapeDataString(ConvertToString(includeAll, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Cancel Workflow Requests - /// Workflow Template Id - /// Confirmation of cancellation. - /// A server side error occurred. - public System.Threading.Tasks.Task CancelRequestAsync(int id) - { - return CancelRequestAsync(id, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Cancel Workflow Requests - /// Workflow Template Id - /// Confirmation of cancellation. - /// A server side error occurred. - public async System.Threading.Tasks.Task CancelRequestAsync(int id, System.Threading.CancellationToken cancellationToken) - { - if (id == null) - throw new System.ArgumentNullException("id"); - - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v1/workflows/templates/{id}/cancel-requests"); - urlBuilder_.Replace("{id}", System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class DiagnosticsV2ServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public DiagnosticsV2ServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new Newtonsoft.Json.JsonSerializerSettings(); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Search system log - /// LogLevel - /// SearchTerm - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// System log messages that match - /// A server side error occurred. - public System.Threading.Tasks.Task SearchSystemLogAsync(string filter_logLevel, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take) - { - return SearchSystemLogAsync(filter_logLevel, filter_searchTerm, skip, sortBy0_direction, sortBy0_name, sortBy0_priority, take, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Search system log - /// LogLevel - /// SearchTerm - /// Number of records to skip before taking results - /// Sort direction - /// Sort field name - /// Priority index. Sorts with lower values are executed earlier - /// Maximum number of records to include in results - /// System log messages that match - /// A server side error occurred. - public async System.Threading.Tasks.Task SearchSystemLogAsync(string filter_logLevel, string filter_searchTerm, int? skip, string sortBy0_direction, string sortBy0_name, int? sortBy0_priority, int? take, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/v2/diagnostics/system-logs?"); - if (filter_logLevel != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.logLevel") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_logLevel, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (filter_searchTerm != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("filter.searchTerm") + "=").Append(System.Uri.EscapeDataString(ConvertToString(filter_searchTerm, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (skip != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("skip") + "=").Append(System.Uri.EscapeDataString(ConvertToString(skip, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_direction != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].direction") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_direction, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_name != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].name") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_name, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (sortBy0_priority != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("sortBy[0].priority") + "=").Append(System.Uri.EscapeDataString(ConvertToString(sortBy0_priority, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - if (take != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("take") + "=").Append(System.Uri.EscapeDataString(ConvertToString(take, System.Globalization.CultureInfo.InvariantCulture))).Append("&"); - } - urlBuilder_.Length--; - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - if (status_ == 403) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Authentication failed", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 400) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Bad request", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - if (status_ == 500) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - throw new ApiException("Internal server error", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[])value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array)value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - /// Response object for authentication failures - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AuthenticationFailedResponse - { - /// Error message - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Message { get; set; } - - - } - - /// Response object for invalid requests - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class BadRequestResponse - { - /// Error message - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Message { get; set; } - - /// Error message detail - [Newtonsoft.Json.JsonProperty("messageDetail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MessageDetail { get; set; } - - /// Error message code - [Newtonsoft.Json.JsonProperty("errorCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ErrorCode { get; set; } - - /// An object describing validation errors - [Newtonsoft.Json.JsonProperty("modelState", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public object ModelState { get; set; } - - - } - - /// Response object for internal server errors - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InternalServerErrorResponse - { - /// Error message - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Message { get; set; } - - /// Error message from exception - [Newtonsoft.Json.JsonProperty("exceptionMessage", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string ExceptionMessage { get; set; } - - /// Exception type - [Newtonsoft.Json.JsonProperty("exceptionType", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string ExceptionType { get; set; } - - /// Exception stack trace - [Newtonsoft.Json.JsonProperty("stackTrace", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string StackTrace { get; set; } - - - } - - /// Online Secret Server Activation Arguments - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class OnlineActivationArgs - { - /// Email of person performing activation - [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Email { get; set; } - - /// Name of person performing activation - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// Phone Number of person performing activation - [Newtonsoft.Json.JsonProperty("phoneNumber", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string PhoneNumber { get; set; } - - - } - - /// GenericResult - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GenericResult - { - /// DebugMessages - [Newtonsoft.Json.JsonProperty("debugMessages", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DebugMessages { get; set; } - - /// ErrorMessage - [Newtonsoft.Json.JsonProperty("errorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ErrorMessage { get; set; } - - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// ApiTokenViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ApiTokenViewModel - { - /// GeneratedToken - [Newtonsoft.Json.JsonProperty("generatedToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString GeneratedToken { get; set; } - - - } - - /// GeneratedToken - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfString - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// App client - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AppClientModel - { - /// App client unique identifier - [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? ClientId { get; set; } - - /// App client ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Authorized redirect URI for this app client - [Newtonsoft.Json.JsonProperty("redirectUri", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RedirectUri { get; set; } - - - } - - /// App client update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AppClientUpdateArgs - { - /// App client ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] - public int Id { get; set; } - - /// Authorized redirect URI for this app client - [Newtonsoft.Json.JsonProperty("redirectUri", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - [System.ComponentModel.DataAnnotations.StringLength(1000)] - public string RedirectUri { get; set; } - - - } - - /// Information about an object that was deleted - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DeletedModel - { - /// ID of the deleted object - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Type of the deleted object - [Newtonsoft.Json.JsonProperty("objectType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ObjectType { get; set; } - - /// List of response codes from the delete operation - [Newtonsoft.Json.JsonProperty("responseCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ResponseCodes { get; set; } - - - } - - /// App client creation options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AppClientCreateArgs - { - /// Authorized redirect URI for this app client - [Newtonsoft.Json.JsonProperty("redirectUri", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RedirectUri { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfUserLookup - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Simple user representation - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserLookup - { - /// User ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Error severity level - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum Severity - { - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Retry")] - Retry = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Warn")] - Warn = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Critical")] - Critical = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Fatal")] - Fatal = 4, - - } - - /// Sort options. Multiple sort options can be provided in the query string. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Sort - { - /// Sort direction - [Newtonsoft.Json.JsonProperty("direction", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SortDirection Direction { get; set; } - - /// Sort field name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// Priority index. Sorts with lower values are executed earlier - [Newtonsoft.Json.JsonProperty("priority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Priority { get; set; } - - - } - - /// Sort direction - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SortDirection - { - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Asc")] - Asc = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Desc")] - Desc = 2, - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfApplicationAccessRequestViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ApplicationAccessRequestViewModel - { - /// CreatedDate - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedDate { get; set; } - - /// DeviceId - [Newtonsoft.Json.JsonProperty("deviceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DeviceId { get; set; } - - /// RequestingApplicationUsername - [Newtonsoft.Json.JsonProperty("requestingApplicationUsername", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestingApplicationUsername { get; set; } - - /// Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ApplicationAccessStatusRequestType? Status { get; set; } - - - } - - /// Status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ApplicationAccessStatusRequestType - { - [System.Runtime.Serialization.EnumMember(Value = @"Approved")] - Approved = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Denied")] - Denied = 2, - - } - - /// ApplicationAccessRequestUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ApplicationAccessRequestUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ApplicationAccessRequestUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ApplicationAccessRequestUpdateModel - { - /// Application Access Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfApplicationAccessStatusRequestType Status { get; set; } - - - } - - /// Application Access Status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfApplicationAccessStatusRequestType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ApplicationAccessStatusRequestType? Value { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfApplicationAccessRequestAuditViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ApplicationAccessRequestAuditViewModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// DatabaseName - [Newtonsoft.Json.JsonProperty("databaseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DatabaseName { get; set; } - - /// DateRecorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - - } - - /// CategorizedListModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListModel - { - /// Whether or not the list is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// List Id - [Newtonsoft.Json.JsonProperty("categorizedListId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CategorizedListId { get; set; } - - /// Description of the list - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// The items in the list - [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Items { get; set; } - - /// Name of the list - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// The items in the list - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemModel - { - /// Categorized List Id - [Newtonsoft.Json.JsonProperty("categorizedListId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CategorizedListId { get; set; } - - /// Categorized List Item Id - [Newtonsoft.Json.JsonProperty("categorizedListItemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CategorizedListItemId { get; set; } - - /// Categorized List Item Category - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Category { get; set; } - - /// Categorized List Item Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// CategorizedListUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CategorizedListUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListUpdateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - - } - - /// Active - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfBoolean - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Value { get; set; } - - - } - - /// Description - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfString - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// CategorizedListDeleteModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListDeleteModel - { - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? Id { get; set; } - - /// ObjectType - [Newtonsoft.Json.JsonProperty("objectType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ObjectType { get; set; } - - /// ResponseCodes - [Newtonsoft.Json.JsonProperty("responseCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ResponseCodes { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfCategorizedListItemModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// List Option Create Argument - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemCreateArgs - { - /// Value(s) of the list options to add - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Data { get; set; } - - - } - - /// Value(s) of the list options to add - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemCreateModel - { - /// Category - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Category { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Value { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfCategorizedListItemViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemViewModel - { - /// CategorizedListId - [Newtonsoft.Json.JsonProperty("categorizedListId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CategorizedListId { get; set; } - - /// CategorizedListItemId - [Newtonsoft.Json.JsonProperty("categorizedListItemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CategorizedListItemId { get; set; } - - /// Category - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString Category { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString Value { get; set; } - - - } - - /// List Option Update Argument - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemUpdateArgs - { - /// Value(s) of the list options to update - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Data { get; set; } - - - } - - /// Value(s) of the list options to update - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemUpdateModel - { - /// CategorizedListItemId - [Newtonsoft.Json.JsonProperty("categorizedListItemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CategorizedListItemId { get; set; } - - /// Category - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Category { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Value { get; set; } - - - } - - /// CategorizedListItemDeleteModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemDeleteModel - { - /// IsDeleted - [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfCategorizedListSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListSummary - { - /// Whether or not the list is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// List Id - [Newtonsoft.Json.JsonProperty("categorizedListId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CategorizedListId { get; set; } - - /// Description of the list - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Name of the list - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// The number of options in the list - [Newtonsoft.Json.JsonProperty("numOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NumOptions { get; set; } - - - } - - /// CategorizedListCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CategorizedListUpdateModel Data { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSimpleCategorizedList - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SimpleCategorizedList - { - /// List Id - [Newtonsoft.Json.JsonProperty("categorizedListId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CategorizedListId { get; set; } - - /// Name of the list - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfString - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfCategorizedListAuditModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListAuditModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// CategorizedListAuditId - [Newtonsoft.Json.JsonProperty("categorizedListAuditId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CategorizedListAuditId { get; set; } - - /// CategorizedListId - [Newtonsoft.Json.JsonProperty("categorizedListId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CategorizedListId { get; set; } - - /// DatabaseName - [Newtonsoft.Json.JsonProperty("databaseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DatabaseName { get; set; } - - /// DateRecorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// DelegatedUserId - [Newtonsoft.Json.JsonProperty("delegatedUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DelegatedUserId { get; set; } - - /// DelegatedUserName - [Newtonsoft.Json.JsonProperty("delegatedUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DelegatedUserName { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// FormattedDate - [Newtonsoft.Json.JsonProperty("formattedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FormattedDate { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// MachineName - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// UserName - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// List option create argument using a file - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemCreateWithFileArgs - { - /// Delimiter used in the file - [Newtonsoft.Json.JsonProperty("delimiter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public Char Delimiter { get; set; } - - /// Uploaded file containing list options to add - [Newtonsoft.Json.JsonProperty("file", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] File { get; set; } - - - } - - /// Delimiter used in the file - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Char - { - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfConfigurationAuditItem - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Configuration Audit Item - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationAuditItem - { - /// Action that was performed - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Date of Action - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Date { get; set; } - - /// Display name of user performing action - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Notes on the action that was performed - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - - } - - /// Configuration General - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationGeneralModel - { - /// General Application Configuration Settings - [Newtonsoft.Json.JsonProperty("applicationSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationApplicationSettingsModel ApplicationSettings { get; set; } - - /// Email server configuration - [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationEmailModel Email { get; set; } - - /// Folders Configuration - [Newtonsoft.Json.JsonProperty("folders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationFoldersModel Folders { get; set; } - - /// Launcher Settings Configuration - [Newtonsoft.Json.JsonProperty("launcherSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLauncherSettingsModel LauncherSettings { get; set; } - - /// Local User Passwords configuration - [Newtonsoft.Json.JsonProperty("localUserPasswords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLocalUserPasswordsModel LocalUserPasswords { get; set; } - - /// Permission Options Configuration - [Newtonsoft.Json.JsonProperty("permissionOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationPermissionOptionsModel PermissionOptions { get; set; } - - /// Protocol Handler Settings Configuration - [Newtonsoft.Json.JsonProperty("protocolHandlerSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationProtocolHandlerSettingsModel ProtocolHandlerSettings { get; set; } - - /// User Experience Configuration - [Newtonsoft.Json.JsonProperty("userExperience", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserExperienceModel UserExperience { get; set; } - - /// User Interface Configuration Settings - [Newtonsoft.Json.JsonProperty("userInterface", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserInterfaceModel UserInterface { get; set; } - - - } - - /// Configuration Application Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationApplicationSettingsModel - { - /// Send Anonymized System Metrics Information - [Newtonsoft.Json.JsonProperty("allowSendTelemetry", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowSendTelemetry { get; set; } - - /// Allow software update checks. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("allowSoftwareUpdateChecks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowSoftwareUpdateChecks { get; set; } - - /// API Refresh Tokens Enabled - [Newtonsoft.Json.JsonProperty("apiRefreshTokensEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ApiRefreshTokensEnabled { get; set; } - - /// API session timeout days - [Newtonsoft.Json.JsonProperty("apiSessionTimeoutDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ApiSessionTimeoutDays { get; set; } - - /// API session timeout hours - [Newtonsoft.Json.JsonProperty("apiSessionTimeoutHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ApiSessionTimeoutHours { get; set; } - - /// API session timeout minutes - [Newtonsoft.Json.JsonProperty("apiSessionTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ApiSessionTimeoutMinutes { get; set; } - - /// API session timeout unlimited - [Newtonsoft.Json.JsonProperty("apiSessionTimeoutUnlimited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ApiSessionTimeoutUnlimited { get; set; } - - /// Notify when preview releases are available. False by default - [Newtonsoft.Json.JsonProperty("configurationEarlyAdopterEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ConfigurationEarlyAdopterEnabled { get; set; } - - /// Outward accessible url to get to application. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("customUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomUrl { get; set; } - - /// Display Downtime Message To Admins Only - [Newtonsoft.Json.JsonProperty("displayDowntimeMessageToAdminsOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisplayDowntimeMessageToAdminsOnly { get; set; } - - /// Enable Cred SSP for win RM - [Newtonsoft.Json.JsonProperty("enableCredSsp", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableCredSsp { get; set; } - - /// Enable Syslog/CEF Logging - [Newtonsoft.Json.JsonProperty("enableSyslogCefLogging", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSyslogCefLogging { get; set; } - - /// Enable Web services - [Newtonsoft.Json.JsonProperty("enableWebServices", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableWebServices { get; set; } - - /// Maximum Token Refreshes Allowed - [Newtonsoft.Json.JsonProperty("maximumTokenRefreshesAllowed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaximumTokenRefreshesAllowed { get; set; } - - /// Maximum number of entries in secret log - [Newtonsoft.Json.JsonProperty("maxSecretLogLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaxSecretLogLength { get; set; } - - /// The Maximum Time for Offline Access on Mobile Devices setting in Secret Server determines how long to cache secret data on the mobile device - [Newtonsoft.Json.JsonProperty("mobileMaxOfflineDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MobileMaxOfflineDays { get; set; } - - /// The Maximum Time for Offline Access on Mobile Devices setting in Secret Server determines how long to cache secret data on the mobile device - [Newtonsoft.Json.JsonProperty("mobileMaxOfflineHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MobileMaxOfflineHours { get; set; } - - /// A keep alive thread will run in the background pinging the web URL to make sure IIS does not stop running due to inactivity. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("preventApplicationFromSleeping", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PreventApplicationFromSleeping { get; set; } - - /// Prevent non-Application Account users from directly authenticating against the API. - [Newtonsoft.Json.JsonProperty("preventDirectApiAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PreventDirectApiAuthentication { get; set; } - - /// This is the site that the CEF/Syslogs will run on - [Newtonsoft.Json.JsonProperty("syslogCefLogSite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SyslogCefLogSite { get; set; } - - /// Syslog/CEF Protocol - [Newtonsoft.Json.JsonProperty("syslogCefPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SyslogCefPort { get; set; } - - /// Syslog/CEF Protocol to use when sending logs - [Newtonsoft.Json.JsonProperty("syslogCefProtocol", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SyslogCefProtocol { get; set; } - - /// Syslog/CEF Server Address - [Newtonsoft.Json.JsonProperty("syslogCefServer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SyslogCefServer { get; set; } - - /// Time Zone to use when sending Syslog/CEF Protocol log entries - [Newtonsoft.Json.JsonProperty("syslogCefTimeZone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SyslogCefTimeZone { get; set; } - - /// If TMS is installed, the file location. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("tmsInstallationPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TmsInstallationPath { get; set; } - - /// Win RM endpoint url - [Newtonsoft.Json.JsonProperty("winRmEndpointUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string WinRmEndpointUrl { get; set; } - - /// Enable syslog events to the windows event log. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("writeSyslogToEventLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WriteSyslogToEventLog { get; set; } - - - } - - /// Outgoing email server configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationEmailModel - { - /// All emails will be sent from this address - [Newtonsoft.Json.JsonProperty("fromEmailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FromEmailAddress { get; set; } - - /// Send Legacy Emails - [Newtonsoft.Json.JsonProperty("sendLegacyEmails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendLegacyEmails { get; set; } - - /// Check Certificate Revocation when in Implicit SSL Connection Mode - [Newtonsoft.Json.JsonProperty("smtpCheckCertificateRevocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SmtpCheckCertificateRevocation { get; set; } - - /// SMTP user domain - [Newtonsoft.Json.JsonProperty("smtpDomain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SmtpDomain { get; set; } - - /// SMTP user password - [Newtonsoft.Json.JsonProperty("smtpPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SmtpPassword { get; set; } - - /// Custom port, otherwise the default - [Newtonsoft.Json.JsonProperty("smtpPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SmtpPort { get; set; } - - /// The resolvable and reachable host name for the outgoing SMTP server - [Newtonsoft.Json.JsonProperty("smtpServer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SmtpServer { get; set; } - - /// true if credentials are set, false if anonymous - [Newtonsoft.Json.JsonProperty("smtpUseCredentials", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SmtpUseCredentials { get; set; } - - /// Implicit SSL Connection Mode - [Newtonsoft.Json.JsonProperty("smtpUseImplicitSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SmtpUseImplicitSSL { get; set; } - - /// SMTP user name - [Newtonsoft.Json.JsonProperty("smtpUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SmtpUserName { get; set; } - - /// Use SSL to connect - [Newtonsoft.Json.JsonProperty("smtpUseSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SmtpUseSSL { get; set; } - - - } - - /// Folder Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationFoldersModel - { - /// Each user will have a personal folder created and assigned to them - [Newtonsoft.Json.JsonProperty("enablePersonalFolders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnablePersonalFolders { get; set; } - - /// The name of the root personal folder. Each user's personal folder will be named based on the user - [Newtonsoft.Json.JsonProperty("personalFolderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PersonalFolderName { get; set; } - - /// The format for the personal folder name for each user - [Newtonsoft.Json.JsonProperty("personalFolderNameOption", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public PersonalFolderNameOptionType? PersonalFolderNameOption { get; set; } - - /// Warning to be shown when creating Secrets if ShowPersonalFolderWarning is true - [Newtonsoft.Json.JsonProperty("personalFolderWarning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PersonalFolderWarning { get; set; } - - /// Users will only see folders they have View permissions on - [Newtonsoft.Json.JsonProperty("requireViewFolderPermission", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireViewFolderPermission { get; set; } - - /// When true the PersonalFolderWarning will be shown when creating Secrets - [Newtonsoft.Json.JsonProperty("showPersonalFolderWarning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ShowPersonalFolderWarning { get; set; } - - - } - - /// The format for the personal folder name for each user - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum PersonalFolderNameOptionType - { - [System.Runtime.Serialization.EnumMember(Value = @"DisplayName")] - DisplayName = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"UsernameAndDomain")] - UsernameAndDomain = 1, - - } - - /// Configuration Launcher Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLauncherSettingsModel - { - /// Forces Check In of Secret when user closes their only active launcher. - [Newtonsoft.Json.JsonProperty("checkInSecretOnLastLauncherClose", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckInSecretOnLastLauncherClose { get; set; } - - /// When Secret is Checked In, all active launchers associated with it will close. - [Newtonsoft.Json.JsonProperty("closeLauncherOnCheckInSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CloseLauncherOnCheckInSecret { get; set; } - - /// Allow the user to download existing and tested mappings from Thycotic.com. - [Newtonsoft.Json.JsonProperty("enableDomainDownload", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDomainDownload { get; set; } - - /// Allow the user to upload mappings - [Newtonsoft.Json.JsonProperty("enableDomainUpload", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDomainUpload { get; set; } - - /// Enable Launcher - [Newtonsoft.Json.JsonProperty("enableLauncher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableLauncher { get; set; } - - /// Enable Launcher Auto Update - [Newtonsoft.Json.JsonProperty("enableLauncherAutoUpdate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableLauncherAutoUpdate { get; set; } - - /// Allow Secret Server to retrieve and parse the mapped website when using the web launcher. - [Newtonsoft.Json.JsonProperty("enableWebParsing", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableWebParsing { get; set; } - - /// Launcher Deployment Type - [Newtonsoft.Json.JsonProperty("launcherDeploymentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LauncherDeploymentType { get; set; } - - /// Send the URL that is on the Secret to the web password launcher in addition to the bookmarklet - [Newtonsoft.Json.JsonProperty("sendSecretUrlToLauncher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendSecretUrlToLauncher { get; set; } - - - } - - /// Configuration Section for Local User Passwords - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLocalUserPasswordsModel - { - /// Whether or not the local password can be reset by the user - [Newtonsoft.Json.JsonProperty("allowUsersToResetForgottenPasswords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowUsersToResetForgottenPasswords { get; set; } - - /// Indicates whether or not local users must change their password when it is reset or expires. - [Newtonsoft.Json.JsonProperty("enableLocalUserPasswordExpiration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableLocalUserPasswordExpiration { get; set; } - - /// Local users cannot change their password until it meets this age - [Newtonsoft.Json.JsonProperty("enableMinimumPasswordAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableMinimumPasswordAge { get; set; } - - /// Passwords cannot be reused when enabled and still in stored history - [Newtonsoft.Json.JsonProperty("enablePasswordHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnablePasswordHistory { get; set; } - - /// How many days until the password expires - [Newtonsoft.Json.JsonProperty("localUserPasswordExpirationDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LocalUserPasswordExpirationDays { get; set; } - - /// How many hours until the password expires - [Newtonsoft.Json.JsonProperty("localUserPasswordExpirationHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LocalUserPasswordExpirationHours { get; set; } - - /// How many minutes until the password expires - [Newtonsoft.Json.JsonProperty("localUserPasswordExpirationMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LocalUserPasswordExpirationMinutes { get; set; } - - /// How many days until password can be changed - [Newtonsoft.Json.JsonProperty("minimumPasswordAgeDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MinimumPasswordAgeDays { get; set; } - - /// How many hours until password can be changed - [Newtonsoft.Json.JsonProperty("minimumPasswordAgeHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MinimumPasswordAgeHours { get; set; } - - /// How many minutes until password can be changed - [Newtonsoft.Json.JsonProperty("minimumPasswordAgeMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MinimumPasswordAgeMinutes { get; set; } - - /// How many passwords should be stored in history. - [Newtonsoft.Json.JsonProperty("passwordHistoryItems", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordHistoryItems { get; set; } - - /// The minimum length required for local user passwords - [Newtonsoft.Json.JsonProperty("passwordMinimumLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordMinimumLength { get; set; } - - /// Whether or not the local password must include a lowercase letter - [Newtonsoft.Json.JsonProperty("passwordRequireLowercase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PasswordRequireLowercase { get; set; } - - /// Whether or not the local password must include a number - [Newtonsoft.Json.JsonProperty("passwordRequireNumbers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PasswordRequireNumbers { get; set; } - - /// Whether or not the local password must include a symbol - [Newtonsoft.Json.JsonProperty("passwordRequireSymbols", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PasswordRequireSymbols { get; set; } - - /// Whether or not the local password must include an uppercase letter - [Newtonsoft.Json.JsonProperty("passwordRequireUppercase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PasswordRequireUppercase { get; set; } - - - } - - /// Configuration Permission Options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationPermissionOptionsModel - { - /// Allow Secrets to have the same name in the same folder - [Newtonsoft.Json.JsonProperty("allowDuplicateSecretNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowDuplicateSecretNames { get; set; } - - /// Users that only have secret view can see the next password - [Newtonsoft.Json.JsonProperty("allowViewUserToRetrieveAutoChangeNextPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowViewUserToRetrieveAutoChangeNextPassword { get; set; } - - /// Default permissions to be applied when a Secret is created - [Newtonsoft.Json.JsonProperty("defaultSecretPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DefaultSecretPermissionsType? DefaultSecretPermissions { get; set; } - - /// Allow approval from email - [Newtonsoft.Json.JsonProperty("enableApprovalFromEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableApprovalFromEmail { get; set; } - - /// Require approval for secrets - [Newtonsoft.Json.JsonProperty("forceSecretApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ForceSecretApproval { get; set; } - - - } - - /// Default permissions to be applied when a Secret is created - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DefaultSecretPermissionsType - { - [System.Runtime.Serialization.EnumMember(Value = @"InheritsPermissions")] - InheritsPermissions = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"CopyFromFolder")] - CopyFromFolder = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"OnlyAllowCreator")] - OnlyAllowCreator = 2, - - } - - /// Configuration Protocol Handler Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationProtocolHandlerSettingsModel - { - /// Allowed Domains/IP Addresses (comma-separated) - [Newtonsoft.Json.JsonProperty("protocolHandlerInstallTimeAllowedDomains", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ProtocolHandlerInstallTimeAllowedDomains { get; set; } - - /// Disable Auto Update - [Newtonsoft.Json.JsonProperty("protocolHandlerInstallTimeDisableAutoUpdate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProtocolHandlerInstallTimeDisableAutoUpdate { get; set; } - - /// Enable Protocol Handler Install Time Settings - [Newtonsoft.Json.JsonProperty("protocolHandlerInstallTimeSettingsEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProtocolHandlerInstallTimeSettingsEnabled { get; set; } - - - } - - /// Configuration User Experience - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationUserExperienceModel - { - /// The default application language for users and the language for non-user specific tasks like logging when applicable - [Newtonsoft.Json.JsonProperty("applicationLanguage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ApplicationLanguage { get; set; } - - /// The default date format that everyone sees unless they override with a user preference - [Newtonsoft.Json.JsonProperty("defaultDateFormat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultDateFormat { get; set; } - - /// The role that should be assigned when a new user is created - [Newtonsoft.Json.JsonProperty("defaultNewUserRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultNewUserRoleId { get; set; } - - /// The default time format that everyone sees unless they override with a user preference - [Newtonsoft.Json.JsonProperty("defaultTimeFormat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultTimeFormat { get; set; } - - /// Logout users that are inactive - [Newtonsoft.Json.JsonProperty("forceInactivityTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ForceInactivityTimeout { get; set; } - - /// Logout users that are inactive for this many minutes - [Newtonsoft.Json.JsonProperty("forceInactivityTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ForceInactivityTimeoutMinutes { get; set; } - - /// Secrets must be created within a folder - [Newtonsoft.Json.JsonProperty("requireFolderForSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireFolderForSecret { get; set; } - - /// This controls the delay, in milliseconds, until the search is executed by the global search in the header. If set to 0, it will require the user to press enter in the search bar. - [Newtonsoft.Json.JsonProperty("searchDelayMs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SearchDelayMs { get; set; } - - /// No duplicate passwords on a Secret - [Newtonsoft.Json.JsonProperty("secretPasswordHistoryRestrictionAll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SecretPasswordHistoryRestrictionAll { get; set; } - - /// How many passwords must be unique on a Secret - [Newtonsoft.Json.JsonProperty("secretPasswordHistoryRestrictionCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPasswordHistoryRestrictionCount { get; set; } - - /// How long entering comments to view a Secret last before being required again - [Newtonsoft.Json.JsonProperty("secretViewIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretViewIntervalMinutes { get; set; } - - /// The timezone that the server shows by default and when job scheduling runs - [Newtonsoft.Json.JsonProperty("serverTimeZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerTimeZoneId { get; set; } - - /// How long until the UI will go inactive and stop polling for updates - [Newtonsoft.Json.JsonProperty("uiInactivitySleepMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UiInactivitySleepMinutes { get; set; } - - - } - - /// User interface settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationUserInterfaceModel - { - /// Allow users to pick their theme when in classic mode - [Newtonsoft.Json.JsonProperty("allowUserToSelectTheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowUserToSelectTheme { get; set; } - - /// Custom logo when left nav is collapsed - [Newtonsoft.Json.JsonProperty("customLogoCollapsed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomLogoCollapsed { get; set; } - - /// Custom logo full size - [Newtonsoft.Json.JsonProperty("customLogoFullSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomLogoFullSize { get; set; } - - /// Default classic theme - [Newtonsoft.Json.JsonProperty("defaultClassicTheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DefaultClassicTheme { get; set; } - - /// New users will use the new ui by default - [Newtonsoft.Json.JsonProperty("newUiDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? NewUiDefault { get; set; } - - - } - - /// ConfigurationGeneralPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationGeneralPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationGeneralUpdateModel Data { get; set; } - - - } - - /// Update configuration, only need to send sections that should be updated - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationGeneralUpdateModel - { - /// Folder option configuration - [Newtonsoft.Json.JsonProperty("folders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationFoldersUpdateModel Folders { get; set; } - - /// Permission option configuration - [Newtonsoft.Json.JsonProperty("permissionOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationPermissionOptionsUpdateModel PermissionOptions { get; set; } - - /// User experience configuration - [Newtonsoft.Json.JsonProperty("userExperience", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserExperienceUpdateModel UserExperience { get; set; } - - - } - - /// Update folder configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationFoldersUpdateModel - { - /// Each user will have a personal folder created and assigned to them - [Newtonsoft.Json.JsonProperty("enablePersonalFolders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnablePersonalFolders { get; set; } - - /// The name of the root personal folder. Each user's personal folder will be named based on the user - [Newtonsoft.Json.JsonProperty("personalFolderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PersonalFolderName { get; set; } - - /// The format for the personal folder name for each user - [Newtonsoft.Json.JsonProperty("personalFolderNameOption", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfPersonalFolderNameOptionType PersonalFolderNameOption { get; set; } - - /// Warning to be shown when creating Secrets if ShowPersonalFolderWarning is true - [Newtonsoft.Json.JsonProperty("personalFolderWarning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PersonalFolderWarning { get; set; } - - /// Users will only see folders they have View permissions on - [Newtonsoft.Json.JsonProperty("requireViewFolderPermission", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RequireViewFolderPermission { get; set; } - - /// When true the PersonalFolderWarning will be shown when creating Secrets - [Newtonsoft.Json.JsonProperty("showPersonalFolderWarning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ShowPersonalFolderWarning { get; set; } - - - } - - /// The format for the personal folder name for each user - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfPersonalFolderNameOptionType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public PersonalFolderNameOptionType? Value { get; set; } - - - } - - /// Configuration Permission Options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationPermissionOptionsUpdateModel - { - /// Whether or not Secrets can have the same name in the same folder - [Newtonsoft.Json.JsonProperty("allowDuplicateSecretNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowDuplicateSecretNames { get; set; } - - /// All users with view only share on a Secret to see the next password - [Newtonsoft.Json.JsonProperty("allowViewUserToRetrieveAutoChangeNextPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean AllowViewUserToRetrieveAutoChangeNextPassword { get; set; } - - /// When a new Secret is created these permissions will be assigned - [Newtonsoft.Json.JsonProperty("defaultSecretPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfDefaultSecretPermissionsType DefaultSecretPermissions { get; set; } - - /// Allow users to approve by clicking on a link in email - [Newtonsoft.Json.JsonProperty("enableApprovalFromEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean EnableApprovalFromEmail { get; set; } - - /// Force approval type on Secrets that have approval - [Newtonsoft.Json.JsonProperty("forceSecretApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalForceSecretApprovalType ForceSecretApproval { get; set; } - - - } - - /// All users with view only share on a Secret to see the next password - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalBoolean - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Value { get; set; } - - - } - - /// When a new Secret is created these permissions will be assigned - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfDefaultSecretPermissionsType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DefaultSecretPermissionsType? Value { get; set; } - - - } - - /// Force approval type on Secrets that have approval - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalForceSecretApprovalType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Configuration User Experience - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationUserExperienceUpdateModel - { - /// The default language for all users - [Newtonsoft.Json.JsonProperty("applicationLanguage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ApplicationLanguage { get; set; } - - /// The default date format that everyone sees unless they override with a user preference - [Newtonsoft.Json.JsonProperty("defaultDateFormat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DefaultDateFormat { get; set; } - - /// The role that should be assigned when a new user is created - [Newtonsoft.Json.JsonProperty("defaultNewUserRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 DefaultNewUserRoleId { get; set; } - - /// The default time format that everyone sees unless they override with a user preference - [Newtonsoft.Json.JsonProperty("defaultTimeFormat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DefaultTimeFormat { get; set; } - - /// Logout users that are inactive - [Newtonsoft.Json.JsonProperty("forceInactivityTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ForceInactivityTimeout { get; set; } - - /// Logout users that are inactive for this many minutes - [Newtonsoft.Json.JsonProperty("forceInactivityTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ForceInactivityTimeoutMinutes { get; set; } - - /// Secrets must be created within a folder - [Newtonsoft.Json.JsonProperty("requireFolderForSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RequireFolderForSecret { get; set; } - - /// No duplicate passwords on a Secret - [Newtonsoft.Json.JsonProperty("secretPasswordHistoryRestrictionAll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SecretPasswordHistoryRestrictionAll { get; set; } - - /// The number of recently used passwords on a Secret that cannot be used - [Newtonsoft.Json.JsonProperty("secretPasswordHistoryRestrictionCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SecretPasswordHistoryRestrictionCount { get; set; } - - /// The number of minutes entering a comment is valid - [Newtonsoft.Json.JsonProperty("secretViewIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SecretViewIntervalMinutes { get; set; } - - /// The timezone that the server shows by default and when job scheduling runs - [Newtonsoft.Json.JsonProperty("serverTimeZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServerTimeZoneId { get; set; } - - /// How long until the UI will go inactive and stop polling for updates - [Newtonsoft.Json.JsonProperty("uiInactivitySleepMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 UiInactivitySleepMinutes { get; set; } - - - } - - /// The default language for all users - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfInt32 - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Value { get; set; } - - - } - - /// The role that should be assigned when a new user is created - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalInt32 - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Value { get; set; } - - - } - - /// ConfigurationLocalPasswordPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLocalPasswordPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLocalPasswordPatchModel Data { get; set; } - - - } - - /// Update settings for local user password configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLocalPasswordPatchModel - { - /// Whether or not the local password can be reset by the user - [Newtonsoft.Json.JsonProperty("allowUsersToResetForgottenPasswords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowUsersToResetForgottenPasswords { get; set; } - - /// Indicates whether or not local users must change their password when it is reset or expires. - [Newtonsoft.Json.JsonProperty("enableLocalUserPasswordExpiration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableLocalUserPasswordExpiration { get; set; } - - /// Local users cannot change their password until it meets this age - [Newtonsoft.Json.JsonProperty("enableMinimumPasswordAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableMinimumPasswordAge { get; set; } - - /// Passwords cannot be reused when enabled and still in stored history - [Newtonsoft.Json.JsonProperty("enablePasswordHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnablePasswordHistory { get; set; } - - /// How many days until the password expires. - [Newtonsoft.Json.JsonProperty("localUserPasswordExpirationDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 LocalUserPasswordExpirationDays { get; set; } - - /// How many hours until the password expires - [Newtonsoft.Json.JsonProperty("localUserPasswordExpirationHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 LocalUserPasswordExpirationHours { get; set; } - - /// How many minutes until the password expires - [Newtonsoft.Json.JsonProperty("localUserPasswordExpirationMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 LocalUserPasswordExpirationMinutes { get; set; } - - /// How many days until password can be changed - [Newtonsoft.Json.JsonProperty("minimumPasswordAgeDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MinimumPasswordAgeDays { get; set; } - - /// How many hours until password can be changed - [Newtonsoft.Json.JsonProperty("minimumPasswordAgeHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MinimumPasswordAgeHours { get; set; } - - /// How many minutes until password can be changed - [Newtonsoft.Json.JsonProperty("minimumPasswordAgeMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MinimumPasswordAgeMinutes { get; set; } - - /// How many passwords should be stored in history. - [Newtonsoft.Json.JsonProperty("passwordHistoryItems", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 PasswordHistoryItems { get; set; } - - /// Save all password history items. When true PasswordHistoryItems is ignored. - [Newtonsoft.Json.JsonProperty("passwordHistoryItemsAll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean PasswordHistoryItemsAll { get; set; } - - /// The minimum length required for local user passwords - [Newtonsoft.Json.JsonProperty("passwordMinimumLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 PasswordMinimumLength { get; set; } - - /// Whether or not the local password must include a lowercase letter - [Newtonsoft.Json.JsonProperty("passwordRequireLowercase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean PasswordRequireLowercase { get; set; } - - /// Whether or not the local password must include a number - [Newtonsoft.Json.JsonProperty("passwordRequireNumbers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean PasswordRequireNumbers { get; set; } - - /// Whether or not the local password must include a symbol - [Newtonsoft.Json.JsonProperty("passwordRequireSymbols", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean PasswordRequireSymbols { get; set; } - - /// Whether or not the local password must include an uppercase letter - [Newtonsoft.Json.JsonProperty("passwordRequireUppercase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean PasswordRequireUppercase { get; set; } - - - } - - /// Security Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSecurityModel - { - /// Allows the Http Get verb for Web Services. This allows REST-style calls to many Web Service methods, but reduces security - [Newtonsoft.Json.JsonProperty("allowWebServiceHttpGet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowWebServiceHttpGet { get; set; } - - /// When enabled, this setting will add audits for TLS certificate validation. Auditing will apply to all Active Directory domains using LDAPS and Syslog using TLS. Certificate policy options including ignoring certificate revocation failures applies to Syslog using TLS only. The default is the most strict so the certificate chain policy may need to be updated. TLS errors will be logged to Security Audit Log found on the Administration page - [Newtonsoft.Json.JsonProperty("auditTlsErrors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AuditTlsErrors { get; set; } - - /// Enable TLS Debugging and Connection Tracking - [Newtonsoft.Json.JsonProperty("auditTlsErrorsDebug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AuditTlsErrorsDebug { get; set; } - - /// Certificate chain policy options - [Newtonsoft.Json.JsonProperty("certificateChainPolicyOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CertificateChainPolicyOptions { get; set; } - - /// Client Certificate Thumbprint(s) - [Newtonsoft.Json.JsonProperty("clientCertificateIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ClientCertificateIds { get; set; } - - /// The secure symmetric key to use when sending data to the separate Database Integrity Monitoring service. This can be retrieved from the configuration utility in the Database Integrity Monitoring service install location - [Newtonsoft.Json.JsonProperty("databaseIntegrityMonitoringSymmetricKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DatabaseIntegrityMonitoringSymmetricKey { get; set; } - - /// When enabled, Secret Server will communicate with the separately installed Database Integrity Monitoring service. This service will send email alerts if it detects possible database tampering. Access to Secret Server's database and web servers should be restricted to highly trusted individuals only - [Newtonsoft.Json.JsonProperty("enableDatabaseIntegrityMonitoring", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDatabaseIntegrityMonitoring { get; set; } - - /// Enable restrictions on the types or sizes of files that can be uploaded into Secret Server - [Newtonsoft.Json.JsonProperty("enableFileRestrictions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableFileRestrictions { get; set; } - - /// Enable Frame Blocking - [Newtonsoft.Json.JsonProperty("enableFrameBlocking", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableFrameBlocking { get; set; } - - /// Enable HTTP Strict Transport Security - [Newtonsoft.Json.JsonProperty("enableHSTS", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableHSTS { get; set; } - - /// File Extension Restrictions - [Newtonsoft.Json.JsonProperty("fileExtensionRestrictions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FileExtensionRestrictions { get; set; } - - /// Allow only FIPS compliant encryption schemes to be used - [Newtonsoft.Json.JsonProperty("fipsEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? FipsEnabled { get; set; } - - /// By requiring HTTPS, users will not be able to access Secret Server using HTTP - [Newtonsoft.Json.JsonProperty("forceHttps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ForceHttps { get; set; } - - /// This will disable the VersionGet SOAP call. It will also hide the Secret Server Version Numbers from the Headers and Footer - [Newtonsoft.Json.JsonProperty("hideVersionNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideVersionNumber { get; set; } - - /// Maximum Age (in seconds) - [Newtonsoft.Json.JsonProperty("hstsMaxAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HstsMaxAge { get; set; } - - /// Maximum File Size (bytes) - [Newtonsoft.Json.JsonProperty("maximumFileSizeBytes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MaximumFileSizeBytes { get; set; } - - /// Maximum File Size supported by ASP.NET - [Newtonsoft.Json.JsonProperty("maximumFileSizeSupported", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MaximumFileSizeSupported { get; set; } - - /// When enabled, the Web Password Filler will only allow exact domain matches. When disabled, subdomains such as https://sub.google.com will match http://google.com Secrets. The recommended setting is enabled. - [Newtonsoft.Json.JsonProperty("webPasswordFillerRequiresFullDomainMatch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WebPasswordFillerRequiresFullDomainMatch { get; set; } - - - } - - /// ConfigurationSecurityPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSecurityPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSecurityPatchModel Data { get; set; } - - - } - - /// Update security configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSecurityPatchModel - { - /// Allows the Http Get verb for Web Services. This allows REST-style calls to many Web Service methods, but reduces security - [Newtonsoft.Json.JsonProperty("allowWebServiceHttpGet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowWebServiceHttpGet { get; set; } - - /// When enabled, this setting will add audits for TLS certificate validation. Auditing will apply to all Active Directory domains using LDAPS and Syslog using TLS. Certificate policy options including ignoring certificate revocation failures applies to Syslog using TLS only. The default is the most strict so the certificate chain policy may need to be updated. TLS errors will be logged to Security Audit Log found on the Administration page - [Newtonsoft.Json.JsonProperty("auditTlsErrors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AuditTlsErrors { get; set; } - - /// Enable TLS Debugging and Connection Tracking - [Newtonsoft.Json.JsonProperty("auditTlsErrorsDebug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AuditTlsErrorsDebug { get; set; } - - /// Ignore failures for certificate revocations - [Newtonsoft.Json.JsonProperty("certificateChainPolicyOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString CertificateChainPolicyOptions { get; set; } - - /// Client Certificate Thumbprint(s) - [Newtonsoft.Json.JsonProperty("clientCertificateIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ClientCertificateIds { get; set; } - - /// The secure symmetric key to use when sending data to the separate Database Integrity Monitoring service. This can be retrieved from the configuration utility in the Database Integrity Monitoring service install location - [Newtonsoft.Json.JsonProperty("databaseIntegrityMonitoringSymmetricKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DatabaseIntegrityMonitoringSymmetricKey { get; set; } - - /// When enabled, Secret Server will communicate with the separately installed Database Integrity Monitoring service. This service will send email alerts if it detects possible database tampering. Access to Secret Server's database and web servers should be restricted to highly trusted individuals only - [Newtonsoft.Json.JsonProperty("enableDatabaseIntegrityMonitoring", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDatabaseIntegrityMonitoring { get; set; } - - /// Enable restrictions on the types or sizes of files that can be uploaded into Secret Server - [Newtonsoft.Json.JsonProperty("enableFileRestrictions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableFileRestrictions { get; set; } - - /// Enable Frame Blocking - [Newtonsoft.Json.JsonProperty("enableFrameBlocking", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableFrameBlocking { get; set; } - - /// Enable HTTP Strict Transport Security - [Newtonsoft.Json.JsonProperty("enableHSTS", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableHSTS { get; set; } - - /// File Extension Restrictions - [Newtonsoft.Json.JsonProperty("fileExtensionRestrictions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString FileExtensionRestrictions { get; set; } - - /// Allow only FIPS compliant encryption schemes to be used - [Newtonsoft.Json.JsonProperty("fipsEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean FipsEnabled { get; set; } - - /// By requiring HTTPS, users will not be able to access Secret Server using HTTP - [Newtonsoft.Json.JsonProperty("forceHttps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ForceHttps { get; set; } - - /// This will disable the VersionGet SOAP call. It will also hide the Secret Server Version Numbers from the Headers and Footer - [Newtonsoft.Json.JsonProperty("hideVersionNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean HideVersionNumber { get; set; } - - /// Maximum Age (in seconds) - [Newtonsoft.Json.JsonProperty("hstsMaxAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 HstsMaxAge { get; set; } - - /// Maximum File Size (Bytes) - [Newtonsoft.Json.JsonProperty("maximumFileSizeBytes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString MaximumFileSizeBytes { get; set; } - - /// Maximum File Size supported by ASP.NET - [Newtonsoft.Json.JsonProperty("maximumFileSizeSupported", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean MaximumFileSizeSupported { get; set; } - - /// When enabled, the Web Password Filler will only allow exact domain matches. When disabled, subdomains such as https://sub.google.com will match http://google.com Secrets. The recommended setting is enabled. - [Newtonsoft.Json.JsonProperty("webPasswordFillerRequiresFullDomainMatch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WebPasswordFillerRequiresFullDomainMatch { get; set; } - - - } - - /// Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginModel - { - /// AutoComplete is a feature provided by most web browsers to automatically remember and prefill forms for you. This can be a great security concern since they typically do not save the data in a secure manner. You can enable or disable web browser prefill on the Login screen by using this option - [Newtonsoft.Json.JsonProperty("allowAutoComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowAutoComplete { get; set; } - - /// This option enables the "Remember Me" checkbox on the login screen. When a user chooses to use "Remember Me", an encrypted cookie will be set in their browser. This will enable the user to revisit Secret Server without the need to log in. This cookie will no longer be valid when the "Remember Me" period has expired and they will have to log in again - [Newtonsoft.Json.JsonProperty("allowRememberMe", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowRememberMe { get; set; } - - /// Allows cached credentials to be used when Distributed Engine is unable to connect to Active Directory - [Newtonsoft.Json.JsonProperty("cacheADCredentials", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CacheADCredentials { get; set; } - - /// Default Login Domain - [Newtonsoft.Json.JsonProperty("defaultLoginDomain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DefaultLoginDomain { get; set; } - - /// Display the domain selector at login - [Newtonsoft.Json.JsonProperty("enableDomainSelector", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EnableDomainSelector { get; set; } - - /// When this option is checked, the user will only have to complete a CAPTCHA if their login credentials are entered incorrectly a certain number of times - [Newtonsoft.Json.JsonProperty("enableLoginFailureCAPTCHA", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableLoginFailureCAPTCHA { get; set; } - - /// Maximum concurrent logins per user - [Newtonsoft.Json.JsonProperty("maxConcurrentLoginsPerUser", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaxConcurrentLoginsPerUser { get; set; } - - /// Set the number of login attempts allowed before a user is locked out of their account. Once locked out, they will need a Secret Server administrator to reset their password and enable their account - [Newtonsoft.Json.JsonProperty("maximumLoginFailures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaximumLoginFailures { get; set; } - - /// Maximum Login Failures Before CAPTCHA - [Newtonsoft.Json.JsonProperty("maxLoginFailuresBeforeCAPTCHA", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaxLoginFailuresBeforeCAPTCHA { get; set; } - - /// The number of minutes that you will be remembered - [Newtonsoft.Json.JsonProperty("rememberMeTimeOutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RememberMeTimeOutMinutes { get; set; } - - /// Ssh Key Integration Configuration - [Newtonsoft.Json.JsonProperty("sshKeyIntegration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginSshKeyIntegrationModel SshKeyIntegration { get; set; } - - /// Two Factor Login Configuration - [Newtonsoft.Json.JsonProperty("twoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginTwoFactorModel TwoFactor { get; set; } - - /// Number of minutes a User will be locked out for - [Newtonsoft.Json.JsonProperty("userLockoutTimeMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserLockoutTimeMinutes { get; set; } - - /// Enable the Visual Keyboard for logins - [Newtonsoft.Json.JsonProperty("visualEncryptedKeyboardEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? VisualEncryptedKeyboardEnabled { get; set; } - - /// Require the Visual Keyboard for logins - [Newtonsoft.Json.JsonProperty("visualEncryptedKeyboardRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? VisualEncryptedKeyboardRequired { get; set; } - - - } - - /// Ssh Key Integration Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginSshKeyIntegrationModel - { - /// Require password only, public key only, password or public key, password and public key - [Newtonsoft.Json.JsonProperty("authenticationMethod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AuthenticationMethod { get; set; } - - /// When activated, SSH key pairs can be used for authentication in SSH Terminal - [Newtonsoft.Json.JsonProperty("enable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enable { get; set; } - - /// The number of days and hours the key will stay active - [Newtonsoft.Json.JsonProperty("expirationInHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExpirationInHours { get; set; } - - /// When activated, SSH keys will expire after a specified amount of time - [Newtonsoft.Json.JsonProperty("keyExpires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? KeyExpires { get; set; } - - /// When activated, providing a valid SSH key (and password, if required by Unix Authentication Method) will bypass any required 2FA validation - [Newtonsoft.Json.JsonProperty("twoFactorBypass", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? TwoFactorBypass { get; set; } - - - } - - /// Two Factor Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginTwoFactorModel - { - /// When this option is checked, the user will only have to provide their two factor authentication information once in that browser for set time. This is done by setting an encrypted cookie on the browser. The cookie will no longer be valid when the Two Factor Remember Me Duration has expired - [Newtonsoft.Json.JsonProperty("allowTwoFactorRememberMe", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowTwoFactorRememberMe { get; set; } - - /// Duo Two Factor Login Configuration - [Newtonsoft.Json.JsonProperty("duo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginTwoFactorDuoModel Duo { get; set; } - - /// OpenID Connect Two Factor Login Configuration - [Newtonsoft.Json.JsonProperty("openIdConnect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginTwoFactorOpenIdConnectModel OpenIdConnect { get; set; } - - /// RADIUS Two Factor Login Configuration - [Newtonsoft.Json.JsonProperty("radius", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginTwoFactorRadiusModel Radius { get; set; } - - /// Require Two Factor For Web Login - [Newtonsoft.Json.JsonProperty("requireTwoFactorForWebLogin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireTwoFactorForWebLogin { get; set; } - - /// Require Two Factor For Web Services - [Newtonsoft.Json.JsonProperty("requireTwoFactorForWebServices", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireTwoFactorForWebServices { get; set; } - - /// The number of days that you will not be reprompted for 2FA - [Newtonsoft.Json.JsonProperty("twoFactorRememberMeTimeOutDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TwoFactorRememberMeTimeOutDays { get; set; } - - - } - - /// Duo Two Factor Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginTwoFactorDuoModel - { - /// API Hostname - [Newtonsoft.Json.JsonProperty("apiHostname", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ApiHostname { get; set; } - - /// Enable Duo Integration - [Newtonsoft.Json.JsonProperty("enable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enable { get; set; } - - /// Integration Key - [Newtonsoft.Json.JsonProperty("integrationKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IntegrationKey { get; set; } - - /// Secret Key - [Newtonsoft.Json.JsonProperty("secretKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretKey { get; set; } - - /// Use RADIUS Username for DUO - [Newtonsoft.Json.JsonProperty("useRadiusUsername", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseRadiusUsername { get; set; } - - - } - - /// OpenID Connect Two Factor Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginTwoFactorOpenIdConnectModel - { - /// When activated, new Secret Server users will be added automatically to Thycotic One - [Newtonsoft.Json.JsonProperty("addNewUsersToThycoticOne", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AddNewUsersToThycoticOne { get; set; } - - /// Client Id - [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ClientId { get; set; } - - /// Client Secret - [Newtonsoft.Json.JsonProperty("clientSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ClientSecret { get; set; } - - /// Enable OpenID Connect Integration - [Newtonsoft.Json.JsonProperty("enable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enable { get; set; } - - /// The URL users must visit to log out of their OpenID Connect account. (Optional) - [Newtonsoft.Json.JsonProperty("logoutUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LogoutUrl { get; set; } - - /// OpenID Connect Server URL - [Newtonsoft.Json.JsonProperty("serverUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerUrl { get; set; } - - /// When activated, passwords will be checked against Thycotic One instead of Secret Server. This affects the REST API, DoubleLock, and export functionality - [Newtonsoft.Json.JsonProperty("useThycoticOneAuthAsDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseThycoticOneAuthAsDefault { get; set; } - - - } - - /// RADIUS Two Factor Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginTwoFactorRadiusModel - { - /// If checked, Secret Server will automatically try to authenticate to RADIUS using the user's local password after it is entered during login. - ///
If RADIUS authentication fails, the user will be prompted for the correct RADIUS password.Please note that this is not supported when Integrated Windows - ///
Authentication is enabled
- [Newtonsoft.Json.JsonProperty("attemptUserPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AttemptUserPassword { get; set; } - - /// RADIUS Client Port Range - [Newtonsoft.Json.JsonProperty("clientPortRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ClientPortRange { get; set; } - - /// RADIUS Default Username - [Newtonsoft.Json.JsonProperty("defaultUsername", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DefaultUsername { get; set; } - - /// Disable Radius NAS-IP-Address Attribute - [Newtonsoft.Json.JsonProperty("disableNasIpAddressAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableNasIpAddressAttribute { get; set; } - - /// Enabling RADIUS integration will allow another form of two factor authentication for users - [Newtonsoft.Json.JsonProperty("enable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enable { get; set; } - - /// Enabling a Failover RADIUS server will allow another server to fail over to - [Newtonsoft.Json.JsonProperty("enableFailoverServer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableFailoverServer { get; set; } - - /// Configure the NAS-Identifier that will be sent with the RADIUS Access-Request - [Newtonsoft.Json.JsonProperty("enableRadiusNasId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableRadiusNasId { get; set; } - - /// The IP address of your Failover RADIUS server - [Newtonsoft.Json.JsonProperty("failoverServerIP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FailoverServerIP { get; set; } - - /// Failover RADIUS Server Port - [Newtonsoft.Json.JsonProperty("failoverServerPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FailoverServerPort { get; set; } - - /// Failover RADIUS Shared Secret - [Newtonsoft.Json.JsonProperty("failoverSharedSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FailoverSharedSecret { get; set; } - - /// Failover Time Out (seconds) - [Newtonsoft.Json.JsonProperty("failoverTimeoutSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FailoverTimeoutSeconds { get; set; } - - /// RADIUS Login Explanation - [Newtonsoft.Json.JsonProperty("loginExplanation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LoginExplanation { get; set; } - - /// The NAS-Identifier attribute value that will be sent with the RADIUS Access-Request - [Newtonsoft.Json.JsonProperty("nasId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NasId { get; set; } - - /// Authentication Protocol - [Newtonsoft.Json.JsonProperty("protocol", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Protocol { get; set; } - - /// The IP address of your RADIUS server - [Newtonsoft.Json.JsonProperty("serverIP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerIP { get; set; } - - /// RADIUS Server Port - [Newtonsoft.Json.JsonProperty("serverPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ServerPort { get; set; } - - /// RADIUS Shared Secret for All Users - [Newtonsoft.Json.JsonProperty("sharedSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SharedSecret { get; set; } - - /// Use Same RADIUS Shared Secret for All Users - [Newtonsoft.Json.JsonProperty("sharedSecretSameForAllUsers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SharedSecretSameForAllUsers { get; set; } - - /// Time Out (seconds) - [Newtonsoft.Json.JsonProperty("timeoutSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TimeoutSeconds { get; set; } - - - } - - /// ConfigurationLoginPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginPatchModel Data { get; set; } - - - } - - /// Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginPatchModel - { - /// AutoComplete is a feature provided by most web browsers to automatically remember and prefill forms for you. This can be a great security concern since they typically do not save the data in a secure manner. You can enable or disable web browser prefill on the Login screen by using this option - [Newtonsoft.Json.JsonProperty("allowAutoComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowAutoComplete { get; set; } - - /// This option enables the "Remember Me" checkbox on the login screen. When a user chooses to use "Remember Me", an encrypted cookie will be set in their browser. This will enable the user to revisit Secret Server without the need to log in. This cookie will no longer be valid when the "Remember Me" period has expired and they will have to log in again - [Newtonsoft.Json.JsonProperty("allowRememberMe", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowRememberMe { get; set; } - - /// Allows cached credentials to be used when Distributed Engine is unable to connect to Active Directory - [Newtonsoft.Json.JsonProperty("cacheADCredentials", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean CacheADCredentials { get; set; } - - /// Default Login Domain - [Newtonsoft.Json.JsonProperty("defaultLoginDomain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DefaultLoginDomain { get; set; } - - /// Display the domain selector at login - [Newtonsoft.Json.JsonProperty("enableDomainSelector", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EnableDomainSelector { get; set; } - - /// When this option is checked, the user will only have to complete a CAPTCHA if their login credentials are entered incorrectly a certain number of times - [Newtonsoft.Json.JsonProperty("enableLoginFailureCAPTCHA", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableLoginFailureCAPTCHA { get; set; } - - /// Maximum concurrent logins per user - [Newtonsoft.Json.JsonProperty("maxConcurrentLoginsPerUser", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MaxConcurrentLoginsPerUser { get; set; } - - /// Set the number of login attempts allowed before a user is locked out of their account. Once locked out, they will need a Secret Server administrator to reset their password and enable their account - [Newtonsoft.Json.JsonProperty("maximumLoginFailures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MaximumLoginFailures { get; set; } - - /// Maximum Login Failures Before CAPTCHA - [Newtonsoft.Json.JsonProperty("maxLoginFailuresBeforeCAPTCHA", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MaxLoginFailuresBeforeCAPTCHA { get; set; } - - /// The number of minutes that you will be remembered - [Newtonsoft.Json.JsonProperty("rememberMeTimeOutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 RememberMeTimeOutMinutes { get; set; } - - /// Ssh Key Integration Configuration - [Newtonsoft.Json.JsonProperty("sshKeyIntegration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginSshKeyIntegrationPatchModel SshKeyIntegration { get; set; } - - /// Two Factor Login Configuration - [Newtonsoft.Json.JsonProperty("twoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginTwoFactorPatchModel TwoFactor { get; set; } - - /// Number of minutes a User will be locked out for - [Newtonsoft.Json.JsonProperty("userLockoutTimeMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 UserLockoutTimeMinutes { get; set; } - - /// Enable the Visual Keyboard for logins - [Newtonsoft.Json.JsonProperty("visualEncryptedKeyboardEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean VisualEncryptedKeyboardEnabled { get; set; } - - /// Require the Visual Keyboard for logins - [Newtonsoft.Json.JsonProperty("visualEncryptedKeyboardRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean VisualEncryptedKeyboardRequired { get; set; } - - - } - - /// Ssh Key Integration Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginSshKeyIntegrationPatchModel - { - /// Require password only, public key only, password or public key, password and public key - [Newtonsoft.Json.JsonProperty("authenticationMethod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 AuthenticationMethod { get; set; } - - /// When activated, SSH key pairs can be used for authentication in SSH Terminal - [Newtonsoft.Json.JsonProperty("enable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enable { get; set; } - - /// The number of days and hours the key will stay active - [Newtonsoft.Json.JsonProperty("expirationInHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ExpirationInHours { get; set; } - - /// When activated, SSH keys will expire after a specified amount of time - [Newtonsoft.Json.JsonProperty("keyExpires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean KeyExpires { get; set; } - - /// When activated, providing a valid SSH key (and password, if required by Unix Authentication Method) will bypass any required 2FA validation - [Newtonsoft.Json.JsonProperty("twoFactorBypass", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean TwoFactorBypass { get; set; } - - - } - - /// Two Factor Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginTwoFactorPatchModel - { - /// When this option is checked, the user will only have to provide their two factor authentication information once in that browser for set time. This is done by setting an encrypted cookie on the browser. The cookie will no longer be valid when the Two Factor Remember Me Duration has expired - [Newtonsoft.Json.JsonProperty("allowTwoFactorRememberMe", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowTwoFactorRememberMe { get; set; } - - /// Duo Two Factor Login Configuration - [Newtonsoft.Json.JsonProperty("duo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginTwoFactorDuoPatchModel Duo { get; set; } - - /// OpenID Connect Two Factor Login Configuration - [Newtonsoft.Json.JsonProperty("openIdConnect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginTwoFactorOpenIdConnectPatchModel OpenIdConnect { get; set; } - - /// RADIUS Two Factor Login Configuration - [Newtonsoft.Json.JsonProperty("radius", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginTwoFactorRadiusPatchModel Radius { get; set; } - - /// Require Two Factor For Web Login - [Newtonsoft.Json.JsonProperty("requireTwoFactorForWebLogin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RequireTwoFactorForWebLogin { get; set; } - - /// Require Two Factor For Web Services - [Newtonsoft.Json.JsonProperty("requireTwoFactorForWebServices", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RequireTwoFactorForWebServices { get; set; } - - /// The number of days that you will not be reprompted for 2FA - [Newtonsoft.Json.JsonProperty("twoFactorRememberMeTimeOutDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 TwoFactorRememberMeTimeOutDays { get; set; } - - - } - - /// Duo Two Factor Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginTwoFactorDuoPatchModel - { - /// API Hostname - [Newtonsoft.Json.JsonProperty("apiHostname", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ApiHostname { get; set; } - - /// Enable Duo Integration - [Newtonsoft.Json.JsonProperty("enable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enable { get; set; } - - /// Integration Key - [Newtonsoft.Json.JsonProperty("integrationKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString IntegrationKey { get; set; } - - /// Secret Key - [Newtonsoft.Json.JsonProperty("secretKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SecretKey { get; set; } - - /// Use RADIUS Username for DUO - [Newtonsoft.Json.JsonProperty("useRadiusUsername", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean UseRadiusUsername { get; set; } - - - } - - /// OpenID Connect Two Factor Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginTwoFactorOpenIdConnectPatchModel - { - /// When activated, new Secret Server users will be added automatically to Thycotic One - [Newtonsoft.Json.JsonProperty("addNewUsersToThycoticOne", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AddNewUsersToThycoticOne { get; set; } - - /// Client Id - [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ClientId { get; set; } - - /// Client Secret - [Newtonsoft.Json.JsonProperty("clientSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ClientSecret { get; set; } - - /// Enable OpenID Connect Integration - [Newtonsoft.Json.JsonProperty("enable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enable { get; set; } - - /// The URL users must visit to log out of their OpenID Connect account. (Optional) - [Newtonsoft.Json.JsonProperty("logoutUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString LogoutUrl { get; set; } - - /// OpenID Connect Server URL - [Newtonsoft.Json.JsonProperty("serverUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServerUrl { get; set; } - - /// When activated, passwords will be checked against Thycotic One instead of Secret Server. This affects the REST API, DoubleLock, and export functionality - [Newtonsoft.Json.JsonProperty("useThycoticOneAuthAsDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean UseThycoticOneAuthAsDefault { get; set; } - - - } - - /// RADIUS Two Factor Login Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLoginTwoFactorRadiusPatchModel - { - /// If checked, Secret Server will automatically try to authenticate to RADIUS using the user's local password after it is entered during login. - ///
If RADIUS authentication fails, the user will be prompted for the correct RADIUS password.Please note that this is not supported when Integrated Windows - ///
Authentication is enabled
- [Newtonsoft.Json.JsonProperty("attemptUserPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AttemptUserPassword { get; set; } - - /// RADIUS Client Port Range - [Newtonsoft.Json.JsonProperty("clientPortRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ClientPortRange { get; set; } - - /// RADIUS Default Username - [Newtonsoft.Json.JsonProperty("defaultUsername", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DefaultUsername { get; set; } - - /// Disable Radius NAS-IP-Address Attribute - [Newtonsoft.Json.JsonProperty("disableNasIpAddressAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean DisableNasIpAddressAttribute { get; set; } - - /// Enabling RADIUS integration will allow another form of two factor authentication for users - [Newtonsoft.Json.JsonProperty("enable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enable { get; set; } - - /// Enabling a Failover RADIUS server will allow another server to fail over to - [Newtonsoft.Json.JsonProperty("enableFailoverServer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableFailoverServer { get; set; } - - /// Configure the NAS-Identifier that will be sent with the RADIUS Access-Request - [Newtonsoft.Json.JsonProperty("enableRadiusNasId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableRadiusNasId { get; set; } - - /// The IP address of your Failover RADIUS server - [Newtonsoft.Json.JsonProperty("failoverServerIP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString FailoverServerIP { get; set; } - - /// Failover RADIUS Server Port - [Newtonsoft.Json.JsonProperty("failoverServerPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 FailoverServerPort { get; set; } - - /// Failover RADIUS Shared Secret - [Newtonsoft.Json.JsonProperty("failoverSharedSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString FailoverSharedSecret { get; set; } - - /// Failover Time Out (seconds) - [Newtonsoft.Json.JsonProperty("failoverTimeoutSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 FailoverTimeoutSeconds { get; set; } - - /// RADIUS Login Explanation - [Newtonsoft.Json.JsonProperty("loginExplanation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString LoginExplanation { get; set; } - - /// The NAS-Identifier attribute value that will be sent with the RADIUS Access-Request - [Newtonsoft.Json.JsonProperty("nasId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString NasId { get; set; } - - /// Authentication Protocol - [Newtonsoft.Json.JsonProperty("protocol", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 Protocol { get; set; } - - /// The IP address of your RADIUS server - [Newtonsoft.Json.JsonProperty("serverIP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServerIP { get; set; } - - /// RADIUS Server Port - [Newtonsoft.Json.JsonProperty("serverPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ServerPort { get; set; } - - /// Shared Secret for All Users - [Newtonsoft.Json.JsonProperty("sharedSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SharedSecret { get; set; } - - /// Use Same RADIUS Shared Secret for All Users - [Newtonsoft.Json.JsonProperty("sharedSecretSameForAllUsers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SharedSecretSameForAllUsers { get; set; } - - /// Time Out (seconds) - [Newtonsoft.Json.JsonProperty("timeoutSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 TimeoutSeconds { get; set; } - - - } - - /// SAML configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSamlModel - { - /// Enable SAML authentication - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Enable legacy SingleLogout - [Newtonsoft.Json.JsonProperty("enableLegacySLO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableLegacySLO { get; set; } - - /// List of Identity Providers - [Newtonsoft.Json.JsonProperty("identityProviders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection IdentityProviders { get; set; } - - /// Optional AttributeName to use for matching a Secret Server user. - [Newtonsoft.Json.JsonProperty("legacyUsernameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LegacyUsernameAttribute { get; set; } - - /// The Service Provider Certificate. Base64 encoded - [Newtonsoft.Json.JsonProperty("serviceProviderCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceProviderCertificate { get; set; } - - /// The password for the Service Provider Certificate - [Newtonsoft.Json.JsonProperty("serviceProviderCertificatePassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceProviderCertificatePassword { get; set; } - - /// The name of the Service Provider - [Newtonsoft.Json.JsonProperty("serviceProviderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceProviderName { get; set; } - - /// Use Legacy SAML - [Newtonsoft.Json.JsonProperty("useLegacy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseLegacy { get; set; } - - - } - - /// SAML Identity Provider configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSamlIdentityProviderModel - { - /// Active status of the Identity Provider. Users can only log-in via an active Identity Provider. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// When specified, instructs the IDP on how to authenticate the user(optional). - [Newtonsoft.Json.JsonProperty("authnContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AuthnContext { get; set; } - - /// The allowed number of minutes of difference between Secret Server's clock and the IDP's clock. The default is 3 minutes. - [Newtonsoft.Json.JsonProperty("clockSkew", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ClockSkew { get; set; } - - /// Description of the Identity Provider. - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// When true, SAML messages that were already received from this IDP will be allowed by Secret Server. Otherwise, resending messages from the IDP will trigger an error. - [Newtonsoft.Json.JsonProperty("disableAssertionReplayCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableAssertionReplayCheck { get; set; } - - /// A SAML assertion may include an audience restriction URI. This identifies the intended recipient of the SAML assertion. If included it should match the service provider's name. When this setting is true, this check is skipped. - [Newtonsoft.Json.JsonProperty("disableAudienceRestrictionCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableAudienceRestrictionCheck { get; set; } - - /// Disables the authentication context check, which validates that the real authentication method matches the ExpectedAuthnContext method. - [Newtonsoft.Json.JsonProperty("disableAuthnContextCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableAuthnContextCheck { get; set; } - - /// When true, the destination URI in the SAML response will not be validated. - [Newtonsoft.Json.JsonProperty("disableDestinationCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableDestinationCheck { get; set; } - - /// When true, logout requests coming from this IDP are ignored. - [Newtonsoft.Json.JsonProperty("disableInboundLogout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableInboundLogout { get; set; } - - /// When true, the InResponseTo attribute in SAML messages is not checked. - [Newtonsoft.Json.JsonProperty("disableInResponseToCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableInResponseToCheck { get; set; } - - /// When true, a SAML logout response will be considered legitimate even if there was no corresponding logout request. - [Newtonsoft.Json.JsonProperty("disablePendingLogoutCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisablePendingLogoutCheck { get; set; } - - /// When true, the built-in check against the AssertionConsumerService URL will be skipped. - [Newtonsoft.Json.JsonProperty("disableRecipientCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableRecipientCheck { get; set; } - - /// When true, a SAML response is valid regardless of when it was sent. - [Newtonsoft.Json.JsonProperty("disableTimePeriodCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableTimePeriodCheck { get; set; } - - /// The Display Name for the Identity Provider. - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Optional AttributeName to use for matching a Secret Server user's domain. - [Newtonsoft.Json.JsonProperty("domainAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainAttribute { get; set; } - - /// When true, a more detailed log will be generated for SAML logins and logouts. - [Newtonsoft.Json.JsonProperty("enableDetailedLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDetailedLog { get; set; } - - /// When true, logging out of Secret Server will log the user out of this Identity Provider. - [Newtonsoft.Json.JsonProperty("enableSLO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSLO { get; set; } - - /// When true, the Identity Provider will be instructed to re-authenticate the user, even if they are already authenticated. - [Newtonsoft.Json.JsonProperty("forceAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ForceAuthentication { get; set; } - - /// SAML Identity Provider Id - [Newtonsoft.Json.JsonProperty("identityProviderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? IdentityProviderId { get; set; } - - /// The logout request life time. - [Newtonsoft.Json.JsonProperty("logoutRequestLifeTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LogoutRequestLifeTime { get; set; } - - /// Name of the Identity Provider. - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// When true, an in-progress SP-initiated login may be interrupted by an IDP-initiated login. - [Newtonsoft.Json.JsonProperty("overridePendingAuthnRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OverridePendingAuthnRequest { get; set; } - - /// The public certificate for the Identity Provider. Base64 encoded - [Newtonsoft.Json.JsonProperty("publicCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PublicCertificate { get; set; } - - /// When true, the authentication requests sent to this IDP will be signed. - [Newtonsoft.Json.JsonProperty("signAuthnRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SignAuthnRequest { get; set; } - - /// When true, logout requests sent to this IDP will be signed.< - [Newtonsoft.Json.JsonProperty("signLogoutRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SignLogoutRequest { get; set; } - - /// When true, logout responses sent to this IDP will be signed. - [Newtonsoft.Json.JsonProperty("signLogoutResponse", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SignLogoutResponse { get; set; } - - /// The URL where Secret Server will send responses to single logout messages. - [Newtonsoft.Json.JsonProperty("singleLogoutServiceResponseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SingleLogoutServiceResponseUrl { get; set; } - - /// The URL to send the single logout message to. - [Newtonsoft.Json.JsonProperty("singleLogoutServiceUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SingleLogoutServiceUrl { get; set; } - - /// Method for communicating with the Identity Provider. HTTPRedirect is recommended in most cases. - [Newtonsoft.Json.JsonProperty("ssoServiceBinding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SsoServiceBinding { get; set; } - - /// The URL of the Identity Provider where the user will be sent to authenticate. - [Newtonsoft.Json.JsonProperty("ssoServiceUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SsoServiceUrl { get; set; } - - /// Optional AttributeName to use for matching a Secret Server user. - [Newtonsoft.Json.JsonProperty("usernameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UsernameAttribute { get; set; } - - /// When true, Secret Server will expect SAML assertions from this IDP to be encrypted. Unencrypted assertions or assertions that cannot be decrypted will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionEncrypted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantAssertionEncrypted { get; set; } - - /// When true, Secret Server will expect either SAML assertions or SAML responses from this IDP to be signed. Unsigned assertions/responses and assertions/responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionOrResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantAssertionOrResponseSigned { get; set; } - - /// When true, Secret Server will expect SAML assertions from this IDP to be signed. Unsigned assertions or assertions whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantAssertionSigned { get; set; } - - /// When true, Secret Server will expect logout requests from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantLogoutRequestSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantLogoutRequestSigned { get; set; } - - /// When true, Secret Server will expect logout responses from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantLogoutResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantLogoutResponseSigned { get; set; } - - /// When true, Secret Server will expect SAML responses from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantSAMLResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantSAMLResponseSigned { get; set; } - - - } - - /// ConfigurationSamlPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSamlPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSamlPatchModel Data { get; set; } - - - } - - /// SAML configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSamlPatchModel - { - /// Enable SAML authentication - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enabled { get; set; } - - /// Enable legacy SingleLogout - [Newtonsoft.Json.JsonProperty("enableLegacySLO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableLegacySLO { get; set; } - - /// List of Identity Providers - [Newtonsoft.Json.JsonProperty("identityProviders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection IdentityProviders { get; set; } - - /// Optional AttributeName to use for matching a Secret Server user. - [Newtonsoft.Json.JsonProperty("legacyUsernameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString LegacyUsernameAttribute { get; set; } - - /// The Service Provider Certificate. Base64 encoded - [Newtonsoft.Json.JsonProperty("serviceProviderCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServiceProviderCertificate { get; set; } - - /// The password for the Service Provider Certificate - [Newtonsoft.Json.JsonProperty("serviceProviderCertificatePassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServiceProviderCertificatePassword { get; set; } - - /// The name of the Service Provider - [Newtonsoft.Json.JsonProperty("serviceProviderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServiceProviderName { get; set; } - - /// Use Legacy SAML - [Newtonsoft.Json.JsonProperty("useLegacy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean UseLegacy { get; set; } - - - } - - /// SAML Identity Provider configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSamlIdentityProviderPatchModel - { - /// Active status of the Identity Provider. Users can only log-in via an active Identity Provider. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// When specified, instructs the IDP on how to authenticate the user(optional). - [Newtonsoft.Json.JsonProperty("authnContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString AuthnContext { get; set; } - - /// The allowed number of minutes of difference between Secret Server's clock and the IDP's clock. The default is 3 minutes. - [Newtonsoft.Json.JsonProperty("clockSkew", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ClockSkew { get; set; } - - /// Description of the Identity Provider. - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Description { get; set; } - - /// When true, SAML messages that were already received from this IDP will be allowed by Secret Server. Otherwise, resending messages from the IDP will trigger an error. - [Newtonsoft.Json.JsonProperty("disableAssertionReplayCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisableAssertionReplayCheck { get; set; } - - /// A SAML assertion may include an audience restriction URI. This identifies the intended recipient of the SAML assertion. If included it should match the service provider's name. When this setting is true, this check is skipped. - [Newtonsoft.Json.JsonProperty("disableAudienceRestrictionCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisableAudienceRestrictionCheck { get; set; } - - /// Disables the authentication context check, which validates that the real authentication method matches the ExpectedAuthnContext method. - [Newtonsoft.Json.JsonProperty("disableAuthnContextCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisableAuthnContextCheck { get; set; } - - /// When true, the destination URI in the SAML response will not be validated. - [Newtonsoft.Json.JsonProperty("disableDestinationCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisableDestinationCheck { get; set; } - - /// When true, logout requests coming from this IDP are ignored. - [Newtonsoft.Json.JsonProperty("disableInboundLogout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisableInboundLogout { get; set; } - - /// When true, the InResponseTo attribute in SAML messages is not checked. - [Newtonsoft.Json.JsonProperty("disableInResponseToCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisableInResponseToCheck { get; set; } - - /// When true, a SAML logout response will be considered legitimate even if there was no corresponding logout request. - [Newtonsoft.Json.JsonProperty("disablePendingLogoutCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisablePendingLogoutCheck { get; set; } - - /// When true, the built-in check against the AssertionConsumerService URL will be skipped. - [Newtonsoft.Json.JsonProperty("disableRecipientCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisableRecipientCheck { get; set; } - - /// When true, a SAML response is valid regardless of when it was sent. - [Newtonsoft.Json.JsonProperty("disableTimePeriodCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisableTimePeriodCheck { get; set; } - - /// The Display Name for the Identity Provider. - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DisplayName { get; set; } - - /// Optional AttributeName to use for matching a Secret Server user's domain. - [Newtonsoft.Json.JsonProperty("domainAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DomainAttribute { get; set; } - - /// When true, a more detailed log will be generated for SAML logins and logouts. - [Newtonsoft.Json.JsonProperty("enableDetailedLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDetailedLog { get; set; } - - /// When true, logging out of Secret Server will log the user out of this Identity Provider. - [Newtonsoft.Json.JsonProperty("enableSLO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableSLO { get; set; } - - /// When true, the Identity Provider will be instructed to re-authenticate the user, even if they are already authenticated. - [Newtonsoft.Json.JsonProperty("forceAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ForceAuthentication { get; set; } - - /// SAML Identity Provider Id - [Newtonsoft.Json.JsonProperty("identityProviderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? IdentityProviderId { get; set; } - - /// The logout request life time. - [Newtonsoft.Json.JsonProperty("logoutRequestLifeTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 LogoutRequestLifeTime { get; set; } - - /// Name of the Identity Provider. - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// When true, an in-progress SP-initiated login may be interrupted by an IDP-initiated login. - [Newtonsoft.Json.JsonProperty("overridePendingAuthnRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean OverridePendingAuthnRequest { get; set; } - - /// The public certificate for the Identity Provider. Base64 encoded - [Newtonsoft.Json.JsonProperty("publicCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PublicCertificate { get; set; } - - /// When true, the authentication requests sent to this IDP will be signed. - [Newtonsoft.Json.JsonProperty("signAuthnRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SignAuthnRequest { get; set; } - - /// When true, logout requests sent to this IDP will be signed.< - [Newtonsoft.Json.JsonProperty("signLogoutRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SignLogoutRequest { get; set; } - - /// When true, logout responses sent to this IDP will be signed. - [Newtonsoft.Json.JsonProperty("signLogoutResponse", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SignLogoutResponse { get; set; } - - /// The URL where Secret Server will send responses to single logout messages. - [Newtonsoft.Json.JsonProperty("singleLogoutServiceResponseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SingleLogoutServiceResponseUrl { get; set; } - - /// The URL to send the single logout message to. - [Newtonsoft.Json.JsonProperty("singleLogoutServiceUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SingleLogoutServiceUrl { get; set; } - - /// Method for communicating with the Identity Provider. HTTPRedirect is recommended in most cases. - [Newtonsoft.Json.JsonProperty("ssoServiceBinding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SsoServiceBinding { get; set; } - - /// The URL of the Identity Provider where the user will be sent to authenticate. - [Newtonsoft.Json.JsonProperty("ssoServiceUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SsoServiceUrl { get; set; } - - /// Optional AttributeName to use for matching a Secret Server user. - [Newtonsoft.Json.JsonProperty("usernameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString UsernameAttribute { get; set; } - - /// When true, Secret Server will expect SAML assertions from this IDP to be encrypted. Unencrypted assertions or assertions that cannot be decrypted will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionEncrypted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WantAssertionEncrypted { get; set; } - - /// When true, Secret Server will expect either SAML assertions or SAML responses from this IDP to be signed. Unsigned assertions/responses and assertions/responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionOrResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WantAssertionOrResponseSigned { get; set; } - - /// When true, Secret Server will expect SAML assertions from this IDP to be signed. Unsigned assertions or assertions whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WantAssertionSigned { get; set; } - - /// When true, Secret Server will expect logout requests from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantLogoutRequestSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WantLogoutRequestSigned { get; set; } - - /// When true, Secret Server will expect logout responses from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantLogoutResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WantLogoutResponseSigned { get; set; } - - /// When true, Secret Server will expect SAML responses from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantSAMLResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WantSAMLResponseSigned { get; set; } - - - } - - /// RPC Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationRpcModel - { - /// Check Out Interval Days - [Newtonsoft.Json.JsonProperty("checkOutIntervalDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutIntervalDays { get; set; } - - /// Check Out Interval Hours - [Newtonsoft.Json.JsonProperty("checkOutIntervalHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutIntervalHours { get; set; } - - /// Check Out Interval Minutes - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutIntervalMinutes { get; set; } - - /// How many days to keep the operational logs - [Newtonsoft.Json.JsonProperty("daysToKeepLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DaysToKeepLogs { get; set; } - - /// Whether or not heartbeat is enabled - [Newtonsoft.Json.JsonProperty("enableHeartbeat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableHeartbeat { get; set; } - - /// Whether or not to allow changing the password when a Secret is checked in - [Newtonsoft.Json.JsonProperty("enablePasswordChangeOnCheckIn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnablePasswordChangeOnCheckIn { get; set; } - - /// Whether or not RPC is enabled - [Newtonsoft.Json.JsonProperty("enableRpc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableRpc { get; set; } - - - } - - /// ConfigurationRpcPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationRpcPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationRpcPatchModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationRpcPatchModel - { - /// CheckOutIntervalDays - [Newtonsoft.Json.JsonProperty("checkOutIntervalDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 CheckOutIntervalDays { get; set; } - - /// CheckOutIntervalHours - [Newtonsoft.Json.JsonProperty("checkOutIntervalHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 CheckOutIntervalHours { get; set; } - - /// CheckOutIntervalMinutes - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 CheckOutIntervalMinutes { get; set; } - - /// DaysToKeepLogs - [Newtonsoft.Json.JsonProperty("daysToKeepLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DaysToKeepLogs { get; set; } - - /// EnableHeartbeat - [Newtonsoft.Json.JsonProperty("enableHeartbeat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableHeartbeat { get; set; } - - /// EnablePasswordChangeOnCheckIn - [Newtonsoft.Json.JsonProperty("enablePasswordChangeOnCheckIn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnablePasswordChangeOnCheckIn { get; set; } - - /// EnableRpc - [Newtonsoft.Json.JsonProperty("enableRpc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableRpc { get; set; } - - - } - - /// SiteConnectorsSummaryModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorsSummaryModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// SiteConnectorId - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteConnectorId { get; set; } - - /// SiteConnectorName - [Newtonsoft.Json.JsonProperty("siteConnectorName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteConnectorName { get; set; } - - - } - - /// Internal Site Connector Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationInternalSiteConnectorModel - { - /// Site connector that is used internally by Secret Server - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteConnectorId { get; set; } - - - } - - /// ConfigurationInternalSiteConnectorPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationInternalSiteConnectorPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationInternalSiteConnectorPatchModel Data { get; set; } - - - } - - /// Internal Site Connector Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationInternalSiteConnectorPatchModel - { - /// ID for which site connector to use internally - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SiteConnectorId { get; set; } - - - } - - /// Configuration for Secret search indexer - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SearchIndexerModel - { - /// How many days to keep the logs for the search indexer - [Newtonsoft.Json.JsonProperty("daysToKeepLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DaysToKeepLogs { get; set; } - - /// Whether or not the search indexer is enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Characters that split keys to be indexed - [Newtonsoft.Json.JsonProperty("indexingSeparators", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection IndexingSeparators { get; set; } - - /// The index mode: standard or extended - [Newtonsoft.Json.JsonProperty("indexMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SearchIndexMode? IndexMode { get; set; } - - /// The percent of the index that is built - [Newtonsoft.Json.JsonProperty("indexPercentComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public float? IndexPercentComplete { get; set; } - - /// The time of the last indexing - [Newtonsoft.Json.JsonProperty("lastIndexDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastIndexDate { get; set; } - - /// Whether or not a log is available for the Secret Search Indexer - [Newtonsoft.Json.JsonProperty("logAvailable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LogAvailable { get; set; } - - /// The current status of the search secret indexer - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SearchIndexStatus? Status { get; set; } - - - } - - /// The index mode: standard or extended - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SearchIndexMode - { - [System.Runtime.Serialization.EnumMember(Value = @"Standard")] - Standard = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Extended")] - Extended = 1, - - } - - /// The current status of the search secret indexer - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SearchIndexStatus - { - [System.Runtime.Serialization.EnumMember(Value = @"NotStarted")] - NotStarted = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Idle")] - Idle = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Indexing")] - Indexing = 2, - - } - - /// SearchIndexerUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SearchIndexerUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SearchIndexerUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SearchIndexerUpdateModel - { - /// How many days to keep the logs for the search indexer - [Newtonsoft.Json.JsonProperty("daysToKeepLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DaysToKeepLogs { get; set; } - - /// Whether or not the search indexer is enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enabled { get; set; } - - /// Characters that split keys to be indexed - [Newtonsoft.Json.JsonProperty("indexingSeparators", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfStringOf IndexingSeparators { get; set; } - - /// The index mode: standard or extended - [Newtonsoft.Json.JsonProperty("indexMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfSearchIndexMode IndexMode { get; set; } - - - } - - /// Characters that split keys to be indexed - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfStringOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// The index mode: standard or extended - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfSearchIndexMode - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SearchIndexMode? Value { get; set; } - - - } - - /// Automatic Export Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AutoExportConfigurationModel - { - /// Whether automatic export is enabled. - [Newtonsoft.Json.JsonProperty("enableAutoExport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableAutoExport { get; set; } - - /// Whether child folders are included in the export. - [Newtonsoft.Json.JsonProperty("exportChildFolders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ExportChildFolders { get; set; } - - /// Whether folder paths are included in the export. - [Newtonsoft.Json.JsonProperty("exportFolderPaths", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ExportFolderPaths { get; set; } - - /// The ID of the Secret whose value is used to password protect exported data. - [Newtonsoft.Json.JsonProperty("exportPasswordSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExportPasswordSecretId { get; set; } - - /// Where the exported file is stored if on-prem. - [Newtonsoft.Json.JsonProperty("exportPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ExportPath { get; set; } - - /// Whether TOTP settings are included in the export. - [Newtonsoft.Json.JsonProperty("exportTotpSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ExportTotpSettings { get; set; } - - /// Which folder to automatically export, if none provided then all are exported. - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// How many days between each automatic export. - [Newtonsoft.Json.JsonProperty("frequencyDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FrequencyDays { get; set; } - - /// The last time the automatic export ran. - [Newtonsoft.Json.JsonProperty("lastExported", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastExported { get; set; } - - /// The user the export will be run as. - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// AutoExportConfigurationArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AutoExportConfigurationArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public AutoExportConfigurationUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AutoExportConfigurationUpdateModel - { - /// EnableAutoExport - [Newtonsoft.Json.JsonProperty("enableAutoExport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableAutoExport { get; set; } - - /// ExportChildFolders - [Newtonsoft.Json.JsonProperty("exportChildFolders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ExportChildFolders { get; set; } - - /// ExportFolderPaths - [Newtonsoft.Json.JsonProperty("exportFolderPaths", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ExportFolderPaths { get; set; } - - /// ExportPasswordSecretId - [Newtonsoft.Json.JsonProperty("exportPasswordSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 ExportPasswordSecretId { get; set; } - - /// ExportPath - [Newtonsoft.Json.JsonProperty("exportPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ExportPath { get; set; } - - /// ExportTotpSettings - [Newtonsoft.Json.JsonProperty("exportTotpSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ExportTotpSettings { get; set; } - - /// FolderId - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 FolderId { get; set; } - - /// FrequencyDays - [Newtonsoft.Json.JsonProperty("frequencyDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 FrequencyDays { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfAutoExportConfigurationAuditViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Automatic Export Configuration Audit - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AutoExportConfigurationAuditViewModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Date { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfAutoExportLogViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Automatic Export Log - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AutoExportLogViewModel - { - /// ExportDate - [Newtonsoft.Json.JsonProperty("exportDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExportDate { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfAutoExportStorageItemViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Details for an item in automatic export storage. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AutoExportStorageItemViewModel - { - /// The ID for the configuration this item used. - [Newtonsoft.Json.JsonProperty("autoExportConfigurationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AutoExportConfigurationId { get; set; } - - /// Whether the user can download this item. - [Newtonsoft.Json.JsonProperty("canDownload", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanDownload { get; set; } - - /// The name of the file stored. - [Newtonsoft.Json.JsonProperty("filename", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Filename { get; set; } - - /// The ID for this item in storage. - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The date and time this item was stored. - [Newtonsoft.Json.JsonProperty("storageDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StorageDate { get; set; } - - - } - - /// StreamContent - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class StreamContent - { - /// Headers - [Newtonsoft.Json.JsonProperty("headers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public HttpContentHeaders Headers { get; set; } - - - } - - /// Headers - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class HttpContentHeaders - { - /// Allow - [Newtonsoft.Json.JsonProperty("allow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Allow { get; set; } - - /// ContentDisposition - [Newtonsoft.Json.JsonProperty("contentDisposition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ContentDispositionHeaderValue ContentDisposition { get; set; } - - /// ContentEncoding - [Newtonsoft.Json.JsonProperty("contentEncoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ContentEncoding { get; set; } - - /// ContentLanguage - [Newtonsoft.Json.JsonProperty("contentLanguage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ContentLanguage { get; set; } - - /// ContentLength - [Newtonsoft.Json.JsonProperty("contentLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? ContentLength { get; set; } - - /// ContentLocation - [Newtonsoft.Json.JsonProperty("contentLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public Uri ContentLocation { get; set; } - - /// ContentMD5 - [Newtonsoft.Json.JsonProperty("contentMD5", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] ContentMD5 { get; set; } - - /// ContentRange - [Newtonsoft.Json.JsonProperty("contentRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ContentRangeHeaderValue ContentRange { get; set; } - - /// ContentType - [Newtonsoft.Json.JsonProperty("contentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public MediaTypeHeaderValue ContentType { get; set; } - - /// Expires - [Newtonsoft.Json.JsonProperty("expires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset Expires { get; set; } - - /// LastModified - [Newtonsoft.Json.JsonProperty("lastModified", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset LastModified { get; set; } - - - } - - /// ContentDisposition - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ContentDispositionHeaderValue - { - /// CreationDate - [Newtonsoft.Json.JsonProperty("creationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset CreationDate { get; set; } - - /// DispositionType - [Newtonsoft.Json.JsonProperty("dispositionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DispositionType { get; set; } - - /// FileName - [Newtonsoft.Json.JsonProperty("fileName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FileName { get; set; } - - /// FileNameStar - [Newtonsoft.Json.JsonProperty("fileNameStar", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FileNameStar { get; set; } - - /// ModificationDate - [Newtonsoft.Json.JsonProperty("modificationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset ModificationDate { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Parameters - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - /// ReadDate - [Newtonsoft.Json.JsonProperty("readDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset ReadDate { get; set; } - - /// Size - [Newtonsoft.Json.JsonProperty("size", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? Size { get; set; } - - - } - - /// CreationDate - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class OptionalDateTimeOffset - { - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Date { get; set; } - - /// DateTime - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateTime { get; set; } - - /// Day - [Newtonsoft.Json.JsonProperty("day", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Day { get; set; } - - /// DayOfWeek - [Newtonsoft.Json.JsonProperty("dayOfWeek", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DayOfWeek? DayOfWeek { get; set; } - - /// DayOfYear - [Newtonsoft.Json.JsonProperty("dayOfYear", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DayOfYear { get; set; } - - /// Hour - [Newtonsoft.Json.JsonProperty("hour", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Hour { get; set; } - - /// LocalDateTime - [Newtonsoft.Json.JsonProperty("localDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LocalDateTime { get; set; } - - /// Millisecond - [Newtonsoft.Json.JsonProperty("millisecond", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Millisecond { get; set; } - - /// Minute - [Newtonsoft.Json.JsonProperty("minute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Minute { get; set; } - - /// Month - [Newtonsoft.Json.JsonProperty("month", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Month { get; set; } - - /// Offset - [Newtonsoft.Json.JsonProperty("offset", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? Offset { get; set; } - - /// Second - [Newtonsoft.Json.JsonProperty("second", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Second { get; set; } - - /// Ticks - [Newtonsoft.Json.JsonProperty("ticks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? Ticks { get; set; } - - /// TimeOfDay - [Newtonsoft.Json.JsonProperty("timeOfDay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? TimeOfDay { get; set; } - - /// UtcDateTime - [Newtonsoft.Json.JsonProperty("utcDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? UtcDateTime { get; set; } - - /// UtcTicks - [Newtonsoft.Json.JsonProperty("utcTicks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? UtcTicks { get; set; } - - /// Year - [Newtonsoft.Json.JsonProperty("year", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Year { get; set; } - - - } - - /// DayOfWeek - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DayOfWeek - { - [System.Runtime.Serialization.EnumMember(Value = @"Sunday")] - Sunday = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Monday")] - Monday = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Tuesday")] - Tuesday = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Wednesday")] - Wednesday = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Thursday")] - Thursday = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"Friday")] - Friday = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"Saturday")] - Saturday = 6, - - } - - /// Parameters - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class NameValueHeaderValue - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// ContentLocation - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Uri - { - /// AbsolutePath - [Newtonsoft.Json.JsonProperty("absolutePath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AbsolutePath { get; set; } - - /// AbsoluteUri - [Newtonsoft.Json.JsonProperty("absoluteUri", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AbsoluteUri { get; set; } - - /// Authority - [Newtonsoft.Json.JsonProperty("authority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Authority { get; set; } - - /// DnsSafeHost - [Newtonsoft.Json.JsonProperty("dnsSafeHost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DnsSafeHost { get; set; } - - /// Fragment - [Newtonsoft.Json.JsonProperty("fragment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Fragment { get; set; } - - /// Host - [Newtonsoft.Json.JsonProperty("host", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Host { get; set; } - - /// HostNameType - [Newtonsoft.Json.JsonProperty("hostNameType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UriHostNameType? HostNameType { get; set; } - - /// IdnHost - [Newtonsoft.Json.JsonProperty("idnHost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IdnHost { get; set; } - - /// IsAbsoluteUri - [Newtonsoft.Json.JsonProperty("isAbsoluteUri", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsAbsoluteUri { get; set; } - - /// IsDefaultPort - [Newtonsoft.Json.JsonProperty("isDefaultPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDefaultPort { get; set; } - - /// IsFile - [Newtonsoft.Json.JsonProperty("isFile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFile { get; set; } - - /// IsLoopback - [Newtonsoft.Json.JsonProperty("isLoopback", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsLoopback { get; set; } - - /// IsUnc - [Newtonsoft.Json.JsonProperty("isUnc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUnc { get; set; } - - /// LocalPath - [Newtonsoft.Json.JsonProperty("localPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LocalPath { get; set; } - - /// OriginalString - [Newtonsoft.Json.JsonProperty("originalString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OriginalString { get; set; } - - /// PathAndQuery - [Newtonsoft.Json.JsonProperty("pathAndQuery", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PathAndQuery { get; set; } - - /// Port - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Port { get; set; } - - /// Query - [Newtonsoft.Json.JsonProperty("query", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Query { get; set; } - - /// Scheme - [Newtonsoft.Json.JsonProperty("scheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Scheme { get; set; } - - /// Segments - [Newtonsoft.Json.JsonProperty("segments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Segments { get; set; } - - /// UserEscaped - [Newtonsoft.Json.JsonProperty("userEscaped", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UserEscaped { get; set; } - - /// UserInfo - [Newtonsoft.Json.JsonProperty("userInfo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserInfo { get; set; } - - - } - - /// HostNameType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum UriHostNameType - { - [System.Runtime.Serialization.EnumMember(Value = @"Unknown")] - Unknown = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Basic")] - Basic = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Dns")] - Dns = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"IPv4")] - IPv4 = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"IPv6")] - IPv6 = 4, - - } - - /// ContentRange - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ContentRangeHeaderValue - { - /// From - [Newtonsoft.Json.JsonProperty("from", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? From { get; set; } - - /// HasLength - [Newtonsoft.Json.JsonProperty("hasLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasLength { get; set; } - - /// HasRange - [Newtonsoft.Json.JsonProperty("hasRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasRange { get; set; } - - /// Length - [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? Length { get; set; } - - /// To - [Newtonsoft.Json.JsonProperty("to", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? To { get; set; } - - /// Unit - [Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Unit { get; set; } - - - } - - /// ContentType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MediaTypeHeaderValue - { - /// CharSet - [Newtonsoft.Json.JsonProperty("charSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CharSet { get; set; } - - /// MediaType - [Newtonsoft.Json.JsonProperty("mediaType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MediaType { get; set; } - - /// Parameters - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - - } - - /// Database Backup Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class BackupConfigurationModel - { - /// Where to backup the database - [Newtonsoft.Json.JsonProperty("backupDatabasePath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BackupDatabasePath { get; set; } - - /// Whether or not to send an email if backup fails - [Newtonsoft.Json.JsonProperty("backupFailureNotification", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? BackupFailureNotification { get; set; } - - /// Where to store the web application backup files - [Newtonsoft.Json.JsonProperty("backupPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BackupPath { get; set; } - - /// The next time the backup will run - [Newtonsoft.Json.JsonProperty("backupStartDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? BackupStartDateTime { get; set; } - - /// SQL Timeout when running the backup - [Newtonsoft.Json.JsonProperty("configurationSqlBackupTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ConfigurationSqlBackupTimeoutMinutes { get; set; } - - /// Backup type - [Newtonsoft.Json.JsonProperty("copyOnlyDatabaseBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CopyOnlyDatabaseBackup { get; set; } - - /// Whether or not the backup the database - [Newtonsoft.Json.JsonProperty("enableDatabaseBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDatabaseBackup { get; set; } - - /// Is the backup enabled - [Newtonsoft.Json.JsonProperty("enableScheduledBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableScheduledBackup { get; set; } - - /// Whether or not the TMS web files are backed up - [Newtonsoft.Json.JsonProperty("enableTmsBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableTmsBackup { get; set; } - - /// Whether or not the web application is set to backup - [Newtonsoft.Json.JsonProperty("enableWebApplicationBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableWebApplicationBackup { get; set; } - - /// How many backups should be kept (deletes oldest) - [Newtonsoft.Json.JsonProperty("numberOfBackupsToKeep", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NumberOfBackupsToKeep { get; set; } - - /// How many days between backups - [Newtonsoft.Json.JsonProperty("repeatDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RepeatDays { get; set; } - - /// How many hours between backups - [Newtonsoft.Json.JsonProperty("repeatHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RepeatHours { get; set; } - - /// How many minutes between backups - [Newtonsoft.Json.JsonProperty("repeatMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RepeatMinutes { get; set; } - - /// Where TMS is installed - [Newtonsoft.Json.JsonProperty("tmsInstallationPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TmsInstallationPath { get; set; } - - - } - - /// BackupConfigurationArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class BackupConfigurationArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public BackupConfigurationUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class BackupConfigurationUpdateModel - { - /// BackupDatabasePath - [Newtonsoft.Json.JsonProperty("backupDatabasePath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString BackupDatabasePath { get; set; } - - /// BackupFailureNotification - [Newtonsoft.Json.JsonProperty("backupFailureNotification", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean BackupFailureNotification { get; set; } - - /// BackupPath - [Newtonsoft.Json.JsonProperty("backupPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString BackupPath { get; set; } - - /// BackupStartDateTime - [Newtonsoft.Json.JsonProperty("backupStartDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfDateTime BackupStartDateTime { get; set; } - - /// ConfigurationSqlBackupTimeoutMinutes - [Newtonsoft.Json.JsonProperty("configurationSqlBackupTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ConfigurationSqlBackupTimeoutMinutes { get; set; } - - /// CopyOnlyDatabaseBackup - [Newtonsoft.Json.JsonProperty("copyOnlyDatabaseBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean CopyOnlyDatabaseBackup { get; set; } - - /// EnableDatabaseBackup - [Newtonsoft.Json.JsonProperty("enableDatabaseBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDatabaseBackup { get; set; } - - /// EnableScheduledBackup - [Newtonsoft.Json.JsonProperty("enableScheduledBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableScheduledBackup { get; set; } - - /// EnableTmsBackup - [Newtonsoft.Json.JsonProperty("enableTmsBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableTmsBackup { get; set; } - - /// EnableWebApplicationBackup - [Newtonsoft.Json.JsonProperty("enableWebApplicationBackup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableWebApplicationBackup { get; set; } - - /// NumberOfBackupsToKeep - [Newtonsoft.Json.JsonProperty("numberOfBackupsToKeep", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 NumberOfBackupsToKeep { get; set; } - - /// RepeatDays - [Newtonsoft.Json.JsonProperty("repeatDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 RepeatDays { get; set; } - - /// RepeatHours - [Newtonsoft.Json.JsonProperty("repeatHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 RepeatHours { get; set; } - - /// RepeatMinutes - [Newtonsoft.Json.JsonProperty("repeatMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 RepeatMinutes { get; set; } - - /// TmsInstallationPath - [Newtonsoft.Json.JsonProperty("tmsInstallationPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TmsInstallationPath { get; set; } - - - } - - /// BackupStartDateTime - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfDateTime - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Value { get; set; } - - - } - - /// IPagingOfBackupLogViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfBackupLogViewModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Database Backup Log - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class BackupLogViewModel - { - /// BackupTime - [Newtonsoft.Json.JsonProperty("backupTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? BackupTime { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// System Log Configuration View Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SystemLogConfigurationViewModel - { - /// When enabled, the log will be able to be viewed online - [Newtonsoft.Json.JsonProperty("allowViewingOnline", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean AllowViewingOnline { get; set; } - - /// When enabled, the system log is enabled - [Newtonsoft.Json.JsonProperty("enableSystemLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean EnableSystemLog { get; set; } - - /// Maximum number of messages to keep in log. When null, it is unlimited - [Newtonsoft.Json.JsonProperty("maxLogLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 MaxLogLength { get; set; } - - /// When enabled, admins will get a notified when the log file is shrunk - [Newtonsoft.Json.JsonProperty("notifyWhenShrunk", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean NotifyWhenShrunk { get; set; } - - - } - - /// When enabled, the log will be able to be viewed online - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfBoolean - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Value { get; set; } - - - } - - /// Maximum number of messages to keep in log. When null, it is unlimited - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfOptionalInt32 - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Value { get; set; } - - - } - - /// SystemLogConfigurationUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SystemLogConfigurationUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SystemLogConfigurationUpdateModel Data { get; set; } - - - } - - /// System Log Configuration Update Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SystemLogConfigurationUpdateModel - { - /// When enabled, the log will be able to be viewed online - [Newtonsoft.Json.JsonProperty("allowViewingOnline", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowViewingOnline { get; set; } - - /// When enabled, the system log is enabled - [Newtonsoft.Json.JsonProperty("enableSystemLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableSystemLog { get; set; } - - /// Maximum number of messages to keep in log. When null, it is unlimited - [Newtonsoft.Json.JsonProperty("maxLogLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 MaxLogLength { get; set; } - - /// When enabled, admins will get a notified when the log file is shrunk - [Newtonsoft.Json.JsonProperty("notifyWhenShrunk", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean NotifyWhenShrunk { get; set; } - - - } - - /// User public ssh keys expiration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PublicSshKeyConfigurationViewModel - { - /// User Public SSH Key Authentication is enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Expiration Message - [Newtonsoft.Json.JsonProperty("expirationMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ExpirationMessage { get; set; } - - - } - - /// Ticket System Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationTicketSystemViewModel - { - /// List of Ticket Systems - [Newtonsoft.Json.JsonProperty("ticketSystemList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection TicketSystemList { get; set; } - - - } - - /// List of Ticket Systems - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TicketSystemViewModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean Active { get; set; } - - /// AddCommentsToTicket - [Newtonsoft.Json.JsonProperty("addCommentsToTicket", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean AddCommentsToTicket { get; set; } - - /// BmcChangeManagementCommentWorkType - [Newtonsoft.Json.JsonProperty("bmcChangeManagementCommentWorkType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBmcChangeManagementCommentWorkType BmcChangeManagementCommentWorkType { get; set; } - - /// BmcIncidentManagementCommentWorkType - [Newtonsoft.Json.JsonProperty("bmcIncidentManagementCommentWorkType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBmcIncidentManagementCommentWorkType BmcIncidentManagementCommentWorkType { get; set; } - - /// BmcRemedyAuthentication - [Newtonsoft.Json.JsonProperty("bmcRemedyAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString BmcRemedyAuthentication { get; set; } - - /// BmcRemedyUrlEndpoint - [Newtonsoft.Json.JsonProperty("bmcRemedyUrlEndpoint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString BmcRemedyUrlEndpoint { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString Description { get; set; } - - /// DisplayMessage - [Newtonsoft.Json.JsonProperty("displayMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString DisplayMessage { get; set; } - - /// ForceRequireTicketNumber - [Newtonsoft.Json.JsonProperty("forceRequireTicketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfForceRequireTicketSystemOptions ForceRequireTicketNumber { get; set; } - - /// IsDefault - [Newtonsoft.Json.JsonProperty("isDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean IsDefault { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString Name { get; set; } - - /// OrganizationId - [Newtonsoft.Json.JsonProperty("organizationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 OrganizationId { get; set; } - - /// PowerShellAddCommentScriptArguments - [Newtonsoft.Json.JsonProperty("powerShellAddCommentScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString PowerShellAddCommentScriptArguments { get; set; } - - /// PowerShellAddCommentScriptId - [Newtonsoft.Json.JsonProperty("powerShellAddCommentScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 PowerShellAddCommentScriptId { get; set; } - - /// PowerShellAddTicketCommentScriptArguments - [Newtonsoft.Json.JsonProperty("powerShellAddTicketCommentScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString PowerShellAddTicketCommentScriptArguments { get; set; } - - /// PowerShellAddTicketCommentScriptId - [Newtonsoft.Json.JsonProperty("powerShellAddTicketCommentScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 PowerShellAddTicketCommentScriptId { get; set; } - - /// PowerShellRunAsAccountSecretId - [Newtonsoft.Json.JsonProperty("powerShellRunAsAccountSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 PowerShellRunAsAccountSecretId { get; set; } - - /// PowerShellTicketStatusScriptArguments - [Newtonsoft.Json.JsonProperty("powerShellTicketStatusScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString PowerShellTicketStatusScriptArguments { get; set; } - - /// PowerShellTicketStatusScriptId - [Newtonsoft.Json.JsonProperty("powerShellTicketStatusScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 PowerShellTicketStatusScriptId { get; set; } - - /// ServiceNowAllowedStatuses - [Newtonsoft.Json.JsonProperty("serviceNowAllowedStatuses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString ServiceNowAllowedStatuses { get; set; } - - /// ServiceNowDomainName - [Newtonsoft.Json.JsonProperty("serviceNowDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString ServiceNowDomainName { get; set; } - - /// SiteId - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 SiteId { get; set; } - - /// SystemCredentialSecretId - [Newtonsoft.Json.JsonProperty("systemCredentialSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 SystemCredentialSecretId { get; set; } - - /// TicketNumberErrorMessage - [Newtonsoft.Json.JsonProperty("ticketNumberErrorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString TicketNumberErrorMessage { get; set; } - - /// TicketNumberValidation - [Newtonsoft.Json.JsonProperty("ticketNumberValidation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString TicketNumberValidation { get; set; } - - /// TicketSystemId - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 TicketSystemId { get; set; } - - /// TicketSystemType - [Newtonsoft.Json.JsonProperty("ticketSystemType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfTicketSystemTypes TicketSystemType { get; set; } - - /// ViewTicketURL - [Newtonsoft.Json.JsonProperty("viewTicketURL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString ViewTicketURL { get; set; } - - - } - - /// BmcChangeManagementCommentWorkType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfOptionalBmcChangeManagementCommentWorkType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// BmcIncidentManagementCommentWorkType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfOptionalBmcIncidentManagementCommentWorkType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// ForceRequireTicketNumber - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfForceRequireTicketSystemOptions - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ForceRequireTicketSystemOptions? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ForceRequireTicketSystemOptions - { - [System.Runtime.Serialization.EnumMember(Value = @"ReasonOnlyRequired")] - ReasonOnlyRequired = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"BothRequired")] - BothRequired = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"TicketNumberOrReasonRequired")] - TicketNumberOrReasonRequired = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"TicketNumberOnlyRequired")] - TicketNumberOnlyRequired = 3, - - } - - /// OrganizationId - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfInt32 - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Value { get; set; } - - - } - - /// TicketSystemType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfTicketSystemTypes - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public TicketSystemTypes? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum TicketSystemTypes - { - [System.Runtime.Serialization.EnumMember(Value = @"TicketNumberValidation")] - TicketNumberValidation = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"BmcRemedyIncidentManagement")] - BmcRemedyIncidentManagement = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"BmcRemedyChangeManagement")] - BmcRemedyChangeManagement = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"PowerShell")] - PowerShell = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"ServiceNowChangeManagement")] - ServiceNowChangeManagement = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"ServiceNowIncidentManagement")] - ServiceNowIncidentManagement = 5, - - } - - /// ConfigurationTicketSystemArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationTicketSystemArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TicketSystemPatchModel - { - /// Ticket System Active status - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Send comment to your integrated Ticket System and add it to the incident or change request. - [Newtonsoft.Json.JsonProperty("addCommentsToTicket", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AddCommentsToTicket { get; set; } - - /// BMC Remedy Change Management integration only. Select work type for comments added. - [Newtonsoft.Json.JsonProperty("bmcChangeManagementCommentWorkType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBmcChangeManagementCommentWorkType BmcChangeManagementCommentWorkType { get; set; } - - /// BMC Remedy Incident Management integration only. Select work type for comments added. - [Newtonsoft.Json.JsonProperty("bmcIncidentManagementCommentWorkType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBmcIncidentManagementCommentWorkType BmcIncidentManagementCommentWorkType { get; set; } - - /// BMC Remedy integration only. Authentication value that usually represents a login server. - [Newtonsoft.Json.JsonProperty("bmcRemedyAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString BmcRemedyAuthentication { get; set; } - - /// BMC Remedy integration only. The SOAP URL endpoint for the BMC Remedy Incident or Change Management. Should be the CHG_ChangeInterface_WS or HPD_IncidentInterface_WS endpoint. - [Newtonsoft.Json.JsonProperty("bmcRemedyUrlEndpoint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString BmcRemedyUrlEndpoint { get; set; } - - /// Ticket System Dexcription - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Description { get; set; } - - /// Ticket System Ticket Title - [Newtonsoft.Json.JsonProperty("displayMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DisplayMessage { get; set; } - - /// Ticket System Comment and/or Number Requirement - [Newtonsoft.Json.JsonProperty("forceRequireTicketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfForceRequireTicketSystemOptions ForceRequireTicketNumber { get; set; } - - /// Indicates the Ticket System is the default choice. - [Newtonsoft.Json.JsonProperty("isDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean IsDefault { get; set; } - - /// Ticket System Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// PowerShell integration only. Optional arguments for the comment script. Arguemnts are separated by a space. - [Newtonsoft.Json.JsonProperty("powerShellAddCommentScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PowerShellAddCommentScriptArguments { get; set; } - - /// PowerShell integration only. Custom PowerSHell script to add a comment to a ticket system. - [Newtonsoft.Json.JsonProperty("powerShellAddCommentScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 PowerShellAddCommentScriptId { get; set; } - - /// PowerShell integration only. Optional arguments for the ticket comment script. Arguemnts are separated by a space. - [Newtonsoft.Json.JsonProperty("powerShellAddTicketCommentScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PowerShellAddTicketCommentScriptArguments { get; set; } - - /// PowerShell integration only. Custom PowerSHell script to add a comment to a ticket in a ticket system. - [Newtonsoft.Json.JsonProperty("powerShellAddTicketCommentScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 PowerShellAddTicketCommentScriptId { get; set; } - - /// PowerShell integration only. Secret Id for credentials to use to run the Powershell. - [Newtonsoft.Json.JsonProperty("powerShellRunAsAccountSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 PowerShellRunAsAccountSecretId { get; set; } - - /// PowerShell integration only. Optional arguments for the ticket status script. Arguemnts are separated by a space. - [Newtonsoft.Json.JsonProperty("powerShellTicketStatusScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PowerShellTicketStatusScriptArguments { get; set; } - - /// Powreshell Integration only. Custom PowerShell script to get the ticket status. - [Newtonsoft.Json.JsonProperty("powerShellTicketStatusScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 PowerShellTicketStatusScriptId { get; set; } - - /// ServiceNow integration only. Statuses to accept from ServiceNow, separated by commas. - [Newtonsoft.Json.JsonProperty("serviceNowAllowedStatuses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServiceNowAllowedStatuses { get; set; } - - /// ServiceNow integration only. The domain name that hosts the RESTful web services for Ticket System integration. - [Newtonsoft.Json.JsonProperty("serviceNowDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServiceNowDomainName { get; set; } - - /// Ticket System Site - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SiteId { get; set; } - - /// Privilged Secret Id for credentials to connect to integrated Ticket Systems. - [Newtonsoft.Json.JsonProperty("systemCredentialSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SystemCredentialSecretId { get; set; } - - /// Ticket Number Validation Error Message - [Newtonsoft.Json.JsonProperty("ticketNumberErrorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TicketNumberErrorMessage { get; set; } - - /// Ticket Number Validation Regex - [Newtonsoft.Json.JsonProperty("ticketNumberValidation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TicketNumberValidation { get; set; } - - /// TicketSystemId - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - /// Ticket System Type - [Newtonsoft.Json.JsonProperty("ticketSystemType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfTicketSystemTypes TicketSystemType { get; set; } - - /// Ticket System URL pattern - [Newtonsoft.Json.JsonProperty("viewTicketUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ViewTicketUrl { get; set; } - - - } - - /// BMC Remedy Change Management integration only. Select work type for comments added. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalBmcChangeManagementCommentWorkType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// BMC Remedy Incident Management integration only. Select work type for comments added. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalBmcIncidentManagementCommentWorkType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Ticket System Comment and/or Number Requirement - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfForceRequireTicketSystemOptions - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ForceRequireTicketSystemOptions? Value { get; set; } - - - } - - /// Ticket System Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfTicketSystemTypes - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public TicketSystemTypes? Value { get; set; } - - - } - - /// ConfigurationSamlIdentityProviderCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSamlIdentityProviderCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSamlIdentityProviderCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSamlIdentityProviderCreateModel - { - /// Active status of the Identity Provider. Users can only log-in via an active Identity Provider. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// When specified, instructs the IDP on how to authenticate the user(optional). - [Newtonsoft.Json.JsonProperty("authnContext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AuthnContext { get; set; } - - /// The allowed number of minutes of difference between Secret Server's clock and the IDP's clock. The default is 3 minutes. - [Newtonsoft.Json.JsonProperty("clockSkew", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ClockSkew { get; set; } - - /// Description of the Identity Provider. - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// When true, SAML messages that were already received from this IDP will be allowed by Secret Server. Otherwise, resending messages from the IDP will trigger an error. - [Newtonsoft.Json.JsonProperty("disableAssertionReplayCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableAssertionReplayCheck { get; set; } - - /// A SAML assertion may include an audience restriction URI. This identifies the intended recipient of the SAML assertion. If included it should match the service provider's name. When this setting is true, this check is skipped. - [Newtonsoft.Json.JsonProperty("disableAudienceRestrictionCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableAudienceRestrictionCheck { get; set; } - - /// Disables the authentication context check, which validates that the real authentication method matches the ExpectedAuthnContext method. - [Newtonsoft.Json.JsonProperty("disableAuthnContextCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableAuthnContextCheck { get; set; } - - /// When true, the destination URI in the SAML response will not be validated. - [Newtonsoft.Json.JsonProperty("disableDestinationCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableDestinationCheck { get; set; } - - /// When true, logout requests coming from this IDP are ignored. - [Newtonsoft.Json.JsonProperty("disableInboundLogout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableInboundLogout { get; set; } - - /// When true, the InResponseTo attribute in SAML messages is not checked. - [Newtonsoft.Json.JsonProperty("disableInResponseToCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableInResponseToCheck { get; set; } - - /// When true, a SAML logout response will be considered legitimate even if there was no corresponding logout request. - [Newtonsoft.Json.JsonProperty("disablePendingLogoutCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisablePendingLogoutCheck { get; set; } - - /// When true, the built-in check against the AssertionConsumerService URL will be skipped. - [Newtonsoft.Json.JsonProperty("disableRecipientCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableRecipientCheck { get; set; } - - /// When true, a SAML response is valid regardless of when it was sent. - [Newtonsoft.Json.JsonProperty("disableTimePeriodCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableTimePeriodCheck { get; set; } - - /// The Display Name for the Identity Provider. - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Optional AttributeName to use for matching a Secret Server user's domain. - [Newtonsoft.Json.JsonProperty("domainAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainAttribute { get; set; } - - /// When true, a more detailed log will be generated for SAML logins and logouts. - [Newtonsoft.Json.JsonProperty("enableDetailedLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDetailedLog { get; set; } - - /// When true, logging out of Secret Server will log the user out of this Identity Provider. - [Newtonsoft.Json.JsonProperty("enableSLO", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSLO { get; set; } - - /// When true, the Identity Provider will be instructed to re-authenticate the user, even if they are already authenticated. - [Newtonsoft.Json.JsonProperty("forceAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ForceAuthentication { get; set; } - - /// The logout request life time. - [Newtonsoft.Json.JsonProperty("logoutRequestLifeTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LogoutRequestLifeTime { get; set; } - - /// Name of the Identity Provider. - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// When true, an in-progress SP-initiated login may be interrupted by an IDP-initiated login. - [Newtonsoft.Json.JsonProperty("overridePendingAuthnRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OverridePendingAuthnRequest { get; set; } - - /// The public certificate for the Identity Provider. Base64 encoded - [Newtonsoft.Json.JsonProperty("publicCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PublicCertificate { get; set; } - - /// When true, the authentication requests sent to this IDP will be signed. - [Newtonsoft.Json.JsonProperty("signAuthnRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SignAuthnRequest { get; set; } - - /// When true, logout requests sent to this IDP will be signed.< - [Newtonsoft.Json.JsonProperty("signLogoutRequest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SignLogoutRequest { get; set; } - - /// When true, logout responses sent to this IDP will be signed. - [Newtonsoft.Json.JsonProperty("signLogoutResponse", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SignLogoutResponse { get; set; } - - /// The URL where Secret Server will send responses to single logout messages. - [Newtonsoft.Json.JsonProperty("singleLogoutServiceResponseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SingleLogoutServiceResponseUrl { get; set; } - - /// The URL to send the single logout message to. - [Newtonsoft.Json.JsonProperty("singleLogoutServiceUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SingleLogoutServiceUrl { get; set; } - - /// Method for communicating with the Identity Provider. HTTPRedirect is recommended in most cases. - [Newtonsoft.Json.JsonProperty("ssoServiceBinding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SsoServiceBinding { get; set; } - - /// The URL of the Identity Provider where the user will be sent to authenticate. - [Newtonsoft.Json.JsonProperty("ssoServiceUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SsoServiceUrl { get; set; } - - /// Optional AttributeName to use for matching a Secret Server user. - [Newtonsoft.Json.JsonProperty("usernameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UsernameAttribute { get; set; } - - /// When true, Secret Server will expect SAML assertions from this IDP to be encrypted. Unencrypted assertions or assertions that cannot be decrypted will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionEncrypted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantAssertionEncrypted { get; set; } - - /// When true, Secret Server will expect either SAML assertions or SAML responses from this IDP to be signed. Unsigned assertions/responses and assertions/responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionOrResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantAssertionOrResponseSigned { get; set; } - - /// When true, Secret Server will expect SAML assertions from this IDP to be signed. Unsigned assertions or assertions whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantAssertionSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantAssertionSigned { get; set; } - - /// When true, Secret Server will expect logout requests from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantLogoutRequestSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantLogoutRequestSigned { get; set; } - - /// When true, Secret Server will expect logout responses from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantLogoutResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantLogoutResponseSigned { get; set; } - - /// When true, Secret Server will expect SAML responses from this IDP to be signed. Unsigned responses or responses whose signatures cannot be verified will cause an error. - [Newtonsoft.Json.JsonProperty("wantSAMLResponseSigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WantSAMLResponseSigned { get; set; } - - - } - - /// ConfigurationSamlIdentityProviderPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSamlIdentityProviderPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSamlIdentityProviderPatchModel Data { get; set; } - - - } - - /// ConfigurationSessionRecordingPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSessionRecordingPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSessionRecordingPatchModel Data { get; set; } - - - } - - /// Update session recording configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSessionRecordingPatchModel - { - /// If archive location changes based on site - [Newtonsoft.Json.JsonProperty("archiveLocationBySite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ArchiveLocationBySite { get; set; } - - /// The archive location of the recordings stored on disk - [Newtonsoft.Json.JsonProperty("archivePath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ArchivePath { get; set; } - - /// The number of days until a recording is archived - [Newtonsoft.Json.JsonProperty("daysUntilArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DaysUntilArchive { get; set; } - - /// The number of days before a session recording is deleted - [Newtonsoft.Json.JsonProperty("daysUntilDelete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DaysUntilDelete { get; set; } - - /// If recordings should be archived - [Newtonsoft.Json.JsonProperty("enableArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableArchive { get; set; } - - /// If session recordings will be automatically deleted - [Newtonsoft.Json.JsonProperty("enableDelete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDelete { get; set; } - - /// If hardware acceleration should be enabled - [Newtonsoft.Json.JsonProperty("enableHardwareAcceleration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableHardwareAcceleration { get; set; } - - /// If sessions should end if inactive - [Newtonsoft.Json.JsonProperty("enableInactivityTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableInactivityTimeout { get; set; } - - /// If on demand video processing should be available - [Newtonsoft.Json.JsonProperty("enableOnDemandVideoProcessing", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableOnDemandVideoProcessing { get; set; } - - /// Whether or not Session Recording is enabled - [Newtonsoft.Json.JsonProperty("enableSessionRecording", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableSessionRecording { get; set; } - - /// If archived session recordings should be encrypted - [Newtonsoft.Json.JsonProperty("encryptArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EncryptArchive { get; set; } - - /// If the recording indicator should be shown - [Newtonsoft.Json.JsonProperty("hideRecordingIndicator", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean HideRecordingIndicator { get; set; } - - /// The length of inactivity before the session is ended - [Newtonsoft.Json.JsonProperty("inactivityTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 InactivityTimeoutMinutes { get; set; } - - /// The longest a session is allowed to be in hours - [Newtonsoft.Json.JsonProperty("maxSessionLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MaxSessionLength { get; set; } - - /// If proxied RDP sessions should have keystrokes recorded - [Newtonsoft.Json.JsonProperty("rdpProxyRecordKeyStrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RdpProxyRecordKeyStrokes { get; set; } - - /// If proxied RDP sessions should have video recorded - [Newtonsoft.Json.JsonProperty("rdpProxyRecordVideo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RdpProxyRecordVideo { get; set; } - - /// If proxied SSH sessions should have keystrokes recorded - [Newtonsoft.Json.JsonProperty("sshProxyRecordKeyStrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SshProxyRecordKeyStrokes { get; set; } - - /// If proxied SSH sessions should have video recorded - [Newtonsoft.Json.JsonProperty("sshProxyRecordVideo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SshProxyRecordVideo { get; set; } - - /// If session recordings should be stored in the database - [Newtonsoft.Json.JsonProperty("storeInDatabase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean StoreInDatabase { get; set; } - - /// If the archive location should store temporary session recording data instead of the database - [Newtonsoft.Json.JsonProperty("useTemporaryArchives", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean UseTemporaryArchives { get; set; } - - /// Which video codec to use for session recordings on OSX - [Newtonsoft.Json.JsonProperty("videoCodecId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 VideoCodecId { get; set; } - - - } - - /// Session Recording Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSessionRecordingModel - { - /// If archive location changes based on site - [Newtonsoft.Json.JsonProperty("archiveLocationBySite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ArchiveLocationBySite { get; set; } - - /// The location of the recordings stored on disk - [Newtonsoft.Json.JsonProperty("archivePath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ArchivePath { get; set; } - - /// The number of days until a recording is archived - [Newtonsoft.Json.JsonProperty("daysUntilArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DaysUntilArchive { get; set; } - - /// The number of days before a session recording is deleted - [Newtonsoft.Json.JsonProperty("daysUntilDelete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DaysUntilDelete { get; set; } - - /// If recordings should be archived - [Newtonsoft.Json.JsonProperty("enableArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableArchive { get; set; } - - /// If session recordings will be automatically deleted - [Newtonsoft.Json.JsonProperty("enableDelete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDelete { get; set; } - - /// If hardware acceleration should be enabled - [Newtonsoft.Json.JsonProperty("enableHardwareAcceleration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableHardwareAcceleration { get; set; } - - /// If sessions should end if inactive - [Newtonsoft.Json.JsonProperty("enableInactivityTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInactivityTimeout { get; set; } - - /// If on demand video processing should be available - [Newtonsoft.Json.JsonProperty("enableOnDemandVideoProcessing", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableOnDemandVideoProcessing { get; set; } - - /// Whether or not Session Recording is enabled - [Newtonsoft.Json.JsonProperty("enableSessionRecording", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSessionRecording { get; set; } - - /// If archived session recordings should be encrypted - [Newtonsoft.Json.JsonProperty("encryptArchive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EncryptArchive { get; set; } - - /// If the recording indicator should be shown - [Newtonsoft.Json.JsonProperty("hideRecordingIndicator", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideRecordingIndicator { get; set; } - - /// The length of inactivity before the session is ended - [Newtonsoft.Json.JsonProperty("inactivityTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InactivityTimeoutMinutes { get; set; } - - /// The longest a session is allowed to be in hours - [Newtonsoft.Json.JsonProperty("maxSessionLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaxSessionLength { get; set; } - - /// If proxied RDP sessions should have keystrokes recorded - [Newtonsoft.Json.JsonProperty("rdpProxyRecordKeyStrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RdpProxyRecordKeyStrokes { get; set; } - - /// If proxied RDP sessions should have video recorded - [Newtonsoft.Json.JsonProperty("rdpProxyRecordVideo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RdpProxyRecordVideo { get; set; } - - /// If proxied SSH sessions should have keystrokes recorded - [Newtonsoft.Json.JsonProperty("sshProxyRecordKeyStrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SshProxyRecordKeyStrokes { get; set; } - - /// If proxied SSH sessions should have video recorded - [Newtonsoft.Json.JsonProperty("sshProxyRecordVideo", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SshProxyRecordVideo { get; set; } - - /// If session recordings should be stored in the database - [Newtonsoft.Json.JsonProperty("storeInDatabase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? StoreInDatabase { get; set; } - - /// If the archive location should store temporary session recording data instead of the database - [Newtonsoft.Json.JsonProperty("useTemporaryArchives", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseTemporaryArchives { get; set; } - - /// Which video codec to use for session recordings on OSX - [Newtonsoft.Json.JsonProperty("videoCodecId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? VideoCodecId { get; set; } - - - } - - /// ConfigurationFoldersPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationFoldersPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationFoldersPatchModel Data { get; set; } - - - } - - /// Update folder configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationFoldersPatchModel - { - /// Each user will have a personal folder created and assigned to them - [Newtonsoft.Json.JsonProperty("enablePersonalFolders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnablePersonalFolders { get; set; } - - /// The name of the root personal folder. Each user's personal folder will be named based on the user - [Newtonsoft.Json.JsonProperty("personalFolderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PersonalFolderName { get; set; } - - /// The format for the personal folder name for each user - [Newtonsoft.Json.JsonProperty("personalFolderNameOption", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfPersonalFolderNameOptionType PersonalFolderNameOption { get; set; } - - /// Warning to be shown when creating Secrets if ShowPersonalFolderWarning is true - [Newtonsoft.Json.JsonProperty("personalFolderWarning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PersonalFolderWarning { get; set; } - - /// Users will only see folders they have View permissions on - [Newtonsoft.Json.JsonProperty("requireViewFolderPermission", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RequireViewFolderPermission { get; set; } - - /// When true the PersonalFolderWarning will be shown when creating Secrets - [Newtonsoft.Json.JsonProperty("showPersonalFolderWarning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ShowPersonalFolderWarning { get; set; } - - - } - - /// UnlimitedAdminUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UnlimitedAdminUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UnlimitedAdminUpdateModel Data { get; set; } - - - } - - /// Unlimited Admin Update Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UnlimitedAdminUpdateModel - { - /// State of Unlimited Admin Mode - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enabled { get; set; } - - /// Notes for the change. Only updated if state has changed - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Notes { get; set; } - - - } - - /// ConfigurationApplicationSettingsPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationApplicationSettingsPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationApplicationSettingsPatchModel Data { get; set; } - - - } - - /// Update application settings configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationApplicationSettingsPatchModel - { - /// Send Anonymized System Metrics Information - [Newtonsoft.Json.JsonProperty("allowSendTelemetry", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowSendTelemetry { get; set; } - - /// Allow software update checks. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("allowSoftwareUpdateChecks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowSoftwareUpdateChecks { get; set; } - - /// API Refresh Tokens Enabled - [Newtonsoft.Json.JsonProperty("apiRefreshTokensEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ApiRefreshTokensEnabled { get; set; } - - /// API session timeout days - [Newtonsoft.Json.JsonProperty("apiSessionTimeoutDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ApiSessionTimeoutDays { get; set; } - - /// API session timeout hours - [Newtonsoft.Json.JsonProperty("apiSessionTimeoutHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ApiSessionTimeoutHours { get; set; } - - /// API session timeout minutes - [Newtonsoft.Json.JsonProperty("apiSessionTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ApiSessionTimeoutMinutes { get; set; } - - /// API session timeout unlimited - [Newtonsoft.Json.JsonProperty("apiSessionTimeoutUnlimited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ApiSessionTimeoutUnlimited { get; set; } - - /// Notify when preview releases are available. False by default - [Newtonsoft.Json.JsonProperty("configurationEarlyAdopterEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ConfigurationEarlyAdopterEnabled { get; set; } - - /// Outward accessible url to get to application. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("customUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString CustomUrl { get; set; } - - /// Only show downtime messages to admins. This setting is only used in cloud environments. - [Newtonsoft.Json.JsonProperty("displayDowntimeMessageToAdminsOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DisplayDowntimeMessageToAdminsOnly { get; set; } - - /// Enable Cred SSP for win RM - [Newtonsoft.Json.JsonProperty("enableCredSsp", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableCredSsp { get; set; } - - /// Enable Syslog/CEF Logging - [Newtonsoft.Json.JsonProperty("enableSyslogCefLogging", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableSyslogCefLogging { get; set; } - - /// Enable Web services - [Newtonsoft.Json.JsonProperty("enableWebServices", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableWebServices { get; set; } - - /// ExternalInstanceId - [Newtonsoft.Json.JsonProperty("externalInstanceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ExternalInstanceId { get; set; } - - /// Maximum Token Refreshes Allowed - [Newtonsoft.Json.JsonProperty("maximumTokenRefreshesAllowed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MaximumTokenRefreshesAllowed { get; set; } - - /// Maximum number of entries in secret log - [Newtonsoft.Json.JsonProperty("maxSecretLogLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MaxSecretLogLength { get; set; } - - /// The Maximum Time for Offline Access on Mobile Devices setting in Secret Server determines how long to cache secret data on the mobile device - [Newtonsoft.Json.JsonProperty("mobileMaxOfflineDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MobileMaxOfflineDays { get; set; } - - /// The Maximum Time for Offline Access on Mobile Devices setting in Secret Server determines how long to cache secret data on the mobile device - [Newtonsoft.Json.JsonProperty("mobileMaxOfflineHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MobileMaxOfflineHours { get; set; } - - /// A keep alive thread will run in the background pinging the web URL to make sure IIS does not stop running due to inactivity. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("preventApplicationFromSleeping", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean PreventApplicationFromSleeping { get; set; } - - /// Prevent non-Application Account users from directly authenticating against the API. - [Newtonsoft.Json.JsonProperty("preventDirectApiAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean PreventDirectApiAuthentication { get; set; } - - /// This is the site that the CEF/Syslogs will run on - [Newtonsoft.Json.JsonProperty("syslogCefLogSite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SyslogCefLogSite { get; set; } - - /// Syslog/CEF Protocol - [Newtonsoft.Json.JsonProperty("syslogCefPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SyslogCefPort { get; set; } - - /// Syslog/CEF Protocol to use when sending logs - [Newtonsoft.Json.JsonProperty("syslogCefProtocol", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfSyslogCefProtocolType SyslogCefProtocol { get; set; } - - /// Syslog/CEF Server Address - [Newtonsoft.Json.JsonProperty("syslogCefServer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SyslogCefServer { get; set; } - - /// Time Zone to use when sending Syslog/CEF Protocol log entries - [Newtonsoft.Json.JsonProperty("syslogCefTimeZone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfSyslogCefTimeZoneType SyslogCefTimeZone { get; set; } - - /// If TMS is installed, the file location. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("tmsInstallationPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TmsInstallationPath { get; set; } - - /// Win RM endpoUpdateFieldValue<int> url - [Newtonsoft.Json.JsonProperty("winRmEndpointUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString WinRmEndpointUrl { get; set; } - - /// Enable syslog events to the windows event log. This setting is ignored in cloud environments. - [Newtonsoft.Json.JsonProperty("writeSyslogToEventLog", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WriteSyslogToEventLog { get; set; } - - - } - - /// Syslog/CEF Protocol to use when sending logs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfSyslogCefProtocolType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SyslogCefProtocolType? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SyslogCefProtocolType - { - [System.Runtime.Serialization.EnumMember(Value = @"UDP")] - UDP = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"TCP")] - TCP = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"SECURE_TCP")] - SECURE_TCP = 2, - - } - - /// Time Zone to use when sending Syslog/CEF Protocol log entries - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfSyslogCefTimeZoneType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SyslogCefTimeZoneType? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SyslogCefTimeZoneType - { - [System.Runtime.Serialization.EnumMember(Value = @"ServerTime")] - ServerTime = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"UtcTime")] - UtcTime = 1, - - } - - /// ConfigurationPermissionOptionsPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationPermissionOptionsPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationPermissionOptionsPatchModel Data { get; set; } - - - } - - /// Update permission options configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationPermissionOptionsPatchModel - { - /// Whether or not Secrets can have the same name in the same folder - [Newtonsoft.Json.JsonProperty("allowDuplicateSecretNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowDuplicateSecretNames { get; set; } - - /// All users with view only share on a Secret to see the next password - [Newtonsoft.Json.JsonProperty("allowViewUserToRetrieveAutoChangeNextPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean AllowViewUserToRetrieveAutoChangeNextPassword { get; set; } - - /// When a new Secret is created these permissions will be assigned - [Newtonsoft.Json.JsonProperty("defaultSecretPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfDefaultSecretPermissionsType DefaultSecretPermissions { get; set; } - - /// Allow users to approve by clicking on a link in email - [Newtonsoft.Json.JsonProperty("enableApprovalFromEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean EnableApprovalFromEmail { get; set; } - - /// Force approval type on Secrets that have approval - [Newtonsoft.Json.JsonProperty("forceSecretApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalForceSecretApprovalType ForceSecretApproval { get; set; } - - - } - - /// ConfigurationLauncherSettingsPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLauncherSettingsPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLauncherSettingsPatchModel Data { get; set; } - - - } - - /// Update launcher settings configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationLauncherSettingsPatchModel - { - /// Forces Check In of Secret when user closes their only active launcher. - [Newtonsoft.Json.JsonProperty("checkInSecretOnLastLauncherClose", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean CheckInSecretOnLastLauncherClose { get; set; } - - /// When Secret is Checked In, all active launchers associated with it will close. - [Newtonsoft.Json.JsonProperty("closeLauncherOnCheckInSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean CloseLauncherOnCheckInSecret { get; set; } - - /// Allow the user to download existing and tested mappings from Thycotic.com. - [Newtonsoft.Json.JsonProperty("enableDomainDownload", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDomainDownload { get; set; } - - /// Allow the user to upload mappings - [Newtonsoft.Json.JsonProperty("enableDomainUpload", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDomainUpload { get; set; } - - /// Enable Launcher - [Newtonsoft.Json.JsonProperty("enableLauncher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableLauncher { get; set; } - - /// Enable Launcher Auto Update - [Newtonsoft.Json.JsonProperty("enableLauncherAutoUpdate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableLauncherAutoUpdate { get; set; } - - /// Allow Secret Server to retrieve and parse the mapped website when using the web launcher. - [Newtonsoft.Json.JsonProperty("enableWebParsing", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableWebParsing { get; set; } - - /// Launcher Deployment Type - [Newtonsoft.Json.JsonProperty("launcherDeploymentType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfLauncherDeploymentType LauncherDeploymentType { get; set; } - - /// Send the URL that is on the Secret to the web password launcher in addition to the bookmarklet - [Newtonsoft.Json.JsonProperty("sendSecretUrlToLauncher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SendSecretUrlToLauncher { get; set; } - - - } - - /// Launcher Deployment Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfLauncherDeploymentType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public LauncherDeploymentType? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum LauncherDeploymentType - { - [System.Runtime.Serialization.EnumMember(Value = @"ClickOnce")] - ClickOnce = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"ProtocolHandler")] - ProtocolHandler = 1, - - } - - /// ConfigurationProtocolHandlerSettingsPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationProtocolHandlerSettingsPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationProtocolHandlerSettingsPatchModel Data { get; set; } - - - } - - /// Update protocol handler settings configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationProtocolHandlerSettingsPatchModel - { - /// Allowed Domains/IP Addresses (comma-separated) - [Newtonsoft.Json.JsonProperty("protocolHandlerInstallTimeAllowedDomains", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ProtocolHandlerInstallTimeAllowedDomains { get; set; } - - /// Disable Auto Update - [Newtonsoft.Json.JsonProperty("protocolHandlerInstallTimeDisableAutoUpdate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ProtocolHandlerInstallTimeDisableAutoUpdate { get; set; } - - /// Enable Protocol Handler Install Time Settings - [Newtonsoft.Json.JsonProperty("protocolHandlerInstallTimeSettingsEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ProtocolHandlerInstallTimeSettingsEnabled { get; set; } - - - } - - /// ConfigurationUserExperiencePatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationUserExperiencePatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserExperiencePatchModel Data { get; set; } - - - } - - /// Update user experience configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationUserExperiencePatchModel - { - /// The default language for all users - [Newtonsoft.Json.JsonProperty("applicationLanguage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ApplicationLanguage { get; set; } - - /// The default date format that everyone sees unless they override with a user preference - [Newtonsoft.Json.JsonProperty("defaultDateFormat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DefaultDateFormat { get; set; } - - /// The role that should be assigned when a new user is created - [Newtonsoft.Json.JsonProperty("defaultNewUserRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 DefaultNewUserRoleId { get; set; } - - /// The default time format that everyone sees unless they override with a user preference - [Newtonsoft.Json.JsonProperty("defaultTimeFormat", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DefaultTimeFormat { get; set; } - - /// Logout users that are inactive - [Newtonsoft.Json.JsonProperty("forceInactivityTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ForceInactivityTimeout { get; set; } - - /// Logout users that are inactive for this many minutes - [Newtonsoft.Json.JsonProperty("forceInactivityTimeoutMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ForceInactivityTimeoutMinutes { get; set; } - - /// Secrets must be created within a folder - [Newtonsoft.Json.JsonProperty("requireFolderForSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RequireFolderForSecret { get; set; } - - /// This controls the delay, in milliseconds, until the search is executed by the global search in the header - [Newtonsoft.Json.JsonProperty("searchDelayMs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SearchDelayMs { get; set; } - - /// No duplicate passwords on a Secret - [Newtonsoft.Json.JsonProperty("secretPasswordHistoryRestrictionAll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SecretPasswordHistoryRestrictionAll { get; set; } - - /// The number of recently used passwords on a Secret that cannot be used - [Newtonsoft.Json.JsonProperty("secretPasswordHistoryRestrictionCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SecretPasswordHistoryRestrictionCount { get; set; } - - /// The number of minutes entering a comment is valid - [Newtonsoft.Json.JsonProperty("secretViewIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SecretViewIntervalMinutes { get; set; } - - /// The timezone that the server shows by default and when job scheduling runs - [Newtonsoft.Json.JsonProperty("serverTimeZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServerTimeZoneId { get; set; } - - /// How long until the UI will go inactive and stop polling for updates - [Newtonsoft.Json.JsonProperty("uiInactivitySleepMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 UiInactivitySleepMinutes { get; set; } - - - } - - /// ConfigurationUserInterfacePatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationUserInterfacePatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserInterfacePatchModel Data { get; set; } - - - } - - /// Update user interface configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationUserInterfacePatchModel - { - /// Allow users to pick their theme when in classic mode - [Newtonsoft.Json.JsonProperty("allowUserToSelectTheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean AllowUserToSelectTheme { get; set; } - - /// Custom logo when left nav is collapsed - [Newtonsoft.Json.JsonProperty("customLogoCollapsed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString CustomLogoCollapsed { get; set; } - - /// Custom logo full size - [Newtonsoft.Json.JsonProperty("customLogoFullSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString CustomLogoFullSize { get; set; } - - /// Default classic theme - [Newtonsoft.Json.JsonProperty("defaultClassicTheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DefaultClassicTheme { get; set; } - - /// New users will use the new ui by default - [Newtonsoft.Json.JsonProperty("newUiDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean NewUiDefault { get; set; } - - - } - - /// ConfigurationEmailPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationEmailPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationEmailPatchModel Data { get; set; } - - - } - - /// Update email server configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationEmailPatchModel - { - /// All emails will be sent from this address - [Newtonsoft.Json.JsonProperty("fromEmailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString FromEmailAddress { get; set; } - - /// Send Legacy Emails - [Newtonsoft.Json.JsonProperty("sendLegacyEmails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean SendLegacyEmails { get; set; } - - /// Check Certificate Revocation when in Implicit SSL Connection Mode - [Newtonsoft.Json.JsonProperty("smtpCheckCertificateRevocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean SmtpCheckCertificateRevocation { get; set; } - - /// SMTP user domain - [Newtonsoft.Json.JsonProperty("smtpDomain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SmtpDomain { get; set; } - - /// SMTP user password - [Newtonsoft.Json.JsonProperty("smtpPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SmtpPassword { get; set; } - - /// Custom port, otherwise the default - [Newtonsoft.Json.JsonProperty("smtpPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SmtpPort { get; set; } - - /// The resolvable and reachable host name for the outgoing SMTP server - [Newtonsoft.Json.JsonProperty("smtpServer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SmtpServer { get; set; } - - /// true if credentials are set, false if anonymous - [Newtonsoft.Json.JsonProperty("smtpUseCredentials", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SmtpUseCredentials { get; set; } - - /// Implicit SSL Connection Mode - [Newtonsoft.Json.JsonProperty("smtpUseImplicitSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean SmtpUseImplicitSSL { get; set; } - - /// SMTP user name - [Newtonsoft.Json.JsonProperty("smtpUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SmtpUserName { get; set; } - - /// Use SSL to connect - [Newtonsoft.Json.JsonProperty("smtpUseSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SmtpUseSSL { get; set; } - - - } - - /// Connection Manager Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConnectionManagerSettingsModel - { - /// Allow Local Connections - [Newtonsoft.Json.JsonProperty("allowLocalConnections", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowLocalConnections { get; set; } - - /// Allow Saving Credentials - [Newtonsoft.Json.JsonProperty("allowSavingCredentials", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowSavingCredentials { get; set; } - - /// Download Url - [Newtonsoft.Json.JsonProperty("downloadUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DownloadUrl { get; set; } - - /// Has Valid License - [Newtonsoft.Json.JsonProperty("hasValidLicense", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasValidLicense { get; set; } - - /// Is Trial License - [Newtonsoft.Json.JsonProperty("isTrialLicense", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsTrialLicense { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfDevOpsSecretsVaultSyncStatusSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultSyncStatusSummary - { - /// If the mapping is active. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// When the Secret will be pushed next. - [Newtonsoft.Json.JsonProperty("dateAdded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateAdded { get; set; } - - /// Where to push the Secret to in the Tenant. - [Newtonsoft.Json.JsonProperty("devOpsSecretVaultPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DevOpsSecretVaultPath { get; set; } - - /// ID of the mapping between the Tenant and Secret. - [Newtonsoft.Json.JsonProperty("devOpsSyncMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DevOpsSyncMapId { get; set; } - - /// When the Secret was last pushed. - [Newtonsoft.Json.JsonProperty("lastSyncTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastSyncTime { get; set; } - - /// Name of the Secret. - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// Status of syncing progress. - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Status { get; set; } - - - } - - /// DevOps Secrets Vault Synchronization Status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultSyncStatusModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Date Added - [Newtonsoft.Json.JsonProperty("dateAdded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateAdded { get; set; } - - /// DevOps Secrets Vault Path - [Newtonsoft.Json.JsonProperty("devOpsSecretVaultPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DevOpsSecretVaultPath { get; set; } - - /// DevOps Synchronization Map Id - [Newtonsoft.Json.JsonProperty("devOpsSyncMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DevOpsSyncMapId { get; set; } - - /// Last Sync Time - [Newtonsoft.Json.JsonProperty("lastSyncTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastSyncTime { get; set; } - - /// Next Sync Time - [Newtonsoft.Json.JsonProperty("nextSyncTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? NextSyncTime { get; set; } - - /// Secret Id - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Secret Name - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Status { get; set; } - - /// Tenant Id - [Newtonsoft.Json.JsonProperty("tenantId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TenantId { get; set; } - - - } - - /// DevOpsSecretsVaultCreateSyncArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultCreateSyncArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DevOpsSecretVaultSyncUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretVaultSyncUpdateModel - { - /// If this mapping of Secret to Tenant is active. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Tenant to push the secret to. - [Newtonsoft.Json.JsonProperty("dsvTenantId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DsvTenantId { get; set; } - - /// The path in DSV to push the secret to. - [Newtonsoft.Json.JsonProperty("fieldNamesPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfStringOf FieldNamesPath { get; set; } - - /// Secret to Sync. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SecretId { get; set; } - - - } - - /// DevOpsSecretsVaultSyncSecretsArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultSyncSecretsArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Data { get; set; } - - - } - - /// DevOpsSecretsVaultSyncStatusViewModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultSyncStatusViewModel - { - /// If the mapping is active. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean Active { get; set; } - - /// When the Secret was originally mapped to the Tenant. - [Newtonsoft.Json.JsonProperty("dateAdded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfDateTime DateAdded { get; set; } - - /// Where to push the Secret to in the Tenant. - [Newtonsoft.Json.JsonProperty("devOpsSecretVaultPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString DevOpsSecretVaultPath { get; set; } - - /// ID of the mapping between the Tenant and Secret. - [Newtonsoft.Json.JsonProperty("devOpsSyncMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfInt32 DevOpsSyncMapId { get; set; } - - /// When the Secret was last pushed. - [Newtonsoft.Json.JsonProperty("lastSyncTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfOptionalDateTime LastSyncTime { get; set; } - - /// When the Secret will be pushed next. - [Newtonsoft.Json.JsonProperty("nextSyncTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfOptionalDateTime NextSyncTime { get; set; } - - /// Secret ID. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 SecretId { get; set; } - - /// Name of the Secret. - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString SecretName { get; set; } - - /// Status of syncing progress. - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString Status { get; set; } - - /// Tenant ID. - [Newtonsoft.Json.JsonProperty("tenantId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 TenantId { get; set; } - - - } - - /// When the Secret was originally mapped to the Tenant. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfDateTime - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Value { get; set; } - - - } - - /// ID of the mapping between the Tenant and Secret. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfInt32 - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Value { get; set; } - - - } - - /// When the Secret was last pushed. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfOptionalDateTime - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Value { get; set; } - - - } - - /// Name of the Secret. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfString - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfDevOpsSecretsVaultTenantSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultTenantSummary - { - /// If this Tenant should be pushed to. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// When the Tenant was added to Secret Server. - [Newtonsoft.Json.JsonProperty("dateAdded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateAdded { get; set; } - - /// Tenant ID. - [Newtonsoft.Json.JsonProperty("dsvTenantId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DsvTenantId { get; set; } - - /// The last time the Sync Interval expired. - [Newtonsoft.Json.JsonProperty("lastSynced", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastSynced { get; set; } - - /// The Secret in which to connect to DSV. - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// How often to check if secrets need to be pushed to the Tenant. - [Newtonsoft.Json.JsonProperty("syncInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SyncInterval { get; set; } - - /// Tenant Name. - [Newtonsoft.Json.JsonProperty("tenantName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TenantName { get; set; } - - - } - - /// DevOpsSecretsVaultCreateTenantArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultCreateTenantArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DevOpsSecretsVaultTenantUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultTenantUpdateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// SecretId - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SecretId { get; set; } - - /// SyncInterval - [Newtonsoft.Json.JsonProperty("syncInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SyncInterval { get; set; } - - /// TenantName - [Newtonsoft.Json.JsonProperty("tenantName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TenantName { get; set; } - - - } - - /// DevOps Secrets Vault Tenant - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultTenantModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Date Added - [Newtonsoft.Json.JsonProperty("dateAdded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateAdded { get; set; } - - /// DSV Tenant Id - [Newtonsoft.Json.JsonProperty("dsvTenantId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DsvTenantId { get; set; } - - /// Last Synchronized - [Newtonsoft.Json.JsonProperty("lastSynced", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastSynced { get; set; } - - /// Secret Id - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Secret Name - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// Synchronization Interval - [Newtonsoft.Json.JsonProperty("syncInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SyncInterval { get; set; } - - /// Tenant Name - [Newtonsoft.Json.JsonProperty("tenantName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TenantName { get; set; } - - - } - - /// DevOpsSecretsVaultUpdateTenantArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultUpdateTenantArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DevOpsSecretsVaultTenantUpdateModel Data { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfDevOpsSecretsVaultTenantAuditSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DevOpsSecretsVaultTenantAuditSummary - { - /// What the user did. - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// When the action occurred. - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Date { get; set; } - - /// A description of the action. - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Tenant being audited. - [Newtonsoft.Json.JsonProperty("tenantName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TenantName { get; set; } - - /// User that performed the action. - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - - } - - /// Diagnostics summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiagnosticsSummary - { - /// Active Directory Synchronization Status - [Newtonsoft.Json.JsonProperty("activeDirectorySynchronizationThreadStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ActiveDirectorySynchronizationThreadStatus { get; set; } - - /// Backbone Class Name - [Newtonsoft.Json.JsonProperty("backboneClass", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BackboneClass { get; set; } - - /// Backbone Type - [Newtonsoft.Json.JsonProperty("backboneType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BackboneType { get; set; } - - /// HSM Cache Map Size - [Newtonsoft.Json.JsonProperty("hsmCacheMapSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HsmCacheMapSize { get; set; } - - /// HSM Timing - [Newtonsoft.Json.JsonProperty("hsmTiming", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HsmTiming { get; set; } - - /// Is Domain Controller - [Newtonsoft.Json.JsonProperty("isDomainController", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IsDomainController { get; set; } - - /// Last Upgrade - [Newtonsoft.Json.JsonProperty("lastUpgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LastUpgrade { get; set; } - - /// LDAP Provider - [Newtonsoft.Json.JsonProperty("ldapProvider", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LdapProvider { get; set; } - - /// Max Degrees Of Parallelism - [Newtonsoft.Json.JsonProperty("maxDegreeOfParallelism", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MaxDegreeOfParallelism { get; set; } - - /// Net FX Version - [Newtonsoft.Json.JsonProperty("netFxVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NetFxVersion { get; set; } - - /// Operating System - [Newtonsoft.Json.JsonProperty("operatingSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OperatingSystem { get; set; } - - /// Operating System Architecture - [Newtonsoft.Json.JsonProperty("operatingSystemArchitecture", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OperatingSystemArchitecture { get; set; } - - /// Physical Memory - [Newtonsoft.Json.JsonProperty("physicalMemory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PhysicalMemory { get; set; } - - /// Product Version - [Newtonsoft.Json.JsonProperty("productVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ProductVersion { get; set; } - - /// Proxy Configuration - [Newtonsoft.Json.JsonProperty("proxyConfiguration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ProxyConfiguration { get; set; } - - /// Read Only Mode - [Newtonsoft.Json.JsonProperty("readOnlyMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyMode { get; set; } - - /// Search Indexer Status - [Newtonsoft.Json.JsonProperty("searchIndexerThreadStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SearchIndexerThreadStatus { get; set; } - - /// Secret Server URL - [Newtonsoft.Json.JsonProperty("secretServerUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretServerUrl { get; set; } - - /// Server Name - [Newtonsoft.Json.JsonProperty("serverName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerName { get; set; } - - /// Server Time - [Newtonsoft.Json.JsonProperty("serverTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerTime { get; set; } - - /// Server TimeZone - [Newtonsoft.Json.JsonProperty("serverTimeZone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerTimeZone { get; set; } - - /// SQL Database Name - [Newtonsoft.Json.JsonProperty("sqlDatabaseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlDatabaseName { get; set; } - - /// SQL Is Database Replicated - [Newtonsoft.Json.JsonProperty("sqlIsDatabaseReplicated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlIsDatabaseReplicated { get; set; } - - /// SQL Server Collation - [Newtonsoft.Json.JsonProperty("sqlServerCollation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerCollation { get; set; } - - /// SQL Server Connection String - [Newtonsoft.Json.JsonProperty("sqlServerConnectionString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerConnectionString { get; set; } - - /// SQL Server Edition - [Newtonsoft.Json.JsonProperty("sqlServerEdition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerEdition { get; set; } - - /// SQL Server Is Published - [Newtonsoft.Json.JsonProperty("sqlServerIsPublished", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerIsPublished { get; set; } - - /// SQL Server Is Replication Running - [Newtonsoft.Json.JsonProperty("sqlServerIsReplicationRunning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerIsReplicationRunning { get; set; } - - /// SQL Server Is Subscribed - [Newtonsoft.Json.JsonProperty("sqlServerIsSubscribed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerIsSubscribed { get; set; } - - /// SQL Server Name - [Newtonsoft.Json.JsonProperty("sqlServerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerName { get; set; } - - /// SQL Server Time - [Newtonsoft.Json.JsonProperty("sqlServerTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerTime { get; set; } - - /// SQL Server Version - [Newtonsoft.Json.JsonProperty("sqlServerVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SqlServerVersion { get; set; } - - /// Upgrade Available - [Newtonsoft.Json.JsonProperty("upgradeAvailable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UpgradeAvailable { get; set; } - - /// Upgrade In Progress - [Newtonsoft.Json.JsonProperty("upgradeInProgress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UpgradeInProgress { get; set; } - - /// Up Time - [Newtonsoft.Json.JsonProperty("upTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UpTime { get; set; } - - - } - - /// ThreadInformation[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ThreadInformation - { - /// ApplicationName - [Newtonsoft.Json.JsonProperty("applicationName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ApplicationName { get; set; } - - /// HostName - [Newtonsoft.Json.JsonProperty("hostName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HostName { get; set; } - - /// IdentityName - [Newtonsoft.Json.JsonProperty("identityName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IdentityName { get; set; } - - /// LastActivity - [Newtonsoft.Json.JsonProperty("lastActivity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastActivity { get; set; } - - /// ManagedThreadId - [Newtonsoft.Json.JsonProperty("managedThreadId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ManagedThreadId { get; set; } - - /// ThreadName - [Newtonsoft.Json.JsonProperty("threadName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ThreadName { get; set; } - - - } - - /// DictionaryOfStringAndString - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DictionaryOfStringAndString - { - - } - - /// QuartzTrigger[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class QuartzTrigger - { - /// JobName - [Newtonsoft.Json.JsonProperty("jobName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string JobName { get; set; } - - /// NextFireTicks - [Newtonsoft.Json.JsonProperty("nextFireTicks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? NextFireTicks { get; set; } - - /// NextFireTime - [Newtonsoft.Json.JsonProperty("nextFireTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? NextFireTime { get; set; } - - /// PreviousFireTicks - [Newtonsoft.Json.JsonProperty("previousFireTicks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? PreviousFireTicks { get; set; } - - /// PreviousFireTime - [Newtonsoft.Json.JsonProperty("previousFireTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? PreviousFireTime { get; set; } - - /// TriggerState - [Newtonsoft.Json.JsonProperty("triggerState", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TriggerState { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfDirectoryServicesSynchronizationLogEntry - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryServicesSynchronizationLogEntry - { - - } - - /// Directory Synchronization Status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryServicesSynchronizationStatus - { - /// Results from the last syncrhonization for each domain. If a synchronization is currently running this will indicate the results for the last synchronization and not the current running totals. - [Newtonsoft.Json.JsonProperty("domainStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DomainStatus { get; set; } - - /// The date and time that the last synchronization ended. If a synchronization is currently running this will be empty. - [Newtonsoft.Json.JsonProperty("endDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndDateTime { get; set; } - - /// The number of errors since the last synchronization start time - [Newtonsoft.Json.JsonProperty("errorCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ErrorCount { get; set; } - - /// Based on last run time duration the percent complete assumes each run takes approximately the same amount of time - [Newtonsoft.Json.JsonProperty("estimatedPercentComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EstimatedPercentComplete { get; set; } - - /// The next time the synchronization is expected to run - [Newtonsoft.Json.JsonProperty("nextSynchronizationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? NextSynchronizationDateTime { get; set; } - - /// The date and time that the last synchronization started. This will be empty if a synchronization has never been run. - [Newtonsoft.Json.JsonProperty("startDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDateTime { get; set; } - - - } - - /// Results of the last synchronization for this domain - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainSynchronizationStatus - { - /// Number of users that were disabled - [Newtonsoft.Json.JsonProperty("disabledUsers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DisabledUsers { get; set; } - - /// Which domain is this status for - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Number of users that have been updated for any reason since last synchronization - [Newtonsoft.Json.JsonProperty("domainUsersUpdatedSinceLastSynchronization", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainUsersUpdatedSinceLastSynchronization { get; set; } - - /// Total new users that were created - [Newtonsoft.Json.JsonProperty("newUsersCreated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NewUsersCreated { get; set; } - - /// Total new users that were created and then set as disabled due to either license limits or other settings - [Newtonsoft.Json.JsonProperty("newUsersCreatedAsDisabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NewUsersCreatedAsDisabled { get; set; } - - /// Total users removed from groups - [Newtonsoft.Json.JsonProperty("usersRemovedFromGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UsersRemovedFromGroups { get; set; } - - /// Total number of users that were added or removed from any group in this domain - [Newtonsoft.Json.JsonProperty("usersWithGroupMembershipChanges", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UsersWithGroupMembershipChanges { get; set; } - - - } - - /// IPagingOfDomainSummaryModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfDomainSummaryModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Domain Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainSummaryModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Domain Id - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Domain Name - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// Domain Type - [Newtonsoft.Json.JsonProperty("domainType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DomainType? DomainType { get; set; } - - /// Friendly Name - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FriendlyName { get; set; } - - /// Require Radius Authentication - [Newtonsoft.Json.JsonProperty("requireRadiusAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireRadiusAuthentication { get; set; } - - /// Use Secure LDAP - [Newtonsoft.Json.JsonProperty("useSecureLdap", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSecureLdap { get; set; } - - - } - - /// Domain Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DomainType - { - [System.Runtime.Serialization.EnumMember(Value = @"ActiveDirectory")] - ActiveDirectory = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"OpenLdap")] - OpenLdap = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"AzureActiveDirectory")] - AzureActiveDirectory = 2, - - } - - /// DomainCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DomainCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainCreateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// AuthType for OpenLdap - [Newtonsoft.Json.JsonProperty("authType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AuthType { get; set; } - - /// Client ID - [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ClientId { get; set; } - - /// Client Secret - [Newtonsoft.Json.JsonProperty("clientSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ClientSecret { get; set; } - - /// Domain Base DN - [Newtonsoft.Json.JsonProperty("distinguishedName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DistinguishedName { get; set; } - - /// The name of the domain. - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// The type of the domain. - [Newtonsoft.Json.JsonProperty("domainType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DomainType? DomainType { get; set; } - - /// The friendly name of the domain. - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FriendlyName { get; set; } - - /// Domain multifactor authentication provider. - [Newtonsoft.Json.JsonProperty("multifactorAuthenticationProvider", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MultifactorAuthenticationProviderTypes? MultifactorAuthenticationProvider { get; set; } - - /// Site Id - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// Synchronization Secret - [Newtonsoft.Json.JsonProperty("synchronizationSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SynchronizationSecretId { get; set; } - - /// Tenant ID - [Newtonsoft.Json.JsonProperty("tenantId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TenantId { get; set; } - - /// UserAuthType for OpenLdap - [Newtonsoft.Json.JsonProperty("userAuthType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserAuthType { get; set; } - - /// Use Secure LDAP - [Newtonsoft.Json.JsonProperty("useSecureLDAP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSecureLDAP { get; set; } - - - } - - /// Domain multifactor authentication providers. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum MultifactorAuthenticationProviderTypes - { - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Radius")] - Radius = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"TOTPAuthenticator")] - TOTPAuthenticator = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Duo")] - Duo = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Fido2")] - Fido2 = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"Email")] - Email = 5, - - } - - /// Domain - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Domain Id - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Domain Name - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// Friendly Name - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FriendlyName { get; set; } - - /// Multifactor Authentication Provider - [Newtonsoft.Json.JsonProperty("multifactorAuthenticationProvider", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MultifactorAuthenticationProviderTypes? MultifactorAuthenticationProvider { get; set; } - - /// Site Id - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// Synchronization Secret - [Newtonsoft.Json.JsonProperty("synchronizationSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SynchronizationSecretId { get; set; } - - /// Use Secure LDAP - [Newtonsoft.Json.JsonProperty("useSecureLDAP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSecureLDAP { get; set; } - - - } - - /// LdapSyncSettingsViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LdapSyncSettingsViewModel - { - /// Valid Actions - [Newtonsoft.Json.JsonProperty("actions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public System.Collections.Generic.ICollection Actions { get; set; } - - /// Base Distinguished Name Code - [Newtonsoft.Json.JsonProperty("baseDnCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldDropDownValueOfString BaseDnCode { get; set; } - - /// Display name attribute - [Newtonsoft.Json.JsonProperty("displayNameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString DisplayNameAttribute { get; set; } - - /// Domain Id - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Email attribute - [Newtonsoft.Json.JsonProperty("emailAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString EmailAttribute { get; set; } - - /// Group member attribute - [Newtonsoft.Json.JsonProperty("groupMemberAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString GroupMemberAttribute { get; set; } - - /// Group name attribute - [Newtonsoft.Json.JsonProperty("groupNameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString GroupNameAttribute { get; set; } - - /// Group object classes - [Newtonsoft.Json.JsonProperty("groupObjectClasses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString GroupObjectClasses { get; set; } - - /// Ldap Filter for finding groups - [Newtonsoft.Json.JsonProperty("groupSearchFilter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString GroupSearchFilter { get; set; } - - /// Guid attribute - [Newtonsoft.Json.JsonProperty("guidAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString GuidAttribute { get; set; } - - /// Username attribute - [Newtonsoft.Json.JsonProperty("usernameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString UsernameAttribute { get; set; } - - /// User object classes - [Newtonsoft.Json.JsonProperty("userObjectClasses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString UserObjectClasses { get; set; } - - /// User Principal Name attribute - [Newtonsoft.Json.JsonProperty("userPrincipalNameAttribute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString UserPrincipalNameAttribute { get; set; } - - - } - - /// Valid Actions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DomainActionType - { - [System.Runtime.Serialization.EnumMember(Value = @"EditDomain")] - EditDomain = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"EditGroups")] - EditGroups = 1, - - } - - /// Base Distinguished Name Code - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldDropDownValueOfString - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// DropDownOptions - [Newtonsoft.Json.JsonProperty("dropDownOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DropDownOptions { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// DropDownOptions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldDropDownOption - { - /// FieldDisplay - [Newtonsoft.Json.JsonProperty("fieldDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldDisplay { get; set; } - - /// FieldValue - [Newtonsoft.Json.JsonProperty("fieldValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldValue { get; set; } - - - } - - /// Directory Groups - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryServicesGroupViewModel - { - /// Error Message returned when populating groups array if error occurs, otherwise null - [Newtonsoft.Json.JsonProperty("errorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ErrorMessage { get; set; } - - /// Groups that matched the search criteria - [Newtonsoft.Json.JsonProperty("groups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Groups { get; set; } - - - } - - /// Directory Group - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryServicesGroupModel - { - /// Unique Identifier of the Group - [Newtonsoft.Json.JsonProperty("dsGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DsGuid { get; set; } - - /// Name Guid of the Group - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Group Member Response - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryServicesGroupMemberResponse - { - /// Indicates if an error message occurred - [Newtonsoft.Json.JsonProperty("errorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ErrorMessage { get; set; } - - /// Members of the group - [Newtonsoft.Json.JsonProperty("members", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Members { get; set; } - - - } - - /// Directory Group User - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryGroupUserViewModel - { - /// Display Name of the user - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - - } - - /// Directory Services Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryServicesConfigurationModel - { - /// How long to keep operational logs - [Newtonsoft.Json.JsonProperty("daysToKeepOperationalLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DaysToKeepOperationalLogs { get; set; } - - /// How long to wait before disabling inactive users - [Newtonsoft.Json.JsonProperty("disableInactiveUsersMonths", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DisableInactiveUsersMonths { get; set; } - - /// Whether or not any Directory Services integrations are enabled or not - [Newtonsoft.Json.JsonProperty("enableDirectoryIntegration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDirectoryIntegration { get; set; } - - /// Synchronize users and group membership on a time interval - [Newtonsoft.Json.JsonProperty("enableDirectorySynchronization", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDirectorySynchronization { get; set; } - - /// Integrated Windows Authentication (IWA) allows users to log into Secret Server automatically if they are logged into a workstation with their Active Directory credentials. - [Newtonsoft.Json.JsonProperty("enableIntegratedWindowsAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableIntegratedWindowsAuthentication { get; set; } - - /// When enabled inactive users will be automatically disabled regardless of their Directory status - [Newtonsoft.Json.JsonProperty("enableUserDisabling", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableUserDisabling { get; set; } - - /// Synchronize days interval for users and group membership - [Newtonsoft.Json.JsonProperty("synchronizationIntervalDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SynchronizationIntervalDays { get; set; } - - /// Synchronize hours interval for users and group membership - [Newtonsoft.Json.JsonProperty("synchronizationIntervalHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SynchronizationIntervalHours { get; set; } - - /// Synchronize minutes interval for users and group membership - [Newtonsoft.Json.JsonProperty("synchronizationIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SynchronizationIntervalMinutes { get; set; } - - /// Indicates how to synchronize the enabled status for new and existing users - [Newtonsoft.Json.JsonProperty("userAccountOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DirectoryServicesSynchronizationUserOption? UserAccountOptions { get; set; } - - - } - - /// Indicates how to synchronize the enabled status for new and existing users - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DirectoryServicesSynchronizationUserOption - { - [System.Runtime.Serialization.EnumMember(Value = @"ImportEnabled")] - ImportEnabled = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"ImportDisabled")] - ImportDisabled = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"MirrorDirectory")] - MirrorDirectory = 2, - - } - - /// DirectoryServicesConfigurationUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryServicesConfigurationUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DirectoryServicesConfigurationUpdateModel Data { get; set; } - - - } - - /// The fields to update on the Directory Services configuration. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DirectoryServicesConfigurationUpdateModel - { - /// How long to keep operational logs - [Newtonsoft.Json.JsonProperty("daysToKeepOperationalLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DaysToKeepOperationalLogs { get; set; } - - /// How long to wait before disabling inactive users. Valid values are 1 to 12 months. - [Newtonsoft.Json.JsonProperty("disableInactiveUsersMonths", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DisableInactiveUsersMonths { get; set; } - - /// Whether or not any Directory Services integrations are enabled or not - [Newtonsoft.Json.JsonProperty("enableDirectoryIntegration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDirectoryIntegration { get; set; } - - /// Synchronize users and group membership on a time interval - [Newtonsoft.Json.JsonProperty("enableDirectorySynchronization", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDirectorySynchronization { get; set; } - - /// Integrated Windows Authentication (IWA) allows users to log into Secret Server automatically if they are logged into a workstation with their Active Directory credentials. - [Newtonsoft.Json.JsonProperty("enableIntegratedWindowsAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableIntegratedWindowsAuthentication { get; set; } - - /// When enabled inactive users will be automatically disabled regardless of their Directory status - [Newtonsoft.Json.JsonProperty("enableUserDisabling", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableUserDisabling { get; set; } - - /// Synchronize days interval for users and group membership - [Newtonsoft.Json.JsonProperty("synchronizationIntervalDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SynchronizationIntervalDays { get; set; } - - /// Synchronize hours interval for users and group membership - [Newtonsoft.Json.JsonProperty("synchronizationIntervalHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SynchronizationIntervalHours { get; set; } - - /// Synchronize minutes interval for users and group membership - [Newtonsoft.Json.JsonProperty("synchronizationIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SynchronizationIntervalMinutes { get; set; } - - /// Indicates how to synchronize the enabled status for new and existing users - [Newtonsoft.Json.JsonProperty("userAccountOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfDirectoryServicesSynchronizationUserOption UserAccountOptions { get; set; } - - - } - - /// Indicates how to synchronize the enabled status for new and existing users - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfDirectoryServicesSynchronizationUserOption - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DirectoryServicesSynchronizationUserOption? Value { get; set; } - - - } - - /// LinkDomainGroupArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LinkDomainGroupArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public LinkDomainGroupSettings Data { get; set; } - - - } - - /// Information about the directory group that is needed to create a link - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LinkDomainGroupSettings - { - /// The unique directory identifier for the group to be linked. For example, this is ADGuid in Active Directory - [Newtonsoft.Json.JsonProperty("domainIdentifier", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainIdentifier { get; set; } - - /// Name of the group in the directory - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfDiscoverySourceSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceSummaryModel - { - /// Is discovery source active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Discover specific OUs - [Newtonsoft.Json.JsonProperty("discoverSpecificOUs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DiscoverSpecificOUs { get; set; } - - /// Discovery scanner ID - [Newtonsoft.Json.JsonProperty("discoveryScannerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DiscoveryScannerId { get; set; } - - /// The discovery source ID - [Newtonsoft.Json.JsonProperty("discoverySourceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceId { get; set; } - - /// Additional settings for discovery source - [Newtonsoft.Json.JsonProperty("discoverySourceSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoverySourceSettingsSummaryModel DiscoverySourceSettings { get; set; } - - /// Last discovery run date - [Newtonsoft.Json.JsonProperty("lastDiscoveryRunDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastDiscoveryRunDate { get; set; } - - /// Use machine name and FQDM or only use machine name - [Newtonsoft.Json.JsonProperty("machineNameResolutionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MachineNameResolutionType? MachineNameResolutionType { get; set; } - - /// The discovery source naame - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Default Discovery Secret credentials - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The site ID - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - - } - - /// Additional settings for discovery source - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceSettingsSummaryModel - { - /// The domain distinguished name - [Newtonsoft.Json.JsonProperty("distinguishedName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DistinguishedName { get; set; } - - /// Domain type: ActiveDirectory, OpenLdap, or AzureActiveDirectory - [Newtonsoft.Json.JsonProperty("domainType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainType { get; set; } - - /// The domain friendly name - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FriendlyName { get; set; } - - /// The fully qualified domain name - [Newtonsoft.Json.JsonProperty("fullyQualifiedDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FullyQualifiedDomainName { get; set; } - - /// The NetBIOS name - [Newtonsoft.Json.JsonProperty("netBIOSName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NetBIOSName { get; set; } - - /// Use secure LDAP - [Newtonsoft.Json.JsonProperty("useSecureLDAP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSecureLDAP { get; set; } - - - } - - /// Use machine name and FQDM or only use machine name - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum MachineNameResolutionType - { - [System.Runtime.Serialization.EnumMember(Value = @"UseMachineNameAndFQDM")] - UseMachineNameAndFQDM = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"OnlyUseMachineName")] - OnlyUseMachineName = 1, - - } - - /// DiscoverySourceModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceModel - { - /// Is discovery source active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Discover specific OUs - [Newtonsoft.Json.JsonProperty("discoverSpecificOUs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DiscoverSpecificOUs { get; set; } - - /// Discovery scanner ID - [Newtonsoft.Json.JsonProperty("discoveryScannerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DiscoveryScannerId { get; set; } - - /// The discovery source ID - [Newtonsoft.Json.JsonProperty("discoverySourceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceId { get; set; } - - /// Additional settings for discovery source - [Newtonsoft.Json.JsonProperty("discoverySourceSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoverySourceSettingsModel DiscoverySourceSettings { get; set; } - - /// Last discovery run date - [Newtonsoft.Json.JsonProperty("lastDiscoveryRunDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastDiscoveryRunDate { get; set; } - - /// Use machine name and FQDM or only use machine name - [Newtonsoft.Json.JsonProperty("machineNameResolutionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MachineNameResolutionType? MachineNameResolutionType { get; set; } - - /// The discovery source naame - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Default Discovery Secret credentials - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The site ID - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - - } - - /// Additional settings for discovery source - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceSettingsModel - { - /// The domain distinguished name - [Newtonsoft.Json.JsonProperty("distinguishedName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DistinguishedName { get; set; } - - /// Domain type: ActiveDirectory, OpenLdap, or AzureActiveDirectory - [Newtonsoft.Json.JsonProperty("domainType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainType { get; set; } - - /// The domain friendly name - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FriendlyName { get; set; } - - /// The fully qualified domain name - [Newtonsoft.Json.JsonProperty("fullyQualifiedDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FullyQualifiedDomainName { get; set; } - - /// The NetBIOS name - [Newtonsoft.Json.JsonProperty("netBIOSName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NetBIOSName { get; set; } - - /// Use secure LDAP - [Newtonsoft.Json.JsonProperty("useSecureLDAP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSecureLDAP { get; set; } - - - } - - /// DiscoverySourceUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoverySourceUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceUpdateModel - { - /// Is discovery source active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Discover specific OUs - [Newtonsoft.Json.JsonProperty("discoverSpecificOUs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DiscoverSpecificOUs { get; set; } - - /// Additional discovery settings - [Newtonsoft.Json.JsonProperty("discoverySourceSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfDiscoverySourceSettingsUpdateModel DiscoverySourceSettings { get; set; } - - /// Use machine name and FQDM or only use machine name - [Newtonsoft.Json.JsonProperty("machineNameResolutionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfMachineNameResolutionType MachineNameResolutionType { get; set; } - - /// The discovery source name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// Default Discovery Secret credentials - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SecretId { get; set; } - - /// The discovery source site - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SiteId { get; set; } - - - } - - /// Additional discovery settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfDiscoverySourceSettingsUpdateModel - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoverySourceSettingsUpdateModel Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceSettingsUpdateModel - { - /// The domain friendly name - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString FriendlyName { get; set; } - - /// The fully qualified domain name - [Newtonsoft.Json.JsonProperty("fullyQualifiedDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString FullyQualifiedDomainName { get; set; } - - /// Use secure LDAP - [Newtonsoft.Json.JsonProperty("useSecureLDAP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean UseSecureLDAP { get; set; } - - - } - - /// Use machine name and FQDM or only use machine name - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfMachineNameResolutionType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MachineNameResolutionType? Value { get; set; } - - - } - - /// DiscoveryConfigurationModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryConfigurationModel - { - /// Synchronize days interval for Discovery - [Newtonsoft.Json.JsonProperty("discoveryIntervalDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryIntervalDays { get; set; } - - /// Synchronize hours interval for Discovery - [Newtonsoft.Json.JsonProperty("discoveryIntervalHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryIntervalHours { get; set; } - - /// Sets time offset in hours for discovery scan operations. Default value: 0 - [Newtonsoft.Json.JsonProperty("discoveryScanOffsetHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryScanOffsetHours { get; set; } - - /// Whether or not discovery is enabled - [Newtonsoft.Json.JsonProperty("enableDiscovery", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDiscovery { get; set; } - - /// The size of the batch for Active Directory Account engine scanning - set higher if engine takes too much time to process. Default value: 1 - [Newtonsoft.Json.JsonProperty("engineADDiscoveryBatchSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EngineADDiscoveryBatchSize { get; set; } - - /// If set to true, Discovery scans will bypass machines identified as 'msclustervirtualserver.' Default value: False - [Newtonsoft.Json.JsonProperty("ignoreClusterNodeObjects", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IgnoreClusterNodeObjects { get; set; } - - /// How long to keep logs - [Newtonsoft.Json.JsonProperty("maxLogAgeDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaxLogAgeDays { get; set; } - - - } - - /// DiscoveryConfigurationUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryConfigurationUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoveryConfigurationUpdateModel Data { get; set; } - - - } - - /// Update discovery configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryConfigurationUpdateModel - { - /// Threshold for number of times a dependency can be not found before being deactivated. (0 - Never) - [Newtonsoft.Json.JsonProperty("dependencyNotFoundThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DependencyNotFoundThreshold { get; set; } - - /// Synchronize days interval for users and group membership - [Newtonsoft.Json.JsonProperty("discoveryIntervalDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DiscoveryIntervalDays { get; set; } - - /// Synchronize hours interval for users and group membership - [Newtonsoft.Json.JsonProperty("discoveryIntervalHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DiscoveryIntervalHours { get; set; } - - /// Sets time offset in hours for discovery scan operations. Default value: 0 - [Newtonsoft.Json.JsonProperty("discoveryScanOffsetHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DiscoveryScanOffsetHours { get; set; } - - /// Whether or not discovery is enabled - [Newtonsoft.Json.JsonProperty("enableDiscovery", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDiscovery { get; set; } - - /// The size of the batch for Active Directory Account engine scanning - set higher if engine takes too much time to process. Default value: 1 - [Newtonsoft.Json.JsonProperty("engineADDiscoveryBatchSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EngineADDiscoveryBatchSize { get; set; } - - /// If set to true, Discovery scans will bypass machines identified as 'msclustervirtualserver.' Default value: False - [Newtonsoft.Json.JsonProperty("ignoreClusterNodeObjects", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean IgnoreClusterNodeObjects { get; set; } - - /// How long to keep logs - [Newtonsoft.Json.JsonProperty("maxLogAgeDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MaxLogAgeDays { get; set; } - - - } - - /// DiscoveryStatusModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryStatusModel - { - /// Actions the current user can perform for Discovery - [Newtonsoft.Json.JsonProperty("actions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public System.Collections.Generic.ICollection Actions { get; set; } - - /// The date and time the Scan Computer messages completed queueing last. - [Newtonsoft.Json.JsonProperty("discoveryComputerScanEndDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DiscoveryComputerScanEndDateTime { get; set; } - - /// The date and time Scan Computer messages last started. - [Newtonsoft.Json.JsonProperty("discoveryComputerScanStartDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DiscoveryComputerScanStartDateTime { get; set; } - - /// The date and time the Host Range and Machine fetching last completed. This will be empty if a synchronization has never been run. - [Newtonsoft.Json.JsonProperty("discoveryFetchEndDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DiscoveryFetchEndDateTime { get; set; } - - /// The date and time the Host Range and Machine fetching was last run or started. This will be empty if a synchronization has never been run. - [Newtonsoft.Json.JsonProperty("discoveryFetchStartDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DiscoveryFetchStartDateTime { get; set; } - - /// Total number of discovery sources either active or inactive - [Newtonsoft.Json.JsonProperty("discoverySourceCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceCount { get; set; } - - /// Indicates if computer scanning is actively queueing. - [Newtonsoft.Json.JsonProperty("isDiscoveryComputerScanRunning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDiscoveryComputerScanRunning { get; set; } - - /// Indicates if Discovery is currently enabled - [Newtonsoft.Json.JsonProperty("isDiscoveryEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDiscoveryEnabled { get; set; } - - /// Indicates if the Host Range and Machine fetching is currently running. - [Newtonsoft.Json.JsonProperty("isDiscoveryFetchRunning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDiscoveryFetchRunning { get; set; } - - /// The next time computer scanning is expected to run - [Newtonsoft.Json.JsonProperty("nextComputerScanDiscoveryDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? NextComputerScanDiscoveryDateTime { get; set; } - - /// The next time the Host Range and Machine fetching is expected to run - [Newtonsoft.Json.JsonProperty("nextFetchDiscoveryDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? NextFetchDiscoveryDateTime { get; set; } - - - } - - /// Actions the current user can perform for Discovery - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DiscoveryActionType - { - [System.Runtime.Serialization.EnumMember(Value = @"CreateDiscoverySource")] - CreateDiscoverySource = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"EditDiscoverySource")] - EditDiscoverySource = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"RunDiscovery")] - RunDiscovery = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"RunComputerScan")] - RunComputerScan = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"EditConfiguration")] - EditConfiguration = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewScanners")] - ViewScanners = 5, - - } - - /// DiscoveryScannerSettingTypeSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryScannerSettingTypeSummary - { - /// Description of the scanner - [Newtonsoft.Json.JsonProperty("discoveryItemScannerDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DiscoveryItemScannerDescription { get; set; } - - /// Item Scanner ID - [Newtonsoft.Json.JsonProperty("discoveryItemScannerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryItemScannerId { get; set; } - - /// Scanner name - [Newtonsoft.Json.JsonProperty("discoveryItemScannerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DiscoveryItemScannerName { get; set; } - - /// Scanner Type ID - [Newtonsoft.Json.JsonProperty("discoveryScanTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryScanTypeId { get; set; } - - /// True if this scanner is typically created - [Newtonsoft.Json.JsonProperty("isSuggested", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSuggested { get; set; } - - - } - - /// DiscoveryScannerSettingSummaryModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryScannerSettingSummaryModel - { - /// Discovery Scanner Id - [Newtonsoft.Json.JsonProperty("discoveryScannerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryScannerId { get; set; } - - /// The ID for the map - [Newtonsoft.Json.JsonProperty("discoverySourceScannerMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceScannerMapId { get; set; } - - - } - - /// DiscoveryScanTypeSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryScanTypeSummary - { - /// Discovery Scan Type Id - [Newtonsoft.Json.JsonProperty("discoveryScanTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryScanTypeId { get; set; } - - /// Scan Type Description - [Newtonsoft.Json.JsonProperty("scanTypeDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScanTypeDescription { get; set; } - - /// Scan Type Name - [Newtonsoft.Json.JsonProperty("scanTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScanTypeName { get; set; } - - - } - - /// IPagingOfDiscoverySourceAudit - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfDiscoverySourceAudit - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Records - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceAudit - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Date { get; set; } - - /// DiscoverySourceAuditId - [Newtonsoft.Json.JsonProperty("discoverySourceAuditId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceAuditId { get; set; } - - /// DiscoverySourceId - [Newtonsoft.Json.JsonProperty("discoverySourceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceId { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// FormattedDate - [Newtonsoft.Json.JsonProperty("formattedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FormattedDate { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// UserName - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// OUModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class OUModel - { - /// The display name of the OU - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// The distinguished name of the OU - [Newtonsoft.Json.JsonProperty("distinguishedName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DistinguishedName { get; set; } - - /// The GUID of the OU - [Newtonsoft.Json.JsonProperty("guid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Guid { get; set; } - - /// The Secret Server ID of the OU - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The parent GUID of the OU - [Newtonsoft.Json.JsonProperty("parentGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ParentGuid { get; set; } - - /// The type of the OU - [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Type { get; set; } - - - } - - /// A discovery filter to limit discovery to specific OU - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainDiscoveryScopeModel - { - /// The Secret Server ID of the discovery soure - [Newtonsoft.Json.JsonProperty("discoverySourceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceId { get; set; } - - /// A list of filter memebers - [Newtonsoft.Json.JsonProperty("filters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Filters { get; set; } - - /// Is the look up table ready for the discovery source - [Newtonsoft.Json.JsonProperty("lookupTableIsReady", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LookupTableIsReady { get; set; } - - - } - - /// A filter for a discovery source - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainDiscoveryScopeFilterModel - { - /// A filter ID - [Newtonsoft.Json.JsonProperty("discoveryFilterId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryFilterId { get; set; } - - /// The display name of the member - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Indicates if the filter is an include or exclude - [Newtonsoft.Json.JsonProperty("filterType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DiscoveryFilterType? FilterType { get; set; } - - /// The GUID of the member - [Newtonsoft.Json.JsonProperty("guid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Guid { get; set; } - - /// The scan target type for the member - [Newtonsoft.Json.JsonProperty("scanTargetType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ScanTargetType? ScanTargetType { get; set; } - - /// The secret ID associated with the member - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The secret name associated with the member - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// The site ID - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// The site name of the member - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - - } - - /// Indicates if the filter is an include or exclude - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DiscoveryFilterType - { - [System.Runtime.Serialization.EnumMember(Value = @"Include")] - Include = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Exclude")] - Exclude = 1, - - } - - /// The scan target type for the member - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ScanTargetType - { - [System.Runtime.Serialization.EnumMember(Value = @"Users")] - Users = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Computers")] - Computers = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"UsersAndComputers")] - UsersAndComputers = 2, - - } - - /// DiscoverySourceFilterPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceFilterPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DomainDiscoveryScopeFilterPatchModel Data { get; set; } - - - } - - /// A filter on a domain scope - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainDiscoveryScopeFilterPatchModel - { - /// The scan target type for the member - [Newtonsoft.Json.JsonProperty("scanTargetType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfScanTargetType ScanTargetType { get; set; } - - /// The secret ID associated with the member - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SecretId { get; set; } - - /// The site ID - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SiteId { get; set; } - - - } - - /// The scan target type for the member - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfScanTargetType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ScanTargetType? Value { get; set; } - - - } - - /// DiscoverySourceCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoverySourceCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceCreateModel - { - /// Is discovery source active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Discover specific OUs - [Newtonsoft.Json.JsonProperty("discoverSpecificOUs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DiscoverSpecificOUs { get; set; } - - /// Discovery scanner ID - [Newtonsoft.Json.JsonProperty("discoveryScannerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DiscoveryScannerId { get; set; } - - /// Additional settings for discovery source - [Newtonsoft.Json.JsonProperty("discoverySourceSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoverySourceSettingsCreateModel DiscoverySourceSettings { get; set; } - - /// Last discovery run date - [Newtonsoft.Json.JsonProperty("lastDiscoveryRunDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastDiscoveryRunDate { get; set; } - - /// Use machine name and FQDM or only use machine name - [Newtonsoft.Json.JsonProperty("machineNameResolutionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MachineNameResolutionType? MachineNameResolutionType { get; set; } - - /// The discovery source naame - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Discovery Secret credential - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The site ID - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - - } - - /// Additional settings for discovery source - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceSettingsCreateModel - { - /// Domain type: ActiveDirectory, OpenLdap, or AzureActiveDirectory - [Newtonsoft.Json.JsonProperty("domainType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DomainType? DomainType { get; set; } - - /// The domain friendly name - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FriendlyName { get; set; } - - /// The fully qualified domain name - [Newtonsoft.Json.JsonProperty("fullyQualifiedDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FullyQualifiedDomainName { get; set; } - - /// Use secure LDAP - [Newtonsoft.Json.JsonProperty("useSecureLDAP", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSecureLDAP { get; set; } - - - } - - /// DiscoveryRunArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryRunArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoveryRunModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryRunModel - { - /// CommandType - [Newtonsoft.Json.JsonProperty("commandType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DiscoveryCommandType? CommandType { get; set; } - - - } - - /// CommandType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DiscoveryCommandType - { - [System.Runtime.Serialization.EnumMember(Value = @"Discovery")] - Discovery = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"ComputerScan")] - ComputerScan = 1, - - } - - /// Discovery Scanner Settings Create Args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryScannerSettingCreateArgs - { - /// Discovery Scanner Settings Create Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoveryScannerSettingCreateData Data { get; set; } - - - } - - /// Create discovery scanner settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryScannerSettingCreateData - { - /// DiscoveryScanTypeId to create - [Newtonsoft.Json.JsonProperty("discoveryScanTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryScanTypeId { get; set; } - - - } - - /// Discovery Scanner Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoveryScannerSettingViewModel - { - /// Unique ID for scanner setting - [Newtonsoft.Json.JsonProperty("discoverySourceScannerMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceScannerMapId { get; set; } - - - } - - /// DiscoverySourceFiltersUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceFiltersUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DiscoverySourceFiltersUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DiscoverySourceFiltersUpdateModel - { - /// Filters - [Newtonsoft.Json.JsonProperty("filters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Filters { get; set; } - - - } - - /// Filters - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainDiscoveryScopeFilterUpdateModel - { - /// A filter ID - [Newtonsoft.Json.JsonProperty("discoveryFilterId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoveryFilterId { get; set; } - - /// FilterType - [Newtonsoft.Json.JsonProperty("filterType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DiscoveryFilterType? FilterType { get; set; } - - /// The AD GUID - [Newtonsoft.Json.JsonProperty("guid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Guid { get; set; } - - /// The scan target type for the member - [Newtonsoft.Json.JsonProperty("scanTargetType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ScanTargetType? ScanTargetType { get; set; } - - /// The secret ID associated with the member - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The site ID - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - - } - - /// Distributed Engine Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DistributedEngineConfigurationModel - { - /// Azure Service Bus Transport Type - [Newtonsoft.Json.JsonProperty("azureServiceBusTransportType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public AzureServiceBusTransportType? AzureServiceBusTransportType { get; set; } - - /// Port of the Distributed Engines - [Newtonsoft.Json.JsonProperty("callbackPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CallbackPort { get; set; } - - /// Url of the Distributed Engines - [Newtonsoft.Json.JsonProperty("callbackUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CallbackUrl { get; set; } - - /// Default Callback Interval Seconds - [Newtonsoft.Json.JsonProperty("defaultCallbackIntervalSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultCallbackIntervalSeconds { get; set; } - - /// Whether Distributed Engines are enabled or not - [Newtonsoft.Json.JsonProperty("enableDistributedEngines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDistributedEngines { get; set; } - - /// Protocol used by Distibuted Engines - [Newtonsoft.Json.JsonProperty("protocol", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DistributedEngineProtocol? Protocol { get; set; } - - /// Response Bus Site Connector - [Newtonsoft.Json.JsonProperty("responseBusSiteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ResponseBusSiteConnectorId { get; set; } - - /// Secret Heartbeat Message Time to Live in Minutes - [Newtonsoft.Json.JsonProperty("secretHeartbeatMessageMinutesToLive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretHeartbeatMessageMinutesToLive { get; set; } - - /// Secret Heartbeat Message Retry Time in Minutes - [Newtonsoft.Json.JsonProperty("secretHeartbeatMessageRetryMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretHeartbeatMessageRetryMinutes { get; set; } - - /// Secret Password Change Message Time to Live in Minutes - [Newtonsoft.Json.JsonProperty("secretPasswordChangeMessageMinutesToLive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPasswordChangeMessageMinutesToLive { get; set; } - - /// Secret Password Change Message Retry Time in Minutes - [Newtonsoft.Json.JsonProperty("secretPasswordChangeMessageRetryMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPasswordChangeMessageRetryMinutes { get; set; } - - - } - - /// Azure Service Bus Transport Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum AzureServiceBusTransportType - { - [System.Runtime.Serialization.EnumMember(Value = @"Amqp")] - Amqp = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"AmqpWebSockets")] - AmqpWebSockets = 1, - - } - - /// Protocol used by Distibuted Engines - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DistributedEngineProtocol - { - [System.Runtime.Serialization.EnumMember(Value = @"Http")] - Http = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Https")] - Https = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Tcp")] - Tcp = 2, - - } - - /// DistributedEngineConfigurationUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DistributedEngineConfigurationUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DistributedEngineConfigurationUpdateModel Data { get; set; } - - - } - - /// The fields to update on the Distributed Engine Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DistributedEngineConfigurationUpdateModel - { - /// Azure Service Bus Transport Type - [Newtonsoft.Json.JsonProperty("azureServiceBusTransportType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfAzureServiceBusTransportType AzureServiceBusTransportType { get; set; } - - /// Port of the Distributed Engines - [Newtonsoft.Json.JsonProperty("callbackPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 CallbackPort { get; set; } - - /// Url of the Distributed Engines - [Newtonsoft.Json.JsonProperty("callbackUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString CallbackUrl { get; set; } - - /// Default Callback Interval Seconds - [Newtonsoft.Json.JsonProperty("defaultCallbackIntervalSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DefaultCallbackIntervalSeconds { get; set; } - - /// Whether Distributed Engines are enabled or not - [Newtonsoft.Json.JsonProperty("enableDistributedEngines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDistributedEngines { get; set; } - - /// Protocol used by Distibuted Engine - [Newtonsoft.Json.JsonProperty("protocol", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfDistributedEngineProtocol Protocol { get; set; } - - /// Response Bus Site Connector - [Newtonsoft.Json.JsonProperty("responseBusSiteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 ResponseBusSiteConnectorId { get; set; } - - /// Secret Heartbeat Message Time to Live in Minutes - [Newtonsoft.Json.JsonProperty("secretHeartbeatMessageMinutesToLive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SecretHeartbeatMessageMinutesToLive { get; set; } - - /// Secret Heartbeat Message Retry Time in Minutes - [Newtonsoft.Json.JsonProperty("secretHeartbeatMessageRetryMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SecretHeartbeatMessageRetryMinutes { get; set; } - - /// Secret Password Change Message Time to Live in Minutes - [Newtonsoft.Json.JsonProperty("secretPasswordChangeMessageMinutesToLive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SecretPasswordChangeMessageMinutesToLive { get; set; } - - /// Secret Password Change Message Retry Time in Minutes - [Newtonsoft.Json.JsonProperty("secretPasswordChangeMessageRetryMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SecretPasswordChangeMessageRetryMinutes { get; set; } - - - } - - /// Azure Service Bus Transport Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfAzureServiceBusTransportType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public AzureServiceBusTransportType? Value { get; set; } - - - } - - /// Protocol used by Distibuted Engine - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfDistributedEngineProtocol - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DistributedEngineProtocol? Value { get; set; } - - - } - - /// IPagingOfSiteConnectorSummaryModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfSiteConnectorSummaryModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Site Connector Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorSummaryModel - { - /// Whether Site Connector is active or not - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Host Name of Site Connector - [Newtonsoft.Json.JsonProperty("hostName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HostName { get; set; } - - /// Queue Type of Site Connector - [Newtonsoft.Json.JsonProperty("queueType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string QueueType { get; set; } - - /// Id of Site Connector - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteConnectorId { get; set; } - - /// Name of Site Connector - [Newtonsoft.Json.JsonProperty("siteConnectorName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteConnectorName { get; set; } - - /// Whether Site Connector has been validated or not - [Newtonsoft.Json.JsonProperty("validated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Validated { get; set; } - - /// Version of Site Connector - [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Version { get; set; } - - - } - - /// Site Connector View Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorViewModel - { - /// Whether Site Connector is active or not - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean Active { get; set; } - - /// Host Name of Site Connector - [Newtonsoft.Json.JsonProperty("hostName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString HostName { get; set; } - - /// Port of Site Connector - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 Port { get; set; } - - /// Queue Type of Site Connector - [Newtonsoft.Json.JsonProperty("queueType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldDropDownValueOfMessageQueueType QueueType { get; set; } - - /// Shared Access Key Name of Site Connector - [Newtonsoft.Json.JsonProperty("sharedAccessKeyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SharedAccessKeyName { get; set; } - - /// Shared Access Key Value of Site Connector - [Newtonsoft.Json.JsonProperty("sharedAccessKeyValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SharedAccessKeyValue { get; set; } - - /// Id of Site Connector - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteConnectorId { get; set; } - - /// Name of Site Connector - [Newtonsoft.Json.JsonProperty("siteConnectorName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SiteConnectorName { get; set; } - - /// SSL Certificate Thumbprint of Site Connector - [Newtonsoft.Json.JsonProperty("sslCertificateThumbprint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SslCertificateThumbprint { get; set; } - - /// Whether Site Connector uses SSL or not - [Newtonsoft.Json.JsonProperty("useSsl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean UseSsl { get; set; } - - /// Whether Site Connector is validated or not - [Newtonsoft.Json.JsonProperty("validated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean Validated { get; set; } - - - } - - /// Queue Type of Site Connector - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldDropDownValueOfMessageQueueType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// DropDownOptions - [Newtonsoft.Json.JsonProperty("dropDownOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DropDownOptions { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MessageQueueType? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum MessageQueueType - { - [System.Runtime.Serialization.EnumMember(Value = @"MemoryMq")] - MemoryMq = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"RabbitMq")] - RabbitMq = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"AzureServiceBus")] - AzureServiceBus = 2, - - } - - /// SiteConnectorUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SiteConnectorUpdateModel Data { get; set; } - - - } - - /// Site Connector Update Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorUpdateModel - { - /// Whether Site Connector is active or not - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Host Name of Site Connector - [Newtonsoft.Json.JsonProperty("hostName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString HostName { get; set; } - - /// Port of Site Connector - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 Port { get; set; } - - /// Queue Type of Site Connector - [Newtonsoft.Json.JsonProperty("queueType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfMessageQueueType QueueType { get; set; } - - /// Shared Access Key Name of Site Connector - [Newtonsoft.Json.JsonProperty("sharedAccessKeyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SharedAccessKeyName { get; set; } - - /// Shared Access Key Value of Site Connector - [Newtonsoft.Json.JsonProperty("sharedAccessKeyValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SharedAccessKeyValue { get; set; } - - /// Name of Site Connector - [Newtonsoft.Json.JsonProperty("siteConnectorName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SiteConnectorName { get; set; } - - /// SSL Certificate Thumbprint of Site Connector - [Newtonsoft.Json.JsonProperty("sslCertificateThumbprint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SslCertificateThumbprint { get; set; } - - /// Whether Site Connector uses SSL or not - [Newtonsoft.Json.JsonProperty("useSsl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean UseSsl { get; set; } - - - } - - /// Queue Type of Site Connector - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfMessageQueueType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MessageQueueType? Value { get; set; } - - - } - - /// The credentials that should exist in the site connector service - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorCredentialsModel - { - /// The password that should exist in the site connector service - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password { get; set; } - - /// The username that should exist in the site connector service - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } - - - } - - /// IPagingOfEngineSummaryModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfEngineSummaryModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Records - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EngineSummaryModel - { - /// ActivationStatus - [Newtonsoft.Json.JsonProperty("activationStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EngineActivationStatusType? ActivationStatus { get; set; } - - /// BindAddress - [Newtonsoft.Json.JsonProperty("bindAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BindAddress { get; set; } - - /// ConnectionStatus - [Newtonsoft.Json.JsonProperty("connectionStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EngineConnectionStatusType? ConnectionStatus { get; set; } - - /// EngineId - [Newtonsoft.Json.JsonProperty("engineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EngineId { get; set; } - - /// FriendlyName - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FriendlyName { get; set; } - - /// HostName - [Newtonsoft.Json.JsonProperty("hostName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HostName { get; set; } - - /// IsBlockedByNet48 - [Newtonsoft.Json.JsonProperty("isBlockedByNet48", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsBlockedByNet48 { get; set; } - - /// LastConnected - [Newtonsoft.Json.JsonProperty("lastConnected", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastConnected { get; set; } - - - } - - /// ActivationStatus - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum EngineActivationStatusType - { - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Activated")] - Activated = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Inactive")] - Inactive = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Deleted")] - Deleted = 3, - - } - - /// ConnectionStatus - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum EngineConnectionStatusType - { - [System.Runtime.Serialization.EnumMember(Value = @"Offline")] - Offline = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Online")] - Online = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Invalid")] - Invalid = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"OldVersion")] - OldVersion = 3, - - } - - /// IPagingOfSiteSummaryModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfSiteSummaryModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Site Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteSummaryModel - { - /// Is Site Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Indicates if this site is the local site that cannot have engines assigned - [Newtonsoft.Json.JsonProperty("isLocal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsLocal { get; set; } - - /// Last Date of Activity of Site - [Newtonsoft.Json.JsonProperty("lastActivity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastActivity { get; set; } - - /// The number of engines on the site missing the minimum DotNet Framework - [Newtonsoft.Json.JsonProperty("numEnginesMissingNetFramework", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NumEnginesMissingNetFramework { get; set; } - - /// The number of engines on the site without the ability to restart the service, required for upgrades - [Newtonsoft.Json.JsonProperty("numEnginesWithoutAbilityToRestartService", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NumEnginesWithoutAbilityToRestartService { get; set; } - - /// Offline Engine Count of Site - [Newtonsoft.Json.JsonProperty("offlineEngineCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? OfflineEngineCount { get; set; } - - /// Online Engine Count of Site - [Newtonsoft.Json.JsonProperty("onlineEngineCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? OnlineEngineCount { get; set; } - - /// Id of Site - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// List of Metrics for this site such as ConnectionStatusOffline, ConnectionStatusOnline, ActivationStatusPending, LostConnection, and more. Only returned on a search when IncludeSiteMetrics is true. - [Newtonsoft.Json.JsonProperty("siteMetrics", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SiteMetrics { get; set; } - - /// Name of Site - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - - } - - /// List of Metrics for this site such as ConnectionStatusOffline, ConnectionStatusOnline, ActivationStatusPending, LostConnection, and more. Only returned on a search when IncludeSiteMetrics is true. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteMetric - { - /// MetricDisplayName - [Newtonsoft.Json.JsonProperty("metricDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetricDisplayName { get; set; } - - /// MetricName - [Newtonsoft.Json.JsonProperty("metricName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetricName { get; set; } - - /// MetricValue - [Newtonsoft.Json.JsonProperty("metricValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetricValue { get; set; } - - - } - - /// Basic Site Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteBasicModel - { - /// Is Site Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Enable CredSSP For WinRM - [Newtonsoft.Json.JsonProperty("enableCredSspForWinRm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableCredSspForWinRm { get; set; } - - /// Enable RDP Proxy - [Newtonsoft.Json.JsonProperty("enableRdpProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableRdpProxy { get; set; } - - /// Enable SSH Proxy - [Newtonsoft.Json.JsonProperty("enableSshProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSshProxy { get; set; } - - /// Heartbeat Interval of Site - [Newtonsoft.Json.JsonProperty("heartbeatInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HeartbeatInterval { get; set; } - - /// Powershell Secret Id of Site if set - [Newtonsoft.Json.JsonProperty("powershellSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PowershellSecretId { get; set; } - - /// Processing Location of Site - [Newtonsoft.Json.JsonProperty("processingLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ProcessingLocationType? ProcessingLocation { get; set; } - - /// RDP Proxy Port - [Newtonsoft.Json.JsonProperty("rdpProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RdpProxyPort { get; set; } - - /// RDP Proxy Port Inherited - [Newtonsoft.Json.JsonProperty("rdpProxyPortInherited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RdpProxyPortInherited { get; set; } - - /// Secret Count of Site - [Newtonsoft.Json.JsonProperty("secretCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretCount { get; set; } - - /// Id of Site Connector of Site - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteConnectorId { get; set; } - - /// Id of Site - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// Name of Site - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - /// SSH Proxy Port - [Newtonsoft.Json.JsonProperty("sshProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshProxyPort { get; set; } - - /// SSH Proxy Port Inherited - [Newtonsoft.Json.JsonProperty("sshProxyPortInherited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SshProxyPortInherited { get; set; } - - /// Is this a system site - [Newtonsoft.Json.JsonProperty("systemSite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SystemSite { get; set; } - - /// WinRM End Point URL of Site - [Newtonsoft.Json.JsonProperty("winRmEndPointUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string WinRmEndPointUrl { get; set; } - - - } - - /// Processing Location of Site - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ProcessingLocationType - { - [System.Runtime.Serialization.EnumMember(Value = @"UseWebSite")] - UseWebSite = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"UseDistributedEngine")] - UseDistributedEngine = 1, - - } - - /// SiteUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SiteUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteUpdateModel - { - /// Is Site Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Enable CredSSP For WinRM - [Newtonsoft.Json.JsonProperty("enableCredSspForWinRm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean EnableCredSspForWinRm { get; set; } - - /// Enable RDP Proxy - [Newtonsoft.Json.JsonProperty("enableRdpProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableRdpProxy { get; set; } - - /// Enable SSH Proxy - [Newtonsoft.Json.JsonProperty("enableSshProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableSshProxy { get; set; } - - /// Heartbeat Interval of Site - [Newtonsoft.Json.JsonProperty("heartbeatInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 HeartbeatInterval { get; set; } - - /// Powershell Secret Id of Site if set - [Newtonsoft.Json.JsonProperty("powershellSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 PowershellSecretId { get; set; } - - /// Processing Location of Site - [Newtonsoft.Json.JsonProperty("processingLocation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfProcessingLocationType ProcessingLocation { get; set; } - - /// RDP Proxy Port - [Newtonsoft.Json.JsonProperty("rdpProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 RdpProxyPort { get; set; } - - /// Id of Site Connector of Site - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SiteConnectorId { get; set; } - - /// Name of Site - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SiteName { get; set; } - - /// SSH Proxy Port - [Newtonsoft.Json.JsonProperty("sshProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SshProxyPort { get; set; } - - /// WinRM End Point URL of Site - [Newtonsoft.Json.JsonProperty("winRmEndPointUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString WinRmEndPointUrl { get; set; } - - - } - - /// Processing Location of Site - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfProcessingLocationType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ProcessingLocationType? Value { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSiteAuditSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Site Audit Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteAuditSummary - { - /// Site Audit Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Site Audit DateRecorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Site Audit Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Site Audit Id - [Newtonsoft.Json.JsonProperty("siteAuditId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteAuditId { get; set; } - - /// Site Audit UserName - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSiteLogSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Site Log Summary Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteLogSummaryModel - { - /// Date Log Message was Recorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Name of Engine - [Newtonsoft.Json.JsonProperty("engineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EngineName { get; set; } - - /// Message that was Logged - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Message { get; set; } - - - } - - /// FileStream - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FileStream - { - /// CanRead - [Newtonsoft.Json.JsonProperty("canRead", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanRead { get; set; } - - /// CanSeek - [Newtonsoft.Json.JsonProperty("canSeek", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanSeek { get; set; } - - /// CanTimeout - [Newtonsoft.Json.JsonProperty("canTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanTimeout { get; set; } - - /// CanWrite - [Newtonsoft.Json.JsonProperty("canWrite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanWrite { get; set; } - - /// Handle - [Newtonsoft.Json.JsonProperty("handle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public IntPtr Handle { get; set; } - - /// IsAsync - [Newtonsoft.Json.JsonProperty("isAsync", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsAsync { get; set; } - - /// Length - [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? Length { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Position - [Newtonsoft.Json.JsonProperty("position", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? Position { get; set; } - - /// ReadTimeout - [Newtonsoft.Json.JsonProperty("readTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ReadTimeout { get; set; } - - /// SafeFileHandle - [Newtonsoft.Json.JsonProperty("safeFileHandle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SafeFileHandle SafeFileHandle { get; set; } - - /// WriteTimeout - [Newtonsoft.Json.JsonProperty("writeTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WriteTimeout { get; set; } - - - } - - /// Handle - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IntPtr - { - - } - - /// SafeFileHandle - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SafeFileHandle - { - /// IsClosed - [Newtonsoft.Json.JsonProperty("isClosed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsClosed { get; set; } - - /// IsInvalid - [Newtonsoft.Json.JsonProperty("isInvalid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsInvalid { get; set; } - - - } - - /// EngineServerCapabilitiesSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EngineServerCapabilitiesSummary - { - /// When the capability was last updated - [Newtonsoft.Json.JsonProperty("lastModifiedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastModifiedDate { get; set; } - - /// Which capability - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// The server's capability - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// SiteConnectorCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SiteConnectorCreateModel Data { get; set; } - - - } - - /// Site Connector Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorCreateModel - { - /// Whether Site Connector is active or not - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Host Name of Site Connector - [Newtonsoft.Json.JsonProperty("hostName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HostName { get; set; } - - /// Port of Site Connector - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Port { get; set; } - - /// Queue Type of Site Connector - [Newtonsoft.Json.JsonProperty("queueType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MessageQueueType? QueueType { get; set; } - - /// Shared Access Key Name of Site Connector - [Newtonsoft.Json.JsonProperty("sharedAccessKeyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SharedAccessKeyName { get; set; } - - /// Shared Access Key Value of Site Connector - [Newtonsoft.Json.JsonProperty("sharedAccessKeyValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SharedAccessKeyValue { get; set; } - - /// Name of Site Connector - [Newtonsoft.Json.JsonProperty("siteConnectorName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteConnectorName { get; set; } - - /// SSL Certificate Thumbprint of Site Connector - [Newtonsoft.Json.JsonProperty("sslCertificateThumbprint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SslCertificateThumbprint { get; set; } - - /// Whether Site Connector uses SSL or not - [Newtonsoft.Json.JsonProperty("useSsl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSsl { get; set; } - - - } - - /// Result of site connector validation - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteConnectorValidationResult - { - /// When false, may contain reason for failure - [Newtonsoft.Json.JsonProperty("validationMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValidationMessage { get; set; } - - /// True if successfully validated - [Newtonsoft.Json.JsonProperty("validationSuccess", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValidationSuccess { get; set; } - - - } - - /// EngineActivationRequestArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EngineActivationRequestArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EngineActivationRequestModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EngineActivationRequestModel - { - /// Engines - [Newtonsoft.Json.JsonProperty("engines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Engines { get; set; } - - - } - - /// Change engine status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EngineStatusChangeModel - { - /// When activating an engine if SiteId is null this will be the default callback interval - [Newtonsoft.Json.JsonProperty("callbackInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CallbackInterval { get; set; } - - /// The action to perform on the engine - [Newtonsoft.Json.JsonProperty("changeType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EngineStatusChangeType? ChangeType { get; set; } - - /// The ID of the engine to change status - [Newtonsoft.Json.JsonProperty("engineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EngineId { get; set; } - - /// When activating an engine if SiteId is null this is the site connector that will be used. - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteConnectorId { get; set; } - - /// When activating an engine SiteId is required - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// When activating an engine if SiteId is null you can pass a SiteName and it will create the site and then activate the engine - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - - } - - /// The action to perform on the engine - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum EngineStatusChangeType - { - [System.Runtime.Serialization.EnumMember(Value = @"Activate")] - Activate = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Deactivate")] - Deactivate = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"RemoveFromSite")] - RemoveFromSite = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Delete")] - Delete = 3, - - } - - /// EngineActivationResultModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EngineActivationResultModel - { - /// Results - [Newtonsoft.Json.JsonProperty("results", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Results { get; set; } - - - } - - /// The result of the engine status update - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EngineActivationResult - { - /// Engine ID - [Newtonsoft.Json.JsonProperty("engineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EngineId { get; set; } - - /// The name of the engine - [Newtonsoft.Json.JsonProperty("engineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EngineName { get; set; } - - /// If there was an error - [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Error { get; set; } - - /// Whether or not the status change was successful - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// SiteCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SiteCreateModel Data { get; set; } - - - } - - /// Site Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteCreateModel - { - /// Is Site Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Enable CredSSP For WinRM - [Newtonsoft.Json.JsonProperty("enableCredSspForWinRm", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableCredSspForWinRm { get; set; } - - /// Enable RDP Proxy - [Newtonsoft.Json.JsonProperty("enableRdpProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableRdpProxy { get; set; } - - /// Enable SSH Proxy - [Newtonsoft.Json.JsonProperty("enableSshProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSshProxy { get; set; } - - /// Heartbeat Interval of Site - [Newtonsoft.Json.JsonProperty("heartbeatInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HeartbeatInterval { get; set; } - - /// Powershell Secret Id of Site if set - [Newtonsoft.Json.JsonProperty("powershellSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PowershellSecretId { get; set; } - - /// RDP Proxy Port - [Newtonsoft.Json.JsonProperty("rdpProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RdpProxyPort { get; set; } - - /// Id of Site Connector of Site - [Newtonsoft.Json.JsonProperty("siteConnectorId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteConnectorId { get; set; } - - /// Name of Site - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - /// SSH Proxy Port - [Newtonsoft.Json.JsonProperty("sshProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshProxyPort { get; set; } - - /// WinRM End Point URL of Site - [Newtonsoft.Json.JsonProperty("winRmEndPointUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string WinRmEndPointUrl { get; set; } - - - } - - /// ReassignSecretsArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReassignSecretsArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReassignSecretsModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReassignSecretsModel - { - /// Should the site be disabled as part of the reassign - [Newtonsoft.Json.JsonProperty("disableSite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DisableSite { get; set; } - - /// The new site ID to reassign to - [Newtonsoft.Json.JsonProperty("newSiteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NewSiteId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfDomainNameIndexSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainNameIndexSummary - { - /// DiscoverySourceId - [Newtonsoft.Json.JsonProperty("discoverySourceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceId { get; set; } - - /// DiscoverySourceIdScanned - [Newtonsoft.Json.JsonProperty("discoverySourceIdScanned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceIdScanned { get; set; } - - /// DiscoverySourceIdSuggested - [Newtonsoft.Json.JsonProperty("discoverySourceIdSuggested", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceIdSuggested { get; set; } - - /// DomainMarkedAsIgnored - [Newtonsoft.Json.JsonProperty("domainMarkedAsIgnored", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DomainMarkedAsIgnored { get; set; } - - /// DomainNameDiscovered - [Newtonsoft.Json.JsonProperty("domainNameDiscovered", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainNameDiscovered { get; set; } - - /// DomainNameIndexId - [Newtonsoft.Json.JsonProperty("domainNameIndexId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainNameIndexId { get; set; } - - /// DomainResolveType - [Newtonsoft.Json.JsonProperty("domainResolveType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DomainResolveType? DomainResolveType { get; set; } - - /// ExpiredDate - [Newtonsoft.Json.JsonProperty("expiredDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExpiredDate { get; set; } - - /// LastIndexedDate - [Newtonsoft.Json.JsonProperty("lastIndexedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastIndexedDate { get; set; } - - - } - - /// DomainResolveType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DomainResolveType - { - [System.Runtime.Serialization.EnumMember(Value = @"CouldNotResolve")] - CouldNotResolve = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"MatchedDomainInDb")] - MatchedDomainInDb = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"MatchedFQDNOrFriendlyOrNetBIOSInDb")] - MatchedFQDNOrFriendlyOrNetBIOSInDb = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"MatchedFriendlyNameWithAd")] - MatchedFriendlyNameWithAd = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"ManualUserInputDiscoverySourceId")] - ManualUserInputDiscoverySourceId = 4, - - } - - /// DomainNameIndexUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainNameIndexUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DomainNameIndexUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainNameIndexUpdateModel - { - /// DiscoverySourceIdSuggested - [Newtonsoft.Json.JsonProperty("discoverySourceIdSuggested", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 DiscoverySourceIdSuggested { get; set; } - - /// DomainMarkedAsIgnored - [Newtonsoft.Json.JsonProperty("domainMarkedAsIgnored", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DomainMarkedAsIgnored { get; set; } - - - } - - /// Domain Name Index - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainNameIndexModel - { - /// DiscoverySourceId - [Newtonsoft.Json.JsonProperty("discoverySourceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceId { get; set; } - - /// DiscoverySourceIdScanned - [Newtonsoft.Json.JsonProperty("discoverySourceIdScanned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceIdScanned { get; set; } - - /// DiscoverySourceIdSuggested - [Newtonsoft.Json.JsonProperty("discoverySourceIdSuggested", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DiscoverySourceIdSuggested { get; set; } - - /// Indicates if the domain is marked As Ignored - [Newtonsoft.Json.JsonProperty("domainMarkedAsIgnored", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DomainMarkedAsIgnored { get; set; } - - /// Domain Name Discovered - [Newtonsoft.Json.JsonProperty("domainNameDiscovered", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainNameDiscovered { get; set; } - - /// Domain Name Index Id - [Newtonsoft.Json.JsonProperty("domainNameIndexId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainNameIndexId { get; set; } - - /// How the domain was resolved - [Newtonsoft.Json.JsonProperty("domainResolveType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DomainResolveType? DomainResolveType { get; set; } - - /// Expired date - [Newtonsoft.Json.JsonProperty("expiredDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExpiredDate { get; set; } - - /// The date the domain was last indexed - [Newtonsoft.Json.JsonProperty("lastIndexedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastIndexedDate { get; set; } - - - } - - /// DomainNameIndexCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainNameIndexCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DomainNameIndexCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainNameIndexCreateModel - { - /// DiscoverySourceIdSuggested - [Newtonsoft.Json.JsonProperty("discoverySourceIdSuggested", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 DiscoverySourceIdSuggested { get; set; } - - /// DomainMarkedAsIgnored - [Newtonsoft.Json.JsonProperty("domainMarkedAsIgnored", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DomainMarkedAsIgnored { get; set; } - - /// DomainNameDiscovered - [Newtonsoft.Json.JsonProperty("domainNameDiscovered", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DomainNameDiscovered { get; set; } - - - } - - /// DomainNameIndexExpireUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainNameIndexExpireUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DomainNameIndexExpireUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainNameIndexExpireUpdateModel - { - /// DomainNameIndexId - [Newtonsoft.Json.JsonProperty("domainNameIndexId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 DomainNameIndexId { get; set; } - - /// ReIndexNow - [Newtonsoft.Json.JsonProperty("reIndexNow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ReIndexNow { get; set; } - - - } - - /// Dual control - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlModel - { - /// Whether this dual control is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Dual control approval groups - [Newtonsoft.Json.JsonProperty("dualControlApprovalGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DualControlApprovalGroups { get; set; } - - /// Dual control type ID - [Newtonsoft.Json.JsonProperty("dualControlTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DualControlTypeId { get; set; } - - /// Dual control type name - [Newtonsoft.Json.JsonProperty("dualControlTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DualControlTypeName { get; set; } - - /// Dual control ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Dual control item ID - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// Dual control item name - [Newtonsoft.Json.JsonProperty("itemName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemName { get; set; } - - - } - - /// Dual control approval groups - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IDualControlApprovalGroup - { - /// DualControlId - [Newtonsoft.Json.JsonProperty("dualControlId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DualControlId { get; set; } - - /// Enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// GroupName - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - - } - - /// Dual control update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlUpdateArgs - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Dual control approval groups - [Newtonsoft.Json.JsonProperty("dualControlApprovalGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DualControlApprovalGroups { get; set; } - - /// Dual control type - [Newtonsoft.Json.JsonProperty("dualControlTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DualControlTypeId { get; set; } - - /// App client ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] - public int Id { get; set; } - - /// ItemId - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - - } - - /// Whether or not dual control access has been authorized - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlStateModel - { - /// The status for the dual control entity - [Newtonsoft.Json.JsonProperty("stateResult", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DualControlStateResultType? StateResult { get; set; } - - - } - - /// The status for the dual control entity - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DualControlStateResultType - { - [System.Runtime.Serialization.EnumMember(Value = @"ApprovalRequired")] - ApprovalRequired = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"AccessAllowed")] - AccessAllowed = 1, - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfDualControlSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Dual control summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlSummary - { - /// Whether this dual control is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Dual control type ID - [Newtonsoft.Json.JsonProperty("dualControlTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DualControlType? DualControlTypeId { get; set; } - - /// Dual control type name - [Newtonsoft.Json.JsonProperty("dualControlTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DualControlTypeName { get; set; } - - /// Dual control ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Dual control item ID - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// Dual control item name - [Newtonsoft.Json.JsonProperty("itemName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemName { get; set; } - - - } - - /// Dual control type ID - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DualControlType - { - [System.Runtime.Serialization.EnumMember(Value = @"Report")] - Report = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"UserAuditReport")] - UserAuditReport = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Secret")] - Secret = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"CreateReport")] - CreateReport = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"AllSecretSessions")] - AllSecretSessions = 4, - - } - - /// Dual control creation options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlCreateArgs - { - /// Create the dual control as active or not - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Dual control approval groups - [Newtonsoft.Json.JsonProperty("dualControlApprovalGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DualControlApprovalGroups { get; set; } - - /// Dual control type ID - [Newtonsoft.Json.JsonProperty("dualControlTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DualControlTypeId { get; set; } - - /// ItemId - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - - } - - /// DualControlTypeModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlTypeModel - { - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Dual control auth args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlAuthArgs - { - /// Dual control auth data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DualControlAuthDataModel Data { get; set; } - - - } - - /// Used to authorize dual controls - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlAuthDataModel - { - /// Domain for the user, null if local - [Newtonsoft.Json.JsonProperty("domain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Domain { get; set; } - - /// User password - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password { get; set; } - - /// Two Factor Token to login - [Newtonsoft.Json.JsonProperty("twoFactorToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TwoFactorToken { get; set; } - - /// Username that can login - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } - - - } - - /// The result of the authorization request - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlAuthResult - { - /// True if the auth succeeded - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Enterprise Search Result Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EnterpriseSearchResultModel - { - /// Date enterprise was accessed - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Data { get; set; } - - /// Date process was completed - [Newtonsoft.Json.JsonProperty("processEndDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ProcessEndDate { get; set; } - - /// Date process was started - [Newtonsoft.Json.JsonProperty("processStartDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ProcessStartDate { get; set; } - - - } - - /// Enterprise Search Result Data Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EnterpriseSearchResultDataModel - { - /// Action taken on the accessed enterprise - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Date enterprise was accessed - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Name of secret associated to the accessed enterprise - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// Secret Template of secret associated to the accessed enterprise - [Newtonsoft.Json.JsonProperty("secretTemplateName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretTemplateName { get; set; } - - /// Id of user that accessed the enterprise - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// Name of user that accessed the enterprise - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Enterprise Search Request Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EnterpriseSearchRequestModel - { - /// Id of Request - [Newtonsoft.Json.JsonProperty("requestId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RequestId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfEventPipelinePolicyAuditSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyAuditSummary - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Audit ID - [Newtonsoft.Json.JsonProperty("auditId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AuditId { get; set; } - - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Date { get; set; } - - /// Is Policy - [Newtonsoft.Json.JsonProperty("isPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPolicy { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// User Display Name - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - - } - - /// Event Pipeline - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Event Pipeline Created Date - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedDate { get; set; } - - /// Entity Type Id - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// Event Pipeline Description - [Newtonsoft.Json.JsonProperty("eventPipelineDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineDescription { get; set; } - - /// Event Pipeline Id - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// Event Pipeline Name - [Newtonsoft.Json.JsonProperty("eventPipelineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineName { get; set; } - - /// Event Pipeline Policy Id - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// Event Pipeline Policy Map Id - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyMapId { get; set; } - - /// Event Pipeline Filters - [Newtonsoft.Json.JsonProperty("filterList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection FilterList { get; set; } - - /// Event pipeline used by the system - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// Event Pipeline Modified Date - [Newtonsoft.Json.JsonProperty("lastModifiedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastModifiedDate { get; set; } - - /// Event Pipeline Last Modified Date - [Newtonsoft.Json.JsonProperty("lastModifiedDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LastModifiedDisplayName { get; set; } - - /// Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Event Pipeline Tasks - [Newtonsoft.Json.JsonProperty("taskList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection TaskList { get; set; } - - /// Event Pipeline Triggers - [Newtonsoft.Json.JsonProperty("triggers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Triggers { get; set; } - - - } - - /// Event Pipeline Filter - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineFilterModel - { - /// Event Entity Type Id - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// Event Pipeline Filter Description - [Newtonsoft.Json.JsonProperty("eventPipelineFilterDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineFilterDescription { get; set; } - - /// Event Pipeline Filter Display Name - [Newtonsoft.Json.JsonProperty("eventPipelineFilterDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineFilterDisplayName { get; set; } - - /// Event Pipeline Filter Id - [Newtonsoft.Json.JsonProperty("eventPipelineFilterId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineFilterId { get; set; } - - /// Event Pipeline Filter Map Id - [Newtonsoft.Json.JsonProperty("eventPipelineFilterMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineFilterMapId { get; set; } - - /// Event Pipeline Filter Name - [Newtonsoft.Json.JsonProperty("eventPipelineFilterName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineFilterName { get; set; } - - /// Settings - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Settings { get; set; } - - /// Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// Event Pipeline Filter Setting Value Map - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineFilterSettingValueMapModel - { - /// Event Pipeline Filter Map Id - [Newtonsoft.Json.JsonProperty("eventPipelineFilterMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineFilterMapId { get; set; } - - /// Event Pipeline Filter Setting Value Map Id - [Newtonsoft.Json.JsonProperty("eventPipelineFilterSettingValueMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineFilterSettingValueMapId { get; set; } - - /// Whether to override the default value - [Newtonsoft.Json.JsonProperty("overrideDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OverrideDefault { get; set; } - - /// Setting - [Newtonsoft.Json.JsonProperty("setting", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SettingForDisplay Setting { get; set; } - - /// Setting Display - [Newtonsoft.Json.JsonProperty("settingDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingDisplay { get; set; } - - /// Setting Display Value - [Newtonsoft.Json.JsonProperty("settingDisplayValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingDisplayValue { get; set; } - - /// Setting Id - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingId { get; set; } - - /// Setting Value - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingValue { get; set; } - - /// Whether or not to use the setting's default value. - [Newtonsoft.Json.JsonProperty("usingDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsingDefault { get; set; } - - - } - - /// Setting - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SettingForDisplay - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// CanEdit - [Newtonsoft.Json.JsonProperty("canEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEdit { get; set; } - - /// CanEditValue - [Newtonsoft.Json.JsonProperty("canEditValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEditValue { get; set; } - - /// ChildLoadSQL - [Newtonsoft.Json.JsonProperty("childLoadSQL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ChildLoadSQL { get; set; } - - /// ChildSettings - [Newtonsoft.Json.JsonProperty("childSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ChildSettings { get; set; } - - /// DefaultValue - [Newtonsoft.Json.JsonProperty("defaultValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DefaultValue { get; set; } - - /// IsVisible - [Newtonsoft.Json.JsonProperty("isVisible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsVisible { get; set; } - - /// NameLocalizeKey - [Newtonsoft.Json.JsonProperty("nameLocalizeKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NameLocalizeKey { get; set; } - - /// ParentSettingId - [Newtonsoft.Json.JsonProperty("parentSettingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ParentSettingId { get; set; } - - /// RegexValidation - [Newtonsoft.Json.JsonProperty("regexValidation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RegexValidation { get; set; } - - /// SettingId - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingId { get; set; } - - /// SettingName - [Newtonsoft.Json.JsonProperty("settingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingName { get; set; } - - /// SettingSectionId - [Newtonsoft.Json.JsonProperty("settingSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingSectionId { get; set; } - - /// SettingType - [Newtonsoft.Json.JsonProperty("settingType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SettingType? SettingType { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// SubSettingSectionId - [Newtonsoft.Json.JsonProperty("subSettingSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SubSettingSectionId { get; set; } - - /// TooltipLocalizeKey - [Newtonsoft.Json.JsonProperty("tooltipLocalizeKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TooltipLocalizeKey { get; set; } - - - } - - /// ChildSettings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Setting - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// CanEdit - [Newtonsoft.Json.JsonProperty("canEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEdit { get; set; } - - /// CanEditValue - [Newtonsoft.Json.JsonProperty("canEditValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEditValue { get; set; } - - /// ChildLoadSQL - [Newtonsoft.Json.JsonProperty("childLoadSQL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ChildLoadSQL { get; set; } - - /// DefaultValue - [Newtonsoft.Json.JsonProperty("defaultValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DefaultValue { get; set; } - - /// IsVisible - [Newtonsoft.Json.JsonProperty("isVisible", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsVisible { get; set; } - - /// NameLocalizeKey - [Newtonsoft.Json.JsonProperty("nameLocalizeKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NameLocalizeKey { get; set; } - - /// ParentSettingId - [Newtonsoft.Json.JsonProperty("parentSettingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ParentSettingId { get; set; } - - /// RegexValidation - [Newtonsoft.Json.JsonProperty("regexValidation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RegexValidation { get; set; } - - /// SettingId - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingId { get; set; } - - /// SettingName - [Newtonsoft.Json.JsonProperty("settingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingName { get; set; } - - /// SettingSectionId - [Newtonsoft.Json.JsonProperty("settingSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingSectionId { get; set; } - - /// SettingType - [Newtonsoft.Json.JsonProperty("settingType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SettingType? SettingType { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// SubSettingSectionId - [Newtonsoft.Json.JsonProperty("subSettingSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SubSettingSectionId { get; set; } - - /// TooltipLocalizeKey - [Newtonsoft.Json.JsonProperty("tooltipLocalizeKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TooltipLocalizeKey { get; set; } - - - } - - /// SettingType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SettingType - { - [System.Runtime.Serialization.EnumMember(Value = @"Default")] - Default = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Integer")] - Integer = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"String")] - String = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Boolean")] - Boolean = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"StringArray")] - StringArray = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"DropDown")] - DropDown = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"DropDownItem")] - DropDownItem = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"MultilineString")] - MultilineString = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"IntegerArray")] - IntegerArray = 8, - - } - - /// Event Pipeline Task - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTaskModel - { - /// Event Entity Type Id - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventEntityTypeId { get; set; } - - /// Event Pipeline Task Description - [Newtonsoft.Json.JsonProperty("eventPipelineTaskDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskDescription { get; set; } - - /// Event Pipeline Task Display Name - [Newtonsoft.Json.JsonProperty("eventPipelineTaskDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskDisplayName { get; set; } - - /// Event Pipeline Task Id - [Newtonsoft.Json.JsonProperty("eventPipelineTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskId { get; set; } - - /// Event Pipeline Task Map Id - [Newtonsoft.Json.JsonProperty("eventPipelineTaskMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskMapId { get; set; } - - /// Event Pipeline Name - [Newtonsoft.Json.JsonProperty("eventPipelineTaskName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskName { get; set; } - - /// Multiselect - [Newtonsoft.Json.JsonProperty("isMultiSelect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsMultiSelect { get; set; } - - /// Settings - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Settings { get; set; } - - /// Sort ORder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// Event Pipeline Task Setting Value Map - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTaskSettingValueMapModel - { - /// Event Pipeline Task Map Id - [Newtonsoft.Json.JsonProperty("eventPipelineTaskMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskMapId { get; set; } - - /// Event Pipeline Task Setting Value Map Id - [Newtonsoft.Json.JsonProperty("eventPipelineTaskSettingValueMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskSettingValueMapId { get; set; } - - /// Override Default - [Newtonsoft.Json.JsonProperty("overrideDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OverrideDefault { get; set; } - - /// Setting - [Newtonsoft.Json.JsonProperty("setting", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SettingForDisplay Setting { get; set; } - - /// Setting Display - [Newtonsoft.Json.JsonProperty("settingDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingDisplay { get; set; } - - /// Setting Display Value - [Newtonsoft.Json.JsonProperty("settingDisplayValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingDisplayValue { get; set; } - - /// Setting Id - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingId { get; set; } - - /// Setting Value - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingValue { get; set; } - - /// Whether or not to use the setting's default value. - [Newtonsoft.Json.JsonProperty("usingDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsingDefault { get; set; } - - - } - - /// Event Pipeline Trigger - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTriggerModel - { - /// Entity Type Display Name - [Newtonsoft.Json.JsonProperty("entityTypeDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EntityTypeDisplayName { get; set; } - - /// Event Action Id - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventActionId { get; set; } - - /// Event Pipeline Id - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// Event Pipeline Trigger Id - [Newtonsoft.Json.JsonProperty("eventPipelineTriggerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTriggerId { get; set; } - - /// Trigger Display Name - [Newtonsoft.Json.JsonProperty("triggerDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TriggerDisplayName { get; set; } - - - } - - /// EventPipelineUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EventPipelineUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineUpdateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// EventPipelineDescription - [Newtonsoft.Json.JsonProperty("eventPipelineDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EventPipelineDescription { get; set; } - - /// EventPipelineName - [Newtonsoft.Json.JsonProperty("eventPipelineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EventPipelineName { get; set; } - - /// Filters - [Newtonsoft.Json.JsonProperty("filters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfEventPipelineFilterMapUpdateModelOf Filters { get; set; } - - /// Tasks - [Newtonsoft.Json.JsonProperty("tasks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfEventPipelineTaskMapUpdateModelOf Tasks { get; set; } - - /// Triggers - [Newtonsoft.Json.JsonProperty("triggers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfEventPipelineTriggerUpdateModelOf Triggers { get; set; } - - - } - - /// Filters - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfEventPipelineFilterMapUpdateModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineFilterMapUpdateModel - { - /// EventPipelineFilterId - [Newtonsoft.Json.JsonProperty("eventPipelineFilterId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EventPipelineFilterId { get; set; } - - /// EventPipelineFilterMapId - [Newtonsoft.Json.JsonProperty("eventPipelineFilterMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 EventPipelineFilterMapId { get; set; } - - /// EventPipelineFilterName - [Newtonsoft.Json.JsonProperty("eventPipelineFilterName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EventPipelineFilterName { get; set; } - - /// Settings - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfSettingUpdateModelOf Settings { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SortOrder { get; set; } - - - } - - /// Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfSettingUpdateModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SettingUpdateModel - { - /// SettingName - [Newtonsoft.Json.JsonProperty("settingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SettingName { get; set; } - - /// SettingValue - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SettingValue { get; set; } - - - } - - /// Tasks - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfEventPipelineTaskMapUpdateModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTaskMapUpdateModel - { - /// EventPipelineTaskId - [Newtonsoft.Json.JsonProperty("eventPipelineTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EventPipelineTaskId { get; set; } - - /// EventPipelineTaskMapId - [Newtonsoft.Json.JsonProperty("eventPipelineTaskMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 EventPipelineTaskMapId { get; set; } - - /// EventPipelineTaskName - [Newtonsoft.Json.JsonProperty("eventPipelineTaskName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EventPipelineTaskName { get; set; } - - /// Settings - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfSettingUpdateModelOf Settings { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SortOrder { get; set; } - - - } - - /// Triggers - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfEventPipelineTriggerUpdateModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTriggerUpdateModel - { - /// EventActionId - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EventActionId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfEventPipelineViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineViewModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean Active { get; set; } - - /// CreatedDate - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfDateTime CreatedDate { get; set; } - - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// EventPipelineDescription - [Newtonsoft.Json.JsonProperty("eventPipelineDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString EventPipelineDescription { get; set; } - - /// EventPipelineId - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// EventPipelineName - [Newtonsoft.Json.JsonProperty("eventPipelineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString EventPipelineName { get; set; } - - /// EventPipelinePolicyId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// EventPipelinePolicyMapId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyMapId { get; set; } - - /// FilterList - [Newtonsoft.Json.JsonProperty("filterList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection FilterList { get; set; } - - /// IsSystem - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// LastModifiedDate - [Newtonsoft.Json.JsonProperty("lastModifiedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfDateTime LastModifiedDate { get; set; } - - /// LastModifiedDisplayName - [Newtonsoft.Json.JsonProperty("lastModifiedDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString LastModifiedDisplayName { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 SortOrder { get; set; } - - /// TaskList - [Newtonsoft.Json.JsonProperty("taskList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection TaskList { get; set; } - - /// Triggers - [Newtonsoft.Json.JsonProperty("triggers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Triggers { get; set; } - - - } - - /// FilterList - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineFilterViewModel - { - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfOptionalInt32 EventEntityTypeId { get; set; } - - /// EventPipelineFilterDescription - [Newtonsoft.Json.JsonProperty("eventPipelineFilterDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString EventPipelineFilterDescription { get; set; } - - /// EventPipelineFilterDisplayName - [Newtonsoft.Json.JsonProperty("eventPipelineFilterDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString EventPipelineFilterDisplayName { get; set; } - - /// EventPipelineFilterId - [Newtonsoft.Json.JsonProperty("eventPipelineFilterId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 EventPipelineFilterId { get; set; } - - /// EventPipelineFilterMapId - [Newtonsoft.Json.JsonProperty("eventPipelineFilterMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfInt32 EventPipelineFilterMapId { get; set; } - - /// EventPipelineFilterName - [Newtonsoft.Json.JsonProperty("eventPipelineFilterName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString EventPipelineFilterName { get; set; } - - /// Settings - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfEventPipelineFilterSettingValueMapViewModelOf Settings { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfInt32 SortOrder { get; set; } - - - } - - /// EventEntityTypeId - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfOptionalInt32 - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Value { get; set; } - - - } - - /// Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfEventPipelineFilterSettingValueMapViewModelOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineFilterSettingValueMapViewModel - { - /// EventPipelineFilterMapId - [Newtonsoft.Json.JsonProperty("eventPipelineFilterMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 EventPipelineFilterMapId { get; set; } - - /// EventPipelineFilterSettingValueMapId - [Newtonsoft.Json.JsonProperty("eventPipelineFilterSettingValueMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfOptionalInt32 EventPipelineFilterSettingValueMapId { get; set; } - - /// OverrideDefault - [Newtonsoft.Json.JsonProperty("overrideDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean OverrideDefault { get; set; } - - /// Setting - [Newtonsoft.Json.JsonProperty("setting", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfSettingForDisplay Setting { get; set; } - - /// SettingDisplay - [Newtonsoft.Json.JsonProperty("settingDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString SettingDisplay { get; set; } - - /// SettingDisplayValue - [Newtonsoft.Json.JsonProperty("settingDisplayValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingDisplayValue { get; set; } - - /// SettingId - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 SettingId { get; set; } - - /// SettingValue - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SettingValue { get; set; } - - /// UsingDefault - [Newtonsoft.Json.JsonProperty("usingDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean UsingDefault { get; set; } - - - } - - /// Setting - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfSettingForDisplay - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SettingForDisplay Value { get; set; } - - - } - - /// TaskList - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTaskViewModel - { - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfOptionalEventEntityTypeEnum EventEntityTypeId { get; set; } - - /// EventPipelineTaskDescription - [Newtonsoft.Json.JsonProperty("eventPipelineTaskDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString EventPipelineTaskDescription { get; set; } - - /// EventPipelineTaskDisplayName - [Newtonsoft.Json.JsonProperty("eventPipelineTaskDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString EventPipelineTaskDisplayName { get; set; } - - /// EventPipelineTaskId - [Newtonsoft.Json.JsonProperty("eventPipelineTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 EventPipelineTaskId { get; set; } - - /// EventPipelineTaskMapId - [Newtonsoft.Json.JsonProperty("eventPipelineTaskMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfInt32 EventPipelineTaskMapId { get; set; } - - /// EventPipelineTaskName - [Newtonsoft.Json.JsonProperty("eventPipelineTaskName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString EventPipelineTaskName { get; set; } - - /// IsMultiSelect - [Newtonsoft.Json.JsonProperty("isMultiSelect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfBoolean IsMultiSelect { get; set; } - - /// Settings - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfEventPipelineTaskSettingValueMapViewModelOf Settings { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 SortOrder { get; set; } - - - } - - /// EventEntityTypeId - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfOptionalEventEntityTypeEnum - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// IsMultiSelect - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfBoolean - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Value { get; set; } - - - } - - /// Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfEventPipelineTaskSettingValueMapViewModelOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTaskSettingValueMapViewModel - { - /// EventPipelineTaskMapId - [Newtonsoft.Json.JsonProperty("eventPipelineTaskMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 EventPipelineTaskMapId { get; set; } - - /// EventPipelineTaskSettingValueMapId - [Newtonsoft.Json.JsonProperty("eventPipelineTaskSettingValueMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfOptionalInt32 EventPipelineTaskSettingValueMapId { get; set; } - - /// OverrideDefault - [Newtonsoft.Json.JsonProperty("overrideDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean OverrideDefault { get; set; } - - /// Setting - [Newtonsoft.Json.JsonProperty("setting", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfSettingForDisplay Setting { get; set; } - - /// SettingDisplay - [Newtonsoft.Json.JsonProperty("settingDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString SettingDisplay { get; set; } - - /// SettingDisplayValue - [Newtonsoft.Json.JsonProperty("settingDisplayValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingDisplayValue { get; set; } - - /// SettingId - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 SettingId { get; set; } - - /// SettingValue - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SettingValue { get; set; } - - /// UsingDefault - [Newtonsoft.Json.JsonProperty("usingDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean UsingDefault { get; set; } - - - } - - /// Triggers - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTriggerViewModel - { - /// EntityTypeDisplayName - [Newtonsoft.Json.JsonProperty("entityTypeDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString EntityTypeDisplayName { get; set; } - - /// EventActionId - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 EventActionId { get; set; } - - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfOptionalEventEntityTypeEnum EventEntityTypeId { get; set; } - - /// EventPipelineId - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfInt32 EventPipelineId { get; set; } - - /// EventPipelineTriggerId - [Newtonsoft.Json.JsonProperty("eventPipelineTriggerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 EventPipelineTriggerId { get; set; } - - /// TriggerDisplayName - [Newtonsoft.Json.JsonProperty("triggerDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString TriggerDisplayName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfEventPipelineSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineSummaryModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Event Pipeline Created Date - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedDate { get; set; } - - /// Entity Type Id - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// Event Pipeline Description - [Newtonsoft.Json.JsonProperty("eventPipelineDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineDescription { get; set; } - - /// Event Pipeline Id - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// Event Pipeline Name - [Newtonsoft.Json.JsonProperty("eventPipelineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineName { get; set; } - - /// Event Pipeline Policy Id - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// Event Pipeline Policy Map Id - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyMapId { get; set; } - - /// Event pipeline used by the system - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// Event Pipeline Modified Date - [Newtonsoft.Json.JsonProperty("lastModifiedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastModifiedDate { get; set; } - - /// Event Pipeline Last Modified Date - [Newtonsoft.Json.JsonProperty("lastModifiedDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LastModifiedDisplayName { get; set; } - - /// Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// EventPipeline - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipeline - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// CreatedDate - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedDate { get; set; } - - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// EventPipelineDescription - [Newtonsoft.Json.JsonProperty("eventPipelineDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineDescription { get; set; } - - /// EventPipelineId - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// EventPipelineName - [Newtonsoft.Json.JsonProperty("eventPipelineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineName { get; set; } - - /// EventPipelinePolicyId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// IsSystem - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// LastModifiedDate - [Newtonsoft.Json.JsonProperty("lastModifiedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastModifiedDate { get; set; } - - /// LastModifiedUser - [Newtonsoft.Json.JsonProperty("lastModifiedUser", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LastModifiedUser { get; set; } - - /// LastModifiedUserId - [Newtonsoft.Json.JsonProperty("lastModifiedUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LastModifiedUserId { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfEventPipelineRunViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineRunViewModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Duration - [Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Duration { get; set; } - - /// EndDate - [Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndDate { get; set; } - - /// EntityTypeName - [Newtonsoft.Json.JsonProperty("entityTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EntityTypeName { get; set; } - - /// EventDateTime - [Newtonsoft.Json.JsonProperty("eventDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EventDateTime { get; set; } - - /// EventDetails - [Newtonsoft.Json.JsonProperty("eventDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventDetails { get; set; } - - /// EventName - [Newtonsoft.Json.JsonProperty("eventName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventName { get; set; } - - /// EventPipelineId - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// EventPipelinePolicyRunId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyRunId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? EventPipelinePolicyRunId { get; set; } - - /// ItemId - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// ItemName - [Newtonsoft.Json.JsonProperty("itemName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemName { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// QueuedDate - [Newtonsoft.Json.JsonProperty("queuedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? QueuedDate { get; set; } - - /// StartDate - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDate { get; set; } - - /// Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EventPipelineStatus? Status { get; set; } - - - } - - /// Status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum EventPipelineStatus - { - [System.Runtime.Serialization.EnumMember(Value = @"Failed")] - Failed = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Success")] - Success = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Skipped")] - Skipped = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Processing")] - Processing = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"Scheduled")] - Scheduled = 5, - - } - - /// EventPipelineCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EventPipelineUpdateModel Data { get; set; } - - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// EventPipelinePolicyId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - - } - - /// EventPipelineOrderUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineOrderUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EventPipelineOrderUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineOrderUpdateModel - { - /// EventPipelinePolicyId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SortOrder { get; set; } - - - } - - /// EventPipelinePolicyMap[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyMap - { - /// EventPipelineId - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// EventPipelinePolicyId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// EventPipelinePolicyMapId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyMapId { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// EventPipelineActivateUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineActivateUpdateArgs - { - /// Activate - [Newtonsoft.Json.JsonProperty("activate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Activate { get; set; } - - - } - - /// Event Pipeline Policy - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyModel - { - /// If the Policy is Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The Date the Policy was created - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedDate { get; set; } - - /// Event Pipeline Type Id - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// Event Pipeline Policy Description - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelinePolicyDescription { get; set; } - - /// Event Pipeline Policy Id - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// Event Pipeline Policy Name - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelinePolicyName { get; set; } - - /// Event pipeline policy used by the system - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// The Date the Policy was last modified - [Newtonsoft.Json.JsonProperty("lastModifiedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastModifiedDate { get; set; } - - /// The display name of the user who last modified the Policy - [Newtonsoft.Json.JsonProperty("lastModifiedDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LastModifiedDisplayName { get; set; } - - /// Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// EventPipelinePolicyAddPipelineArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyAddPipelineArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EventPipelinePolicyAddPipelineModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyAddPipelineModel - { - /// EventPipelineId - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EventPipelineId { get; set; } - - - } - - /// Event Pipeline Policy Map - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyMapModel - { - /// Event Pipeline Id - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// Event Pipeline Policy Id - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// Event Pipeline Policy Map Id - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyMapId { get; set; } - - /// Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// EventPipelinePolicyUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EventPipelinePolicyUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyUpdateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// EventPipelinePolicyDescription - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EventPipelinePolicyDescription { get; set; } - - /// EventPipelinePolicyName - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EventPipelinePolicyName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfEventPipelinePolicySummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicySummary - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Created Date - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedDate { get; set; } - - /// Event Entity Type ID - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// Event Pipeline Policy Description - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelinePolicyDescription { get; set; } - - /// Event Pipeline Policy ID - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelinePolicyId { get; set; } - - /// Event Pipeline Policy Name - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelinePolicyName { get; set; } - - /// Is System - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// Last Modified Date - [Newtonsoft.Json.JsonProperty("lastModifiedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastModifiedDate { get; set; } - - /// Last Modified Display Name - [Newtonsoft.Json.JsonProperty("lastModifiedDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LastModifiedDisplayName { get; set; } - - - } - - /// EventPipelinePolicyRunActivityViewModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyRunActivityViewModel - { - /// Duration - [Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Duration { get; set; } - - /// EndDateTime - [Newtonsoft.Json.JsonProperty("endDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndDateTime { get; set; } - - /// EventAction - [Newtonsoft.Json.JsonProperty("eventAction", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventAction { get; set; } - - /// EventEntityType - [Newtonsoft.Json.JsonProperty("eventEntityType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventEntityType { get; set; } - - /// EventPipelineDescription - [Newtonsoft.Json.JsonProperty("eventPipelineDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineDescription { get; set; } - - /// EventPipelineId - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// EventPipelineName - [Newtonsoft.Json.JsonProperty("eventPipelineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineName { get; set; } - - /// EventPipelinePolicyRunId - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyRunId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? EventPipelinePolicyRunId { get; set; } - - /// EventPipelineTaskDescription - [Newtonsoft.Json.JsonProperty("eventPipelineTaskDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskDescription { get; set; } - - /// EventPipelineTaskId - [Newtonsoft.Json.JsonProperty("eventPipelineTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskId { get; set; } - - /// EventPipelineTaskName - [Newtonsoft.Json.JsonProperty("eventPipelineTaskName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskName { get; set; } - - /// ItemId - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// ItemName - [Newtonsoft.Json.JsonProperty("itemName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// QueuedDateTime - [Newtonsoft.Json.JsonProperty("queuedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? QueuedDateTime { get; set; } - - /// RunOrder - [Newtonsoft.Json.JsonProperty("runOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RunOrder { get; set; } - - /// StartDateTime - [Newtonsoft.Json.JsonProperty("startDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDateTime { get; set; } - - /// Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EventPipelineStatus? Status { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretPolicyViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyViewModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean Active { get; set; } - - /// SecretPolicyDescription - [Newtonsoft.Json.JsonProperty("secretPolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SecretPolicyDescription { get; set; } - - /// SecretPolicyId - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// SecretPolicyName - [Newtonsoft.Json.JsonProperty("secretPolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SecretPolicyName { get; set; } - - - } - - /// FolderSimpleViewModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderSimpleViewModel - { - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Path - [Newtonsoft.Json.JsonProperty("path", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Path { get; set; } - - /// Restricted - [Newtonsoft.Json.JsonProperty("restricted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Restricted { get; set; } - - - } - - /// EventPipelinePolicyFolderMapUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyFolderMapUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Data { get; set; } - - - } - - /// UserGroupSearchResultModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserGroupSearchResultModel - { - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// DomainName - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// EventPipelinePolicyGroupMapUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyGroupMapUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Data { get; set; } - - - } - - /// EventPipelinePolicyFolderChildData[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyFolderChildData - { - /// ChildFolderCount - [Newtonsoft.Json.JsonProperty("childFolderCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ChildFolderCount { get; set; } - - /// FolderId - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// HasPipelinePolicy - [Newtonsoft.Json.JsonProperty("hasPipelinePolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPipelinePolicy { get; set; } - - - } - - /// EventPipelinePolicyCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EventPipelinePolicyCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyCreateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EventEntityTypeId { get; set; } - - /// EventPipelinePolicyDescription - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EventPipelinePolicyDescription { get; set; } - - /// EventPipelinePolicyName - [Newtonsoft.Json.JsonProperty("eventPipelinePolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EventPipelinePolicyName { get; set; } - - /// ExternalInstanceId - [Newtonsoft.Json.JsonProperty("externalInstanceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? ExternalInstanceId { get; set; } - - /// IsSystem - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// Pipelines - [Newtonsoft.Json.JsonProperty("pipelines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfEventPipelineUpdateModelOf Pipelines { get; set; } - - /// ReuseExistingPipelines - [Newtonsoft.Json.JsonProperty("reuseExistingPipelines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReuseExistingPipelines { get; set; } - - - } - - /// Pipelines - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfEventPipelineUpdateModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// EventPipelinePolicyImportArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyImportArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Data { get; set; } - - - } - - /// EventPipelinePolicySortOrderUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicySortOrderUpdateArgs - { - /// NewSortOrder - [Newtonsoft.Json.JsonProperty("newSortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NewSortOrder { get; set; } - - - } - - /// EventPipelinePolicyActivateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelinePolicyActivateArgs - { - /// Activate - [Newtonsoft.Json.JsonProperty("activate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Activate { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfEventPipelineTask - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTask - { - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// EventPipelineTaskDescription - [Newtonsoft.Json.JsonProperty("eventPipelineTaskDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskDescription { get; set; } - - /// EventPipelineTaskId - [Newtonsoft.Json.JsonProperty("eventPipelineTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskId { get; set; } - - /// EventPipelineTaskName - [Newtonsoft.Json.JsonProperty("eventPipelineTaskName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskName { get; set; } - - /// IsMultiSelect - [Newtonsoft.Json.JsonProperty("isMultiSelect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsMultiSelect { get; set; } - - - } - - /// EventPipelineTaskSettingMapSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTaskSettingMapSummary - { - /// Event Pipeline Task ID - [Newtonsoft.Json.JsonProperty("eventPipelineTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskId { get; set; } - - /// Event Pipeline Task Setting Map ID - [Newtonsoft.Json.JsonProperty("eventPipelineTaskSettingMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskSettingMapId { get; set; } - - /// Setting - [Newtonsoft.Json.JsonProperty("setting", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SettingForDisplay Setting { get; set; } - - /// Setting Display - [Newtonsoft.Json.JsonProperty("settingDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingDisplay { get; set; } - - /// Setting ID - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingId { get; set; } - - /// Setting Value - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingValue { get; set; } - - /// Event Pipeline Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Using Default - [Newtonsoft.Json.JsonProperty("usingDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsingDefault { get; set; } - - - } - - /// EventPipelineFilterSettingMapSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineFilterSettingMapSummary - { - /// Event Pipeline Filter ID - [Newtonsoft.Json.JsonProperty("eventPipelineFilterId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineFilterId { get; set; } - - /// Event Pipeline Filter Setting Map ID - [Newtonsoft.Json.JsonProperty("eventPipelineFilterSettingMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineFilterSettingMapId { get; set; } - - /// Setting - [Newtonsoft.Json.JsonProperty("setting", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SettingForDisplay Setting { get; set; } - - /// Setting Display - [Newtonsoft.Json.JsonProperty("settingDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingDisplay { get; set; } - - /// Setting ID - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingId { get; set; } - - /// Setting Value - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingValue { get; set; } - - /// Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Using Default - [Newtonsoft.Json.JsonProperty("usingDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UsingDefault { get; set; } - - - } - - /// EventPipelineTaskSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTaskSummary - { - /// Event Entity Type ID - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventEntityTypeId { get; set; } - - /// Event Pipeline Task Description - [Newtonsoft.Json.JsonProperty("eventPipelineTaskDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskDescription { get; set; } - - /// Event Pipeline Task Display Name - [Newtonsoft.Json.JsonProperty("eventPipelineTaskDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskDisplayName { get; set; } - - /// Event Pipeline Task ID - [Newtonsoft.Json.JsonProperty("eventPipelineTaskId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskId { get; set; } - - /// Event Pipeline Task Map ID - [Newtonsoft.Json.JsonProperty("eventPipelineTaskMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTaskMapId { get; set; } - - /// Event Pipeline Task Name - [Newtonsoft.Json.JsonProperty("eventPipelineTaskName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineTaskName { get; set; } - - /// Is Multi Select - [Newtonsoft.Json.JsonProperty("isMultiSelect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsMultiSelect { get; set; } - - /// Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// EventPipelineFilterSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineFilterSummary - { - /// Event Entity Type ID - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// Event Pipeline Filter Description - [Newtonsoft.Json.JsonProperty("eventPipelineFilterDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineFilterDescription { get; set; } - - /// Event Pipeline Filter Display Name - [Newtonsoft.Json.JsonProperty("eventPipelineFilterDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineFilterDisplayName { get; set; } - - /// Event Pipeline Filter Id - [Newtonsoft.Json.JsonProperty("eventPipelineFilterId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineFilterId { get; set; } - - /// Event Pipeline Filter Map ID - [Newtonsoft.Json.JsonProperty("eventPipelineFilterMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineFilterMapId { get; set; } - - /// Event Pipeline Filter Name - [Newtonsoft.Json.JsonProperty("eventPipelineFilterName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventPipelineFilterName { get; set; } - - /// Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// EventPipelineTriggerSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTriggerSummary - { - /// Entity Type Display Name - [Newtonsoft.Json.JsonProperty("entityTypeDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EntityTypeDisplayName { get; set; } - - /// Event Action ID ID - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventActionId { get; set; } - - /// Event Entity Type ID - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// Event Pipeline ID - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// Event Pipeline Trigger ID - [Newtonsoft.Json.JsonProperty("eventPipelineTriggerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTriggerId { get; set; } - - /// Trigger Display Name - [Newtonsoft.Json.JsonProperty("triggerDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TriggerDisplayName { get; set; } - - - } - - /// EventPipelineTrigger - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventPipelineTrigger - { - /// EntityTypeDisplayName - [Newtonsoft.Json.JsonProperty("entityTypeDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EntityTypeDisplayName { get; set; } - - /// EventActionId - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventActionId { get; set; } - - /// EventActionName - [Newtonsoft.Json.JsonProperty("eventActionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventActionName { get; set; } - - /// EventEntityTypeId - [Newtonsoft.Json.JsonProperty("eventEntityTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventEntityTypeId { get; set; } - - /// EventPipelineId - [Newtonsoft.Json.JsonProperty("eventPipelineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineId { get; set; } - - /// EventPipelineTriggerId - [Newtonsoft.Json.JsonProperty("eventPipelineTriggerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventPipelineTriggerId { get; set; } - - /// TriggerDisplayName - [Newtonsoft.Json.JsonProperty("triggerDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TriggerDisplayName { get; set; } - - - } - - /// EventSubscriptionStubViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionStubViewModel - { - /// SendEmail - [Newtonsoft.Json.JsonProperty("sendEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean SendEmail { get; set; } - - /// SendSlack - [Newtonsoft.Json.JsonProperty("sendSlack", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean SendSlack { get; set; } - - - } - - /// EntityTypeModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EntityTypeModel - { - /// The list of actions available for the entity - [Newtonsoft.Json.JsonProperty("actions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Actions { get; set; } - - /// The list of condition type options available for the entity - [Newtonsoft.Json.JsonProperty("conditionTypeOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ConditionTypeOptions { get; set; } - - /// The localized name of the entity type, such as Secret, IP Address Range, or Folder - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// The type of item that can be monitored. Secret, folder, engine, etc.. - [Newtonsoft.Json.JsonProperty("entity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EventSubscriptionEntity? Entity { get; set; } - - /// The ID of the entity - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EventSubscriptionEntity? Id { get; set; } - - - } - - /// The list of actions available for the entity - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionTypeActionModel - { - /// A list of available conditions to apply to the action/entity combination - [Newtonsoft.Json.JsonProperty("conditions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public System.Collections.Generic.ICollection Conditions { get; set; } - - /// The localized name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// The ID of the event action - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventActionId { get; set; } - - - } - - /// A list of available conditions to apply to the action/entity combination - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum EventSubscriptionConditionType - { - [System.Runtime.Serialization.EnumMember(Value = @"All")] - All = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"InFolder")] - InFolder = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"ShowSubfolder")] - ShowSubfolder = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"ThisFolder")] - ThisFolder = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Secret")] - Secret = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"User")] - User = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"Group")] - Group = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"Role")] - Role = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"Permission")] - Permission = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"PasswordChanger")] - PasswordChanger = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"PasswordRequirement")] - PasswordRequirement = 10, - - [System.Runtime.Serialization.EnumMember(Value = @"CharacterSet")] - CharacterSet = 11, - - } - - /// The list of condition type options available for the entity - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionConditionTypeOptionModel - { - /// OptionId - [Newtonsoft.Json.JsonProperty("optionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? OptionId { get; set; } - - /// OptionName - [Newtonsoft.Json.JsonProperty("optionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OptionName { get; set; } - - - } - - /// The type of item that can be monitored. Secret, folder, engine, etc.. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum EventSubscriptionEntity - { - [System.Runtime.Serialization.EnumMember(Value = @"User")] - User = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Folder")] - Folder = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Role")] - Role = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"RolePermission")] - RolePermission = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Configuration")] - Configuration = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"Group")] - Group = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"IpAddressRange")] - IpAddressRange = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"Secret")] - Secret = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"UnlimitedAdmin")] - UnlimitedAdmin = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"ExportSecrets")] - ExportSecrets = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"ImportSecrets")] - ImportSecrets = 10, - - [System.Runtime.Serialization.EnumMember(Value = @"UserAudit")] - UserAudit = 11, - - [System.Runtime.Serialization.EnumMember(Value = @"SecretTemplate")] - SecretTemplate = 12, - - [System.Runtime.Serialization.EnumMember(Value = @"Licenses")] - Licenses = 13, - - [System.Runtime.Serialization.EnumMember(Value = @"ScriptPowerShell")] - ScriptPowerShell = 14, - - [System.Runtime.Serialization.EnumMember(Value = @"SecretPolicy")] - SecretPolicy = 15, - - [System.Runtime.Serialization.EnumMember(Value = @"ScriptSsh")] - ScriptSsh = 16, - - [System.Runtime.Serialization.EnumMember(Value = @"ScriptSql")] - ScriptSql = 17, - - [System.Runtime.Serialization.EnumMember(Value = @"Encryption")] - Encryption = 18, - - [System.Runtime.Serialization.EnumMember(Value = @"Site")] - Site = 19, - - [System.Runtime.Serialization.EnumMember(Value = @"Engine")] - Engine = 20, - - [System.Runtime.Serialization.EnumMember(Value = @"SiteConnector")] - SiteConnector = 21, - - [System.Runtime.Serialization.EnumMember(Value = @"SecurityAnalyticsConfiguration")] - SecurityAnalyticsConfiguration = 22, - - [System.Runtime.Serialization.EnumMember(Value = @"DualControl")] - DualControl = 23, - - [System.Runtime.Serialization.EnumMember(Value = @"Tls")] - Tls = 24, - - [System.Runtime.Serialization.EnumMember(Value = @"PasswordChanger")] - PasswordChanger = 25, - - [System.Runtime.Serialization.EnumMember(Value = @"CharacterSet")] - CharacterSet = 26, - - [System.Runtime.Serialization.EnumMember(Value = @"PasswordRequirement")] - PasswordRequirement = 27, - - [System.Runtime.Serialization.EnumMember(Value = @"Domain")] - Domain = 28, - - [System.Runtime.Serialization.EnumMember(Value = @"BackupConfiguration")] - BackupConfiguration = 29, - - [System.Runtime.Serialization.EnumMember(Value = @"SecretServerSettings")] - SecretServerSettings = 30, - - [System.Runtime.Serialization.EnumMember(Value = @"AutoExport")] - AutoExport = 31, - - [System.Runtime.Serialization.EnumMember(Value = @"Other")] - Other = 32, - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfEventSubscriptionSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionSummary - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// EventSubscriptionId - [Newtonsoft.Json.JsonProperty("eventSubscriptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventSubscriptionId { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// EventSubscriptionCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EventSubscriptionCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionCreateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// EntityActions - [Newtonsoft.Json.JsonProperty("entityActions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection EntityActions { get; set; } - - /// SendEmail - [Newtonsoft.Json.JsonProperty("sendEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendEmail { get; set; } - - /// SendSlack - [Newtonsoft.Json.JsonProperty("sendSlack", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendSlack { get; set; } - - /// SubscriptionName - [Newtonsoft.Json.JsonProperty("subscriptionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SubscriptionName { get; set; } - - - } - - /// EntityActions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionEntityActionModel - { - /// Only set on the return type to indicate the type of condition. Not needed on an update - [Newtonsoft.Json.JsonProperty("conditionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EventSubscriptionConditionType? ConditionType { get; set; } - - /// ContainerId - [Newtonsoft.Json.JsonProperty("containerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ContainerId { get; set; } - - /// Indicates the name of the container, only set on a get. Not needed on an update - [Newtonsoft.Json.JsonProperty("containerName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ContainerName { get; set; } - - /// EventActionDisplayName - [Newtonsoft.Json.JsonProperty("eventActionDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventActionDisplayName { get; set; } - - /// EventActionId - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventActionId { get; set; } - - /// EventEntityType - [Newtonsoft.Json.JsonProperty("eventEntityType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EventSubscriptionEntity? EventEntityType { get; set; } - - /// EventEntityTypeDisplayName - [Newtonsoft.Json.JsonProperty("eventEntityTypeDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventEntityTypeDisplayName { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IncludeSubcontainers - [Newtonsoft.Json.JsonProperty("includeSubcontainers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IncludeSubcontainers { get; set; } - - /// ItemId - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// ItemName - [Newtonsoft.Json.JsonProperty("itemName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemName { get; set; } - - - } - - /// An event subscription - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionModel - { - /// Is subscription active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// A list of the entity actions that file the subscription - [Newtonsoft.Json.JsonProperty("entityActions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection EntityActions { get; set; } - - /// The event severity - [Newtonsoft.Json.JsonProperty("eventSeverity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventSeverity { get; set; } - - /// The ID of the event subscription - [Newtonsoft.Json.JsonProperty("eventSubscriptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventSubscriptionId { get; set; } - - /// Nuber of days for the message to stay in the inbox - [Newtonsoft.Json.JsonProperty("inboxExpiration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxExpiration { get; set; } - - /// A list of the groups subscribed to the event - [Newtonsoft.Json.JsonProperty("subscribers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Subscribers { get; set; } - - /// The name of the event subscription - [Newtonsoft.Json.JsonProperty("subscriptionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SubscriptionName { get; set; } - - - } - - /// A list of the groups subscribed to the event - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionSubscriberModel - { - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// IsGroup - [Newtonsoft.Json.JsonProperty("isGroup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsGroup { get; set; } - - - } - - /// EventSubscriptionUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EventSubscriptionUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EventSubscriptionUpdateModel - { - /// Set the subscription to active or not - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// A list of the entity actions that file the subscription - [Newtonsoft.Json.JsonProperty("entityActions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfEventSubscriptionEntityActionModelOf EntityActions { get; set; } - - /// The number of days the message stays in the inbox - [Newtonsoft.Json.JsonProperty("inboxExpiration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 InboxExpiration { get; set; } - - /// A list of the groups subscribed to the event - [Newtonsoft.Json.JsonProperty("subscribers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32Of Subscribers { get; set; } - - /// Update the name of the subscription - [Newtonsoft.Json.JsonProperty("subscriptionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SubscriptionName { get; set; } - - - } - - /// A list of the entity actions that file the subscription - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfEventSubscriptionEntityActionModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// A list of the groups subscribed to the event - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfInt32Of - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Regex Values Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RegexValuesSummary - { - /// List of Regex values on the Secret, mapped to the Extended Field - [Newtonsoft.Json.JsonProperty("regexList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection RegexList { get; set; } - - - } - - /// Folder permission - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderPermissionModel - { - /// Role ID granted on the folder - [Newtonsoft.Json.JsonProperty("folderAccessRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderAccessRoleId { get; set; } - - /// Role name granted on the folder - [Newtonsoft.Json.JsonProperty("folderAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderAccessRoleName { get; set; } - - /// Folder ID - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Group ID having permissions on the folder - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group name having permissions on the folder - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// Folder permission ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// KnownAs - [Newtonsoft.Json.JsonProperty("knownAs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string KnownAs { get; set; } - - /// Role ID granted on secrets in the folder - [Newtonsoft.Json.JsonProperty("secretAccessRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretAccessRoleId { get; set; } - - /// Role name granted on secrets in the folder - [Newtonsoft.Json.JsonProperty("secretAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretAccessRoleName { get; set; } - - /// User ID having permissions on the folder - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name having permissions on the folder - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Folder permission update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderPermissionUpdateArgs - { - /// Allow updating of inherited permissions - [Newtonsoft.Json.JsonProperty("breakInheritance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? BreakInheritance { get; set; } = true; - - /// Role to grant on the folder (View, Edit, Add Secret, Owner) - [Newtonsoft.Json.JsonProperty("folderAccessRoleName", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string FolderAccessRoleName { get; set; } - - /// Folder ID - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Always)] - public int FolderId { get; set; } - - /// Folder permission ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] - public int Id { get; set; } - - /// Role to grant on secrets in the folder (View, Edit, List, Owner) - [Newtonsoft.Json.JsonProperty("secretAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretAccessRoleName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfFolderPermissionSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Folder permission summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderPermissionSummary - { - /// Role ID granted on the folder - [Newtonsoft.Json.JsonProperty("folderAccessRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderAccessRoleId { get; set; } - - /// Role name granted on the folder - [Newtonsoft.Json.JsonProperty("folderAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderAccessRoleName { get; set; } - - /// Folder ID - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Group ID having permissions on the folder - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group name having permissions on the folder - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// Folder permission ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// KnownAs - [Newtonsoft.Json.JsonProperty("knownAs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string KnownAs { get; set; } - - /// Role ID granted on secrets in the folder - [Newtonsoft.Json.JsonProperty("secretAccessRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretAccessRoleId { get; set; } - - /// Role name granted on secrets in the folder - [Newtonsoft.Json.JsonProperty("secretAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretAccessRoleName { get; set; } - - /// User ID having permissions on the folder - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name having permissions on the folder - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// FolderPermissionCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderPermissionCreateArgs - { - /// Allow updating of inherited permissions - [Newtonsoft.Json.JsonProperty("breakInheritance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? BreakInheritance { get; set; } = true; - - /// Role to grant on the folder (View, Edit, Add Secret, Owner) - [Newtonsoft.Json.JsonProperty("folderAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderAccessRoleName { get; set; } - - /// Folder on which to grant permissions - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Group to receive permissions - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Role to grant on secrets in the folder (View, Edit, List, Owner) - [Newtonsoft.Json.JsonProperty("secretAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretAccessRoleName { get; set; } - - /// User to receive permissions - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Describes the properties of a secret folder - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderModel - { - /// List of folders within this folder - [Newtonsoft.Json.JsonProperty("childFolders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ChildFolders { get; set; } - - /// The name of the folder. - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderName { get; set; } - - /// The path of all folders and subfolders beginning at the root anterminating at this folder. - [Newtonsoft.Json.JsonProperty("folderPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderPath { get; set; } - - /// The icon to display for the folder. Depricated in latest UI. Use 1 when setting this value. - [Newtonsoft.Json.JsonProperty("folderTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderTypeId { get; set; } - - /// Folder ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether the folder should inherit permissions from its parent (default: true) - [Newtonsoft.Json.JsonProperty("inheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritPermissions { get; set; } - - /// Whether the folder should inherit the secret policy. Defaults to true unless creating a root folder. - [Newtonsoft.Json.JsonProperty("inheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritSecretPolicy { get; set; } - - /// The ID of this folder's parent folder. - [Newtonsoft.Json.JsonProperty("parentFolderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ParentFolderId { get; set; } - - /// The id of the Secret Policy that sets security and other settings on secrets contained within the folder. - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// List of templates that may be used to create secrets in this folder - [Newtonsoft.Json.JsonProperty("secretTemplates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretTemplates { get; set; } - - - } - - /// Describes the properties of a secret folder - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IFolderModel - { - /// List of folders within this folder - [Newtonsoft.Json.JsonProperty("childFolders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ChildFolders { get; set; } - - /// Folder name - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderName { get; set; } - - /// Path of this folder - [Newtonsoft.Json.JsonProperty("folderPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderPath { get; set; } - - /// Folder type ID - [Newtonsoft.Json.JsonProperty("folderTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderTypeId { get; set; } - - /// Folder ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether the folder inherits permissions from its parent - [Newtonsoft.Json.JsonProperty("inheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritPermissions { get; set; } - - /// Whether the folder inherits the secret policy - [Newtonsoft.Json.JsonProperty("inheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritSecretPolicy { get; set; } - - /// Parent folder ID - [Newtonsoft.Json.JsonProperty("parentFolderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ParentFolderId { get; set; } - - /// Secret policy ID - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// Secret templates associated with this folder - [Newtonsoft.Json.JsonProperty("secretTemplates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretTemplates { get; set; } - - - } - - /// Secret templates associated with this folder - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ISecretTemplateSummary - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// PasswordTypeId - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - /// SecretCount - [Newtonsoft.Json.JsonProperty("secretCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretCount { get; set; } - - - } - - /// Available options for updating a secret folder - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderUpdateArgs - { - /// The name of the folder - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string FolderName { get; set; } - - /// The icon to display for the folder. Depricated in latest UI. Use 1 when setting this value. - [Newtonsoft.Json.JsonProperty("folderTypeId", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, 3)] - public int FolderTypeId { get; set; } - - /// Folder ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int Id { get; set; } - - /// Whether the folder should inherit permissions from its parent (default: true) - [Newtonsoft.Json.JsonProperty("inheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritPermissions { get; set; } - - /// Whether the folder should inherit the secret policy. Defaults to true unless creating a root folder. - [Newtonsoft.Json.JsonProperty("inheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritSecretPolicy { get; set; } - - /// The ID of this folder's parent folder. - [Newtonsoft.Json.JsonProperty("parentFolderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(-1, int.MaxValue)] - public int? ParentFolderId { get; set; } - - /// The id of the Secret Policy that sets security and other settings on secrets contained within the folder. - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfFolderSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Representation of a secret folder object - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderSummary - { - /// The name of the folder - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderName { get; set; } - - /// The path of all folders and subfolders beginning at the root anterminating at this folder. - [Newtonsoft.Json.JsonProperty("folderPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderPath { get; set; } - - /// The icon to display for the folder. Depricated in latest UI. Use 1 when setting this value. - [Newtonsoft.Json.JsonProperty("folderTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderTypeId { get; set; } - - /// Folder ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether the folder should inherit permissions from its parent (default: true) - [Newtonsoft.Json.JsonProperty("inheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritPermissions { get; set; } - - /// Whether the folder should inherit the secret policy. Defaults to true unless creating a root folder. - [Newtonsoft.Json.JsonProperty("inheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritSecretPolicy { get; set; } - - /// The ID of this folder's parent folder. - [Newtonsoft.Json.JsonProperty("parentFolderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ParentFolderId { get; set; } - - /// The id of the Secret Policy that sets security and other settings on secrets contained within the folder. - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - - } - - /// Available options for creating a secret folder - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderCreateArgs - { - /// The name of the folder. - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string FolderName { get; set; } - - /// The icon to display for the folder. Depricated in latest UI. Use 1 when setting this value. - [Newtonsoft.Json.JsonProperty("folderTypeId", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, 3)] - public int FolderTypeId { get; set; } - - /// Whether the folder should inherit permissions from its parent (default: true) - [Newtonsoft.Json.JsonProperty("inheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritPermissions { get; set; } - - /// Whether the folder should inherit the secret policy. Defaults to true unless creating a root folder. - [Newtonsoft.Json.JsonProperty("inheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritSecretPolicy { get; set; } - - /// The id of this folder's parent folder. - [Newtonsoft.Json.JsonProperty("parentFolderId", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(-1, int.MaxValue)] - public int ParentFolderId { get; set; } - - /// The id of the Secret Policy that sets security and other settings on secrets contained within the folder. - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfFolderLookup - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Simple folder representation - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderLookup - { - /// Folder ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Folder name - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfFolderAuditSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Folder Audit Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderAuditSummary - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Audit Folder Id - [Newtonsoft.Json.JsonProperty("auditFolderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AuditFolderId { get; set; } - - /// Date Recorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Display Name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - - } - - /// FolderDetailViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderDetailViewModel - { - /// Actions - [Newtonsoft.Json.JsonProperty("actions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public System.Collections.Generic.ICollection Actions { get; set; } - - /// AllowedTemplates - [Newtonsoft.Json.JsonProperty("allowedTemplates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AllowedTemplates { get; set; } - - /// FolderWarning - [Newtonsoft.Json.JsonProperty("folderWarning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderWarning { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Actions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum FolderDetailActionType - { - [System.Runtime.Serialization.EnumMember(Value = @"CreateSubfolder")] - CreateSubfolder = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"EditFolder")] - EditFolder = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"AddSecret")] - AddSecret = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"DeleteFolder")] - DeleteFolder = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"MoveFolder")] - MoveFolder = 4, - - } - - /// Template View Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TemplateViewModel - { - /// Template Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Template Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// FolderPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public FolderPatchModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderPatchModel - { - /// AllowedTemplates - [Newtonsoft.Json.JsonProperty("allowedTemplates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AllowedTemplates { get; set; } - - /// AllowRemoveOwner - [Newtonsoft.Json.JsonProperty("allowRemoveOwner", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowRemoveOwner { get; set; } - - /// EnableInheritPermissions - [Newtonsoft.Json.JsonProperty("enableInheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableInheritPermissions { get; set; } - - /// EnableInheritSecretPolicy - [Newtonsoft.Json.JsonProperty("enableInheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableInheritSecretPolicy { get; set; } - - /// FolderName - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString FolderName { get; set; } - - /// Permissons - [Newtonsoft.Json.JsonProperty("permissons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Permissons { get; set; } - - /// SecretPolicy - [Newtonsoft.Json.JsonProperty("secretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SecretPolicy { get; set; } - - - } - - /// FolderBasicModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderBasicModel - { - /// Allowed Templates - [Newtonsoft.Json.JsonProperty("allowedTemplates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AllowedTemplates { get; set; } - - /// Should the folder inherit permissions from the parent folder - [Newtonsoft.Json.JsonProperty("enableInheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritPermissions { get; set; } - - /// Should the folder inherit the secret policy from the parent folder - [Newtonsoft.Json.JsonProperty("enableInheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritSecretPolicy { get; set; } - - /// The dispay name for the folder - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderName { get; set; } - - /// If the user can edit the folder - [Newtonsoft.Json.JsonProperty("hasEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasEdit { get; set; } - - /// If the user owns the folder - [Newtonsoft.Json.JsonProperty("hasOwner", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasOwner { get; set; } - - /// Whether or not this is a personal folder - [Newtonsoft.Json.JsonProperty("isPersonalFolder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPersonalFolder { get; set; } - - /// The ID of the parent folder - [Newtonsoft.Json.JsonProperty("parentFolderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ParentFolderId { get; set; } - - /// Policy name on the parent folder - [Newtonsoft.Json.JsonProperty("parentFolderPolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ParentFolderPolicyName { get; set; } - - /// SecretPolicies - [Newtonsoft.Json.JsonProperty("secretPolicies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretPolicies { get; set; } - - /// The secret policy ID that is assigned to the folder - [Newtonsoft.Json.JsonProperty("secretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicy { get; set; } - - /// Secret Templates - [Newtonsoft.Json.JsonProperty("secretTemplates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretTemplates { get; set; } - - - } - - /// SecretPolicies - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyModel - { - /// Whether or not the Secret Policy is Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The Description of the Secret Policy - [Newtonsoft.Json.JsonProperty("secretPolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretPolicyDescription { get; set; } - - /// The Id of the Secret Policy - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// The Name of the Secret Policy - [Newtonsoft.Json.JsonProperty("secretPolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretPolicyName { get; set; } - - - } - - /// Available options for associating a template to a folder - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderTemplateArgs - { - /// Folder ID to associate. Must match ID in path - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int FolderId { get; set; } - - /// Template ID to associate - [Newtonsoft.Json.JsonProperty("templateId", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int TemplateId { get; set; } - - - } - - /// Describes the properties of a folder/template association - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FolderTemplateModel - { - /// Whether the template is associated with the folder - [Newtonsoft.Json.JsonProperty("associated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Associated { get; set; } - - /// Folder ID - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Template ID - [Newtonsoft.Json.JsonProperty("templateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TemplateId { get; set; } - - - } - - /// Group - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupModel - { - /// Active Directory unique identifier - [Newtonsoft.Json.JsonProperty("adGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AdGuid { get; set; } - - /// Whether you can edit the members of this group. For example, Directory Services group members cannot be edited. Populated on a single group get. - [Newtonsoft.Json.JsonProperty("canEditMembers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEditMembers { get; set; } - - /// Group created date - [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Created { get; set; } - - /// Active Directory Domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Active Directory domain name - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// Whether the group is active - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// If true, the group is owned by specific other users/groups. If false, if it is owned by Group Administrators. - [Newtonsoft.Json.JsonProperty("hasGroupOwners", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasGroupOwners { get; set; } - - /// Group ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether you have permission to edit this group - [Newtonsoft.Json.JsonProperty("isEditable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsEditable { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Hash of GroupIds and GroupNames that own this group. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DictionaryOfInt32AndString OwnerGroups { get; set; } - - /// The owners for the group, both users and groups - [Newtonsoft.Json.JsonProperty("owners", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Owners { get; set; } - - /// Hash of UserIds and UserNames that own this group. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerUsers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DictionaryOfInt32AndString OwnerUsers { get; set; } - - /// Whether the group is synchronized with Active Directory - [Newtonsoft.Json.JsonProperty("synchronized", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Synchronized { get; set; } - - /// Active Directory Sync will only pull in members for domain groups that have this set to true. - [Newtonsoft.Json.JsonProperty("synchronizeNow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SynchronizeNow { get; set; } - - /// Whether the group is an Active Directory system group - [Newtonsoft.Json.JsonProperty("systemGroup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SystemGroup { get; set; } - - - } - - /// Hash of GroupIds and GroupNames that own this group. Only used if HasGroupOwners is true. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DictionaryOfInt32AndString - { - - } - - /// The owners for the group - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupOwner - { - /// The group ID, or personal group ID in the case of a user - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// The display name for the user or group - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// The user ID, or null in the case of a group - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Group update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupUpdateArgs - { - /// The Object GUID of the Active Directory Group (Hexadecimal) - [Newtonsoft.Json.JsonProperty("adGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AdGuid { get; set; } - - /// Active Directory Domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Whether the group is active - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// If true, the group is owned by specific other users/groups. If false, if it is owned by Group Administrators. - [Newtonsoft.Json.JsonProperty("hasGroupOwners", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasGroupOwners { get; set; } - - /// Group ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int Id { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// List of owner GroupIds. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerGroupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OwnerGroupIds { get; set; } - - /// List of owner Group Names. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerGroupNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OwnerGroupNames { get; set; } - - /// List of owner UserIds. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerUserIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OwnerUserIds { get; set; } - - /// List of owner Usernames. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerUserNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OwnerUserNames { get; set; } - - /// Whether the group is synchronized with Active Directory - [Newtonsoft.Json.JsonProperty("synchronized", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Synchronized { get; set; } - - /// Active Directory Sync will only pull in members for domain groups that have this set to true. - [Newtonsoft.Json.JsonProperty("synchronizeNow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SynchronizeNow { get; set; } - - - } - - /// Represents a single user's membership in a group - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupUserModel - { - /// Group Active Directory domain ID - [Newtonsoft.Json.JsonProperty("groupDomainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupDomainId { get; set; } - - /// Group ID - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// User Active Directory domain ID - [Newtonsoft.Json.JsonProperty("userDomainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserDomainId { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfRoleSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Role Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RoleSummary - { - /// Role Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Role ID - [Newtonsoft.Json.JsonProperty("roleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RoleId { get; set; } - - - } - - /// Roles to be assigned - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RoleAssignments - { - /// Role IDs - [Newtonsoft.Json.JsonProperty("roleIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection RoleIds { get; set; } - - - } - - /// The status of the Role change action. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RoleChangeStatusModel - { - /// The success or failure of the user or group role action. - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Roles to be removed - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RoleRemovals - { - /// Role IDs - [Newtonsoft.Json.JsonProperty("roleIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection RoleIds { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfGroupSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Group summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupSummary - { - /// Created Date - [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Created { get; set; } - - /// If this a synchronized group and the user requesting access has access this will be populated with the unique guid for the directory with a group search. - [Newtonsoft.Json.JsonProperty("domainGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainGuid { get; set; } - - /// Active Directory domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Active Directory domain name - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// Whether the group is active - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Group ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Number of members in group - [Newtonsoft.Json.JsonProperty("memberCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MemberCount { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Whether the group is synchronized with Active Directory - [Newtonsoft.Json.JsonProperty("synchronized", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Synchronized { get; set; } - - /// Active Directory Sync will only pull in members for domain groups that have this set to true. - [Newtonsoft.Json.JsonProperty("synchronizeNow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SynchronizeNow { get; set; } - - - } - - /// Group create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupCreateArgs - { - /// The Object GUID of the Active Directory Group (Hexadecimal) - [Newtonsoft.Json.JsonProperty("adGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AdGuid { get; set; } - - /// Active Directory Domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Whether the group is active - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Always)] - public bool Enabled { get; set; } - - /// If true, the group is owned by specific other users/groups. If false, if it is owned by Group Administrators. - [Newtonsoft.Json.JsonProperty("hasGroupOwners", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasGroupOwners { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// List of owner GroupIds. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerGroupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OwnerGroupIds { get; set; } - - /// List of owner Group Names. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerGroupNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OwnerGroupNames { get; set; } - - /// List of owner UserIds. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerUserIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OwnerUserIds { get; set; } - - /// List of owner Usernames. Only used if HasGroupOwners is true. - [Newtonsoft.Json.JsonProperty("ownerUserNames", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OwnerUserNames { get; set; } - - /// Whether the group is synchronized with Active Directory - [Newtonsoft.Json.JsonProperty("synchronized", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Synchronized { get; set; } - - /// Active Directory Sync will only pull in members for domain groups that have this set to true. - [Newtonsoft.Json.JsonProperty("synchronizeNow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SynchronizeNow { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfGroupLookup - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Simple group representation - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupLookup - { - /// Group ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfGroupUserSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupUserSummary - { - /// User display name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// User Enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Group Active Directory domain ID - [Newtonsoft.Json.JsonProperty("groupDomainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupDomainId { get; set; } - - /// Group Domain Name - [Newtonsoft.Json.JsonProperty("groupDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupDomainName { get; set; } - - /// Group ID - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// User Active Directory domain ID - [Newtonsoft.Json.JsonProperty("userDomainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserDomainId { get; set; } - - /// User Active Directory domain name - [Newtonsoft.Json.JsonProperty("userDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDomainName { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Group memberhsip create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupUserCreateArgs - { - /// User ID to add - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Patch group membership - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupMembershipPatchModel - { - /// Only the group IDs to add as members - [Newtonsoft.Json.JsonProperty("addedUserIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AddedUserIds { get; set; } - - /// Only the group IDs to removed as members - [Newtonsoft.Json.JsonProperty("removeUserIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection RemoveUserIds { get; set; } - - - } - - /// GroupMembershipPatchResult - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupMembershipPatchResult - { - /// Success of the patch - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfAdminAuditItem - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Audit entries for administration items - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AdminAuditItem - { - /// The action that occurred - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// The date the audit entry was recorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Extended information for the audit - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Display Name for the user that made the audit - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - /// The user id of the user that made the audit - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// GroupPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public GroupPatchModel Data { get; set; } - - - } - - /// Patch group - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupPatchModel - { - /// Only the group IDs to add as owners, this take precedence over the OwnerGroupIds - [Newtonsoft.Json.JsonProperty("addedOwnerGroupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AddedOwnerGroupIds { get; set; } - - /// Is the group enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enabled { get; set; } - - /// Name of the group - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// The owner IDs - [Newtonsoft.Json.JsonProperty("ownerGroupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32Of OwnerGroupIds { get; set; } - - /// Only the group IDs to removed as owners, this take precedence over the OwnerGroupIds - [Newtonsoft.Json.JsonProperty("removedOwnerGroupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection RemovedOwnerGroupIds { get; set; } - - - } - - /// GroupMemberAssignmentRequest - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupMemberAssignmentRequest - { - /// This list will be the exact members for the group - [Newtonsoft.Json.JsonProperty("userIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection UserIds { get; set; } - - - } - - /// GroupMembershipAssignmentResponse - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupMembershipAssignmentResponse - { - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// HealthCheckModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class HealthCheckModel - { - /// DatabaseHealthy - [Newtonsoft.Json.JsonProperty("databaseHealthy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DatabaseHealthy { get; set; } - - /// DatabaseMismatch - [Newtonsoft.Json.JsonProperty("databaseMismatch", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DatabaseMismatch { get; set; } - - /// Healthy - [Newtonsoft.Json.JsonProperty("healthy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Healthy { get; set; } - - /// Now - [Newtonsoft.Json.JsonProperty("now", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Now { get; set; } - - /// ProvisionDeletionDateTime - [Newtonsoft.Json.JsonProperty("provisionDeletionDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ProvisionDeletionDateTime { get; set; } - - /// ReadOnlyMode - [Newtonsoft.Json.JsonProperty("readOnlyMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnlyMode { get; set; } - - /// ScheduledForDeletion - [Newtonsoft.Json.JsonProperty("scheduledForDeletion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ScheduledForDeletion { get; set; } - - /// ServiceBusHealthy - [Newtonsoft.Json.JsonProperty("serviceBusHealthy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ServiceBusHealthy { get; set; } - - /// StorageAccountHealthy - [Newtonsoft.Json.JsonProperty("storageAccountHealthy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? StorageAccountHealthy { get; set; } - - /// UtcNow - [Newtonsoft.Json.JsonProperty("utcNow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? UtcNow { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfHsmConfigurationAuditViewModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class HsmConfigurationAuditViewModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString Action { get; set; } - - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString Date { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString DisplayName { get; set; } - - /// HsmConfigurationAuditId - [Newtonsoft.Json.JsonProperty("hsmConfigurationAuditId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfInt32 HsmConfigurationAuditId { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString Notes { get; set; } - - - } - - /// Response message when deleting an inbox resource - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxResourceDeleteResponse - { - /// Did the delete succeed - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// InboxMessageTypeSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxMessageTypeSummary - { - /// Message Type ID - [Newtonsoft.Json.JsonProperty("inboxMessageTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxMessageTypeId { get; set; } - - /// The name of the message type - [Newtonsoft.Json.JsonProperty("inboxMessageTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string InboxMessageTypeName { get; set; } - - /// Populated with the number of notifications the current user has of this message type. Only populated when - [Newtonsoft.Json.JsonProperty("notificationCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NotificationCount { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfInboxResourceSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxResourceSummary - { - /// InboxResourceId - [Newtonsoft.Json.JsonProperty("inboxResourceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxResourceId { get; set; } - - /// InboxResourceSlug - [Newtonsoft.Json.JsonProperty("inboxResourceSlug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string InboxResourceSlug { get; set; } - - /// InboxResourceType - [Newtonsoft.Json.JsonProperty("inboxResourceType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxResourceType? InboxResourceType { get; set; } - - - } - - /// InboxResourceType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum InboxResourceType - { - [System.Runtime.Serialization.EnumMember(Value = @"Jpg")] - Jpg = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Png")] - Png = 1, - - } - - /// InboxResourceUploadArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxResourceUploadArgs - { - /// Uploaded file (used for file attachment fields with "Content-Type: multipart/form-data") - [Newtonsoft.Json.JsonProperty("blob", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] Blob { get; set; } - - /// Binary file data (used for file attachment fields with "Content-Type: application/json") - [Newtonsoft.Json.JsonProperty("fileAttachment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] FileAttachment { get; set; } - - /// File name (used for file attachment fields with "Content-Type: application/json")) - [Newtonsoft.Json.JsonProperty("fileName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FileName { get; set; } - - /// The unique resource slug. Must be lowercase with no spaces or special characters except for hyphens. - [Newtonsoft.Json.JsonProperty("slug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Slug { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfInboxMessageSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Summary of an inbox message - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxMessageSummary - { - /// All data fields for this messages - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Data { get; set; } - - /// A common data field on all notifications - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// Within 24 hours of this date this message and all related history will be removed - [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExpirationDate { get; set; } - - /// The type of message id - [Newtonsoft.Json.JsonProperty("inboxMessageTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxMessageTypeId { get; set; } - - /// The message type name - [Newtonsoft.Json.JsonProperty("inboxMessageTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string InboxMessageTypeName { get; set; } - - /// Has the current user read this message - [Newtonsoft.Json.JsonProperty("isRead", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRead { get; set; } - - /// When was the message created - [Newtonsoft.Json.JsonProperty("messageCreatedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? MessageCreatedDate { get; set; } - - /// Message ID - [Newtonsoft.Json.JsonProperty("messageId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MessageId { get; set; } - - /// Who has recieved this message - [Newtonsoft.Json.JsonProperty("recipients", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Recipients { get; set; } - - - } - - /// All data fields for this messages - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxMessageData - { - /// DisplayValue - [Newtonsoft.Json.JsonProperty("displayValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayValue { get; set; } - - /// InboxDataId - [Newtonsoft.Json.JsonProperty("inboxDataId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxDataId { get; set; } - - /// InboxDataName - [Newtonsoft.Json.JsonProperty("inboxDataName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string InboxDataName { get; set; } - - /// ValueBool - [Newtonsoft.Json.JsonProperty("valueBool", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBool { get; set; } - - /// ValueDateTime - [Newtonsoft.Json.JsonProperty("valueDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ValueDateTime { get; set; } - - /// ValueInt - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// ValueString - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - - } - - /// InboxData[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxData - { - /// CreatedByUserId - [Newtonsoft.Json.JsonProperty("createdByUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CreatedByUserId { get; set; } - - /// CreatedDate - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedDate { get; set; } - - /// InboxDataId - [Newtonsoft.Json.JsonProperty("inboxDataId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxDataId { get; set; } - - /// InboxDataName - [Newtonsoft.Json.JsonProperty("inboxDataName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string InboxDataName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfInboxTemplateModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateModel - { - /// Is System - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// Rules leveraging this Template - [Newtonsoft.Json.JsonProperty("rules", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Rules { get; set; } - - /// Inbox Template Id - [Newtonsoft.Json.JsonProperty("templateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TemplateId { get; set; } - - /// Inbox Template Name - [Newtonsoft.Json.JsonProperty("templateName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TemplateName { get; set; } - - /// Template Type - [Newtonsoft.Json.JsonProperty("templateType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxTemplateType? TemplateType { get; set; } - - - } - - /// Rules leveraging this Template - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleModel - { - /// Inbox Rule Id - [Newtonsoft.Json.JsonProperty("inboxRuleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxRuleId { get; set; } - - /// The name of the rule - [Newtonsoft.Json.JsonProperty("inboxRuleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string InboxRuleName { get; set; } - - - } - - /// Template Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum InboxTemplateType - { - [System.Runtime.Serialization.EnumMember(Value = @"Email")] - Email = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Slack")] - Slack = 1, - - } - - /// InboxTemplateCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InboxTemplateCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateCreateModel - { - /// TemplateName - [Newtonsoft.Json.JsonProperty("templateName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TemplateName { get; set; } - - /// TemplateType - [Newtonsoft.Json.JsonProperty("templateType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxTemplateType? TemplateType { get; set; } - - - } - - /// InboxTemplateDetailModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateDetailModel - { - /// IsSystem - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// Locale - [Newtonsoft.Json.JsonProperty("locale", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Locale { get; set; } - - /// TemplateId - [Newtonsoft.Json.JsonProperty("templateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TemplateId { get; set; } - - /// TemplateName - [Newtonsoft.Json.JsonProperty("templateName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TemplateName { get; set; } - - /// TemplateType - [Newtonsoft.Json.JsonProperty("templateType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxTemplateType? TemplateType { get; set; } - - - } - - /// InboxTemplateUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InboxTemplateUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateUpdateModel - { - /// TemplateName - [Newtonsoft.Json.JsonProperty("templateName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TemplateName { get; set; } - - /// TemplateType - [Newtonsoft.Json.JsonProperty("templateType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInboxTemplateType TemplateType { get; set; } - - - } - - /// TemplateType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfInboxTemplateType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxTemplateType? Value { get; set; } - - - } - - /// InboxTemplateLocaleModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateLocaleModel - { - /// LocaleCultureId - [Newtonsoft.Json.JsonProperty("localeCultureId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LocaleCultureId { get; set; } - - /// Subject - [Newtonsoft.Json.JsonProperty("subject", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Subject { get; set; } - - /// TemplateBody - [Newtonsoft.Json.JsonProperty("templateBody", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TemplateBody { get; set; } - - /// TemplateId - [Newtonsoft.Json.JsonProperty("templateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TemplateId { get; set; } - - /// TemplateLocaleId - [Newtonsoft.Json.JsonProperty("templateLocaleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TemplateLocaleId { get; set; } - - - } - - /// InboxTemplateLocaleUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateLocaleUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InboxTemplateLocaleUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateLocaleUpdateModel - { - /// Subject - [Newtonsoft.Json.JsonProperty("subject", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Subject { get; set; } - - /// TemplateBody - [Newtonsoft.Json.JsonProperty("templateBody", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TemplateBody { get; set; } - - - } - - /// InboxMessageSetMessageReadStatusArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxMessageSetMessageReadStatusArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InboxMessageSetMessageReadStatusModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxMessageSetMessageReadStatusModel - { - /// MessageIds - [Newtonsoft.Json.JsonProperty("messageIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection MessageIds { get; set; } - - /// Read - [Newtonsoft.Json.JsonProperty("read", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Read { get; set; } - - - } - - /// InboxTestMessageArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTestMessageArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InboxTestMessageModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTestMessageModel - { - /// The group ID to send the message. If omitted the message is sent to the current user. - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// The actual message - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Message { get; set; } - - /// The subject of the message - [Newtonsoft.Json.JsonProperty("subject", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Subject { get; set; } - - - } - - /// InboxTestMessageResult - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTestMessageResult - { - /// EmailConfigured - [Newtonsoft.Json.JsonProperty("emailConfigured", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EmailConfigured { get; set; } - - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// InboxTemplateCopyArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateCopyArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InboxTemplateCopyModel Data { get; set; } - - - } - - /// Inbox Template Copy Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateCopyModel - { - /// InboxTemplateId To Copy - [Newtonsoft.Json.JsonProperty("inboxTemplateIdToCopy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxTemplateIdToCopy { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// InboxTemplateLocaleCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateLocaleCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InboxTemplateLocaleCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxTemplateLocaleCreateModel - { - /// InboxTemplateId - [Newtonsoft.Json.JsonProperty("inboxTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxTemplateId { get; set; } - - /// LocaleCultureId - [Newtonsoft.Json.JsonProperty("localeCultureId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LocaleCultureId { get; set; } - - /// Subject - [Newtonsoft.Json.JsonProperty("subject", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Subject { get; set; } - - /// TemplateBody - [Newtonsoft.Json.JsonProperty("templateBody", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TemplateBody { get; set; } - - - } - - /// InboxRuleSubscriptionUpdateResponse - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleSubscriptionUpdateResponse - { - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfInboxRuleSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleSummary - { - /// Whether or not this rule is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Only populated when IncludeCurrentUserSubscriptionStatus is passed as true on a rule search - [Newtonsoft.Json.JsonProperty("currentUserSubscribed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CurrentUserSubscribed { get; set; } - - /// Whether or not this rule is for a Digest that runs on a schedule. - [Newtonsoft.Json.JsonProperty("digest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Digest { get; set; } - - /// Inbox Rule ID - [Newtonsoft.Json.JsonProperty("inboxRuleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxRuleId { get; set; } - - /// The name of the rule - [Newtonsoft.Json.JsonProperty("inboxRuleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string InboxRuleName { get; set; } - - /// Whether or not this rule is a system rule - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// Notification Types where this rule is used - [Newtonsoft.Json.JsonProperty("notificationTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection NotificationTypes { get; set; } - - /// Number of times this rule has been used in the last 7 days - [Newtonsoft.Json.JsonProperty("usageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UsageCount { get; set; } - - - } - - /// InboxRuleDetailModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleDetailModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Can Edit Own Subscription - [Newtonsoft.Json.JsonProperty("canEditOwnSubscription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEditOwnSubscription { get; set; } - - /// Conditions - [Newtonsoft.Json.JsonProperty("conditions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Conditions { get; set; } - - /// Created By User Id - [Newtonsoft.Json.JsonProperty("createdByUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CreatedByUserId { get; set; } - - /// High Priority - [Newtonsoft.Json.JsonProperty("highPriority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HighPriority { get; set; } - - /// Inbox Email Template - [Newtonsoft.Json.JsonProperty("inboxEmailTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxEmailTemplateId { get; set; } - - /// Inbox Message Types - [Newtonsoft.Json.JsonProperty("inboxMessageTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection InboxMessageTypes { get; set; } - - /// Inbox Rule Id - [Newtonsoft.Json.JsonProperty("inboxRuleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxRuleId { get; set; } - - /// Inbox Slack Template - [Newtonsoft.Json.JsonProperty("inboxSlackTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxSlackTemplateId { get; set; } - - /// Is Immediate - [Newtonsoft.Json.JsonProperty("isImmediate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsImmediate { get; set; } - - /// Is System - [Newtonsoft.Json.JsonProperty("isSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystem { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// The schedule that indicates when this rule should trigger - [Newtonsoft.Json.JsonProperty("recurringScheduleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RecurringScheduleId { get; set; } - - /// Send Email - [Newtonsoft.Json.JsonProperty("sendEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendEmail { get; set; } - - /// Send Slack - [Newtonsoft.Json.JsonProperty("sendSlack", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendSlack { get; set; } - - - } - - /// Conditions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleConditionSummary - { - /// DisplayValue - [Newtonsoft.Json.JsonProperty("displayValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayValue { get; set; } - - /// InboxDataId - [Newtonsoft.Json.JsonProperty("inboxDataId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxDataId { get; set; } - - /// InboxDataName - [Newtonsoft.Json.JsonProperty("inboxDataName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string InboxDataName { get; set; } - - /// InboxDataType - [Newtonsoft.Json.JsonProperty("inboxDataType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxDataType? InboxDataType { get; set; } - - /// InboxRuleConditionId - [Newtonsoft.Json.JsonProperty("inboxRuleConditionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxRuleConditionId { get; set; } - - /// InboxRuleOperand - [Newtonsoft.Json.JsonProperty("inboxRuleOperand", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxRuleConditionOperand? InboxRuleOperand { get; set; } - - /// ValueBool - [Newtonsoft.Json.JsonProperty("valueBool", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBool { get; set; } - - /// ValueDateTime - [Newtonsoft.Json.JsonProperty("valueDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ValueDateTime { get; set; } - - /// ValueInt - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// ValueString - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - - } - - /// InboxDataType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum InboxDataType - { - [System.Runtime.Serialization.EnumMember(Value = @"Integer")] - Integer = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"DateTime")] - DateTime = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"String")] - String = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Boolean")] - Boolean = 3, - - } - - /// InboxRuleOperand - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum InboxRuleConditionOperand - { - [System.Runtime.Serialization.EnumMember(Value = @"Equals")] - Equals = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"NotEquals")] - NotEquals = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"LessThan")] - LessThan = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"GreaterThan")] - GreaterThan = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Regex")] - Regex = 4, - - } - - /// Inbox Rule Condition - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleConditionDetailModel - { - /// Display Value - [Newtonsoft.Json.JsonProperty("displayValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayValue { get; set; } - - /// Inbox Data - [Newtonsoft.Json.JsonProperty("inboxDataId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxDataId { get; set; } - - /// Inbox Data Type - [Newtonsoft.Json.JsonProperty("inboxDataType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxDataType? InboxDataType { get; set; } - - /// Inbox Rule Condition Id - [Newtonsoft.Json.JsonProperty("inboxRuleConditionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxRuleConditionId { get; set; } - - /// Inbox Rule - [Newtonsoft.Json.JsonProperty("inboxRuleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxRuleId { get; set; } - - /// Operand - [Newtonsoft.Json.JsonProperty("inboxRuleOperand", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxRuleConditionOperand? InboxRuleOperand { get; set; } - - /// Boolean Value - [Newtonsoft.Json.JsonProperty("valueBool", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBool { get; set; } - - /// DateTime Value - [Newtonsoft.Json.JsonProperty("valueDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ValueDateTime { get; set; } - - /// Integer Value - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// String Value - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfInboxRuleSubscriberSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// A user, group, or external email that is subscribed or unsubscribed to an inbox rule - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleSubscriberSummary - { - /// A display name for this subscriber - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Active Directory domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Active Directory Domain Name - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// EmailAddress - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EmailAddress { get; set; } - - /// The subscribers group id. Either an actual group or a personal group ID for a single user. - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// InboxRuleAdditionalEmailId - [Newtonsoft.Json.JsonProperty("inboxRuleAdditionalEmailId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxRuleAdditionalEmailId { get; set; } - - /// The identifier for this subscriber. Email only subscribers will not have this ID. - [Newtonsoft.Json.JsonProperty("inboxRuleSubscribersId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? InboxRuleSubscribersId { get; set; } - - /// Is this a group or a single user - [Newtonsoft.Json.JsonProperty("isGroup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsGroup { get; set; } - - /// True if the user, group, or external email is subscribed. False if the user is unsubscribed. Groups and external emails cannot be unsubscribed as they are just removed. - [Newtonsoft.Json.JsonProperty("subscribed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Subscribed { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfInboxRuleLogSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Log item for inbox rule action results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleLogSummary - { - /// The type of action that was performed for this log entry - [Newtonsoft.Json.JsonProperty("actionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ActionType? ActionType { get; set; } - - /// The display name for the user or external email address - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// The result of the action - [Newtonsoft.Json.JsonProperty("inboxRuleActionStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public InboxRuleActionStatusType? InboxRuleActionStatus { get; set; } - - /// When the action triggered - [Newtonsoft.Json.JsonProperty("statusDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StatusDate { get; set; } - - /// Any extra description for this status - [Newtonsoft.Json.JsonProperty("statusDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StatusDescription { get; set; } - - /// The specific user id that this action was for - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// The type of action that was performed for this log entry - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ActionType - { - [System.Runtime.Serialization.EnumMember(Value = @"SendEmail")] - SendEmail = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"SendSlack")] - SendSlack = 1, - - } - - /// The result of the action - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum InboxRuleActionStatusType - { - [System.Runtime.Serialization.EnumMember(Value = @"Success")] - Success = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Failed")] - Failed = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"FailedAfterThreeAttempts")] - FailedAfterThreeAttempts = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"InvalidEmail")] - InvalidEmail = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"UnableToResolveHost")] - UnableToResolveHost = 4, - - } - - /// InboxRuleSubscribersPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleSubscribersPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InboxRuleSubscriberPatchModel Data { get; set; } - - - } - - /// Inbox rule subscription changes - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleSubscriberPatchModel - { - /// External email addresses to add or remove from this rule - [Newtonsoft.Json.JsonProperty("emailUpdates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection EmailUpdates { get; set; } - - /// Groups and Users changes to the subscription - [Newtonsoft.Json.JsonProperty("groupUserUpdates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection GroupUserUpdates { get; set; } - - - } - - /// Change the subscription for a specific email - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleSubscriberEmailUpdate - { - /// A specific email address to add / remove. - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EmailAddress { get; set; } - - /// Passing true will subscribe this email address, passing false will remove this email address along with any rule action history - [Newtonsoft.Json.JsonProperty("subscribe", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Subscribe { get; set; } - - - } - - /// The user/group to add or remove to the subscription. Either UserId or GroupId should be set. If both are set then GroupId will take precedence and UserId will be ignored. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleSubscriberGroupUserUpdate - { - /// The group ID representing a group or an individual user - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// When true a group or user will be subscribed to this rule. When false a group will be removed from the list. If the this is a user then it will be removed if it is directly subscribed or it will be explicitly unsubscribed if not currently subscribed. - [Newtonsoft.Json.JsonProperty("subscribe", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Subscribe { get; set; } - - /// The user ID representing a an individual user - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// InboxRuleSubscriberUpdateResponse - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class InboxRuleSubscriberUpdateResponse - { - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// IpAddressRestrictionModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IpAddressRestrictionModel - { - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Range - [Newtonsoft.Json.JsonProperty("range", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Range { get; set; } - - - } - - /// IpAddressRestrictionUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IpAddressRestrictionUpdateArgs - { - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Range - [Newtonsoft.Json.JsonProperty("range", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Range { get; set; } - - - } - - /// GroupIpAddressRestrictionModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupIpAddressRestrictionModel - { - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// GroupName - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IpAddressRestrictionId - [Newtonsoft.Json.JsonProperty("ipAddressRestrictionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? IpAddressRestrictionId { get; set; } - - /// IpAddressRestrictionName - [Newtonsoft.Json.JsonProperty("ipAddressRestrictionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddressRestrictionName { get; set; } - - - } - - /// UserIpAddressRestrictionModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserIpAddressRestrictionModel - { - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IpAddressRestrictionId - [Newtonsoft.Json.JsonProperty("ipAddressRestrictionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? IpAddressRestrictionId { get; set; } - - /// IpAddressRestrictionName - [Newtonsoft.Json.JsonProperty("ipAddressRestrictionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddressRestrictionName { get; set; } - - /// UserDisplayName - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// UserName - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfIpAddressRestrictionSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IpAddressRestrictionSummary - { - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Range - [Newtonsoft.Json.JsonProperty("range", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Range { get; set; } - - - } - - /// IpAddressRestrictionCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IpAddressRestrictionCreateArgs - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// Range - [Newtonsoft.Json.JsonProperty("range", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Range { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfGroupIpAddressRestrictionModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// GroupIpAddressRestrictionCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupIpAddressRestrictionCreateArgs - { - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Always)] - public int GroupId { get; set; } - - /// IpAddressRestrictionId - [Newtonsoft.Json.JsonProperty("ipAddressRestrictionId", Required = Newtonsoft.Json.Required.Always)] - public int IpAddressRestrictionId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfUserIpAddressRestrictionModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// UserIpAddressRestrictionCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserIpAddressRestrictionCreateArgs - { - /// IpAddressRestrictionId - [Newtonsoft.Json.JsonProperty("ipAddressRestrictionId", Required = Newtonsoft.Json.Required.Always)] - public int IpAddressRestrictionId { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Always)] - public int UserId { get; set; } - - - } - - /// KeyManagementConfigModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class KeyManagementConfigModel - { - /// AwsKmsAccessKeyId - [Newtonsoft.Json.JsonProperty("awsKmsAccessKeyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AwsKmsAccessKeyId { get; set; } - - /// AwsKmsKeyArn - [Newtonsoft.Json.JsonProperty("awsKmsKeyArn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AwsKmsKeyArn { get; set; } - - /// AwsKmsKeyId - [Newtonsoft.Json.JsonProperty("awsKmsKeyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AwsKmsKeyId { get; set; } - - /// AwsKmsSecretAccessKey - [Newtonsoft.Json.JsonProperty("awsKmsSecretAccessKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AwsKmsSecretAccessKey { get; set; } - - /// KeyManagementConfigId - [Newtonsoft.Json.JsonProperty("keyManagementConfigId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? KeyManagementConfigId { get; set; } - - /// KeyManagementTypeId - [Newtonsoft.Json.JsonProperty("keyManagementTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? KeyManagementTypeId { get; set; } - - /// KeyManagementTypeName - [Newtonsoft.Json.JsonProperty("keyManagementTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string KeyManagementTypeName { get; set; } - - - } - - /// KeyManagementConfigUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class KeyManagementConfigUpdateArgs - { - /// AwsKmsAccessKeyId - [Newtonsoft.Json.JsonProperty("awsKmsAccessKeyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AwsKmsAccessKeyId { get; set; } - - /// AwsKmsKeyArn - [Newtonsoft.Json.JsonProperty("awsKmsKeyArn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AwsKmsKeyArn { get; set; } - - /// AwsKmsKeyId - [Newtonsoft.Json.JsonProperty("awsKmsKeyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AwsKmsKeyId { get; set; } - - /// AwsKmsSecretAccessKey - [Newtonsoft.Json.JsonProperty("awsKmsSecretAccessKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AwsKmsSecretAccessKey { get; set; } - - /// AzureKeyVaultBaseUrl - [Newtonsoft.Json.JsonProperty("azureKeyVaultBaseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AzureKeyVaultBaseUrl { get; set; } - - /// AzureKeyVaultKeyName - [Newtonsoft.Json.JsonProperty("azureKeyVaultKeyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AzureKeyVaultKeyName { get; set; } - - /// AzureKeyVaultKeyVersion - [Newtonsoft.Json.JsonProperty("azureKeyVaultKeyVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AzureKeyVaultKeyVersion { get; set; } - - /// AzureKeyVaultPrincipalId - [Newtonsoft.Json.JsonProperty("azureKeyVaultPrincipalId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AzureKeyVaultPrincipalId { get; set; } - - /// AzureKeyVaultPrincipalSecret - [Newtonsoft.Json.JsonProperty("azureKeyVaultPrincipalSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AzureKeyVaultPrincipalSecret { get; set; } - - /// KeyManagementTypeId - [Newtonsoft.Json.JsonProperty("keyManagementTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? KeyManagementTypeId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfLauncherAgentCollectionSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Launcher Agent Collection summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherAgentCollectionSummary - { - /// Whether the Collection is enabled - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Total number of active Launcher Agents in this Collection - [Newtonsoft.Json.JsonProperty("activeAgentCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ActiveAgentCount { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Collection Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Launcher Agent Collection create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherAgentCollectionCreateArgs - { - /// Collection Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// Record Keystrokes - [Newtonsoft.Json.JsonProperty("recordKeystrokes", Required = Newtonsoft.Json.Required.Always)] - public bool RecordKeystrokes { get; set; } - - /// Record Standalone Sessions - [Newtonsoft.Json.JsonProperty("recordStandaloneSessions", Required = Newtonsoft.Json.Required.Always)] - public bool RecordStandaloneSessions { get; set; } - - - } - - /// Launcher Agent Collection - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherAgentCollectionModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// ActiveAgentCount - [Newtonsoft.Json.JsonProperty("activeAgentCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ActiveAgentCount { get; set; } - - /// Created - [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Created { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// RecordKeystrokes - [Newtonsoft.Json.JsonProperty("recordKeystrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordKeystrokes { get; set; } - - /// RecordStandaloneSessions - [Newtonsoft.Json.JsonProperty("recordStandaloneSessions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordStandaloneSessions { get; set; } - - - } - - /// Launcher Agent Collection update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherAgentCollectionUpdateArgs - { - /// Whether the Launcher Agent Collection is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Launcher Agent ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int? Id { get; set; } - - /// Collection Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Whether or not agents in this collection will record standalone sessions by default - [Newtonsoft.Json.JsonProperty("recordKeystrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordKeystrokes { get; set; } - - /// Whether or not agents in this collection will record standalone sessions by default - [Newtonsoft.Json.JsonProperty("recordStandaloneSessions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordStandaloneSessions { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfLauncherAgentSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherAgentSummary - { - /// Whether or not the agent is running - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The identifier of the collection to which this agent belongs - [Newtonsoft.Json.JsonProperty("collectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CollectionId { get; set; } - - /// The name of the collection to which this agent belongs - [Newtonsoft.Json.JsonProperty("collectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CollectionName { get; set; } - - /// Whether or not this agent will record keystrokes as the default setting for the Collection - [Newtonsoft.Json.JsonProperty("collectionRecordKeystrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CollectionRecordKeystrokes { get; set; } - - /// Whether or not headless session recording is enabled as the default setting for the Collection - [Newtonsoft.Json.JsonProperty("collectionRecordStandaloneSessions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CollectionRecordStandaloneSessions { get; set; } - - /// The date the agent was installed - [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Created { get; set; } - - /// Name of the computer which the agent is running on - [Newtonsoft.Json.JsonProperty("hostName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HostName { get; set; } - - /// Unique ID for this agent - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Any issues with this agent regarding its version and configuration - [Newtonsoft.Json.JsonProperty("issue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Issue { get; set; } - - /// The date the agent was last active - [Newtonsoft.Json.JsonProperty("lastActivity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastActivity { get; set; } - - /// Whether or not this agent will record keystrokes, or using the Collection Default - [Newtonsoft.Json.JsonProperty("recordKeystrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordKeystrokes { get; set; } - - /// Whether or not headless session recording is enabled, or using the Collection Default - [Newtonsoft.Json.JsonProperty("recordStandaloneSessions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordStandaloneSessions { get; set; } - - /// The version number currently installed - [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Version { get; set; } - - - } - - /// LauncherAgentModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherAgentModel - { - /// Whether or not the agent is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The ID of the collection the agent belongs to - [Newtonsoft.Json.JsonProperty("collectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CollectionId { get; set; } - - /// The name of the collection the agent belongs to - [Newtonsoft.Json.JsonProperty("collectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CollectionName { get; set; } - - /// When the agent was created - [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Created { get; set; } - - /// The hostname of the machine the agent is installed on - [Newtonsoft.Json.JsonProperty("hostName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HostName { get; set; } - - /// The ID of the agent - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The date the agent was last active - [Newtonsoft.Json.JsonProperty("lastActivity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastActivity { get; set; } - - /// Whether or not this agent will record keystrokes - [Newtonsoft.Json.JsonProperty("recordKeystrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordKeystrokes { get; set; } - - /// Whether or not headless session recording is enabled - [Newtonsoft.Json.JsonProperty("recordStandaloneSessions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordStandaloneSessions { get; set; } - - /// The version number currently installed - [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Version { get; set; } - - - } - - /// Launcher Agent update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherAgentUpdateArgs - { - /// Whether the Launcher Agent is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Launcher Agent ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int? Id { get; set; } - - /// Whether or not this agent is allowed to record keystroke data - [Newtonsoft.Json.JsonProperty("recordKeystrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordKeystrokes { get; set; } - - /// Whether or not this agent is allowed to record headless sessions - [Newtonsoft.Json.JsonProperty("recordStandaloneSessions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RecordStandaloneSessions { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfLauncherSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Launcher summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherSummary - { - /// Whether the launcher is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Associated application - [Newtonsoft.Json.JsonProperty("application", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Application { get; set; } - - /// Launcher ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether this is a custom launcher - [Newtonsoft.Json.JsonProperty("isCustom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCustom { get; set; } - - /// Launcher name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfLauncherLookup - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Simple launcher representation - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherLookup - { - /// Launcher ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Launcher name - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Launcher - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherModel - { - /// Whether the launcher is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Associated application - [Newtonsoft.Json.JsonProperty("application", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Application { get; set; } - - /// Associated custom launcher ID - [Newtonsoft.Json.JsonProperty("customLauncherId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomLauncherId { get; set; } - - /// Associated custom launcher process name - [Newtonsoft.Json.JsonProperty("customLauncherProcessName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomLauncherProcessName { get; set; } - - /// Associated custom launcher parameters - [Newtonsoft.Json.JsonProperty("customParameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomParameters { get; set; } - - /// Launcher ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether this is a custom launcher - [Newtonsoft.Json.JsonProperty("isCustom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCustom { get; set; } - - /// Launcher name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfLauncherDetailsV2 - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Launcher And Fields - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LauncherDetailsV2 - { - /// Associated application - [Newtonsoft.Json.JsonProperty("application", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Application { get; set; } - - /// If the restricted host is on the allowed list - [Newtonsoft.Json.JsonProperty("approvedList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ApprovedList { get; set; } - - /// Associated custom launcher ID - [Newtonsoft.Json.JsonProperty("customLauncherId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomLauncherId { get; set; } - - /// Associated custom launcher process name - [Newtonsoft.Json.JsonProperty("customLauncherProcessName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomLauncherProcessName { get; set; } - - /// Associated custom launcher parameters - [Newtonsoft.Json.JsonProperty("customParameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomParameters { get; set; } - - /// Whether this is a custom launcher - [Newtonsoft.Json.JsonProperty("isCustom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCustom { get; set; } - - /// Launcher ID - [Newtonsoft.Json.JsonProperty("launcherId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherId { get; set; } - - /// Launcher name - [Newtonsoft.Json.JsonProperty("launcherName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LauncherName { get; set; } - - /// Fields required by the launcher - [Newtonsoft.Json.JsonProperty("promptedField", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ILauncherTypeField PromptedField { get; set; } - - /// Whether there is a host restriction - [Newtonsoft.Json.JsonProperty("restrictedHost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RestrictedHost { get; set; } - - /// The restricted hosts. - [Newtonsoft.Json.JsonProperty("restrictedHosts", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection RestrictedHosts { get; set; } - - - } - - /// Fields required by the launcher - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ILauncherTypeField - { - /// AllowDefault - [Newtonsoft.Json.JsonProperty("allowDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowDefault { get; set; } - - /// DefaultType - [Newtonsoft.Json.JsonProperty("defaultType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DefaultType { get; set; } - - /// DefaultTypeIntMax - [Newtonsoft.Json.JsonProperty("defaultTypeIntMax", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultTypeIntMax { get; set; } - - /// DefaultTypeIntMin - [Newtonsoft.Json.JsonProperty("defaultTypeIntMin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultTypeIntMin { get; set; } - - /// LauncherTypeFieldId - [Newtonsoft.Json.JsonProperty("launcherTypeFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherTypeFieldId { get; set; } - - /// LauncherTypeId - [Newtonsoft.Json.JsonProperty("launcherTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherTypeId { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// PromptableField - [Newtonsoft.Json.JsonProperty("promptableField", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PromptableField { get; set; } - - - } - - /// The restricted hosts. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ICategorizedListItemValue - { - /// Category - [Newtonsoft.Json.JsonProperty("category", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Category { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// LaunchSecretArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LaunchSecretArgs - { - /// The Id of the launcher to use. - [Newtonsoft.Json.JsonProperty("launcherId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherId { get; set; } - - /// The value to apply to the prompted field. - [Newtonsoft.Json.JsonProperty("promptFieldValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PromptFieldValue { get; set; } - - /// The Id of the secret to launch. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The site used to launch when using RDP proxy - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - - } - - /// Launcher - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LaunchedSecretModel - { - /// The version of the Launcher API used. - [Newtonsoft.Json.JsonProperty("apiVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ApiVersion { get; set; } - - /// The url to the launcher - [Newtonsoft.Json.JsonProperty("baseUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BaseUrl { get; set; } - - /// The url to Secret Server - [Newtonsoft.Json.JsonProperty("encodedUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EncodedUrl { get; set; } - - /// The launcher request guid - [Newtonsoft.Json.JsonProperty("guid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? Guid { get; set; } - - /// The name of the launcher used. - [Newtonsoft.Json.JsonProperty("launcherType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LauncherType { get; set; } - - /// The Id of the launcher used. - [Newtonsoft.Json.JsonProperty("launcherTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherTypeId { get; set; } - - /// The Id for a running session. - [Newtonsoft.Json.JsonProperty("sessionGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SessionGuid { get; set; } - - /// The query string for the launcher. - [Newtonsoft.Json.JsonProperty("ssUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SsUrl { get; set; } - - - } - - /// Valid License Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ValidLicenseModel - { - /// Is Licensed - [Newtonsoft.Json.JsonProperty("isLicensed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsLicensed { get; set; } - - /// Is Trial - [Newtonsoft.Json.JsonProperty("isTrial", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsTrial { get; set; } - - /// License End Date - [Newtonsoft.Json.JsonProperty("licenseEndDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LicenseEndDate { get; set; } - - - } - - /// Response message when deleting a metadata value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataDeleteResponse - { - /// Did the delete succeed - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfMetadataSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataSummaryModel - { - /// When the field value was created - [Newtonsoft.Json.JsonProperty("createDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreateDateTime { get; set; } - - /// The user id of who entered the field value - [Newtonsoft.Json.JsonProperty("createUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CreateUserId { get; set; } - - /// Who entered the field value - [Newtonsoft.Json.JsonProperty("createUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CreateUserName { get; set; } - - /// The ID of the item to which this metadata is associated - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// The type of value stored on this field (string, number, user, date, etc) - [Newtonsoft.Json.JsonProperty("metadataFieldDataType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MetadataFieldDataType? MetadataFieldDataType { get; set; } - - /// The metadata field id - [Newtonsoft.Json.JsonProperty("metadataFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldId { get; set; } - - /// The metadata field name - [Newtonsoft.Json.JsonProperty("metadataFieldName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldName { get; set; } - - /// The Metadata section ID - [Newtonsoft.Json.JsonProperty("metadataFieldSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldSectionId { get; set; } - - /// The metadata section name - [Newtonsoft.Json.JsonProperty("metadataFieldSectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldSectionName { get; set; } - - /// Not currently populated, see MetadataFieldDataType - [Newtonsoft.Json.JsonProperty("metadataFieldTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldTypeName { get; set; } - - /// The sequence id for this specific metadata field - [Newtonsoft.Json.JsonProperty("metadataItemDataId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataItemDataId { get; set; } - - /// The type of object. User, Secret, Folder, Group - [Newtonsoft.Json.JsonProperty("metadataType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MetadataType? MetadataType { get; set; } - - /// Not currently populated, see MetadataType - [Newtonsoft.Json.JsonProperty("metadataTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataTypeName { get; set; } - - /// The order in which to sort the metadata fields. This is currently not utilized. - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// When this metadata field is a boolean this will be the value - [Newtonsoft.Json.JsonProperty("valueBit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBit { get; set; } - - /// When this metadata field is a datetime this will be the value - [Newtonsoft.Json.JsonProperty("valueDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ValueDateTime { get; set; } - - /// When this metadata field is a user this will be the user id - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// When this metadata field is a number this will be the value - [Newtonsoft.Json.JsonProperty("valueNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? ValueNumber { get; set; } - - /// When this metadata field is a string this will be the value - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - /// When this metadata field is a user this will be the user display name - [Newtonsoft.Json.JsonProperty("valueUserDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueUserDisplayName { get; set; } - - - } - - /// Field types for metadata values - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum MetadataFieldDataType - { - [System.Runtime.Serialization.EnumMember(Value = @"String")] - String = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Boolean")] - Boolean = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Number")] - Number = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"DateTime")] - DateTime = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"User")] - User = 4, - - } - - /// The types of entities that metadata can be associated to - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum MetadataType - { - [System.Runtime.Serialization.EnumMember(Value = @"User")] - User = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Secret")] - Secret = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Folder")] - Folder = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Group")] - Group = 3, - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfMetadataHistorySummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataHistorySummaryModel - { - /// When the field value was created - [Newtonsoft.Json.JsonProperty("createDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreateDateTime { get; set; } - - /// The user id of who entered the field value - [Newtonsoft.Json.JsonProperty("createUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CreateUserId { get; set; } - - /// Who entered the field value - [Newtonsoft.Json.JsonProperty("createUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CreateUserName { get; set; } - - /// The ID of the item to which this metadata is associated - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// The type of value stored on this field (string, number, user, date, etc) - [Newtonsoft.Json.JsonProperty("metadataFieldDataType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MetadataFieldDataType? MetadataFieldDataType { get; set; } - - /// The metadata field id - [Newtonsoft.Json.JsonProperty("metadataFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldId { get; set; } - - /// The metadata field name - [Newtonsoft.Json.JsonProperty("metadataFieldName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldName { get; set; } - - /// The Metadata section ID - [Newtonsoft.Json.JsonProperty("metadataFieldSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldSectionId { get; set; } - - /// The metadata section name - [Newtonsoft.Json.JsonProperty("metadataFieldSectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldSectionName { get; set; } - - /// Not currently populated, see MetadataFieldDataType - [Newtonsoft.Json.JsonProperty("metadataFieldTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldTypeName { get; set; } - - /// The sequence for this history ID - [Newtonsoft.Json.JsonProperty("metadataItemDataHistoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataItemDataHistoryId { get; set; } - - /// The parent sequence ID for all associated history records - [Newtonsoft.Json.JsonProperty("metadataItemDataId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataItemDataId { get; set; } - - /// The type of object. User, Secret, Folder, Group - [Newtonsoft.Json.JsonProperty("metadataType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MetadataType? MetadataType { get; set; } - - /// Not currently populated, see MetadataType - [Newtonsoft.Json.JsonProperty("metadataTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataTypeName { get; set; } - - /// The order in which to sort the metadata fields. This is currently not utilized. - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// When this metadata field is a boolean this will be the value - [Newtonsoft.Json.JsonProperty("valueBit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBit { get; set; } - - /// When this metadata field is a datetime this will be the value - [Newtonsoft.Json.JsonProperty("valueDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ValueDateTime { get; set; } - - /// When this metadata field is a user this will be the user id - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// When this metadata field is a number this will be the value - [Newtonsoft.Json.JsonProperty("valueNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? ValueNumber { get; set; } - - /// When this metadata field is a string this will be the value - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - /// When this metadata field is a user this will be the user display name - [Newtonsoft.Json.JsonProperty("valueUserDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueUserDisplayName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfMetadataFieldSectionSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Summary of metadata sections - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataFieldSectionSummaryModel - { - /// What actions can the current user perform - [Newtonsoft.Json.JsonProperty("actions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public System.Collections.Generic.ICollection Actions { get; set; } - - /// The description of this section - [Newtonsoft.Json.JsonProperty("metadataFieldSectionDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldSectionDescription { get; set; } - - /// The sequence ID for this section - [Newtonsoft.Json.JsonProperty("metadataFieldSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldSectionId { get; set; } - - /// The name of this section - [Newtonsoft.Json.JsonProperty("metadataFieldSectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldSectionName { get; set; } - - /// Is the user required to have the Administer Metadata role permission in order to edit fields in this metadata section - [Newtonsoft.Json.JsonProperty("requiresAdministerMetadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresAdministerMetadata { get; set; } - - /// Is the user required to be able to edit the entity to which the metadata is associated to in order to edit metadata - [Newtonsoft.Json.JsonProperty("requiresEntityEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresEntityEdit { get; set; } - - - } - - /// Specific actions a user can take on metadata sections - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum MetadataFieldSectionActionType - { - [System.Runtime.Serialization.EnumMember(Value = @"EditSection")] - EditSection = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"AddField")] - AddField = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"EditItem")] - EditItem = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"DeleteItem")] - DeleteItem = 3, - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfMetadataFieldSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Metadata field summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataFieldSummaryModel - { - /// Not currently utilized but the sort order for the metadata - [Newtonsoft.Json.JsonProperty("defaultSortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultSortOrder { get; set; } - - /// The data type for this field (string, number, date, etc) - [Newtonsoft.Json.JsonProperty("fieldDataType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EntityMetadataFieldDataType? FieldDataType { get; set; } - - /// The sequence ID for this metadata field - [Newtonsoft.Json.JsonProperty("metadataFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldId { get; set; } - - /// The name of this metadata field - [Newtonsoft.Json.JsonProperty("metadataFieldName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldName { get; set; } - - /// The field section id that contains this field - [Newtonsoft.Json.JsonProperty("metadataFieldSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldSectionId { get; set; } - - /// The name of the field section - [Newtonsoft.Json.JsonProperty("metadataFieldSectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldSectionName { get; set; } - - - } - - /// The data type for this field (string, number, date, etc) - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum EntityMetadataFieldDataType - { - [System.Runtime.Serialization.EnumMember(Value = @"String")] - String = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Boolean")] - Boolean = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Number")] - Number = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"DateTime")] - DateTime = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"User")] - User = 4, - - } - - /// Create metadata args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataCreateArgs - { - /// Metadata item to create - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public MetadataCreateModel Data { get; set; } - - - } - - /// Model to create a new metadata field value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataCreateModel - { - /// Specify the specific data type desired. Only required when also creating a new field. If field MetadataFieldId is passed or a field already exists with the passed MetadataFieldName this is ignored. Certain data types can also be inferred from which value field is set, but some require this to be explicitly set like User. - [Newtonsoft.Json.JsonProperty("fieldDataType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldDataType { get; set; } - - /// The specific field ID can be passed and in this case MetadataFieldName and MetadataFieldTypeId are ignored - [Newtonsoft.Json.JsonProperty("metadataFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldId { get; set; } - - /// When the field ID is not know this will create a field with this name. If the field name does not already exist a new one will be created. - [Newtonsoft.Json.JsonProperty("metadataFieldName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldName { get; set; } - - /// When the field section ID is not know this will create a field section with this description. If MetadataFieldSectionId is passed or a section with the name MetadataFieldSectionName this field is ignored. - [Newtonsoft.Json.JsonProperty("metadataFieldSectionDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldSectionDescription { get; set; } - - /// The specific field section ID can be passed and in this case MetadataFieldSectionName is ignored - [Newtonsoft.Json.JsonProperty("metadataFieldSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldSectionId { get; set; } - - /// When the field section ID is not know this will create a field section with this name. If the field section name does not already exist a new one will be created. If MetadataFieldSectionId is passed this field is ignored. - [Newtonsoft.Json.JsonProperty("metadataFieldSectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldSectionName { get; set; } - - /// When the field section ID is not know this will create a field section with this setting as to whether the Administer Metadata permission is required for edit. If MetadataFieldSectionId is passed or a section with the name MetadataFieldSectionName, this field is ignored. - [Newtonsoft.Json.JsonProperty("metadataFieldSectionRequiresAdministerMetadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MetadataFieldSectionRequiresAdministerMetadata { get; set; } - - /// When the field section ID is not know this will create a field section with this setting as to whether edit permission is required for edit. Otherwise view will be required. If MetadataFieldSectionId is passed or a section with the name MetadataFieldSectionName, this field is ignored. - [Newtonsoft.Json.JsonProperty("metadataFieldSectionRequiresEntityEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MetadataFieldSectionRequiresEntityEdit { get; set; } - - /// When the field is a boolean it should assign this field on create for the value - [Newtonsoft.Json.JsonProperty("valueBit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBit { get; set; } - - /// When the field is a date it should assign this field on create for the value - [Newtonsoft.Json.JsonProperty("valueDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ValueDateTime { get; set; } - - /// When the field is a user it should assign this field on create for the value - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// When the field is a number it should assign this field on create for the value - [Newtonsoft.Json.JsonProperty("valueNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? ValueNumber { get; set; } - - /// When the field is a string it should assign this field on create for the value - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - - } - - /// A single record of metadata that is associated to one entity - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataModel - { - /// When was this field value entered - [Newtonsoft.Json.JsonProperty("createDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreateDateTime { get; set; } - - /// The user id of the user who entered this field value - [Newtonsoft.Json.JsonProperty("createUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CreateUserId { get; set; } - - /// Who entered this field value - [Newtonsoft.Json.JsonProperty("createUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CreateUserName { get; set; } - - /// The ID of the entity to which this value is associated - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// The metadata field ID for this value - [Newtonsoft.Json.JsonProperty("metadataFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldId { get; set; } - - /// The field name for this metadata value - [Newtonsoft.Json.JsonProperty("metadataFieldName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldName { get; set; } - - /// The section ID in which this metadata value resides - [Newtonsoft.Json.JsonProperty("metadataFieldSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldSectionId { get; set; } - - /// The section name in which this metadata value resides - [Newtonsoft.Json.JsonProperty("metadataFieldSectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldSectionName { get; set; } - - /// The ID for the field type in which this metadata value resides - [Newtonsoft.Json.JsonProperty("metadataFieldTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataFieldTypeId { get; set; } - - /// The field name in which this metadata value resides - [Newtonsoft.Json.JsonProperty("metadataFieldTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataFieldTypeName { get; set; } - - /// The sequence ID for this specific metadata value record - [Newtonsoft.Json.JsonProperty("metadataItemDataId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataItemDataId { get; set; } - - /// The type name in which this metadata value resides - [Newtonsoft.Json.JsonProperty("metadataTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MetadataTypeName { get; set; } - - /// Not currently utilized, but the sort order for the metadata - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// The value when the metadata field is a boolean - [Newtonsoft.Json.JsonProperty("valueBit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBit { get; set; } - - /// The value when the metadata field is a date - [Newtonsoft.Json.JsonProperty("valueDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ValueDateTime { get; set; } - - /// The value when the metadata field is a user - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// The value when the metadata field is a number - [Newtonsoft.Json.JsonProperty("valueNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? ValueNumber { get; set; } - - /// The value when the metadata field is a string - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - /// The user display name when the metadata field is a user type - [Newtonsoft.Json.JsonProperty("valueUserDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueUserDisplayName { get; set; } - - - } - - /// Metadata update args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataUpdateArgs - { - /// Metadata item to update - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public MetadataUpdateModel Data { get; set; } - - - } - - /// Metadata item to update - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataUpdateModel - { - /// The sequence ID for the metadata field - [Newtonsoft.Json.JsonProperty("metadataItemDataId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataItemDataId { get; set; } - - /// The value when the field is a boolean - [Newtonsoft.Json.JsonProperty("valueBit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean ValueBit { get; set; } - - /// The value when the field is a date - [Newtonsoft.Json.JsonProperty("valueDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalDateTime ValueDateTime { get; set; } - - /// The value when the field is a user - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 ValueInt { get; set; } - - /// The value when the field is a number - [Newtonsoft.Json.JsonProperty("valueNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalDouble ValueNumber { get; set; } - - /// The value when the field is a string - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ValueString { get; set; } - - - } - - /// The value when the field is a date - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalDateTime - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Value { get; set; } - - - } - - /// The value when the field is a number - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalDouble - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double? Value { get; set; } - - - } - - /// Metadata field section update args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataFieldSectionUpdateArgs - { - /// Metadata field section item to update - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public MetadataFieldSectionUpdateModel Data { get; set; } - - - } - - /// Model to update a metadata field section - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MetadataFieldSectionUpdateModel - { - /// The description for the metadata section - [Newtonsoft.Json.JsonProperty("metadataFieldSectionDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString MetadataFieldSectionDescription { get; set; } - - /// The metdata section name - [Newtonsoft.Json.JsonProperty("metadataFieldSectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString MetadataFieldSectionName { get; set; } - - /// Indicates if a section requires the user to have the Administer Metadata role permission in order to edit that section - [Newtonsoft.Json.JsonProperty("metadataFieldSectionRequiresAdministerMetadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean MetadataFieldSectionRequiresAdministerMetadata { get; set; } - - /// Indicates if the user is required to have access to edit the entity to which the metadata is associated to - [Newtonsoft.Json.JsonProperty("metadataFieldSectionRequiresEntityEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean MetadataFieldSectionRequiresEntityEdit { get; set; } - - - } - - /// Mobile Configuration Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MobileConfigurationModel - { - /// Maximum Time for Offline Access on Mobile Devices - [Newtonsoft.Json.JsonProperty("maximumTimeOfflineMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MaximumTimeOfflineMinutes { get; set; } - - - } - - /// OneTimePasswordCodeModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class OneTimePasswordCodeModel - { - /// Code - [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Code { get; set; } - - /// DurationSeconds - [Newtonsoft.Json.JsonProperty("durationSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DurationSeconds { get; set; } - - /// RemainingSeconds - [Newtonsoft.Json.JsonProperty("remainingSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RemainingSeconds { get; set; } - - - } - - /// PBA Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PbaConfigurationModel - { - /// Allow Import Data - [Newtonsoft.Json.JsonProperty("allowImportData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowImportData { get; set; } - - /// Challenge Enabled - [Newtonsoft.Json.JsonProperty("challengeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ChallengeEnabled { get; set; } - - /// Challenge Lockout Integrated Enabled - [Newtonsoft.Json.JsonProperty("challengeLockoutIntegratedEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ChallengeLockoutIntegratedEnabled { get; set; } - - /// Challenge Lockout SAML Enabled - [Newtonsoft.Json.JsonProperty("challengeLockoutSamlEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ChallengeLockoutSamlEnabled { get; set; } - - /// Enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Encryption Enabled - [Newtonsoft.Json.JsonProperty("encryptionEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EncryptionEnabled { get; set; } - - /// Event Data Upload Interval - [Newtonsoft.Json.JsonProperty("eventDataUploadInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventDataUploadInterval { get; set; } - - /// Event Data Upload Size Threshold - [Newtonsoft.Json.JsonProperty("eventDataUploadSizeThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventDataUploadSizeThreshold { get; set; } - - /// External PBA URL - [Newtonsoft.Json.JsonProperty("externalPbaUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ExternalPbaUrl { get; set; } - - /// File Upload Enabled - [Newtonsoft.Json.JsonProperty("fileUploadEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? FileUploadEnabled { get; set; } - - /// First Enabled Date - [Newtonsoft.Json.JsonProperty("firstEnabledDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? FirstEnabledDate { get; set; } - - /// Metadata Interval - [Newtonsoft.Json.JsonProperty("metadataInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MetadataInterval { get; set; } - - /// Metadata Last Synchronized - [Newtonsoft.Json.JsonProperty("metadataLastSynchronized", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? MetadataLastSynchronized { get; set; } - - /// PBA Integration Key Set - [Newtonsoft.Json.JsonProperty("pbaIntegrationKeySet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PbaIntegrationKeySet { get; set; } - - /// PBA Key - [Newtonsoft.Json.JsonProperty("pbaKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? PbaKey { get; set; } - - /// PBA Key Created Date - [Newtonsoft.Json.JsonProperty("pbaKeyCreatedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? PbaKeyCreatedDate { get; set; } - - /// PBA Key Status - [Newtonsoft.Json.JsonProperty("pbaKeyStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ApplicationKeyStatus? PbaKeyStatus { get; set; } - - /// Respect Owner Editor Require Approval Enabled - [Newtonsoft.Json.JsonProperty("respectOwnerEditorRequireApprovalEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RespectOwnerEditorRequireApprovalEnabled { get; set; } - - /// Retention Days - [Newtonsoft.Json.JsonProperty("retentionDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RetentionDays { get; set; } - - /// Secret Server Key - [Newtonsoft.Json.JsonProperty("secretServerKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SecretServerKey { get; set; } - - /// Secret Server Key Created Date - [Newtonsoft.Json.JsonProperty("secretServerKeyCreatedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? SecretServerKeyCreatedDate { get; set; } - - /// Secret Server Key Status - [Newtonsoft.Json.JsonProperty("secretServerKeyStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ApplicationKeyStatus? SecretServerKeyStatus { get; set; } - - /// Id of Site - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// Storage Directory Path - [Newtonsoft.Json.JsonProperty("storageDirectoryPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StorageDirectoryPath { get; set; } - - /// Warning Message - [Newtonsoft.Json.JsonProperty("warningMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string WarningMessage { get; set; } - - - } - - /// PBA Key Status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ApplicationKeyStatus - { - [System.Runtime.Serialization.EnumMember(Value = @"Unapproved")] - Unapproved = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Approved")] - Approved = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Disabled")] - Disabled = 2, - - } - - /// PbaConfigurationUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PbaConfigurationUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public PbaConfigurationUpdateModel Data { get; set; } - - - } - - /// Update PBA Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PbaConfigurationUpdateModel - { - /// Challenge Enabled - [Newtonsoft.Json.JsonProperty("challengeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ChallengeEnabled { get; set; } - - /// Challenge Lockout Integrated Enabled - [Newtonsoft.Json.JsonProperty("challengeLockoutIntegratedEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ChallengeLockoutIntegratedEnabled { get; set; } - - /// Challenge Lockout SAML Enabled - [Newtonsoft.Json.JsonProperty("challengeLockoutSamlEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ChallengeLockoutSamlEnabled { get; set; } - - /// Enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enabled { get; set; } - - /// Encryption Enabled - [Newtonsoft.Json.JsonProperty("encryptionEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EncryptionEnabled { get; set; } - - /// Event Data Upload Interval - [Newtonsoft.Json.JsonProperty("eventDataUploadInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EventDataUploadInterval { get; set; } - - /// Event Data Upload Size Threshold - [Newtonsoft.Json.JsonProperty("eventDataUploadSizeThreshold", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 EventDataUploadSizeThreshold { get; set; } - - /// External PBA URL - [Newtonsoft.Json.JsonProperty("externalPbaUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ExternalPbaUrl { get; set; } - - /// File Upload Enabled - [Newtonsoft.Json.JsonProperty("fileUploadEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean FileUploadEnabled { get; set; } - - /// Metadata Interval - [Newtonsoft.Json.JsonProperty("metadataInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 MetadataInterval { get; set; } - - /// PBA Integration Key Set - [Newtonsoft.Json.JsonProperty("pbaIntegrationKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PbaIntegrationKey { get; set; } - - /// Respect Owner Editor Require Approval Enabled - [Newtonsoft.Json.JsonProperty("respectOwnerEditorRequireApprovalEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RespectOwnerEditorRequireApprovalEnabled { get; set; } - - /// Retention Days - [Newtonsoft.Json.JsonProperty("retentionDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 RetentionDays { get; set; } - - /// Id of Site - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SiteId { get; set; } - - /// Storage Directory Path - [Newtonsoft.Json.JsonProperty("storageDirectoryPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString StorageDirectoryPath { get; set; } - - - } - - /// PbaHistoricalImportArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PbaHistoricalImportArgs - { - /// EndDate - [Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset EndDate { get; set; } - - /// ProcessImport - [Newtonsoft.Json.JsonProperty("processImport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProcessImport { get; set; } - - /// StartDate - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset StartDate { get; set; } - - - } - - /// PBA Historical Import - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PbaHistoricalImportViewModel - { - /// Number Of Events Processed - [Newtonsoft.Json.JsonProperty("numberOfEventsProcessed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NumberOfEventsProcessed { get; set; } - - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// PBA Confirm Pair - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PbaConfirmPairModel - { - /// Already Approved - [Newtonsoft.Json.JsonProperty("alreadyApproved", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AlreadyApproved { get; set; } - - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// ProxyClientOverrideSummary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyClientOverrideSummary - { - /// ClientOverrideId - [Newtonsoft.Json.JsonProperty("clientOverrideId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ClientOverrideId { get; set; } - - /// IpAddressRange - [Newtonsoft.Json.JsonProperty("ipAddressRange", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddressRange { get; set; } - - /// TerminalClientType - [Newtonsoft.Json.JsonProperty("terminalClientType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ProxyClientType? TerminalClientType { get; set; } - - - } - - /// TerminalClientType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ProxyClientType - { - [System.Runtime.Serialization.EnumMember(Value = @"Unknown")] - Unknown = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"AllowList")] - AllowList = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"BlockList")] - BlockList = 2, - - } - - /// SshProxyConfigurationViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshProxyConfigurationViewModel - { - /// The number of days to store SSH proxy logs before they are rolled over - [Newtonsoft.Json.JsonProperty("daysToKeepOperationalLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DaysToKeepOperationalLogs { get; set; } - - /// Enable to hide passwords from SSH keystroke capture. This prevents logging user input on lines that are determined to be a password prompt. - [Newtonsoft.Json.JsonProperty("enablePasswordHiding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnablePasswordHiding { get; set; } - - /// Enable block listing of IP Addresses that connect and fail to authenticate too many times - [Newtonsoft.Json.JsonProperty("enableProxyBlockListing", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableProxyBlockListing { get; set; } - - /// Whether or not the proxy should disconnect inactive sessions - [Newtonsoft.Json.JsonProperty("enableProxyInactivityTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableProxyInactivityTimeout { get; set; } - - /// Whether or not the SSH proxy is enabled - [Newtonsoft.Json.JsonProperty("enableSshProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSshProxy { get; set; } - - /// Whether or not the SSH Terminal can allow key authentication - [Newtonsoft.Json.JsonProperty("enableSshPublicKeyAuth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSshPublicKeyAuth { get; set; } - - /// Whether or not the SSH terminal is enabled - [Newtonsoft.Json.JsonProperty("enableSshTerminal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSshTerminal { get; set; } - - /// Whether or not to allow SSH tunneling through the proxy for proxied RDP sessions - [Newtonsoft.Json.JsonProperty("enableSshTunneling", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSshTunneling { get; set; } - - /// Whether or not the SSH terminal should disconnect inactive sessions - [Newtonsoft.Json.JsonProperty("enableTerminalInactivityTimeout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableTerminalInactivityTimeout { get; set; } - - /// IsCloud - [Newtonsoft.Json.JsonProperty("isCloud", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCloud { get; set; } - - /// Regular Expression used to identify password prompts. The default expression search for either prompts beginning with 'sudo password for' or prompts ending with 'password:' - [Newtonsoft.Json.JsonProperty("passwordRegexFilter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PasswordRegexFilter { get; set; } - - /// The number of failed authentication attempts before being blocked - [Newtonsoft.Json.JsonProperty("proxyAutoBlockListingMaxNum", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ProxyAutoBlockListingMaxNum { get; set; } - - /// The time frame in which all the failed attempts must happen before being blocked - [Newtonsoft.Json.JsonProperty("proxyAutoBlockListingTimeFrameMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ProxyAutoBlockListingTimeFrameMinutes { get; set; } - - /// The amount of time in seconds to wait before disconnecting inactive proxy sessions - [Newtonsoft.Json.JsonProperty("proxyInactivityTimeoutSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ProxyInactivityTimeoutSeconds { get; set; } - - /// Whether or not new SSH-enabled secrets should be created with 'Proxy Enabled' set - [Newtonsoft.Json.JsonProperty("proxyNewSecretsByDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProxyNewSecretsByDefault { get; set; } - - /// The host key that will the proxy will serve - [Newtonsoft.Json.JsonProperty("sshHostKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshHostKey { get; set; } - - /// The banner that is display when someone opens an shell connection to the proxy - [Newtonsoft.Json.JsonProperty("sshProxyBanner", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshProxyBanner { get; set; } - - /// The fingerprint of the host key that the proxy will serve - [Newtonsoft.Json.JsonProperty("sshProxyHostFingerprint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshProxyHostFingerprint { get; set; } - - /// The port that that SSH proxy runs on - [Newtonsoft.Json.JsonProperty("sshProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshProxyPort { get; set; } - - /// The banner that is displayed when someone authenticates to the SSH terminal - [Newtonsoft.Json.JsonProperty("sshTerminalBanner", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshTerminalBanner { get; set; } - - /// The amount of time in seconds to wait before disconnecting inactive terminal sessions - [Newtonsoft.Json.JsonProperty("terminalInactivityTimeoutSeconds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TerminalInactivityTimeoutSeconds { get; set; } - - - } - - /// RdpProxyConfigurationViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RdpProxyConfigurationViewModel - { - /// Allows users to select a site when launching or generating proxy credentials for a RDP proxied secret - [Newtonsoft.Json.JsonProperty("allowSiteSelectionForActiveDirectoryAccounts", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowSiteSelectionForActiveDirectoryAccounts { get; set; } - - /// The number of days to store RDP proxy logs before they are rolled over - [Newtonsoft.Json.JsonProperty("daysToKeepOperationalLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DaysToKeepOperationalLogs { get; set; } - - /// Whether or not to enable the RDP proxy - [Newtonsoft.Json.JsonProperty("enableRdpProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableRdpProxy { get; set; } - - /// Whether or not to enforce certificate validation on remote hosts that the proxy connects to - [Newtonsoft.Json.JsonProperty("enableRemoteHostValidation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableRemoteHostValidation { get; set; } - - /// IsCloud - [Newtonsoft.Json.JsonProperty("isCloud", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCloud { get; set; } - - /// Whether or not new RDP-enabled secrets should be created with 'Proxy Enabled' set - [Newtonsoft.Json.JsonProperty("proxyNewSecretsByDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProxyNewSecretsByDefault { get; set; } - - /// The port that the RDP proxy will run on - [Newtonsoft.Json.JsonProperty("rdpProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RdpProxyPort { get; set; } - - /// The certificate that is server when connections begin to the RDP proxy (used "Content-Type: application/json" only) - [Newtonsoft.Json.JsonProperty("rdpServerCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RdpProxyCertificateViewModel RdpServerCertificate { get; set; } - - /// The certificate that is server when connections begin to the RDP proxy (used "Content-Type: multipart/form-data" only) - [Newtonsoft.Json.JsonProperty("rdpServerCertificateMultipart", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] RdpServerCertificateMultipart { get; set; } - - /// The password used to protect the certificate (only used for updating with "Content-Type: multipart/form-data" only) - [Newtonsoft.Json.JsonProperty("rdpServerCertificateMultipartPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RdpServerCertificateMultipartPassword { get; set; } - - - } - - /// The certificate that is server when connections begin to the RDP proxy (used "Content-Type: application/json" only) - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RdpProxyCertificateViewModel - { - /// The certificate (x509/pfx) that is served to users connecting to the RDP proxy. - [Newtonsoft.Json.JsonProperty("rdpServerCertificate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] RdpServerCertificate { get; set; } - - /// The name of the RDP server certificate file - [Newtonsoft.Json.JsonProperty("rdpServerCertificateFileName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RdpServerCertificateFileName { get; set; } - - /// The password used to protect the certificate (only used for updating) - [Newtonsoft.Json.JsonProperty("rdpServerCertificatePassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RdpServerCertificatePassword { get; set; } - - - } - - /// ProxyExplanationsViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyExplanationsViewModel - { - /// RdpProxyExplanation - [Newtonsoft.Json.JsonProperty("rdpProxyExplanation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RdpProxyExplanation { get; set; } - - /// SshProxyExplanation - [Newtonsoft.Json.JsonProperty("sshProxyExplanation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DictionaryOfStringAndString SshProxyExplanation { get; set; } - - /// SshTerminalBlockListExplanation - [Newtonsoft.Json.JsonProperty("sshTerminalBlockListExplanation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshTerminalBlockListExplanation { get; set; } - - /// SshTerminalBlockListOverrideExplanation - [Newtonsoft.Json.JsonProperty("sshTerminalBlockListOverrideExplanation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshTerminalBlockListOverrideExplanation { get; set; } - - /// SshTerminalExplanation - [Newtonsoft.Json.JsonProperty("sshTerminalExplanation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshTerminalExplanation { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfProxyAuditModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyAuditModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// DateRecorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DateRecorded { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - - } - - /// ProxyEndpointsViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyEndpointsViewModel - { - /// DefaultRdpProxyPort - [Newtonsoft.Json.JsonProperty("defaultRdpProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultRdpProxyPort { get; set; } - - /// DefaultSshProxyPort - [Newtonsoft.Json.JsonProperty("defaultSshProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DefaultSshProxyPort { get; set; } - - /// Engines - [Newtonsoft.Json.JsonProperty("engines", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Engines { get; set; } - - /// Nodes - [Newtonsoft.Json.JsonProperty("nodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Nodes { get; set; } - - /// RdpProxyEnabled - [Newtonsoft.Json.JsonProperty("rdpProxyEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RdpProxyEnabled { get; set; } - - /// Sites - [Newtonsoft.Json.JsonProperty("sites", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Sites { get; set; } - - /// SshProxyEnabled - [Newtonsoft.Json.JsonProperty("sshProxyEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SshProxyEnabled { get; set; } - - - } - - /// Engines - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyEngineViewModel - { - /// BindIpAddress - [Newtonsoft.Json.JsonProperty("bindIpAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BindIpAddress { get; set; } - - /// EngineId - [Newtonsoft.Json.JsonProperty("engineId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EngineId { get; set; } - - /// FriendlyName - [Newtonsoft.Json.JsonProperty("friendlyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FriendlyName { get; set; } - - /// PublicHost - [Newtonsoft.Json.JsonProperty("publicHost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PublicHost { get; set; } - - /// SiteName - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - - } - - /// Nodes - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyNodeViewModel - { - /// BindIpAddress - [Newtonsoft.Json.JsonProperty("bindIpAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BindIpAddress { get; set; } - - /// MachineName - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// NodeId - [Newtonsoft.Json.JsonProperty("nodeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NodeId { get; set; } - - /// PublicHost - [Newtonsoft.Json.JsonProperty("publicHost", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PublicHost { get; set; } - - - } - - /// Sites - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxySiteViewModel - { - /// EnableRdpProxy - [Newtonsoft.Json.JsonProperty("enableRdpProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableRdpProxy { get; set; } - - /// EnableSshProxy - [Newtonsoft.Json.JsonProperty("enableSshProxy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSshProxy { get; set; } - - /// RdpProxyPort - [Newtonsoft.Json.JsonProperty("rdpProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RdpProxyPort { get; set; } - - /// RdpProxyPortInherited - [Newtonsoft.Json.JsonProperty("rdpProxyPortInherited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RdpProxyPortInherited { get; set; } - - /// SiteId - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// SiteName - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - /// SshProxyPort - [Newtonsoft.Json.JsonProperty("sshProxyPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshProxyPort { get; set; } - - /// SshProxyPortInherited - [Newtonsoft.Json.JsonProperty("sshProxyPortInherited", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SshProxyPortInherited { get; set; } - - - } - - /// Specify filtering, paging, sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfProxyClientSummaryAndSshProxyClientsFilterQuery - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Additional query options - [Newtonsoft.Json.JsonProperty("filter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshProxyClientsFilterQuery Filter { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Additional query options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshProxyClientsFilterQuery - { - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// TerminalClientType - [Newtonsoft.Json.JsonProperty("terminalClientType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TerminalClientType { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyClientSummary - { - /// ClientId - [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ClientId { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// LastConnectionDate - [Newtonsoft.Json.JsonProperty("lastConnectionDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastConnectionDate { get; set; } - - /// TerminalClientType - [Newtonsoft.Json.JsonProperty("terminalClientType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ProxyClientType? TerminalClientType { get; set; } - - - } - - /// Specify filtering, paging, sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfProxyClientHistorySummaryAndSshProxyClientHistoryFilterQuery - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Additional query options - [Newtonsoft.Json.JsonProperty("filter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshProxyClientHistoryFilterQuery Filter { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Additional query options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshProxyClientHistoryFilterQuery - { - /// AuthenticateResult - [Newtonsoft.Json.JsonProperty("authenticateResult", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AuthenticateResult { get; set; } - - /// EndDate - [Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EndDate { get; set; } - - /// EngineIdentityGuid - [Newtonsoft.Json.JsonProperty("engineIdentityGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EngineIdentityGuid { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// StartDate - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StartDate { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyClientHistorySummary - { - /// AuthenticateResult - [Newtonsoft.Json.JsonProperty("authenticateResult", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public TerminalAuthenticateResult? AuthenticateResult { get; set; } - - /// CreatedDate - [Newtonsoft.Json.JsonProperty("createdDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedDate { get; set; } - - /// EngineIdentityGuid - [Newtonsoft.Json.JsonProperty("engineIdentityGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EngineIdentityGuid { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - - } - - /// AuthenticateResult - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum TerminalAuthenticateResult - { - [System.Runtime.Serialization.EnumMember(Value = @"Unknown")] - Unknown = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Successful")] - Successful = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Failed")] - Failed = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Refused")] - Refused = 3, - - } - - /// ProxyingStateModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProxyingStateModel - { - /// If the logs should be shown - [Newtonsoft.Json.JsonProperty("showLogs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ShowLogs { get; set; } - - - } - - /// GenerateRdpCertificateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GenerateRdpCertificateArgs - { - /// The DNS name to use when generating the self-signed certificate - [Newtonsoft.Json.JsonProperty("dnsName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DnsName { get; set; } - - - } - - /// Displays the properties of a Password Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PasswordTypeModel - { - /// Whether the Password Type is Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Whether the Password Type can be edited - [Newtonsoft.Json.JsonProperty("canEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEdit { get; set; } - - /// Custom Port - [Newtonsoft.Json.JsonProperty("customPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomPort { get; set; } - - /// Exit Command - [Newtonsoft.Json.JsonProperty("exitCommand", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ExitCommand { get; set; } - - /// Password Type Fields - [Newtonsoft.Json.JsonProperty("fields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Fields { get; set; } - - /// Whether Commands Exist - [Newtonsoft.Json.JsonProperty("hasCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasCommands { get; set; } - - /// Whether LDAP Settings Exist - [Newtonsoft.Json.JsonProperty("hasLDAPSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasLDAPSettings { get; set; } - - /// Heartbeat Script Args - [Newtonsoft.Json.JsonProperty("heartbeatScriptArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HeartbeatScriptArgs { get; set; } - - /// Heartbeat Script Id - [Newtonsoft.Json.JsonProperty("heartbeatScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HeartbeatScriptId { get; set; } - - /// Whether Password Type ignores SSL warnings - [Newtonsoft.Json.JsonProperty("ignoreSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IgnoreSSL { get; set; } - - /// Whether Is Web - [Newtonsoft.Json.JsonProperty("isWeb", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsWeb { get; set; } - - /// LDAP Connection Settings Id - [Newtonsoft.Json.JsonProperty("ldapConnectionSettingsId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LdapConnectionSettingsId { get; set; } - - /// Line ending type - [Newtonsoft.Json.JsonProperty("lineEnding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public LineEnding? LineEnding { get; set; } - - /// Mainframe Connection String - [Newtonsoft.Json.JsonProperty("mainframeConnectionString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MainframeConnectionString { get; set; } - - /// Password Type Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ODBC Connection String - [Newtonsoft.Json.JsonProperty("odbcConnectionString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OdbcConnectionString { get; set; } - - /// Password Type Id - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - /// RPC Script Args - [Newtonsoft.Json.JsonProperty("rpcScriptArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RpcScriptArgs { get; set; } - - /// RPC Script Id - [Newtonsoft.Json.JsonProperty("rpcScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RpcScriptId { get; set; } - - /// Runner Type - [Newtonsoft.Json.JsonProperty("runnerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public RunnerType? RunnerType { get; set; } - - /// Scan Template Id - [Newtonsoft.Json.JsonProperty("scanItemTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScanItemTemplateId { get; set; } - - /// Federator Type - [Newtonsoft.Json.JsonProperty("typeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TypeName { get; set; } - - /// Whether Password Type uses SSL - [Newtonsoft.Json.JsonProperty("useSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSSL { get; set; } - - /// Whether Password Type uses both Username and Password - [Newtonsoft.Json.JsonProperty("useUsernameAndPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseUsernameAndPassword { get; set; } - - /// Whether is Valid For Takeover - [Newtonsoft.Json.JsonProperty("validForTakeover", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValidForTakeover { get; set; } - - /// Custom Ports for Windows - [Newtonsoft.Json.JsonProperty("windowsCustomPorts", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string WindowsCustomPorts { get; set; } - - - } - - /// Password Type Fields - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IRestPasswordTypeField - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// PasswordTypeFieldId - [Newtonsoft.Json.JsonProperty("passwordTypeFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeFieldId { get; set; } - - /// ScanItemFieldId - [Newtonsoft.Json.JsonProperty("scanItemFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScanItemFieldId { get; set; } - - - } - - /// Line ending type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum LineEnding - { - [System.Runtime.Serialization.EnumMember(Value = @"NewLine")] - NewLine = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"CarriageReturn")] - CarriageReturn = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"CarriageReturnNewLine")] - CarriageReturnNewLine = 2, - - } - - /// Runner Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum RunnerType - { - [System.Runtime.Serialization.EnumMember(Value = @"Standard")] - Standard = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Legacy")] - Legacy = 1, - - } - - /// PasswordTypeUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PasswordTypeUpdateArgs - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// CanEdit - [Newtonsoft.Json.JsonProperty("canEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEdit { get; set; } - - /// CustomPort - [Newtonsoft.Json.JsonProperty("customPort", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomPort { get; set; } - - /// ExitCommand - [Newtonsoft.Json.JsonProperty("exitCommand", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ExitCommand { get; set; } - - /// HasCommands - [Newtonsoft.Json.JsonProperty("hasCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasCommands { get; set; } - - /// HeartbeatScriptArgs - [Newtonsoft.Json.JsonProperty("heartbeatScriptArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HeartbeatScriptArgs { get; set; } - - /// HeartbeatScriptId - [Newtonsoft.Json.JsonProperty("heartbeatScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HeartbeatScriptId { get; set; } - - /// IgnoreSSL - [Newtonsoft.Json.JsonProperty("ignoreSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IgnoreSSL { get; set; } - - /// IsWeb - [Newtonsoft.Json.JsonProperty("isWeb", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsWeb { get; set; } - - /// LdapConnectionSettingsId - [Newtonsoft.Json.JsonProperty("ldapConnectionSettingsId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LdapConnectionSettingsId { get; set; } - - /// LineEnding - [Newtonsoft.Json.JsonProperty("lineEnding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public LineEnding? LineEnding { get; set; } - - /// MainframeConnectionString - [Newtonsoft.Json.JsonProperty("mainframeConnectionString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MainframeConnectionString { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ODBCConnectionString - [Newtonsoft.Json.JsonProperty("odbcConnectionString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OdbcConnectionString { get; set; } - - /// RPCScriptArgs - [Newtonsoft.Json.JsonProperty("rpcScriptArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RpcScriptArgs { get; set; } - - /// RPCScriptId - [Newtonsoft.Json.JsonProperty("rpcScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RpcScriptId { get; set; } - - /// RunnerType - [Newtonsoft.Json.JsonProperty("runnerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public RunnerType? RunnerType { get; set; } - - /// ScanItemTemplateId - [Newtonsoft.Json.JsonProperty("scanItemTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScanItemTemplateId { get; set; } - - /// UseSSL - [Newtonsoft.Json.JsonProperty("useSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSSL { get; set; } - - /// UseUsernameAndPassword - [Newtonsoft.Json.JsonProperty("useUsernameAndPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseUsernameAndPassword { get; set; } - - /// ValidForTakeover - [Newtonsoft.Json.JsonProperty("validForTakeover", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValidForTakeover { get; set; } - - /// WindowsCustomPorts - [Newtonsoft.Json.JsonProperty("windowsCustomPorts", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string WindowsCustomPorts { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfCustomCommandModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Displays the properties of a Custom Command - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CustomCommandModel - { - /// Command Text - [Newtonsoft.Json.JsonProperty("command", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Command { get; set; } - - /// Command Type Code - [Newtonsoft.Json.JsonProperty("commandTypeCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CommandTypeCode { get; set; } - - /// Comment - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// Concurrency Id - [Newtonsoft.Json.JsonProperty("concurrencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConcurrencyId { get; set; } - - /// Custom Command Id - [Newtonsoft.Json.JsonProperty("customCommandId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomCommandId { get; set; } - - /// Order number - [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Order { get; set; } - - /// Password Type Id - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - /// Pause Duration (milliseconds) - [Newtonsoft.Json.JsonProperty("pause", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Pause { get; set; } - - - } - - /// CustomCommandUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CustomCommandUpdateArgs - { - /// Command - [Newtonsoft.Json.JsonProperty("command", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Command { get; set; } - - /// CommandTypeCode - [Newtonsoft.Json.JsonProperty("commandTypeCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CommandTypeCode { get; set; } - - /// Comment - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// ConcurrencyId - [Newtonsoft.Json.JsonProperty("concurrencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConcurrencyId { get; set; } - - /// Order - [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Order { get; set; } - - /// PasswordTypeId - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - /// Pause - [Newtonsoft.Json.JsonProperty("pause", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Pause { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfPasswordTypeSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Password Type summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PasswordTypeSummary - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// CanEdit - [Newtonsoft.Json.JsonProperty("canEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEdit { get; set; } - - /// HasCommands - [Newtonsoft.Json.JsonProperty("hasCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasCommands { get; set; } - - /// HeartbeatScriptId - [Newtonsoft.Json.JsonProperty("heartbeatScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HeartbeatScriptId { get; set; } - - /// IgnoreSSL - [Newtonsoft.Json.JsonProperty("ignoreSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IgnoreSSL { get; set; } - - /// IsWeb - [Newtonsoft.Json.JsonProperty("isWeb", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsWeb { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// PasswordTypeId - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - /// RequiredEdition - [Newtonsoft.Json.JsonProperty("requiredEdition", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequiredEdition { get; set; } - - /// RPCScriptId - [Newtonsoft.Json.JsonProperty("rpcScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RpcScriptId { get; set; } - - /// RunnerType - [Newtonsoft.Json.JsonProperty("runnerType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public RunnerType? RunnerType { get; set; } - - /// ScanItemTemplateId - [Newtonsoft.Json.JsonProperty("scanItemTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScanItemTemplateId { get; set; } - - /// UseSSL - [Newtonsoft.Json.JsonProperty("useSSL", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSSL { get; set; } - - - } - - /// PasswordTypeCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PasswordTypeCreateArgs - { - /// BasePasswordTypeId - [Newtonsoft.Json.JsonProperty("basePasswordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BasePasswordTypeId { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// CustomCommandCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CustomCommandCreateArgs - { - /// Command - [Newtonsoft.Json.JsonProperty("command", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Command { get; set; } - - /// CommandTypeCode - [Newtonsoft.Json.JsonProperty("commandTypeCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CommandTypeCode { get; set; } - - /// Comment - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// PasswordTypeId - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - /// Pause - [Newtonsoft.Json.JsonProperty("pause", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Pause { get; set; } - - - } - - /// Report - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportModel - { - /// The Report Category Id - [Newtonsoft.Json.JsonProperty("categoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CategoryId { get; set; } - - /// The report chart Type. Null if no chart - [Newtonsoft.Json.JsonProperty("chartType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ChartType { get; set; } - - /// Report Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Whether the Report is active - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Report ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether the Report chart is displayed in 3d - [Newtonsoft.Json.JsonProperty("is3DReport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Is3DReport { get; set; } - - /// Report name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// The page size of the report - [Newtonsoft.Json.JsonProperty("pageSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageSize { get; set; } - - /// The SQL used to generate the report - [Newtonsoft.Json.JsonProperty("reportSql", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportSql { get; set; } - - /// Whether the Report is a system Report - [Newtonsoft.Json.JsonProperty("systemReport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SystemReport { get; set; } - - /// When true paging of a report will be done in SQL server. Not all SQL is compatible with this option. - [Newtonsoft.Json.JsonProperty("useDatabasePaging", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseDatabasePaging { get; set; } - - - } - - /// Report update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportUpdateArgs - { - /// The Category that the report should be in - [Newtonsoft.Json.JsonProperty("categoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CategoryId { get; set; } - - /// The Chart type to use for the report - [Newtonsoft.Json.JsonProperty("chartType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ChartType { get; set; } - - /// The description of the new report - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// The Dual control approval needed to update the report - [Newtonsoft.Json.JsonProperty("dualControlApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DualControlApproval DualControlApproval { get; set; } - - /// The ID of the Report to update. Must match the value in the path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int Id { get; set; } - - /// If the report chart should be 3D or not - [Newtonsoft.Json.JsonProperty("is3DReport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Is3DReport { get; set; } - - /// The name of the new report - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// The number of records that the report should return per page - [Newtonsoft.Json.JsonProperty("pageSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageSize { get; set; } - - /// The SQL query that defines the report - [Newtonsoft.Json.JsonProperty("reportSql", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportSql { get; set; } - - /// If true the report will attempt to do paging in the database. If false the paging will occur on the application server. - [Newtonsoft.Json.JsonProperty("useDatabasePaging", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseDatabasePaging { get; set; } - - - } - - /// The Dual control approval needed to update the report - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DualControlApproval - { - /// DomainId - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Password - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password { get; set; } - - /// TwoFactor - [Newtonsoft.Json.JsonProperty("twoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TwoFactor { get; set; } - - /// Username - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } - - - } - - /// Report Category Detail - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportCategoryDetailModel - { - /// Report Category Description - [Newtonsoft.Json.JsonProperty("reportCategoryDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportCategoryDescription { get; set; } - - /// Report Category Id - [Newtonsoft.Json.JsonProperty("reportCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ReportCategoryId { get; set; } - - /// Report Category Name - [Newtonsoft.Json.JsonProperty("reportCategoryName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportCategoryName { get; set; } - - /// Sort Order in which the category should appear - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// Report Category Update Args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportCategoryUpdateArgs - { - /// Report Category Update Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReportCategoryUpdateModel Data { get; set; } - - - } - - /// Report Category Update Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportCategoryUpdateModel - { - /// Report Category Description - [Newtonsoft.Json.JsonProperty("reportCategoryDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ReportCategoryDescription { get; set; } - - /// Report Category Name - [Newtonsoft.Json.JsonProperty("reportCategoryName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ReportCategoryName { get; set; } - - - } - - /// Report Schedule Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportScheduleModel - { - /// Custom Parameter Value - [Newtonsoft.Json.JsonProperty("customParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomParameterValue { get; set; } - - /// Specific Date Value for when Specfic date is specified for EndDateParameterValue - [Newtonsoft.Json.JsonProperty("endDateParameterSpecificDateValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndDateParameterSpecificDateValue { get; set; } - - /// End Date Parameter Value - [Newtonsoft.Json.JsonProperty("endDateParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EndDateParameterValue { get; set; } - - /// Folder Parameter Value - [Newtonsoft.Json.JsonProperty("folderParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReportParameterValue FolderParameterValue { get; set; } - - /// How to show the report when emailed. Default is Inline which shows the report within the email. Otherwise, it will be an attachment in the selected format. - [Newtonsoft.Json.JsonProperty("format", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ReportFormat? Format { get; set; } - - /// Group Parameter Value - [Newtonsoft.Json.JsonProperty("groupParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReportParameterValue GroupParameterValue { get; set; } - - /// Report Id - [Newtonsoft.Json.JsonProperty("reportId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ReportId { get; set; } - - /// Report Name - [Newtonsoft.Json.JsonProperty("reportName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportName { get; set; } - - /// Schedule - [Newtonsoft.Json.JsonProperty("schedule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ScheduleViewModel Schedule { get; set; } - - /// Schedule Report Id - [Newtonsoft.Json.JsonProperty("scheduleReportId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScheduleReportId { get; set; } - - /// Specific Date Value for when Specfic date is specified for StartDateParameterValue - [Newtonsoft.Json.JsonProperty("startDateParameterSpecificDateValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDateParameterSpecificDateValue { get; set; } - - /// Start Date Parameter Value - [Newtonsoft.Json.JsonProperty("startDateParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StartDateParameterValue { get; set; } - - /// User Parameter Value - [Newtonsoft.Json.JsonProperty("userParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReportParameterValue UserParameterValue { get; set; } - - - } - - /// Folder Parameter Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportParameterValue - { - /// Name of the Report Parameter - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Value of the Report Parameter - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public Object Value { get; set; } - - /// A display name representing the value. For example, when a parameter is a user this will be the user display name - [Newtonsoft.Json.JsonProperty("valueDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueDisplayName { get; set; } - - - } - - /// Value of the Report Parameter - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Object - { - - } - - /// How to show the report when emailed. Default is Inline which shows the report within the email. Otherwise, it will be an attachment in the selected format. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ReportFormat - { - [System.Runtime.Serialization.EnumMember(Value = @"Html")] - Html = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Csv")] - Csv = 1, - - } - - /// Schedule - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ScheduleViewModel - { - /// AdditionalEmailAddresses - [Newtonsoft.Json.JsonProperty("additionalEmailAddresses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString AdditionalEmailAddresses { get; set; } - - /// ChangeType - [Newtonsoft.Json.JsonProperty("changeType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfScheduleChangeType ChangeType { get; set; } - - /// Days - [Newtonsoft.Json.JsonProperty("days", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 Days { get; set; } - - /// EmailGroups - [Newtonsoft.Json.JsonProperty("emailGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfReportSubscriberOf EmailGroups { get; set; } - - /// Friday - [Newtonsoft.Json.JsonProperty("friday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBoolean Friday { get; set; } - - /// HealthCheck - [Newtonsoft.Json.JsonProperty("healthCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean HealthCheck { get; set; } - - /// HistorySize - [Newtonsoft.Json.JsonProperty("historySize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 HistorySize { get; set; } - - /// Monday - [Newtonsoft.Json.JsonProperty("monday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBoolean Monday { get; set; } - - /// MonthlyDay - [Newtonsoft.Json.JsonProperty("monthlyDay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalScheduleMonthlyDayType MonthlyDay { get; set; } - - /// MonthlyDayOfMonth - [Newtonsoft.Json.JsonProperty("monthlyDayOfMonth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 MonthlyDayOfMonth { get; set; } - - /// MonthlyDayOrder - [Newtonsoft.Json.JsonProperty("monthlyDayOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalScheduleMonthlyDayOrderType MonthlyDayOrder { get; set; } - - /// MonthlyDayOrderRecurrence - [Newtonsoft.Json.JsonProperty("monthlyDayOrderRecurrence", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 MonthlyDayOrderRecurrence { get; set; } - - /// MonthlyDayRecurrence - [Newtonsoft.Json.JsonProperty("monthlyDayRecurrence", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 MonthlyDayRecurrence { get; set; } - - /// MonthlyScheduleType - [Newtonsoft.Json.JsonProperty("monthlyScheduleType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalScheduleMonthlyType MonthlyScheduleType { get; set; } - - /// Saturday - [Newtonsoft.Json.JsonProperty("saturday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBoolean Saturday { get; set; } - - /// ScheduleName - [Newtonsoft.Json.JsonProperty("scheduleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString ScheduleName { get; set; } - - /// SendEmail - [Newtonsoft.Json.JsonProperty("sendEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean SendEmail { get; set; } - - /// SendEmailWithHighPriority - [Newtonsoft.Json.JsonProperty("sendEmailWithHighPriority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean SendEmailWithHighPriority { get; set; } - - /// StartingOn - [Newtonsoft.Json.JsonProperty("startingOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfDateTime StartingOn { get; set; } - - /// Sunday - [Newtonsoft.Json.JsonProperty("sunday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBoolean Sunday { get; set; } - - /// Thursday - [Newtonsoft.Json.JsonProperty("thursday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBoolean Thursday { get; set; } - - /// Tuesday - [Newtonsoft.Json.JsonProperty("tuesday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBoolean Tuesday { get; set; } - - /// Wednesday - [Newtonsoft.Json.JsonProperty("wednesday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalBoolean Wednesday { get; set; } - - /// Weeks - [Newtonsoft.Json.JsonProperty("weeks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 Weeks { get; set; } - - - } - - /// ChangeType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfScheduleChangeType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ScheduleChangeType? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ScheduleChangeType - { - [System.Runtime.Serialization.EnumMember(Value = @"Daily")] - Daily = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Weekly")] - Weekly = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Monthly")] - Monthly = 2, - - } - - /// EmailGroups - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfReportSubscriberOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportSubscriber - { - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - - } - - /// Friday - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfOptionalBoolean - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Value { get; set; } - - - } - - /// MonthlyDay - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfOptionalScheduleMonthlyDayType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// MonthlyDayOrder - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfOptionalScheduleMonthlyDayOrderType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// MonthlyScheduleType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfOptionalScheduleMonthlyType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// StartingOn - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfDateTime - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Value { get; set; } - - - } - - /// Report Schedule Update Args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportScheduleUpdateArgs - { - /// Report Schedule Update Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReportScheduleUpdateModel Data { get; set; } - - - } - - /// Report Schedule Update Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportScheduleUpdateModel - { - /// Custom Parameter Value - [Newtonsoft.Json.JsonProperty("customParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString CustomParameterValue { get; set; } - - /// Specific Date Value for when Specfic date is specified for EndDateParameterValue - [Newtonsoft.Json.JsonProperty("endDateParameterSpecificDateValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalDateTime EndDateParameterSpecificDateValue { get; set; } - - /// End Date Parameter Value - [Newtonsoft.Json.JsonProperty("endDateParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalReportScheduleDateParameterType EndDateParameterValue { get; set; } - - /// Folder Parameter Value - [Newtonsoft.Json.JsonProperty("folderParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 FolderParameterValue { get; set; } - - /// How to show the report when emailed. Inline will show the report within the email. Otherwise, it will be an attachment. - [Newtonsoft.Json.JsonProperty("format", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfReportFormat Format { get; set; } - - /// Group Parameter Value - [Newtonsoft.Json.JsonProperty("groupParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 GroupParameterValue { get; set; } - - /// Schedule - [Newtonsoft.Json.JsonProperty("schedule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ScheduleUpdateModel Schedule { get; set; } - - /// Specific Date Value for when Specfic date is specified for StartDateParameterValue - [Newtonsoft.Json.JsonProperty("startDateParameterSpecificDateValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalDateTime StartDateParameterSpecificDateValue { get; set; } - - /// Start Date Parameter Value - [Newtonsoft.Json.JsonProperty("startDateParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalReportScheduleDateParameterType StartDateParameterValue { get; set; } - - /// User Parameter Value - [Newtonsoft.Json.JsonProperty("userParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 UserParameterValue { get; set; } - - - } - - /// End Date Parameter Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalReportScheduleDateParameterType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// How to show the report when emailed. Inline will show the report within the email. Otherwise, it will be an attachment. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfReportFormat - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ReportFormat? Value { get; set; } - - - } - - /// Schedule - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ScheduleUpdateModel - { - /// AdditionalEmailAddresses - [Newtonsoft.Json.JsonProperty("additionalEmailAddresses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString AdditionalEmailAddresses { get; set; } - - /// ChangeType - [Newtonsoft.Json.JsonProperty("changeType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfScheduleChangeType ChangeType { get; set; } - - /// Days - [Newtonsoft.Json.JsonProperty("days", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 Days { get; set; } - - /// EmailGroups - [Newtonsoft.Json.JsonProperty("emailGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32Of EmailGroups { get; set; } - - /// Friday - [Newtonsoft.Json.JsonProperty("friday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean Friday { get; set; } - - /// HealthCheck - [Newtonsoft.Json.JsonProperty("healthCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean HealthCheck { get; set; } - - /// HistorySize - [Newtonsoft.Json.JsonProperty("historySize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 HistorySize { get; set; } - - /// Monday - [Newtonsoft.Json.JsonProperty("monday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean Monday { get; set; } - - /// MonthlyDay - [Newtonsoft.Json.JsonProperty("monthlyDay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalScheduleMonthlyDayType MonthlyDay { get; set; } - - /// MonthlyDayOfMonth - [Newtonsoft.Json.JsonProperty("monthlyDayOfMonth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 MonthlyDayOfMonth { get; set; } - - /// MonthlyDayOrder - [Newtonsoft.Json.JsonProperty("monthlyDayOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalScheduleMonthlyDayOrderType MonthlyDayOrder { get; set; } - - /// MonthlyDayOrderRecurrence - [Newtonsoft.Json.JsonProperty("monthlyDayOrderRecurrence", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 MonthlyDayOrderRecurrence { get; set; } - - /// MonthlyDayRecurrence - [Newtonsoft.Json.JsonProperty("monthlyDayRecurrence", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 MonthlyDayRecurrence { get; set; } - - /// MonthlyScheduleType - [Newtonsoft.Json.JsonProperty("monthlyScheduleType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalScheduleMonthlyType MonthlyScheduleType { get; set; } - - /// Saturday - [Newtonsoft.Json.JsonProperty("saturday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean Saturday { get; set; } - - /// ScheduleName - [Newtonsoft.Json.JsonProperty("scheduleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ScheduleName { get; set; } - - /// SendEmail - [Newtonsoft.Json.JsonProperty("sendEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SendEmail { get; set; } - - /// SendEmailWithHighPriority - [Newtonsoft.Json.JsonProperty("sendEmailWithHighPriority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SendEmailWithHighPriority { get; set; } - - /// StartingOn - [Newtonsoft.Json.JsonProperty("startingOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfDateTime StartingOn { get; set; } - - /// Sunday - [Newtonsoft.Json.JsonProperty("sunday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean Sunday { get; set; } - - /// Thursday - [Newtonsoft.Json.JsonProperty("thursday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean Thursday { get; set; } - - /// Tuesday - [Newtonsoft.Json.JsonProperty("tuesday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean Tuesday { get; set; } - - /// Wednesday - [Newtonsoft.Json.JsonProperty("wednesday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean Wednesday { get; set; } - - /// Weeks - [Newtonsoft.Json.JsonProperty("weeks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 Weeks { get; set; } - - - } - - /// ChangeType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfScheduleChangeType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ScheduleChangeType? Value { get; set; } - - - } - - /// MonthlyDay - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalScheduleMonthlyDayType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// MonthlyDayOrder - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalScheduleMonthlyDayOrderType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// MonthlyScheduleType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalScheduleMonthlyType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfReportAuditSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Report Audit Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportAuditSummary - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Audit Report Id - [Newtonsoft.Json.JsonProperty("auditReportId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AuditReportId { get; set; } - - /// Database - [Newtonsoft.Json.JsonProperty("database", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Database { get; set; } - - /// Date Recorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Display Name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// IP Address - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Report Name - [Newtonsoft.Json.JsonProperty("reportName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfReportSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Report summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportSummary - { - /// Category ID - [Newtonsoft.Json.JsonProperty("categoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CategoryId { get; set; } - - /// Whether the Report is active - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Report ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Report name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Report create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportCreateArgs - { - /// The Category that the report should be in - [Newtonsoft.Json.JsonProperty("categoryId", Required = Newtonsoft.Json.Required.Always)] - public int CategoryId { get; set; } - - /// The Chart type to use for the report - [Newtonsoft.Json.JsonProperty("chartType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ChartType { get; set; } - - /// The description of the new report - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Description { get; set; } - - /// The Dual control approval needed to create the report - [Newtonsoft.Json.JsonProperty("dualControlApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DualControlApproval DualControlApproval { get; set; } - - /// If the report chart should be 3D or not - [Newtonsoft.Json.JsonProperty("is3DReport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Is3DReport { get; set; } - - /// The name of the new report - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// The number of records that the report should return per page - [Newtonsoft.Json.JsonProperty("pageSize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageSize { get; set; } - - /// The SQL query that defines the report - [Newtonsoft.Json.JsonProperty("reportSql", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string ReportSql { get; set; } - - /// If true the report will attempt to do paging in the database. If false the paging will occur on the application server. - [Newtonsoft.Json.JsonProperty("useDatabasePaging", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseDatabasePaging { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfReportLookup - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Simple Report representation - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportLookup - { - /// Report ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Report name - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// ReportCategory[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportCategory - { - /// The report category description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// The Id value of the report category - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The name of the report category - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Report Category Create Args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportCategoryCreateArgs - { - /// Report Category Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReportCategoryCreateModel Data { get; set; } - - - } - - /// Report Category Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportCategoryCreateModel - { - /// Report Category Description - [Newtonsoft.Json.JsonProperty("reportCategoryDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportCategoryDescription { get; set; } - - /// Report Category Name - [Newtonsoft.Json.JsonProperty("reportCategoryName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportCategoryName { get; set; } - - /// Report Category Sort Order, when null will be added at the end - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// ReportChartType[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportChartType - { - /// The int value of the report chart type - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The name of the report chart type - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// ReportExecution - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportDefaultParams - { - /// DefaultParameterValues - [Newtonsoft.Json.JsonProperty("defaultParameterValues", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DefaultParameterValues { get; set; } - - - } - - /// DefaultParameterValues - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ICustomReportParameterValue - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public Object Value { get; set; } - - /// ValueDisplayName - [Newtonsoft.Json.JsonProperty("valueDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueDisplayName { get; set; } - - /// VariableName - [Newtonsoft.Json.JsonProperty("variableName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string VariableName { get; set; } - - - } - - /// IPagingOfReportScheduleSummaryModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfReportScheduleSummaryModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Report Schedule Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportScheduleSummaryModel - { - /// Schedule Change Type - [Newtonsoft.Json.JsonProperty("changeType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ScheduleChangeType? ChangeType { get; set; } - - /// Deleted - [Newtonsoft.Json.JsonProperty("deleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Deleted { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// DateTime of Last Run - [Newtonsoft.Json.JsonProperty("lastRun", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastRun { get; set; } - - /// HistoryId of Last Run - [Newtonsoft.Json.JsonProperty("lastRunHistoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LastRunHistoryId { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Report Id - [Newtonsoft.Json.JsonProperty("reportId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ReportId { get; set; } - - /// Report Name - [Newtonsoft.Json.JsonProperty("reportName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportName { get; set; } - - /// Schedule Report Id - [Newtonsoft.Json.JsonProperty("scheduleReportId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScheduleReportId { get; set; } - - /// Send Report via Email - [Newtonsoft.Json.JsonProperty("sendEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendEmail { get; set; } - - /// Number of reports stored for this schedule - [Newtonsoft.Json.JsonProperty("storedReportCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? StoredReportCount { get; set; } - - - } - - /// Report Schedule Create Args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportScheduleCreateArgs - { - /// Report Schedule Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReportScheduleCreateModel Data { get; set; } - - - } - - /// Report Schedule Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportScheduleCreateModel - { - /// Custom Parameter Value - [Newtonsoft.Json.JsonProperty("customParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CustomParameterValue { get; set; } - - /// Specific Date Value for when Specfic date is specified for EndDateParameterValue - [Newtonsoft.Json.JsonProperty("endDateParameterSpecificDateValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndDateParameterSpecificDateValue { get; set; } - - /// End Date Parameter Value - [Newtonsoft.Json.JsonProperty("endDateParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EndDateParameterValue { get; set; } - - /// Folder Parameter Value - [Newtonsoft.Json.JsonProperty("folderParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderParameterValue { get; set; } - - /// Group Parameter Value - [Newtonsoft.Json.JsonProperty("groupParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupParameterValue { get; set; } - - /// Report Id - [Newtonsoft.Json.JsonProperty("reportId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ReportId { get; set; } - - /// Schedule - [Newtonsoft.Json.JsonProperty("schedule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ScheduleCreateModel Schedule { get; set; } - - /// Specific Date Value for when Specfic date is specified for StartDateParameterValue - [Newtonsoft.Json.JsonProperty("startDateParameterSpecificDateValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDateParameterSpecificDateValue { get; set; } - - /// Start Date Parameter Value - [Newtonsoft.Json.JsonProperty("startDateParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StartDateParameterValue { get; set; } - - /// User Parameter Value - [Newtonsoft.Json.JsonProperty("userParameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserParameterValue { get; set; } - - - } - - /// Schedule Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ScheduleCreateModel - { - /// Additional email addresses to receive the email - [Newtonsoft.Json.JsonProperty("additionalEmailAddresses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AdditionalEmailAddresses { get; set; } - - /// Schedule Change Type - [Newtonsoft.Json.JsonProperty("changeType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ScheduleChangeType? ChangeType { get; set; } - - /// Days of Recurrence if Daily ScheduleType - [Newtonsoft.Json.JsonProperty("days", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Days { get; set; } - - /// Groups to receive the email - [Newtonsoft.Json.JsonProperty("emailGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection EmailGroups { get; set; } - - /// Occurs on Fridays when set if Weekly ScheduleType - [Newtonsoft.Json.JsonProperty("friday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Friday { get; set; } - - /// Health Check - [Newtonsoft.Json.JsonProperty("healthCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HealthCheck { get; set; } - - /// The number of generated reports that will be saved. Null if All - [Newtonsoft.Json.JsonProperty("historySize", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HistorySize { get; set; } - - /// Occurs on Mondays when set if Weekly ScheduleType - [Newtonsoft.Json.JsonProperty("monday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Monday { get; set; } - - /// Day(s) used if DayOfWeekMonth and Monthly ScheduleType - [Newtonsoft.Json.JsonProperty("monthlyDay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MonthlyDay { get; set; } - - /// Day of Month if DayOfMonth and Monthly ScheduleType - [Newtonsoft.Json.JsonProperty("monthlyDayOfMonth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MonthlyDayOfMonth { get; set; } - - /// Day Order used if DayOfWeekMonth and Monthly ScheduleType - [Newtonsoft.Json.JsonProperty("monthlyDayOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MonthlyDayOrder { get; set; } - - /// Months of Recurrence if DayOfWeekMonth and Monthly ScheduleType - [Newtonsoft.Json.JsonProperty("monthlyDayOrderRecurrence", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MonthlyDayOrderRecurrence { get; set; } - - /// Months of Recurrence if DayOfMonth and Monthly ScheduleType - [Newtonsoft.Json.JsonProperty("monthlyDayRecurrence", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MonthlyDayRecurrence { get; set; } - - /// Selection used if Monthly ScheduleType - [Newtonsoft.Json.JsonProperty("monthlyScheduleType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MonthlyScheduleType { get; set; } - - /// Occurs on Saturdays when set if Weekly ScheduleType - [Newtonsoft.Json.JsonProperty("saturday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Saturday { get; set; } - - /// Schedule Name - [Newtonsoft.Json.JsonProperty("scheduleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScheduleName { get; set; } - - /// Send Report via Email - [Newtonsoft.Json.JsonProperty("sendEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendEmail { get; set; } - - /// Send Email With High Priority - [Newtonsoft.Json.JsonProperty("sendEmailWithHighPriority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendEmailWithHighPriority { get; set; } - - /// Day for Report Schedule to start - [Newtonsoft.Json.JsonProperty("startingOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartingOn { get; set; } - - /// Occurs on Sundays when set if Weekly ScheduleType - [Newtonsoft.Json.JsonProperty("sunday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Sunday { get; set; } - - /// Occurs on Thursdays when set if Weekly ScheduleType - [Newtonsoft.Json.JsonProperty("thursday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Thursday { get; set; } - - /// Occurs on Tuesdays when set if Weekly ScheduleType - [Newtonsoft.Json.JsonProperty("tuesday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Tuesday { get; set; } - - /// Occurs on Wednesdays when set if Weekly ScheduleType - [Newtonsoft.Json.JsonProperty("wednesday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Wednesday { get; set; } - - /// Weeks of Recurrence if Weekly ScheduleType - [Newtonsoft.Json.JsonProperty("weeks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Weeks { get; set; } - - - } - - /// IPagingOfReportScheduleHistorySummaryModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfReportScheduleHistorySummaryModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Report Schedule History Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportScheduleHistorySummaryModel - { - /// Date Schedule was Run - [Newtonsoft.Json.JsonProperty("dateRun", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRun { get; set; } - - /// Id of Schedule Report History - [Newtonsoft.Json.JsonProperty("scheduleReportHistoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScheduleReportHistoryId { get; set; } - - - } - - /// Report query options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportExportArgs - { - /// Delimiter - [Newtonsoft.Json.JsonProperty("delimiter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Delimiter { get; set; } - - /// The Dual Control approval value if the report is locked to Dual Control - [Newtonsoft.Json.JsonProperty("dualControlApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DualControlApproval DualControlApproval { get; set; } - - /// True to encode data as HTML, defaults to true if not provided - [Newtonsoft.Json.JsonProperty("encodeHtml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EncodeHtml { get; set; } - - /// End Record Number when taking a specific set of records, passing this will override PageNumber and RecordsPerPage - [Newtonsoft.Json.JsonProperty("endRecordNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EndRecordNumber { get; set; } - - /// Format - [Newtonsoft.Json.JsonProperty("format", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Format { get; set; } - - /// The Id of the report to run. Optional: will use Name if provided - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Flag determining sort direction of custom sort - [Newtonsoft.Json.JsonProperty("isAscending", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsAscending { get; set; } - - /// The name of the report to run. Optional: will use Id if provided - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Ordinal of Field for custom OrderBy of results - [Newtonsoft.Json.JsonProperty("orderByFieldOrdinal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? OrderByFieldOrdinal { get; set; } - - /// Page number for paging results. All records returned if null - [Newtonsoft.Json.JsonProperty("pageNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageNumber { get; set; } - - /// The parameters of the report - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - /// When passed the report will be previewed with this sql - [Newtonsoft.Json.JsonProperty("previewSql", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PreviewSql { get; set; } - - /// Number of records per page for paging results - [Newtonsoft.Json.JsonProperty("recordsPerPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RecordsPerPage { get; set; } - - /// Start Record Number when taking a specific set of records, passing this will override PageNumber and RecordsPerPage - [Newtonsoft.Json.JsonProperty("startRecordNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? StartRecordNumber { get; set; } - - /// TimeZone - [Newtonsoft.Json.JsonProperty("timeZone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TimeZone { get; set; } - - /// If a report contains a parameter but it is not passed the default value will be used on the server - [Newtonsoft.Json.JsonProperty("useDefaultParameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseDefaultParameters { get; set; } - - - } - - /// The parameters of the report - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportParameter - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Report query options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportExecuteArgs - { - /// The Dual Control approval value if the report is locked to Dual Control - [Newtonsoft.Json.JsonProperty("dualControlApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DualControlApproval DualControlApproval { get; set; } - - /// True to encode data as HTML, defaults to true if not provided - [Newtonsoft.Json.JsonProperty("encodeHtml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EncodeHtml { get; set; } - - /// End Record Number when taking a specific set of records, passing this will override PageNumber and RecordsPerPage - [Newtonsoft.Json.JsonProperty("endRecordNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EndRecordNumber { get; set; } - - /// The Id of the report to run. Optional: will use Name if provided - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Flag determining sort direction of custom sort - [Newtonsoft.Json.JsonProperty("isAscending", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsAscending { get; set; } - - /// The name of the report to run. Optional: will use Id if provided - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Ordinal of Field for custom OrderBy of results - [Newtonsoft.Json.JsonProperty("orderByFieldOrdinal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? OrderByFieldOrdinal { get; set; } - - /// Page number for paging results. All records returned if null - [Newtonsoft.Json.JsonProperty("pageNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageNumber { get; set; } - - /// The parameters of the report - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - /// When passed the report will be previewed with this sql - [Newtonsoft.Json.JsonProperty("previewSql", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PreviewSql { get; set; } - - /// Number of records per page for paging results - [Newtonsoft.Json.JsonProperty("recordsPerPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RecordsPerPage { get; set; } - - /// Start Record Number when taking a specific set of records, passing this will override PageNumber and RecordsPerPage - [Newtonsoft.Json.JsonProperty("startRecordNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? StartRecordNumber { get; set; } - - /// If a report contains a parameter but it is not passed the default value will be used on the server - [Newtonsoft.Json.JsonProperty("useDefaultParameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseDefaultParameters { get; set; } - - - } - - /// ReportExecution - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportExecuteModel - { - /// Array of column names. - [Newtonsoft.Json.JsonProperty("columns", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Columns { get; set; } - - /// Array of column types - [Newtonsoft.Json.JsonProperty("columnTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ColumnTypes { get; set; } - - /// Whether the Report is active - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Report ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Array of localized column names. - [Newtonsoft.Json.JsonProperty("localizedColumns", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection LocalizedColumns { get; set; } - - /// Report name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// When passed this SQL will be used to run the report in a preview mode. Used for testing SQL but not updating the report. - [Newtonsoft.Json.JsonProperty("reportPreviewSql", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReportPreviewSql { get; set; } - - /// Rows of report data. - [Newtonsoft.Json.JsonProperty("rows", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection> Rows { get; set; } - - /// Whether the Report is a system Report - [Newtonsoft.Json.JsonProperty("systemReport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SystemReport { get; set; } - - /// Total number of rows - [Newtonsoft.Json.JsonProperty("totalRowCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TotalRowCount { get; set; } - - - } - - /// Report Email Args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportEmailArgs - { - /// Report Email Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ReportEmailModel Data { get; set; } - - - } - - /// Report Email Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportEmailModel - { - /// Email Address to which the report will be sent - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EmailAddress { get; set; } - - /// Format of the data of report - [Newtonsoft.Json.JsonProperty("format", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ReportFormat? Format { get; set; } - - /// Report Parameters to be used for the report execution - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - - } - - /// Report Email Response - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ReportEmailResponse - { - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// HttpResponseMessage - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class HttpResponseMessage - { - /// Content - [Newtonsoft.Json.JsonProperty("content", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public HttpContent Content { get; set; } - - /// Headers - [Newtonsoft.Json.JsonProperty("headers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public HttpResponseHeaders Headers { get; set; } - - /// IsSuccessStatusCode - [Newtonsoft.Json.JsonProperty("isSuccessStatusCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSuccessStatusCode { get; set; } - - /// ReasonPhrase - [Newtonsoft.Json.JsonProperty("reasonPhrase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReasonPhrase { get; set; } - - /// RequestMessage - [Newtonsoft.Json.JsonProperty("requestMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public HttpRequestMessage RequestMessage { get; set; } - - /// StatusCode - [Newtonsoft.Json.JsonProperty("statusCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public HttpStatusCode? StatusCode { get; set; } - - /// Version - [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public Version Version { get; set; } - - - } - - /// Content - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class HttpContent - { - /// Headers - [Newtonsoft.Json.JsonProperty("headers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public HttpContentHeaders Headers { get; set; } - - - } - - /// Headers - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class HttpResponseHeaders - { - /// AcceptRanges - [Newtonsoft.Json.JsonProperty("acceptRanges", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AcceptRanges { get; set; } - - /// Age - [Newtonsoft.Json.JsonProperty("age", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? Age { get; set; } - - /// CacheControl - [Newtonsoft.Json.JsonProperty("cacheControl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public CacheControlHeaderValue CacheControl { get; set; } - - /// Connection - [Newtonsoft.Json.JsonProperty("connection", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Connection { get; set; } - - /// ConnectionClose - [Newtonsoft.Json.JsonProperty("connectionClose", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ConnectionClose { get; set; } - - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset Date { get; set; } - - /// ETag - [Newtonsoft.Json.JsonProperty("eTag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public EntityTagHeaderValue ETag { get; set; } - - /// Location - [Newtonsoft.Json.JsonProperty("location", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public Uri Location { get; set; } - - /// Pragma - [Newtonsoft.Json.JsonProperty("pragma", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Pragma { get; set; } - - /// ProxyAuthenticate - [Newtonsoft.Json.JsonProperty("proxyAuthenticate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ProxyAuthenticate { get; set; } - - /// RetryAfter - [Newtonsoft.Json.JsonProperty("retryAfter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RetryConditionHeaderValue RetryAfter { get; set; } - - /// Server - [Newtonsoft.Json.JsonProperty("server", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Server { get; set; } - - /// Trailer - [Newtonsoft.Json.JsonProperty("trailer", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Trailer { get; set; } - - /// TransferEncoding - [Newtonsoft.Json.JsonProperty("transferEncoding", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection TransferEncoding { get; set; } - - /// TransferEncodingChunked - [Newtonsoft.Json.JsonProperty("transferEncodingChunked", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? TransferEncodingChunked { get; set; } - - /// Upgrade - [Newtonsoft.Json.JsonProperty("upgrade", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Upgrade { get; set; } - - /// Vary - [Newtonsoft.Json.JsonProperty("vary", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Vary { get; set; } - - /// Via - [Newtonsoft.Json.JsonProperty("via", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Via { get; set; } - - /// Warning - [Newtonsoft.Json.JsonProperty("warning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Warning { get; set; } - - /// WwwAuthenticate - [Newtonsoft.Json.JsonProperty("wwwAuthenticate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection WwwAuthenticate { get; set; } - - - } - - /// CacheControl - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CacheControlHeaderValue - { - /// Extensions - [Newtonsoft.Json.JsonProperty("extensions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Extensions { get; set; } - - /// MaxAge - [Newtonsoft.Json.JsonProperty("maxAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? MaxAge { get; set; } - - /// MaxStale - [Newtonsoft.Json.JsonProperty("maxStale", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MaxStale { get; set; } - - /// MaxStaleLimit - [Newtonsoft.Json.JsonProperty("maxStaleLimit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? MaxStaleLimit { get; set; } - - /// MinFresh - [Newtonsoft.Json.JsonProperty("minFresh", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? MinFresh { get; set; } - - /// MustRevalidate - [Newtonsoft.Json.JsonProperty("mustRevalidate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MustRevalidate { get; set; } - - /// NoCache - [Newtonsoft.Json.JsonProperty("noCache", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? NoCache { get; set; } - - /// NoCacheHeaders - [Newtonsoft.Json.JsonProperty("noCacheHeaders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection NoCacheHeaders { get; set; } - - /// NoStore - [Newtonsoft.Json.JsonProperty("noStore", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? NoStore { get; set; } - - /// NoTransform - [Newtonsoft.Json.JsonProperty("noTransform", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? NoTransform { get; set; } - - /// OnlyIfCached - [Newtonsoft.Json.JsonProperty("onlyIfCached", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OnlyIfCached { get; set; } - - /// Private - [Newtonsoft.Json.JsonProperty("private", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Private { get; set; } - - /// PrivateHeaders - [Newtonsoft.Json.JsonProperty("privateHeaders", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection PrivateHeaders { get; set; } - - /// ProxyRevalidate - [Newtonsoft.Json.JsonProperty("proxyRevalidate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProxyRevalidate { get; set; } - - /// Public - [Newtonsoft.Json.JsonProperty("public", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Public { get; set; } - - /// SharedMaxAge - [Newtonsoft.Json.JsonProperty("sharedMaxAge", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? SharedMaxAge { get; set; } - - - } - - /// ETag - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class EntityTagHeaderValue - { - /// IsWeak - [Newtonsoft.Json.JsonProperty("isWeak", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsWeak { get; set; } - - /// Tag - [Newtonsoft.Json.JsonProperty("tag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Tag { get; set; } - - - } - - /// ProxyAuthenticate - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AuthenticationHeaderValue - { - /// Parameter - [Newtonsoft.Json.JsonProperty("parameter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Parameter { get; set; } - - /// Scheme - [Newtonsoft.Json.JsonProperty("scheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Scheme { get; set; } - - - } - - /// RetryAfter - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RetryConditionHeaderValue - { - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset Date { get; set; } - - /// Delta - [Newtonsoft.Json.JsonProperty("delta", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? Delta { get; set; } - - - } - - /// Server - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProductInfoHeaderValue - { - /// Comment - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// Product - [Newtonsoft.Json.JsonProperty("product", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ProductHeaderValue Product { get; set; } - - - } - - /// Product - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ProductHeaderValue - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Version - [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Version { get; set; } - - - } - - /// TransferEncoding - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TransferCodingHeaderValue - { - /// Parameters - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Via - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViaHeaderValue - { - /// Comment - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// ProtocolName - [Newtonsoft.Json.JsonProperty("protocolName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ProtocolName { get; set; } - - /// ProtocolVersion - [Newtonsoft.Json.JsonProperty("protocolVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ProtocolVersion { get; set; } - - /// ReceivedBy - [Newtonsoft.Json.JsonProperty("receivedBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReceivedBy { get; set; } - - - } - - /// Warning - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WarningHeaderValue - { - /// Agent - [Newtonsoft.Json.JsonProperty("agent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Agent { get; set; } - - /// Code - [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Code { get; set; } - - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset Date { get; set; } - - /// Text - [Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Text { get; set; } - - - } - - /// RequestMessage - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class HttpRequestMessage - { - - } - - /// StatusCode - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum HttpStatusCode - { - [System.Runtime.Serialization.EnumMember(Value = @"Continue")] - Continue = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"SwitchingProtocols")] - SwitchingProtocols = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"OK")] - OK = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Created")] - Created = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Accepted")] - Accepted = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"NonAuthoritativeInformation")] - NonAuthoritativeInformation = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"NoContent")] - NoContent = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"ResetContent")] - ResetContent = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"PartialContent")] - PartialContent = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"MultipleChoices")] - MultipleChoices = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"Ambiguous")] - Ambiguous = 10, - - [System.Runtime.Serialization.EnumMember(Value = @"MovedPermanently")] - MovedPermanently = 11, - - [System.Runtime.Serialization.EnumMember(Value = @"Moved")] - Moved = 12, - - [System.Runtime.Serialization.EnumMember(Value = @"Found")] - Found = 13, - - [System.Runtime.Serialization.EnumMember(Value = @"Redirect")] - Redirect = 14, - - [System.Runtime.Serialization.EnumMember(Value = @"SeeOther")] - SeeOther = 15, - - [System.Runtime.Serialization.EnumMember(Value = @"RedirectMethod")] - RedirectMethod = 16, - - [System.Runtime.Serialization.EnumMember(Value = @"NotModified")] - NotModified = 17, - - [System.Runtime.Serialization.EnumMember(Value = @"UseProxy")] - UseProxy = 18, - - [System.Runtime.Serialization.EnumMember(Value = @"Unused")] - Unused = 19, - - [System.Runtime.Serialization.EnumMember(Value = @"TemporaryRedirect")] - TemporaryRedirect = 20, - - [System.Runtime.Serialization.EnumMember(Value = @"RedirectKeepVerb")] - RedirectKeepVerb = 21, - - [System.Runtime.Serialization.EnumMember(Value = @"BadRequest")] - BadRequest = 22, - - [System.Runtime.Serialization.EnumMember(Value = @"Unauthorized")] - Unauthorized = 23, - - [System.Runtime.Serialization.EnumMember(Value = @"PaymentRequired")] - PaymentRequired = 24, - - [System.Runtime.Serialization.EnumMember(Value = @"Forbidden")] - Forbidden = 25, - - [System.Runtime.Serialization.EnumMember(Value = @"NotFound")] - NotFound = 26, - - [System.Runtime.Serialization.EnumMember(Value = @"MethodNotAllowed")] - MethodNotAllowed = 27, - - [System.Runtime.Serialization.EnumMember(Value = @"NotAcceptable")] - NotAcceptable = 28, - - [System.Runtime.Serialization.EnumMember(Value = @"ProxyAuthenticationRequired")] - ProxyAuthenticationRequired = 29, - - [System.Runtime.Serialization.EnumMember(Value = @"RequestTimeout")] - RequestTimeout = 30, - - [System.Runtime.Serialization.EnumMember(Value = @"Conflict")] - Conflict = 31, - - [System.Runtime.Serialization.EnumMember(Value = @"Gone")] - Gone = 32, - - [System.Runtime.Serialization.EnumMember(Value = @"LengthRequired")] - LengthRequired = 33, - - [System.Runtime.Serialization.EnumMember(Value = @"PreconditionFailed")] - PreconditionFailed = 34, - - [System.Runtime.Serialization.EnumMember(Value = @"RequestEntityTooLarge")] - RequestEntityTooLarge = 35, - - [System.Runtime.Serialization.EnumMember(Value = @"RequestUriTooLong")] - RequestUriTooLong = 36, - - [System.Runtime.Serialization.EnumMember(Value = @"UnsupportedMediaType")] - UnsupportedMediaType = 37, - - [System.Runtime.Serialization.EnumMember(Value = @"RequestedRangeNotSatisfiable")] - RequestedRangeNotSatisfiable = 38, - - [System.Runtime.Serialization.EnumMember(Value = @"ExpectationFailed")] - ExpectationFailed = 39, - - [System.Runtime.Serialization.EnumMember(Value = @"UpgradeRequired")] - UpgradeRequired = 40, - - [System.Runtime.Serialization.EnumMember(Value = @"InternalServerError")] - InternalServerError = 41, - - [System.Runtime.Serialization.EnumMember(Value = @"NotImplemented")] - NotImplemented = 42, - - [System.Runtime.Serialization.EnumMember(Value = @"BadGateway")] - BadGateway = 43, - - [System.Runtime.Serialization.EnumMember(Value = @"ServiceUnavailable")] - ServiceUnavailable = 44, - - [System.Runtime.Serialization.EnumMember(Value = @"GatewayTimeout")] - GatewayTimeout = 45, - - [System.Runtime.Serialization.EnumMember(Value = @"HttpVersionNotSupported")] - HttpVersionNotSupported = 46, - - } - - /// Version - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class Version - { - /// Build - [Newtonsoft.Json.JsonProperty("build", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Build { get; set; } - - /// Major - [Newtonsoft.Json.JsonProperty("major", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Major { get; set; } - - /// MajorRevision - [Newtonsoft.Json.JsonProperty("majorRevision", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MajorRevision { get; set; } - - /// Minor - [Newtonsoft.Json.JsonProperty("minor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Minor { get; set; } - - /// MinorRevision - [Newtonsoft.Json.JsonProperty("minorRevision", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? MinorRevision { get; set; } - - /// Revision - [Newtonsoft.Json.JsonProperty("revision", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Revision { get; set; } - - - } - - /// UndeleteReportResponse - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UndeleteReportResponse - { - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Permissions not assigned to any Role - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UnassignedPermissionsModel - { - /// Names of all unassigned Permissions - [Newtonsoft.Json.JsonProperty("permissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Permissions { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfRoleModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Role - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RoleModel - { - /// Created - [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Created { get; set; } - - /// Enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Role Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// A recurring schedule defines an interval that can trigger tasks - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RecurringScheduleModel - { - /// Whether or not the schedule is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// How long is the iteration of this schedule. A weekly schedule with an iteration of 2 would restart every other week. - [Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Duration { get; set; } - - /// When does the schedule iteration begin - [Newtonsoft.Json.JsonProperty("durationStartDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DurationStartDate { get; set; } - - /// The recurring schedule will trigger this entity - [Newtonsoft.Json.JsonProperty("entity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RecurringScheduleEntityModel Entity { get; set; } - - /// TBD - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Unique ID for this schedule - [Newtonsoft.Json.JsonProperty("recurringScheduleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RecurringScheduleId { get; set; } - - /// The iteration period for the schedule. The schedule will restart after this cycle. - [Newtonsoft.Json.JsonProperty("recurringScheduleType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public RecurringScheduleType? RecurringScheduleType { get; set; } - - /// These indicate the rules for when a schedule should recur. If all of the constraints are met then the schedule will trigger. - [Newtonsoft.Json.JsonProperty("scheduleConstraints", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ScheduleConstraints { get; set; } - - /// Time Zone of the times the schedule is run - [Newtonsoft.Json.JsonProperty("timeZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TimeZoneId { get; set; } - - - } - - /// These are entities that subcribe to this schedule - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RecurringScheduleEntityModel - { - /// The ID of the entity that is subscribing to this schedule - [Newtonsoft.Json.JsonProperty("entityId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EntityId { get; set; } - - /// This is the type of entity - [Newtonsoft.Json.JsonProperty("entityType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public RecurringScheduleEntityType? EntityType { get; set; } - - /// The id of schedule entity map - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - - } - - /// This is the type of entity - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum RecurringScheduleEntityType - { - [System.Runtime.Serialization.EnumMember(Value = @"InboxRule")] - InboxRule = 0, - - } - - /// The iteration period for the schedule. The schedule will restart after this cycle. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum RecurringScheduleType - { - [System.Runtime.Serialization.EnumMember(Value = @"Daily")] - Daily = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Weekly")] - Weekly = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"MonthlyDays")] - MonthlyDays = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"MonthlyWeeks")] - MonthlyWeeks = 3, - - } - - /// A defined constraint for a schedule - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RecurringScheduleValueModel - { - /// The value that applies to the constraint. - [Newtonsoft.Json.JsonProperty("recurrenceValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RecurrenceValue { get; set; } - - /// The type of schedule constraint - [Newtonsoft.Json.JsonProperty("recurrenceValueType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public RecurringScheduleValueType? RecurrenceValueType { get; set; } - - - } - - /// The type of schedule constraint - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum RecurringScheduleValueType - { - [System.Runtime.Serialization.EnumMember(Value = @"SpecificTime")] - SpecificTime = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"DayOfWeek")] - DayOfWeek = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"DayOfMonth")] - DayOfMonth = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"WeekOfMonth")] - WeekOfMonth = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"WeekOfMonthDay")] - WeekOfMonthDay = 4, - - } - - /// RecurringScheduleUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RecurringScheduleUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RecurringScheduleUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RecurringScheduleUpdateModel - { - /// Whether or not the schedule is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// How long is the iteration of this schedule. A weekly schedule with an iteration of 2 would restart every other week. - [Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 Duration { get; set; } - - /// When does the schedule iteration begin - [Newtonsoft.Json.JsonProperty("durationStartDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfDateTime DurationStartDate { get; set; } - - /// TBD - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Notes { get; set; } - - /// Unique ID for this schedule - [Newtonsoft.Json.JsonProperty("recurringScheduleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RecurringScheduleId { get; set; } - - /// The iteration period for the schedule. The schedule will restart after this cycle. - [Newtonsoft.Json.JsonProperty("recurringScheduleType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfRecurringScheduleType RecurringScheduleType { get; set; } - - /// Passing any constraints will update all of them and remove any not specified. - [Newtonsoft.Json.JsonProperty("scheduleConstraints", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfRecurringScheduleValueModelOf ScheduleConstraints { get; set; } - - /// Time Zone of the times the schedule is run - [Newtonsoft.Json.JsonProperty("timeZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TimeZoneId { get; set; } - - - } - - /// The iteration period for the schedule. The schedule will restart after this cycle. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfRecurringScheduleType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public RecurringScheduleType? Value { get; set; } - - - } - - /// Passing any constraints will update all of them and remove any not specified. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfRecurringScheduleValueModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// RecurringScheduleCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RecurringScheduleCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RecurringScheduleCreateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RecurringScheduleCreateModel - { - /// Whether or not the schedule is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// How long is the iteration of this schedule. A weekly schedule with an iteration of 2 would restart every other week. - [Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Duration { get; set; } - - /// When does the schedule iteration begin - [Newtonsoft.Json.JsonProperty("durationStartDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DurationStartDate { get; set; } - - /// The recurring schedule will trigger this entity - [Newtonsoft.Json.JsonProperty("entity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RecurringScheduleEntityModel Entity { get; set; } - - /// TBD - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// The iteration period for the schedule. The schedule will restart after this cycle. - [Newtonsoft.Json.JsonProperty("recurringScheduleType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public RecurringScheduleType? RecurringScheduleType { get; set; } - - /// Passing any constraints will update all of them and remove any not specified. - [Newtonsoft.Json.JsonProperty("scheduleConstraints", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ScheduleConstraints { get; set; } - - /// Time Zone of the times the schedule is run - [Newtonsoft.Json.JsonProperty("timeZoneId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TimeZoneId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfScriptSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Script Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ScriptSummary - { - /// Whether the Script is Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Unique Script Concurrency Id - [Newtonsoft.Json.JsonProperty("concurrencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConcurrencyId { get; set; } - - /// Script Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Script Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Script Category Id - [Newtonsoft.Json.JsonProperty("scriptCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptCategoryId { get; set; } - - /// Script Category Name - [Newtonsoft.Json.JsonProperty("scriptCategoryName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScriptCategoryName { get; set; } - - /// Script Id - [Newtonsoft.Json.JsonProperty("scriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptId { get; set; } - - /// Script Type (Powershell = 1, SQL = 2, SSH = 3) - [Newtonsoft.Json.JsonProperty("scriptType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UserScriptType? ScriptType { get; set; } - - - } - - /// Script Type (Powershell = 1, SQL = 2, SSH = 3) - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum UserScriptType - { - [System.Runtime.Serialization.EnumMember(Value = @"PowerShell")] - PowerShell = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"SQL")] - SQL = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"SSH")] - SSH = 2, - - } - - /// Script Create Options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ScriptCreateArgs - { - /// Whether the Script is Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Additional Data - [Newtonsoft.Json.JsonProperty("additionalData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AdditionalData { get; set; } - - /// Script Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Script Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ODBC Connection String Options - [Newtonsoft.Json.JsonProperty("odbcConnectionStringArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OdbcConnectionStringArgs { get; set; } - - /// Script Text - [Newtonsoft.Json.JsonProperty("script", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Script { get; set; } - - /// Script Category Id - [Newtonsoft.Json.JsonProperty("scriptCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptCategoryId { get; set; } - - /// Script Category Name - [Newtonsoft.Json.JsonProperty("scriptCategoryName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScriptCategoryName { get; set; } - - /// Script Type (Powershell = 1, SQL = 2, SSH = 3) - [Newtonsoft.Json.JsonProperty("scriptType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UserScriptType? ScriptType { get; set; } - - /// Usage Count - [Newtonsoft.Json.JsonProperty("usageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UsageCount { get; set; } - - - } - - /// Script - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ScriptModel - { - /// Whether the Script is Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Addition Data - [Newtonsoft.Json.JsonProperty("additionalData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AdditionalData { get; set; } - - /// Unique Script Concurrency Id - [Newtonsoft.Json.JsonProperty("concurrencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConcurrencyId { get; set; } - - /// Script Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Script Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ODBC Connection String Options - [Newtonsoft.Json.JsonProperty("odbcConnectionStringArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OdbcConnectionStringArgs { get; set; } - - /// Script Text - [Newtonsoft.Json.JsonProperty("script", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Script { get; set; } - - /// Script Category Id - [Newtonsoft.Json.JsonProperty("scriptCategoryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptCategoryId { get; set; } - - /// Script Category Name - [Newtonsoft.Json.JsonProperty("scriptCategoryName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScriptCategoryName { get; set; } - - /// Script Id - [Newtonsoft.Json.JsonProperty("scriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptId { get; set; } - - /// Script Type (Powershell = 1, SQL = 2, SSH = 3) - [Newtonsoft.Json.JsonProperty("scriptType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UserScriptType? ScriptType { get; set; } - - /// Usage Count - [Newtonsoft.Json.JsonProperty("usageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UsageCount { get; set; } - - - } - - /// Specify filtering, paging, sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSdkClientAccountSummaryAndSdkClientAccountFilter - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Additional query options - [Newtonsoft.Json.JsonProperty("filter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SdkClientAccountFilter Filter { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Additional query options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientAccountFilter - { - /// Operator - [Newtonsoft.Json.JsonProperty("operator", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public FilterOperator? Operator { get; set; } - - /// SearchText - [Newtonsoft.Json.JsonProperty("searchText", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SearchText { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Operator - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum FilterOperator - { - [System.Runtime.Serialization.EnumMember(Value = @"All")] - All = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Include")] - Include = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Exclude")] - Exclude = 2, - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientAccountSummary - { - /// ClientId - [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? ClientId { get; set; } - - /// Details - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// UserDisplayName - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// SdkClientAccountCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientAccountCreateArgs - { - /// ClientId - [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? ClientId { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// OnboardingKey - [Newtonsoft.Json.JsonProperty("onboardingKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OnboardingKey { get; set; } - - /// RuleName - [Newtonsoft.Json.JsonProperty("ruleName", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string RuleName { get; set; } - - - } - - /// SdkClientAccountModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientAccountModel - { - /// ClientId - [Newtonsoft.Json.JsonProperty("clientId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? ClientId { get; set; } - - /// ClientSecret - [Newtonsoft.Json.JsonProperty("clientSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ClientSecret { get; set; } - - /// Details - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// UserDisplayName - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// SdkClientAccountUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientAccountUpdateArgs - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Specify filtering, paging, sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSdkClientAuditSummaryAndSdkClientAuditFilter - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Additional query options - [Newtonsoft.Json.JsonProperty("filter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SdkClientAuditFilter Filter { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Additional query options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientAuditFilter - { - /// Operator - [Newtonsoft.Json.JsonProperty("operator", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public FilterOperator? Operator { get; set; } - - /// SearchText - [Newtonsoft.Json.JsonProperty("searchText", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SearchText { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientAuditSummary - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// CorrelationId - [Newtonsoft.Json.JsonProperty("correlationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? CorrelationId { get; set; } - - /// CreatedOn - [Newtonsoft.Json.JsonProperty("createdOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreatedOn { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// SdkClientAccountId - [Newtonsoft.Json.JsonProperty("sdkClientAccountId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SdkClientAccountId { get; set; } - - /// SdkClientAccountName - [Newtonsoft.Json.JsonProperty("sdkClientAccountName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SdkClientAccountName { get; set; } - - /// UserDisplayName - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// SdkClientRuleModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientRuleModel - { - /// Details - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// RequireOnboardingKey - [Newtonsoft.Json.JsonProperty("requireOnboardingKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireOnboardingKey { get; set; } - - /// UserDisplayName - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// SdkClientRuleUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientRuleUpdateArgs - { - /// Details - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// RequireOnboardingKey - [Newtonsoft.Json.JsonProperty("requireOnboardingKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireOnboardingKey { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Specify filtering, paging, sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSdkClientRuleSummaryAndSdkClientRuleFilter - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Additional query options - [Newtonsoft.Json.JsonProperty("filter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SdkClientRuleFilter Filter { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Additional query options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientRuleFilter - { - /// Operator - [Newtonsoft.Json.JsonProperty("operator", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public FilterOperator? Operator { get; set; } - - /// SearchText - [Newtonsoft.Json.JsonProperty("searchText", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SearchText { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientRuleSummary - { - /// Details - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// RequireOnboardingKey - [Newtonsoft.Json.JsonProperty("requireOnboardingKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireOnboardingKey { get; set; } - - /// UserDisplayName - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// SdkClientRuleCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SdkClientRuleCreateArgs - { - /// Details - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// RequireOnboardingKey - [Newtonsoft.Json.JsonProperty("requireOnboardingKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireOnboardingKey { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretAccessModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// The Secret Access model object - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretAccessModel - { - /// The Id of the Access Request Workflow Map. - [Newtonsoft.Json.JsonProperty("accessRequestWorkflowMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AccessRequestWorkflowMapId { get; set; } - - /// The Display Name of the Approver of the request - [Newtonsoft.Json.JsonProperty("approverDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ApproverDisplayName { get; set; } - - /// Indicating if request has been completed - [Newtonsoft.Json.JsonProperty("completed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Completed { get; set; } - - /// Indicating if current user is restricted from viewing the request - [Newtonsoft.Json.JsonProperty("currentUserRestrictedFromReviewing", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CurrentUserRestrictedFromReviewing { get; set; } - - /// The Expiration Date of the request - [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExpirationDate { get; set; } - - /// The Folder Id of the Secret associated to the access request. - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Indicating if request is associated to a Work Flow - [Newtonsoft.Json.JsonProperty("hasWorkflow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasWorkflow { get; set; } - - /// The Comment of the request. - [Newtonsoft.Json.JsonProperty("requestComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestComment { get; set; } - - /// The Date of the request. - [Newtonsoft.Json.JsonProperty("requestDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? RequestDate { get; set; } - - /// The Id of the User requesting access. - [Newtonsoft.Json.JsonProperty("requestingUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RequestingUserId { get; set; } - - /// The Username of the User requesting access. - [Newtonsoft.Json.JsonProperty("requestUsername", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestUsername { get; set; } - - /// The Comment of the response to the request - [Newtonsoft.Json.JsonProperty("responseComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ResponseComment { get; set; } - - /// The Date of the response to the request - [Newtonsoft.Json.JsonProperty("responseDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ResponseDate { get; set; } - - /// The Review Status Message of the request - [Newtonsoft.Json.JsonProperty("reviewStatusMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReviewStatusMessage { get; set; } - - /// The Id of the Secret Access Request. - [Newtonsoft.Json.JsonProperty("secretAccessRequestId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretAccessRequestId { get; set; } - - /// The Id of the Secret associated to the access request. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The Name of the Secret associated to the access request. - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// The Start Date of the request. - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDate { get; set; } - - /// The Status of the request - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public AccessRequestState? Status { get; set; } - - /// The Status Description of the request - [Newtonsoft.Json.JsonProperty("statusDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StatusDescription { get; set; } - - /// The Ticket Number of the request - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// The Ticket System Id of the request - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - - } - - /// The Status of the request - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum AccessRequestState - { - [System.Runtime.Serialization.EnumMember(Value = @"WaitingForRequest")] - WaitingForRequest = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Approved")] - Approved = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Denied")] - Denied = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Canceled")] - Canceled = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"Expired")] - Expired = 5, - - } - - /// Secret Access Create paramaters - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretAccessCreateArgs - { - /// Expiration Date - [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExpirationDate { get; set; } - - /// Request Comment - [Newtonsoft.Json.JsonProperty("requestComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestComment { get; set; } - - /// Secret Id - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Always)] - public int SecretId { get; set; } - - /// Start Date - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDate { get; set; } - - /// Ticket Number - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// Ticket System ID - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - - } - - /// Secret Access Update paramaters - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretAccessUpdateArgs - { - /// Expiration Date - [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DateTimeOffset ExpirationDate { get; set; } - - /// Response Comment - [Newtonsoft.Json.JsonProperty("responseComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ResponseComment { get; set; } - - /// Secret Access Request Id - [Newtonsoft.Json.JsonProperty("secretAccessRequestId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretAccessRequestId { get; set; } - - /// Start Date - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DateTimeOffset StartDate { get; set; } - - /// New status for the request: Pending, Approved, Denied, Canceled - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretAccessModelStatus? Status { get; set; } - - - } - - /// Expiration Date - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DateTimeOffset - { - /// Date - [Newtonsoft.Json.JsonProperty("date", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Date { get; set; } - - /// DateTime - [Newtonsoft.Json.JsonProperty("dateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateTime { get; set; } - - /// Day - [Newtonsoft.Json.JsonProperty("day", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Day { get; set; } - - /// DayOfWeek - [Newtonsoft.Json.JsonProperty("dayOfWeek", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DayOfWeek? DayOfWeek { get; set; } - - /// DayOfYear - [Newtonsoft.Json.JsonProperty("dayOfYear", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DayOfYear { get; set; } - - /// Hour - [Newtonsoft.Json.JsonProperty("hour", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Hour { get; set; } - - /// LocalDateTime - [Newtonsoft.Json.JsonProperty("localDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LocalDateTime { get; set; } - - /// Millisecond - [Newtonsoft.Json.JsonProperty("millisecond", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Millisecond { get; set; } - - /// Minute - [Newtonsoft.Json.JsonProperty("minute", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Minute { get; set; } - - /// Month - [Newtonsoft.Json.JsonProperty("month", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Month { get; set; } - - /// Offset - [Newtonsoft.Json.JsonProperty("offset", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? Offset { get; set; } - - /// Second - [Newtonsoft.Json.JsonProperty("second", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Second { get; set; } - - /// Ticks - [Newtonsoft.Json.JsonProperty("ticks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? Ticks { get; set; } - - /// TimeOfDay - [Newtonsoft.Json.JsonProperty("timeOfDay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? TimeOfDay { get; set; } - - /// UtcDateTime - [Newtonsoft.Json.JsonProperty("utcDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? UtcDateTime { get; set; } - - /// UtcTicks - [Newtonsoft.Json.JsonProperty("utcTicks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? UtcTicks { get; set; } - - /// Year - [Newtonsoft.Json.JsonProperty("year", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Year { get; set; } - - - } - - /// New status for the request: Pending, Approved, Denied, Canceled - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretAccessModelStatus - { - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Approved")] - Approved = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Denied")] - Denied = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Canceled")] - Canceled = 3, - - } - - /// The Secret Access model object - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretAccessActionResultModel - { - /// The Id of the Access Request Workflow Map. - [Newtonsoft.Json.JsonProperty("accessRequestWorkflowMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AccessRequestWorkflowMapId { get; set; } - - /// ActionResultMessage - [Newtonsoft.Json.JsonProperty("actionResultMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ActionResultMessage { get; set; } - - /// The Display Name of the Approver of the request - [Newtonsoft.Json.JsonProperty("approverDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ApproverDisplayName { get; set; } - - /// Indicating if request has been completed - [Newtonsoft.Json.JsonProperty("completed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Completed { get; set; } - - /// Indicating if current user is restricted from viewing the request - [Newtonsoft.Json.JsonProperty("currentUserRestrictedFromReviewing", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CurrentUserRestrictedFromReviewing { get; set; } - - /// The Expiration Date of the request - [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExpirationDate { get; set; } - - /// The Folder Id of the Secret associated to the access request. - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Indicating if request is associated to a Work Flow - [Newtonsoft.Json.JsonProperty("hasWorkflow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasWorkflow { get; set; } - - /// The Comment of the request. - [Newtonsoft.Json.JsonProperty("requestComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestComment { get; set; } - - /// The Date of the request. - [Newtonsoft.Json.JsonProperty("requestDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? RequestDate { get; set; } - - /// The Id of the User requesting access. - [Newtonsoft.Json.JsonProperty("requestingUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RequestingUserId { get; set; } - - /// The Username of the User requesting access. - [Newtonsoft.Json.JsonProperty("requestUsername", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestUsername { get; set; } - - /// The Comment of the response to the request - [Newtonsoft.Json.JsonProperty("responseComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ResponseComment { get; set; } - - /// The Date of the response to the request - [Newtonsoft.Json.JsonProperty("responseDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ResponseDate { get; set; } - - /// The Review Status Message of the request - [Newtonsoft.Json.JsonProperty("reviewStatusMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReviewStatusMessage { get; set; } - - /// The Id of the Secret Access Request. - [Newtonsoft.Json.JsonProperty("secretAccessRequestId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretAccessRequestId { get; set; } - - /// The Id of the Secret associated to the access request. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The Name of the Secret associated to the access request. - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// The Start Date of the request. - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDate { get; set; } - - /// The Status of the request - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public AccessRequestState? Status { get; set; } - - /// The Status Description of the request - [Newtonsoft.Json.JsonProperty("statusDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StatusDescription { get; set; } - - /// The Ticket Number of the request - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// The Ticket System Id of the request - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretAccessRequestHistoryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretAccessRequestHistoryModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// DateRecorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Details - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// FullName - [Newtonsoft.Json.JsonProperty("fullName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FullName { get; set; } - - - } - - /// SecretAccessOptionsModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretAccessOptionsModel - { - /// CustomCheckoutIntervalDays - [Newtonsoft.Json.JsonProperty("customCheckoutIntervalDays", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomCheckoutIntervalDays { get; set; } - - /// CustomCheckoutIntervalHours - [Newtonsoft.Json.JsonProperty("customCheckoutIntervalHours", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomCheckoutIntervalHours { get; set; } - - /// CustomCheckoutIntervalMinutes - [Newtonsoft.Json.JsonProperty("customCheckoutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CustomCheckoutIntervalMinutes { get; set; } - - /// EditorsAlsoRequireApproval - [Newtonsoft.Json.JsonProperty("editorsAlsoRequireApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EditorsAlsoRequireApproval { get; set; } - - /// EnableDoubleLock - [Newtonsoft.Json.JsonProperty("enableDoubleLock", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableDoubleLock { get; set; } - - /// EnableRequiresApprovalForAccess - [Newtonsoft.Json.JsonProperty("enableRequiresApprovalForAccess", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableRequiresApprovalForAccess { get; set; } - - /// IsDefaultCheckoutInterval - [Newtonsoft.Json.JsonProperty("isDefaultCheckoutInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDefaultCheckoutInterval { get; set; } - - /// OwnersAndApproversAlsoRequireApproval - [Newtonsoft.Json.JsonProperty("ownersAndApproversAlsoRequireApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OwnersAndApproversAlsoRequireApproval { get; set; } - - /// RequireCheckout - [Newtonsoft.Json.JsonProperty("requireCheckout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireCheckout { get; set; } - - /// RequireCommentTicketNumber - [Newtonsoft.Json.JsonProperty("requireCommentTicketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireCommentTicketNumber { get; set; } - - - } - - /// SecretAccessViewCommentArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretAccessViewCommentArgs - { - /// Comment - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// Ticket Number - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// Ticket System Id - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - - } - - /// The Secret Dependency model object - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyModel - { - /// Whether or not the Secret Dependency is active. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The last run status of the child Secret Dependency. - [Newtonsoft.Json.JsonProperty("childDependencyStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ChildDependencyStatus { get; set; } - - /// The Id of the dependency that will be looked at when Condition Mode is set to 'DEPENDENCYPASS', 'DEPENDENCYFAIL'. The Dependency must have a SortOrder lower than the current one. - [Newtonsoft.Json.JsonProperty("conditionDependencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ConditionDependencyId { get; set; } - - /// Condition Mode governs if this dependency's run relies on the result of other dependencies above it. The Default is ALWAYSRUN. Other values maybe 'All Pass', 'Any Fail', 'DEPENDENCYPASS', 'DEPENDENCYFAIL'. - [Newtonsoft.Json.JsonProperty("conditionMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConditionMode { get; set; } - - /// The DependencyTemplate properties that are populated if the Dependency is based on a Dependency template. - [Newtonsoft.Json.JsonProperty("dependencyTemplate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDependencyTemplate DependencyTemplate { get; set; } - - /// A description for the Secret Dependency. - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// The Id of the Dependency Group that contains the Secret Dependency. - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// The Id of the Secret Dependency. - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The last Log message for the Secret Dependency. - [Newtonsoft.Json.JsonProperty("logMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LogMessage { get; set; } - - /// The Id of the Privileged Secret that the Secret Dependency will use to run. - [Newtonsoft.Json.JsonProperty("privilegedAccountSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrivilegedAccountSecretId { get; set; } - - /// The RunScript properties that are populated if the Dependency is directly running a script. - [Newtonsoft.Json.JsonProperty("runScript", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDependencyRunScript RunScript { get; set; } - - /// The last run status of the Secret Dependency. - [Newtonsoft.Json.JsonProperty("secretDependencyStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SecretDependencyStatus { get; set; } - - /// The Id of the Secret that the Secret Dependency is assigned to. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The Name of the Secret that the Secret Dependency is assigned to. - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// The Settings used by the Secret Dependency. (Ex: WaitBeforeSeconds, Database, Port, SSHKeyDigest). If a setting exists with the same name (or intent in the case of Port and SqlPort) as a field on the Dependency template's DependencyScanItemFields collection, the value assigned to the setting takes precidence and will overwrite the corresponding DependencyScanItemField. - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Settings { get; set; } - - /// The sort order of the Secret Dependency in the group. Determines the order of execution of the dependencies within a group. - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// The Id of the Secret containing the SSH key. (If dependency is tied to SSH key Secret - [Newtonsoft.Json.JsonProperty("sshKeySecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshKeySecretId { get; set; } - - /// The Name of the Secret containing the SSH key. (If dependency is tied to SSH key Secret - [Newtonsoft.Json.JsonProperty("sshKeySecretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshKeySecretName { get; set; } - - /// The Id of the type of Secret Dependency. - [Newtonsoft.Json.JsonProperty("typeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TypeId { get; set; } - - /// The name of the type of Secret Dependency. - [Newtonsoft.Json.JsonProperty("typeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TypeName { get; set; } - - - } - - /// Object filled and used for Secret Dependencies that refer to a Dependency Template - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyTemplate - { - /// The id of the script (if any) used by the Dependency Template - [Newtonsoft.Json.JsonProperty("changerScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ChangerScriptId { get; set; } - - /// The Scan Item Fields used by the Dependency Template - [Newtonsoft.Json.JsonProperty("dependencyScanItemFields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DependencyScanItemFields { get; set; } - - /// The name of the script (if any) used by the Dependency Template - [Newtonsoft.Json.JsonProperty("scriptName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScriptName { get; set; } - - /// The id of the Dependency Changer used by the Dependency Template - [Newtonsoft.Json.JsonProperty("secretDependencyChangerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretDependencyChangerId { get; set; } - - /// The id of the Dependency Template - [Newtonsoft.Json.JsonProperty("secretDependencyTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretDependencyTemplateId { get; set; } - - - } - - /// Represents the ScanItemField used for Discovery dependency matching - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyScanItemField - { - /// Id of the ScanItemField - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Name of the ScanItemField - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ScanItemField Parent name. Will Match Name if no parent is inherited. - [Newtonsoft.Json.JsonProperty("parentName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ParentName { get; set; } - - /// Value of the ScanItemField - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// The RunScript details of a Dependency that directly runs a Script - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyRunScript - { - /// The machine name that the Secret Dependency runs on - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// Connection arguments used for ODBC connections - [Newtonsoft.Json.JsonProperty("odbcConnectionArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OdbcConnectionArguments { get; set; } - - /// Parameter script arguments used by the script - [Newtonsoft.Json.JsonProperty("scriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ScriptArguments { get; set; } - - /// The Id of the script that the Secret Dependency runs. (If directly running a script) - [Newtonsoft.Json.JsonProperty("scriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptId { get; set; } - - /// The Name of the script that the Secret Dependency runs. - [Newtonsoft.Json.JsonProperty("scriptName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScriptName { get; set; } - - /// The service name of the Secret Dependency - [Newtonsoft.Json.JsonProperty("serviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceName { get; set; } - - - } - - /// Connection arguments used for ODBC connections - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyOdbcConnectionArg - { - /// Name of the argument - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Value for the argument - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Arguments used for Run Script Dependencies - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyUniversalScriptArgument - { - /// Name of the argument - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Argument type - [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Type { get; set; } - - /// Argument value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Settings used by Secret Dependency Templates - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencySettingMapForDisplay - { - /// The default read-only setting value on the changer that will be used if no setting value has been given. - [Newtonsoft.Json.JsonProperty("changerSettingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ChangerSettingValue { get; set; } - - /// The read-only Setting details. - [Newtonsoft.Json.JsonProperty("setting", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDependencySetting Setting { get; set; } - - /// The Setting Id - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingId { get; set; } - - /// The Setting Name - [Newtonsoft.Json.JsonProperty("settingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingName { get; set; } - - /// The value for the setting that will be stored in the database. This value should be set when editing or creating a Dependency. If not set the default value will be calculated by looking at the Changer or Script. - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingValue { get; set; } - - - } - - /// Secret Dependency Settings - Mostly used internally - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencySetting - { - /// Indicates the setting is active. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Indicates the setting details may be editted. - [Newtonsoft.Json.JsonProperty("canEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEdit { get; set; } - - /// Indicates the setting value may be editted. - [Newtonsoft.Json.JsonProperty("canEditValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEditValue { get; set; } - - /// The Child Settings that would be used for list of options. - [Newtonsoft.Json.JsonProperty("childSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ChildSettings { get; set; } - - /// Default value if the setting is not given a value - [Newtonsoft.Json.JsonProperty("defaultValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DefaultValue { get; set; } - - /// Setting Display Name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Id of the setting - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Indicates the setting is visible on the UI. - [Newtonsoft.Json.JsonProperty("isVisibile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsVisibile { get; set; } - - /// Parent Setting Id used when a setting has child options. - [Newtonsoft.Json.JsonProperty("parentSettingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ParentSettingId { get; set; } - - /// Regex used to validate the input - [Newtonsoft.Json.JsonProperty("regexValidation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RegexValidation { get; set; } - - /// Name of the setting - [Newtonsoft.Json.JsonProperty("settingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingName { get; set; } - - /// Section Id of the setting - [Newtonsoft.Json.JsonProperty("settingSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingSectionId { get; set; } - - /// Type of Setting (Default (string) = 0, Integer = 1, String = 2, Boolean = 3, StringArray = 4, DropDown = 5,DropDownItem = 6 - [Newtonsoft.Json.JsonProperty("settingType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingType { get; set; } - - /// Subsetting Section Id - [Newtonsoft.Json.JsonProperty("subSettingSectionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SubSettingSectionId { get; set; } - - - } - - /// SecretDependencyUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyUpdateArgs - { - /// Whether or not the Secret Dependency is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The Id of the dependency that will be looked at when Condition Mode is set to 'DEPENDENCYPASS', 'DEPENDENCYFAIL'. The Dependency must have a SortOrder lower than the current one. - [Newtonsoft.Json.JsonProperty("conditionDependencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ConditionDependencyId { get; set; } - - /// Condition Mode governs if this dependency's run relies on the result of other dependencies above it. The Default is ALWAYSRUN. Other values maybe 'All Pass', 'Any Fail', 'DEPENDENCYPASS', 'DEPENDENCYFAIL'. - [Newtonsoft.Json.JsonProperty("conditionMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConditionMode { get; set; } - - /// The DependencyTemplate properties that are populated if the Dependency is based on a Dependency template - [Newtonsoft.Json.JsonProperty("dependencyTemplate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDependencyTemplate DependencyTemplate { get; set; } - - /// A description for the Secret Dependency - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// The Id of the Dependency Group that contains the Secret Dependency. If set to 0 or a group id that does not exist on the secret, an error will be thrown. - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// The Id of the Secret Dependency - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The machine name that the Secret Dependency runs on - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// The Id of the Privileged Secret that the Secret Dependency will use to run - [Newtonsoft.Json.JsonProperty("privilegedAccountSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrivilegedAccountSecretId { get; set; } - - /// The RunScript properties that are populated if the Dependency is directly running a script - [Newtonsoft.Json.JsonProperty("runScript", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDependencyRunScript RunScript { get; set; } - - /// Read Only. The Id of the Secret that the Secret Dependency is assigned to. Cannot move a dependency to another secret by changing its SecretId. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Read Only. The Name of the Secret that the Secret Dependency is assigned to - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// The service name of the Secret Dependency - [Newtonsoft.Json.JsonProperty("serviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceName { get; set; } - - /// The Settings used by the Secret Dependency. (Ex: WaitBeforeSeconds, Database, Port, SSHKeyDigest) - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Settings { get; set; } - - /// The sort order of the Secret Dependency in the group. Determines the order of execution of the dependencies within a group. If not set (default value 0), the dependency will be added at the end of the group. If less than zero the dependency will be added as the first dependency in the group and all other dependencies in the group will be adjusted. - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// The Id of the Secret containing the SSH key. (If dependency is tied to SSH key Secret - [Newtonsoft.Json.JsonProperty("sshKeySecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshKeySecretId { get; set; } - - /// The Id of the type of Secret Dependency - [Newtonsoft.Json.JsonProperty("typeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TypeId { get; set; } - - /// Read Only. The name of the type of Secret Dependency - [Newtonsoft.Json.JsonProperty("typeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TypeName { get; set; } - - - } - - /// ILogicResultOfSecretDependencyGroup[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ILogicResultOfSecretDependencyGroupOf - { - /// Model - [Newtonsoft.Json.JsonProperty("model", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Model { get; set; } - - - } - - /// A Secret Dependency Group Object. A container for a logical collection of Secret Dependencies that use the same site. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyGroup - { - /// The Id of the Secret Dependency Group - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The name of the Secret Dependency Group - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// The Id of the Site that all dependencies in this group use - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// The Name of the Site that all dependencies in this group use - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - /// Total Enabled Secret dependencies in this group with a Failed status - [Newtonsoft.Json.JsonProperty("statusFailedCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? StatusFailedCount { get; set; } - - /// Total Enabled Secret dependencies in this group that have not yet run - [Newtonsoft.Json.JsonProperty("statusNotRunCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? StatusNotRunCount { get; set; } - - /// Total Enabled Secret dependencies in this group with a Success status - [Newtonsoft.Json.JsonProperty("statusSuccessCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? StatusSuccessCount { get; set; } - - /// Total Enabled Secret dependencies in this group - [Newtonsoft.Json.JsonProperty("totalDependencies", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TotalDependencies { get; set; } - - - } - - /// A Secret Dependency Group Object. A container for a logical collection of Secret Dependencies that use the same site. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyGroupCreateArgs - { - /// The name of the Secret Dependency Group - [Newtonsoft.Json.JsonProperty("secretDependencyGroupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretDependencyGroupName { get; set; } - - /// The Id of the Site that all dependencies in this group use - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - - } - - /// DependencyScript[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DependencyScript - { - /// The Settings of the script used for arguments - [Newtonsoft.Json.JsonProperty("arguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Arguments { get; set; } - - /// The Script Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The name of the script - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// The connection arguments of the script if it is a SQL based script - [Newtonsoft.Json.JsonProperty("odbcConnectionArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection OdbcConnectionArguments { get; set; } - - - } - - /// DependencyTemplate[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DependencyTemplate - { - /// Whether or not the Depenency Template is Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The Depenency Template Changer Id - [Newtonsoft.Json.JsonProperty("dependencyChangerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DependencyChangerId { get; set; } - - /// The Dependency Template Type Id - [Newtonsoft.Json.JsonProperty("dependencyTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DependencyTypeId { get; set; } - - /// The Dependency Template Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The Dependency Template Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretDependencySummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// The Summary object for a Secret Dependency - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencySummary - { - /// Whether or not this dependency is enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// The Id of the Dependency Group that contains the Secret Dependency - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// The Id of the Secret Dependency - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// The machine name that the Secret Dependency runs on - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// The order for this dependency within its group - [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Order { get; set; } - - /// The last run result for this dependency - [Newtonsoft.Json.JsonProperty("runResult", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public DependencyRunResultStatus? RunResult { get; set; } - - /// The Id of the Secret that the Secret Dependency is assigned to - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The service name of the Secret Dependency - [Newtonsoft.Json.JsonProperty("serviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceName { get; set; } - - /// The Id of the type of Secret Dependency - [Newtonsoft.Json.JsonProperty("typeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TypeId { get; set; } - - /// The name of the type of Secret Dependency - [Newtonsoft.Json.JsonProperty("typeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TypeName { get; set; } - - - } - - /// The last run result for this dependency - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum DependencyRunResultStatus - { - [System.Runtime.Serialization.EnumMember(Value = @"Success")] - Success = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Failed")] - Failed = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"NotRun")] - NotRun = 2, - - } - - /// The Secret Dependency Create Arguments object - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDependencyCreateArgs - { - /// Whether or not the Secret Dependency is active. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The Id of the dependency that will be looked at when Condition Mode is set to 'DEPENDENCYPASS', 'DEPENDENCYFAIL'. The Dependency must have a SortOrder lower than the current one. - [Newtonsoft.Json.JsonProperty("conditionDependencyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ConditionDependencyId { get; set; } - - /// Condition Mode governs if this dependency's run relies on the result of other dependencies above it. The Default is ALWAYSRUN. Other values maybe 'All Pass', 'Any Fail', 'DEPENDENCYPASS', 'DEPENDENCYFAIL'. - [Newtonsoft.Json.JsonProperty("conditionMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConditionMode { get; set; } - - /// The DependencyTemplate properties that are populated if the Dependency is based on a Dependency template. - [Newtonsoft.Json.JsonProperty("dependencyTemplate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDependencyTemplate DependencyTemplate { get; set; } - - /// A description for the Secret Dependency. - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// The Id of the Dependency Group that contains the Secret Dependency. If set to default value of 0, it will be added to the first group on the secret. - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// The machine name that the Secret Dependency runs on. - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// The Id of the Privileged Secret that the Secret Dependency will use to run. - [Newtonsoft.Json.JsonProperty("privilegedAccountSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrivilegedAccountSecretId { get; set; } - - /// The RunScript properties that are populated if the Dependency is directly running a script. - [Newtonsoft.Json.JsonProperty("runScript", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDependencyRunScript RunScript { get; set; } - - /// The Id of the Secret that the Secret Dependency is assigned to. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Read Only. The Name of the Secret that the Secret Dependency is assigned to. - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// The service name of the Secret Dependency. - [Newtonsoft.Json.JsonProperty("serviceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceName { get; set; } - - /// The Settings used by the Secret Dependency. (Ex: WaitBeforeSeconds, Database, Port, SSHKeyDigest) - [Newtonsoft.Json.JsonProperty("settings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Settings { get; set; } - - /// The sort order of the Secret Dependency in the group. Determines the order of execution of the dependencies within a group. If set to the default value of 0, the dependency will be added at the end of the group. If less than zero the dependency will be added as the first dependency in the group and all other dependencies in the group will be adjusted. - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// The Id of the Secret containing the SSH key. (If dependency is tied to SSH key Secret) - [Newtonsoft.Json.JsonProperty("sshKeySecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshKeySecretId { get; set; } - - /// The Id of the type of Secret Dependency. - [Newtonsoft.Json.JsonProperty("typeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TypeId { get; set; } - - /// Read Only. The name of the type of Secret Dependency. - [Newtonsoft.Json.JsonProperty("typeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TypeName { get; set; } - - - } - - /// Information about the current status of a running task - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TaskProgress - { - /// A list of errors for the task - [Newtonsoft.Json.JsonProperty("errors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Errors { get; set; } - - /// True if the task is complete - [Newtonsoft.Json.JsonProperty("isComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsComplete { get; set; } - - /// The estimated percentage complete of the task - [Newtonsoft.Json.JsonProperty("percentageComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PercentageComplete { get; set; } - - /// The current status of the task - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Status { get; set; } - - /// The task identifier - [Newtonsoft.Json.JsonProperty("taskIdentifier", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TaskIdentifier { get; set; } - - - } - - /// A description of an error for a task - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TaskError - { - /// The error message - [Newtonsoft.Json.JsonProperty("errorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ErrorMessage { get; set; } - - /// The name of the item that had the error - [Newtonsoft.Json.JsonProperty("itemName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretEraseRequestHistoryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretEraseRequestHistoryModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// DateRecorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Details - [Newtonsoft.Json.JsonProperty("details", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Details { get; set; } - - /// FullName - [Newtonsoft.Json.JsonProperty("fullName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FullName { get; set; } - - - } - - /// SecretEraseRequestModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretEraseRequestModel - { - /// CanApproveOrDeny - [Newtonsoft.Json.JsonProperty("canApproveOrDeny", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanApproveOrDeny { get; set; } - - /// CanCancel - [Newtonsoft.Json.JsonProperty("canCancel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanCancel { get; set; } - - /// EraseAfter - [Newtonsoft.Json.JsonProperty("eraseAfter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EraseAfter { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// RequestComment - [Newtonsoft.Json.JsonProperty("requestComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestComment { get; set; } - - /// RequestDate - [Newtonsoft.Json.JsonProperty("requestDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? RequestDate { get; set; } - - /// RequestUserId - [Newtonsoft.Json.JsonProperty("requestUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RequestUserId { get; set; } - - /// RequestUserName - [Newtonsoft.Json.JsonProperty("requestUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestUserName { get; set; } - - /// ResponseComment - [Newtonsoft.Json.JsonProperty("responseComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ResponseComment { get; set; } - - /// ReviewStatusMessage - [Newtonsoft.Json.JsonProperty("reviewStatusMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReviewStatusMessage { get; set; } - - /// SecretCount - [Newtonsoft.Json.JsonProperty("secretCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretCount { get; set; } - - /// Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Status { get; set; } - - /// StatusDescription - [Newtonsoft.Json.JsonProperty("statusDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StatusDescription { get; set; } - - /// TimeErased - [Newtonsoft.Json.JsonProperty("timeErased", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? TimeErased { get; set; } - - /// WorkflowInstanceId - [Newtonsoft.Json.JsonProperty("workflowInstanceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowInstanceId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretEraseRequestSecretModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretEraseRequestSecretModel - { - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// RequestId - [Newtonsoft.Json.JsonProperty("requestId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RequestId { get; set; } - - /// SecretId - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// SecretName - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// TimeErased - [Newtonsoft.Json.JsonProperty("timeErased", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? TimeErased { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretEraseRequestModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// SecretEraseRequestCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretEraseRequestCreateArgs - { - /// Erase After Date - [Newtonsoft.Json.JsonProperty("eraseAfter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EraseAfter { get; set; } - - /// Request Comment - [Newtonsoft.Json.JsonProperty("requestComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RequestComment { get; set; } - - /// Ids of Secrets to Erase - [Newtonsoft.Json.JsonProperty("secretIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretIds { get; set; } - - - } - - /// SecretEraseRequestActionResultModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretEraseRequestActionResultModel - { - /// ActionResultMessage - [Newtonsoft.Json.JsonProperty("actionResultMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ActionResultMessage { get; set; } - - /// Request - [Newtonsoft.Json.JsonProperty("request", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretEraseRequestModel Request { get; set; } - - - } - - /// SecretEraseRequestUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretEraseRequestUpdateArgs - { - /// Erase After Date - [Newtonsoft.Json.JsonProperty("eraseAfter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OptionalDateTimeOffset EraseAfter { get; set; } - - /// Response Comment - [Newtonsoft.Json.JsonProperty("responseComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ResponseComment { get; set; } - - /// Secret Erase Request Id - [Newtonsoft.Json.JsonProperty("secretEraseRequestId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretEraseRequestId { get; set; } - - /// New status for the request: Pending, Approved, Denied, Canceled, Completed - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretEraseRequestModelStatus? Status { get; set; } - - - } - - /// New status for the request: Pending, Approved, Denied, Canceled, Completed - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretEraseRequestModelStatus - { - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Approved")] - Approved = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Denied")] - Denied = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Canceled")] - Canceled = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Completed")] - Completed = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"CompletedWithErrors")] - CompletedWithErrors = 5, - - } - - /// SecretTemplateModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplateModel - { - /// Secret template fields - [Newtonsoft.Json.JsonProperty("fields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Fields { get; set; } - - /// Secret template ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Secret template name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Password Type that the secret template uses for password change - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - - } - - /// Secret template fields - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ISecretTemplateField - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// EditablePermission - [Newtonsoft.Json.JsonProperty("editablePermission", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EditablePermission { get; set; } - - /// EditRequires - [Newtonsoft.Json.JsonProperty("editRequires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EditRequiresOptions? EditRequires { get; set; } - - /// FieldSlugName - [Newtonsoft.Json.JsonProperty("fieldSlugName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldSlugName { get; set; } - - /// GeneratePasswordCharacterSet - [Newtonsoft.Json.JsonProperty("generatePasswordCharacterSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GeneratePasswordCharacterSet { get; set; } - - /// GeneratePasswordLength - [Newtonsoft.Json.JsonProperty("generatePasswordLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GeneratePasswordLength { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// HistoryLength - [Newtonsoft.Json.JsonProperty("historyLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HistoryLength { get; set; } - - /// IsExpirationField - [Newtonsoft.Json.JsonProperty("isExpirationField", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsExpirationField { get; set; } - - /// IsFile - [Newtonsoft.Json.JsonProperty("isFile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFile { get; set; } - - /// IsIndexable - [Newtonsoft.Json.JsonProperty("isIndexable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsIndexable { get; set; } - - /// IsList - [Newtonsoft.Json.JsonProperty("isList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsList { get; set; } - - /// IsNotes - [Newtonsoft.Json.JsonProperty("isNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsNotes { get; set; } - - /// IsPassword - [Newtonsoft.Json.JsonProperty("isPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPassword { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// IsUrl - [Newtonsoft.Json.JsonProperty("isUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUrl { get; set; } - - /// ListType - [Newtonsoft.Json.JsonProperty("listType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ListType? ListType { get; set; } - - /// MustEncrypt - [Newtonsoft.Json.JsonProperty("mustEncrypt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MustEncrypt { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// PasswordRequirementId - [Newtonsoft.Json.JsonProperty("passwordRequirementId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordRequirementId { get; set; } - - /// PasswordTypeFieldId - [Newtonsoft.Json.JsonProperty("passwordTypeFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeFieldId { get; set; } - - /// SecretTemplateFieldId - [Newtonsoft.Json.JsonProperty("secretTemplateFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTemplateFieldId { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// EditRequires - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum EditRequiresOptions - { - [System.Runtime.Serialization.EnumMember(Value = @"Edit")] - Edit = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Owner")] - Owner = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"NotEditable")] - NotEditable = 2, - - } - - /// ListType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ListType - { - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Generic")] - Generic = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"URL")] - URL = 2, - - } - - /// SecretSearchByUrlSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSearchByUrlSummary - { - /// HasOwnerOrEditAccess - [Newtonsoft.Json.JsonProperty("hasOwnerOrEditAccess", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasOwnerOrEditAccess { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IsButtonBound - [Newtonsoft.Json.JsonProperty("isButtonBound", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsButtonBound { get; set; } - - /// IsFavoriteSecret - [Newtonsoft.Json.JsonProperty("isFavoriteSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFavoriteSecret { get; set; } - - /// IsSystemFolder - [Newtonsoft.Json.JsonProperty("isSystemFolder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystemFolder { get; set; } - - /// MatchOrderType - [Newtonsoft.Json.JsonProperty("matchOrderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MatchType? MatchOrderType { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// RedirectUrl - [Newtonsoft.Json.JsonProperty("redirectUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RedirectUrl { get; set; } - - /// RequireComment - [Newtonsoft.Json.JsonProperty("requireComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireComment { get; set; } - - /// ResultPriority - [Newtonsoft.Json.JsonProperty("resultPriority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ResultPriority { get; set; } - - /// SecretTypeId - [Newtonsoft.Json.JsonProperty("secretTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTypeId { get; set; } - - /// SecretUrl - [Newtonsoft.Json.JsonProperty("secretUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretUrl { get; set; } - - /// ShouldRedirect - [Newtonsoft.Json.JsonProperty("shouldRedirect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ShouldRedirect { get; set; } - - - } - - /// MatchOrderType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum MatchType - { - [System.Runtime.Serialization.EnumMember(Value = @"Loose")] - Loose = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Partial")] - Partial = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Exact")] - Exact = 2, - - } - - /// SecretExtensionSearchSummary[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretExtensionSearchSummary - { - /// HasOwnerOrEditAccess - [Newtonsoft.Json.JsonProperty("hasOwnerOrEditAccess", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasOwnerOrEditAccess { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IsButtonBound - [Newtonsoft.Json.JsonProperty("isButtonBound", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsButtonBound { get; set; } - - /// IsFavoriteSecret - [Newtonsoft.Json.JsonProperty("isFavoriteSecret", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFavoriteSecret { get; set; } - - /// IsSystemFolder - [Newtonsoft.Json.JsonProperty("isSystemFolder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsSystemFolder { get; set; } - - /// MatchOrderType - [Newtonsoft.Json.JsonProperty("matchOrderType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MatchType? MatchOrderType { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// RedirectUrl - [Newtonsoft.Json.JsonProperty("redirectUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RedirectUrl { get; set; } - - /// RequireComment - [Newtonsoft.Json.JsonProperty("requireComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequireComment { get; set; } - - /// ResultPriority - [Newtonsoft.Json.JsonProperty("resultPriority", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ResultPriority { get; set; } - - /// SecretTypeId - [Newtonsoft.Json.JsonProperty("secretTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTypeId { get; set; } - - /// ShouldRedirect - [Newtonsoft.Json.JsonProperty("shouldRedirect", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ShouldRedirect { get; set; } - - - } - - /// ExtensionAutoFillValueArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ExtensionAutoFillValueArgs - { - /// The SecretId for the Secret to retrieve the auto-fill values from. - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The URL for which the auto-fill values are being retrieved. Must be the same origin as the URL on the Secret. - [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Url { get; set; } - - - } - - /// SecretExtensionAutoFillResult - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretExtensionAutoFillResult - { - /// Password - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password { get; set; } - - /// Username - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } - - /// UseSessionRecording - [Newtonsoft.Json.JsonProperty("useSessionRecording", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? UseSessionRecording { get; set; } - - /// WebLauncherRequiresIncognitoMode - [Newtonsoft.Json.JsonProperty("webLauncherRequiresIncognitoMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WebLauncherRequiresIncognitoMode { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretViewedByUserModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretViewedByUserModel - { - /// CanView - [Newtonsoft.Json.JsonProperty("canView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanView { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// DisplayNameAndUserName - [Newtonsoft.Json.JsonProperty("displayNameAndUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayNameAndUserName { get; set; } - - /// Domain - [Newtonsoft.Json.JsonProperty("domain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Domain { get; set; } - - /// Enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// UserName - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// SecretDetailHookUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailHookUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailHookUpdateModel Data { get; set; } - - - } - - /// Secret Detail Hook Update Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailHookUpdateModel - { - /// Arguments - [Newtonsoft.Json.JsonProperty("arguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Arguments { get; set; } - - /// Database - [Newtonsoft.Json.JsonProperty("database", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Database { get; set; } - - /// Hook Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Description { get; set; } - - /// Hook Event Id - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 EventActionId { get; set; } - - /// Failure Message - [Newtonsoft.Json.JsonProperty("failureMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString FailureMessage { get; set; } - - /// Hook Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// Parameters - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - /// Port - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Port { get; set; } - - /// Hook PRE or POST Option - [Newtonsoft.Json.JsonProperty("prePostOption", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString PrePostOption { get; set; } - - /// Privilige Secret Id - [Newtonsoft.Json.JsonProperty("privilegedSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 PrivilegedSecretId { get; set; } - - /// Hook Script Id - [Newtonsoft.Json.JsonProperty("scriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 ScriptId { get; set; } - - /// Hook Script Type Id - [Newtonsoft.Json.JsonProperty("scriptTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 ScriptTypeId { get; set; } - - /// Server Key Digest - [Newtonsoft.Json.JsonProperty("serverKeyDigest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServerKeyDigest { get; set; } - - /// Server Name - [Newtonsoft.Json.JsonProperty("serverName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ServerName { get; set; } - - /// Hook Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SortOrder { get; set; } - - /// SSH Key Secret Id - [Newtonsoft.Json.JsonProperty("sshKeySecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SshKeySecretId { get; set; } - - /// Hook Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Status { get; set; } - - /// Stop On Failure - [Newtonsoft.Json.JsonProperty("stopOnFailure", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean StopOnFailure { get; set; } - - - } - - /// Hook Parameter - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailHookParameterViewModel - { - /// Parameter Name - [Newtonsoft.Json.JsonProperty("parameterName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ParameterName { get; set; } - - /// Parameter Type - [Newtonsoft.Json.JsonProperty("parameterType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ParameterType { get; set; } - - /// Parameter Value - [Newtonsoft.Json.JsonProperty("parameterValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ParameterValue { get; set; } - - - } - - /// Secret Detail Hook View Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailHookModel - { - /// Arguments - [Newtonsoft.Json.JsonProperty("arguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Arguments { get; set; } - - /// Database - [Newtonsoft.Json.JsonProperty("database", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Database { get; set; } - - /// Hook Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Event Action Id - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventActionId { get; set; } - - /// Failure Message - [Newtonsoft.Json.JsonProperty("failureMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FailureMessage { get; set; } - - /// Hook Id - [Newtonsoft.Json.JsonProperty("hookId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HookId { get; set; } - - /// Hook Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Parameters - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - /// Port - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Port { get; set; } - - /// Hook PRE or POST Option - [Newtonsoft.Json.JsonProperty("prePostOption", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PrePostOption { get; set; } - - /// Privilige Secret Id - [Newtonsoft.Json.JsonProperty("privilegedSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrivilegedSecretId { get; set; } - - /// Script Id - [Newtonsoft.Json.JsonProperty("scriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptId { get; set; } - - /// Script Type Id - [Newtonsoft.Json.JsonProperty("scriptTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptTypeId { get; set; } - - /// Secret Hook Id - [Newtonsoft.Json.JsonProperty("secretHookId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretHookId { get; set; } - - /// Server Key Digest - [Newtonsoft.Json.JsonProperty("serverKeyDigest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerKeyDigest { get; set; } - - /// Server Name - [Newtonsoft.Json.JsonProperty("serverName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerName { get; set; } - - /// Hook Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// SSH Key Secret Id - [Newtonsoft.Json.JsonProperty("sshKeySecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshKeySecretId { get; set; } - - /// Hook Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Status { get; set; } - - /// Stop on Failure - [Newtonsoft.Json.JsonProperty("stopOnFailure", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? StopOnFailure { get; set; } - - - } - - /// SecretDetailHookSummaryViewModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailHookSummaryViewModel - { - /// Hook Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Event Action Name - [Newtonsoft.Json.JsonProperty("eventActionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventActionName { get; set; } - - /// Hook Id - [Newtonsoft.Json.JsonProperty("hookId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HookId { get; set; } - - /// Hook Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Hook PRE or POST Option - [Newtonsoft.Json.JsonProperty("prePostOption", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PrePostOption { get; set; } - - /// Script Name - [Newtonsoft.Json.JsonProperty("scriptName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScriptName { get; set; } - - /// Script Type Name - [Newtonsoft.Json.JsonProperty("scriptTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScriptTypeName { get; set; } - - /// Secret Hook Id - [Newtonsoft.Json.JsonProperty("secretHookId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretHookId { get; set; } - - /// Hook Sort Order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Hook Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Status { get; set; } - - /// Stop On Failure - [Newtonsoft.Json.JsonProperty("stopOnFailure", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? StopOnFailure { get; set; } - - - } - - /// Create Secret Hook Arguments - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailHookCreateArgs - { - /// Secret Hook Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailHooksCreateModel Data { get; set; } - - - } - - /// Secret Detail Hook Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailHooksCreateModel - { - /// Arguments - [Newtonsoft.Json.JsonProperty("arguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Arguments { get; set; } - - /// Database - [Newtonsoft.Json.JsonProperty("database", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Database { get; set; } - - /// Hook Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Event Action Id - [Newtonsoft.Json.JsonProperty("eventActionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EventActionId { get; set; } - - /// Failure MEssage - [Newtonsoft.Json.JsonProperty("failureMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FailureMessage { get; set; } - - /// Hook Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Hook Parameters - [Newtonsoft.Json.JsonProperty("parameters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Parameters { get; set; } - - /// Port - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Port { get; set; } - - /// Hook Pre or Post Option - [Newtonsoft.Json.JsonProperty("prePostOption", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PrePostOption { get; set; } - - /// Privilige Secret Id - [Newtonsoft.Json.JsonProperty("privilegedSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrivilegedSecretId { get; set; } - - /// Script Id - [Newtonsoft.Json.JsonProperty("scriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ScriptId { get; set; } - - /// Secret Id - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Server Key Digest - [Newtonsoft.Json.JsonProperty("serverKeyDigest", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerKeyDigest { get; set; } - - /// Server Name - [Newtonsoft.Json.JsonProperty("serverName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServerName { get; set; } - - /// SSH Key Secret Id - [Newtonsoft.Json.JsonProperty("sshKeySecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshKeySecretId { get; set; } - - /// Stop On Failure - [Newtonsoft.Json.JsonProperty("stopOnFailure", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? StopOnFailure { get; set; } - - - } - - /// Secret permission - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPermissionModel - { - /// Group ID - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// Secret permission ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// KnownAs - [Newtonsoft.Json.JsonProperty("knownAs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string KnownAs { get; set; } - - /// Granted role ID - [Newtonsoft.Json.JsonProperty("secretAccessRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretAccessRoleId { get; set; } - - /// Granted role name - [Newtonsoft.Json.JsonProperty("secretAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretAccessRoleName { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Secret permission update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPermissionUpdateArgs - { - /// Secret permission ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] - public int Id { get; set; } - - /// Granted role name - [Newtonsoft.Json.JsonProperty("secretAccessRoleName", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string SecretAccessRoleName { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Always)] - public int SecretId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretPermissionSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Secret permission summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPermissionSummary - { - /// Group ID - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// Secret permission ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// KnownAs - [Newtonsoft.Json.JsonProperty("knownAs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string KnownAs { get; set; } - - /// Granted role ID - [Newtonsoft.Json.JsonProperty("secretAccessRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretAccessRoleId { get; set; } - - /// Granted role name - [Newtonsoft.Json.JsonProperty("secretAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretAccessRoleName { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Secret permission create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPermissionCreateArgs - { - /// Domain Name - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// Group ID being granted permission. Leave empty if granting to a user - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group Name - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// Role name being granted - [Newtonsoft.Json.JsonProperty("secretAccessRoleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretAccessRoleName { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// User ID being granted permission. Leave empty if granting to a group - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User Name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// SecretShareUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretShareUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretShareUpdateModel Data { get; set; } - - - } - - /// Share permissions for a specific Secret. Currently only inherits - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretShareUpdateModel - { - /// Whether or not this secret inherits permissions from the folder that contains it. If the secret is not in a folder setting this to true will be ignored. - [Newtonsoft.Json.JsonProperty("inheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean InheritPermissions { get; set; } - - - } - - /// Share permissions for a specific Secret. Currently only inherits - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretShareModel - { - /// Whether or not this secret inherits permissions from the folder that contains it. - [Newtonsoft.Json.JsonProperty("inheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritPermissions { get; set; } - - /// The secret to which the share permissions apply - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - - } - - /// IPagingOfSecretPolicyModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfSecretPolicyModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// Secret Policy Detail Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyDetailModel - { - /// Indicates the policy is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Secret Policy Description - [Newtonsoft.Json.JsonProperty("secretPolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretPolicyDescription { get; set; } - - /// Secret Policy Id - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// List of Secret Policy Items - [Newtonsoft.Json.JsonProperty("secretPolicyItems", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretPolicyItems { get; set; } - - /// Secret Policy Name - [Newtonsoft.Json.JsonProperty("secretPolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretPolicyName { get; set; } - - - } - - /// Secret Policy Item Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyItemModel - { - /// Secret Policy Item Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Secret Policy Item Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Id of the Parent Secret Policy Item if one exists - [Newtonsoft.Json.JsonProperty("parentSecretPolicyItemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ParentSecretPolicyItemId { get; set; } - - /// Policy Apply Type - [Newtonsoft.Json.JsonProperty("policyApplyType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public PolicyApplyType? PolicyApplyType { get; set; } - - /// Id of the Secret Policy Item - [Newtonsoft.Json.JsonProperty("secretPolicyItemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyItemId { get; set; } - - /// Id of the Secret Policy Item Map - [Newtonsoft.Json.JsonProperty("secretPolicyItemMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyItemMapId { get; set; } - - /// Secret Policy Item Section Name - [Newtonsoft.Json.JsonProperty("sectionName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SectionName { get; set; } - - /// List of SshCommandMenuGroupMaps for when the ValueType is SSHMENUGROUP - [Newtonsoft.Json.JsonProperty("sshCommandMenuGroupMaps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandMenuGroupMaps { get; set; } - - /// List of UserGroupMaps for when the ValueType is GROUP - [Newtonsoft.Json.JsonProperty("userGroupMaps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection UserGroupMaps { get; set; } - - /// Set when saving a boolean value - [Newtonsoft.Json.JsonProperty("valueBool", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBool { get; set; } - - /// Set when saving an integer value - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// Set when saving a secret Id - [Newtonsoft.Json.JsonProperty("valueSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueSecretId { get; set; } - - /// Set when saving a string value. i.e. Schedule, PasswordTypeWebScript - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - /// Type of Value - [Newtonsoft.Json.JsonProperty("valueType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretPolicyValueType? ValueType { get; set; } - - - } - - /// Policy Apply Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum PolicyApplyType - { - [System.Runtime.Serialization.EnumMember(Value = @"NotSet")] - NotSet = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Default")] - Default = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Enforced")] - Enforced = 2, - - } - - /// Ssh Command Menu Group Map Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuGroupMapModel - { - /// Group Id - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Ssh Command Menu Id - [Newtonsoft.Json.JsonProperty("sshCommandMenuId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandMenuId { get; set; } - - - } - - /// User Group Map Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserGroupMapModel - { - /// Group Id - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - - } - - /// Secret Policy Value Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretPolicyValueType - { - [System.Runtime.Serialization.EnumMember(Value = @"Bool")] - Bool = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Int")] - Int = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"SecretId")] - SecretId = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Group")] - Group = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Schedule")] - Schedule = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"SshMenuGroup")] - SshMenuGroup = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"SshBlocklist")] - SshBlocklist = 6, - - } - - /// SecretPolicyUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyUpdateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretPolicyUpdateModel Data { get; set; } - - - } - - /// Secret Policy Update Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyUpdateModel - { - /// Indicates the policy is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Secret Policy Description - [Newtonsoft.Json.JsonProperty("secretPolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SecretPolicyDescription { get; set; } - - /// List of Secret Policy Items - [Newtonsoft.Json.JsonProperty("secretPolicyItems", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretPolicyItems { get; set; } - - /// Secret Policy Name - [Newtonsoft.Json.JsonProperty("secretPolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SecretPolicyName { get; set; } - - - } - - /// Secret Policy Item Update Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyItemUpdateModel - { - /// Secret Policy Item Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Description { get; set; } - - /// Secret Policy Item Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// Policy Apply Type - [Newtonsoft.Json.JsonProperty("policyApplyType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfPolicyApplyType PolicyApplyType { get; set; } - - /// Id of the Secret Policy Item - [Newtonsoft.Json.JsonProperty("secretPolicyItemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyItemId { get; set; } - - /// Id of the Secret Policy Item Map - [Newtonsoft.Json.JsonProperty("secretPolicyItemMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyItemMapId { get; set; } - - /// List of SshCommandMenuGroupMaps for when the ValueType is SSHMENUGROUP - [Newtonsoft.Json.JsonProperty("sshCommandMenuGroupMaps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfSshCommandMenuGroupMapDataModelOf SshCommandMenuGroupMaps { get; set; } - - /// List of UserGroupMaps for when the ValueType is GROUP - [Newtonsoft.Json.JsonProperty("userGroupMaps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfUserGroupMapDataModelOf UserGroupMaps { get; set; } - - /// Set when saving a boolean value - [Newtonsoft.Json.JsonProperty("valueBool", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean ValueBool { get; set; } - - /// Set when saving an integer value - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 ValueInt { get; set; } - - /// Set when saving a secret Id - [Newtonsoft.Json.JsonProperty("valueSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 ValueSecretId { get; set; } - - /// Set when saving a string value. i.e. Schedule, PasswordTypeWebScript - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ValueString { get; set; } - - - } - - /// Policy Apply Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfPolicyApplyType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public PolicyApplyType? Value { get; set; } - - - } - - /// List of SshCommandMenuGroupMaps for when the ValueType is SSHMENUGROUP - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfSshCommandMenuGroupMapDataModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Ssh Command Menu Group Map Data Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuGroupMapDataModel - { - /// Ssh Command Menu Id - [Newtonsoft.Json.JsonProperty("sshCommandMenuId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandMenuId { get; set; } - - /// User Group Map Data - [Newtonsoft.Json.JsonProperty("userGroupMap", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UserGroupMapDataModel UserGroupMap { get; set; } - - - } - - /// User Group Map Data Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserGroupMapDataModel - { - /// User/Group Id - [Newtonsoft.Json.JsonProperty("userGroupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserGroupId { get; set; } - - /// User/Group Map Type - [Newtonsoft.Json.JsonProperty("userGroupMapType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UserGroupMapType? UserGroupMapType { get; set; } - - - } - - /// User Group Map Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum UserGroupMapType - { - [System.Runtime.Serialization.EnumMember(Value = @"User")] - User = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Group")] - Group = 1, - - } - - /// List of UserGroupMaps for when the ValueType is GROUP - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfUserGroupMapDataModelOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// SecretPolicyCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyCreateArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretPolicyCreateModel Data { get; set; } - - - } - - /// Secret Policy Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyCreateModel - { - /// Indicates the policy is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Secret Policy Description - [Newtonsoft.Json.JsonProperty("secretPolicyDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretPolicyDescription { get; set; } - - /// List of Secret Policy Items - [Newtonsoft.Json.JsonProperty("secretPolicyItems", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretPolicyItems { get; set; } - - /// Secret Policy Name - [Newtonsoft.Json.JsonProperty("secretPolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretPolicyName { get; set; } - - - } - - /// Secret Policy Item Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretPolicyItemCreateModel - { - /// Policy Apply Type - [Newtonsoft.Json.JsonProperty("policyApplyType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public PolicyApplyType? PolicyApplyType { get; set; } - - /// Id of the Secret Policy Item - [Newtonsoft.Json.JsonProperty("secretPolicyItemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyItemId { get; set; } - - /// List of SshCommandMenuGroupMaps for when the ValueType is SSHMENUGROUP - [Newtonsoft.Json.JsonProperty("sshCommandMenuGroupMaps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandMenuGroupMaps { get; set; } - - /// List of UserGroupMaps for when the ValueType is GROUP - [Newtonsoft.Json.JsonProperty("userGroupMaps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection UserGroupMaps { get; set; } - - /// Set when saving a boolean value - [Newtonsoft.Json.JsonProperty("valueBool", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValueBool { get; set; } - - /// Set when saving an integer value - [Newtonsoft.Json.JsonProperty("valueInt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueInt { get; set; } - - /// Set when saving a secret Id - [Newtonsoft.Json.JsonProperty("valueSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ValueSecretId { get; set; } - - /// Set when saving a string value. i.e. Schedule, PasswordTypeWebScript - [Newtonsoft.Json.JsonProperty("valueString", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ValueString { get; set; } - - - } - - /// Secret - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretModel - { - /// AccessRequestWorkflowMapId - [Newtonsoft.Json.JsonProperty("accessRequestWorkflowMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AccessRequestWorkflowMapId { get; set; } - - /// Whether the secret is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// AllowOwnersUnrestrictedSshCommands - [Newtonsoft.Json.JsonProperty("allowOwnersUnrestrictedSshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowOwnersUnrestrictedSshCommands { get; set; } - - /// AutoChangeEnabled - [Newtonsoft.Json.JsonProperty("autoChangeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AutoChangeEnabled { get; set; } - - /// AutoChangeNextPassword - [Newtonsoft.Json.JsonProperty("autoChangeNextPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AutoChangeNextPassword { get; set; } - - /// Whether the secret is currently checked out - [Newtonsoft.Json.JsonProperty("checkedOut", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckedOut { get; set; } - - /// CheckOutChangePasswordEnabled - [Newtonsoft.Json.JsonProperty("checkOutChangePasswordEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutChangePasswordEnabled { get; set; } - - /// Whether secret checkout is enabled - [Newtonsoft.Json.JsonProperty("checkOutEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutEnabled { get; set; } - - /// Checkout interval, in minutes - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutIntervalMinutes { get; set; } - - /// Minutes remaining in current checkout interval - [Newtonsoft.Json.JsonProperty("checkOutMinutesRemaining", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutMinutesRemaining { get; set; } - - /// Name of user who has checked out the secret - [Newtonsoft.Json.JsonProperty("checkOutUserDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CheckOutUserDisplayName { get; set; } - - /// ID of user who has checked out the secret - [Newtonsoft.Json.JsonProperty("checkOutUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutUserId { get; set; } - - /// DoubleLockId - [Newtonsoft.Json.JsonProperty("doubleLockId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DoubleLockId { get; set; } - - /// EnableInheritPermissions - [Newtonsoft.Json.JsonProperty("enableInheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritPermissions { get; set; } - - /// Whether the secret policy is inherited from the containing folder - [Newtonsoft.Json.JsonProperty("enableInheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritSecretPolicy { get; set; } - - /// Number of failed password change attempts - [Newtonsoft.Json.JsonProperty("failedPasswordChangeAttempts", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FailedPasswordChangeAttempts { get; set; } - - /// Containing folder ID - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether double lock is enabled - [Newtonsoft.Json.JsonProperty("isDoubleLock", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDoubleLock { get; set; } - - /// Out of sync indicates that a Password is setup for autochange and has failed its last password change attempt or has exceeded the maximum RPC attempts - [Newtonsoft.Json.JsonProperty("isOutOfSync", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsOutOfSync { get; set; } - - /// Whether the secret is restricted - [Newtonsoft.Json.JsonProperty("isRestricted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRestricted { get; set; } - - /// Secret data fields - [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Items { get; set; } - - /// Time of last heartbeat check - [Newtonsoft.Json.JsonProperty("lastHeartBeatCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastHeartBeatCheck { get; set; } - - /// Current status of heartbeat - [Newtonsoft.Json.JsonProperty("lastHeartBeatStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public HeartbeatStatus? LastHeartBeatStatus { get; set; } - - /// Time of most recent password change attempt - [Newtonsoft.Json.JsonProperty("lastPasswordChangeAttempt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastPasswordChangeAttempt { get; set; } - - /// LauncherConnectAsSecretId - [Newtonsoft.Json.JsonProperty("launcherConnectAsSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherConnectAsSecretId { get; set; } - - /// Secret name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Reason message if the secret is out of sync - [Newtonsoft.Json.JsonProperty("outOfSyncReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OutOfSyncReason { get; set; } - - /// PasswordTypeWebScriptId - [Newtonsoft.Json.JsonProperty("passwordTypeWebScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeWebScriptId { get; set; } - - /// ProxyEnabled - [Newtonsoft.Json.JsonProperty("proxyEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProxyEnabled { get; set; } - - /// RequiresApprovalForAccess - [Newtonsoft.Json.JsonProperty("requiresApprovalForAccess", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresApprovalForAccess { get; set; } - - /// RequiresComment - [Newtonsoft.Json.JsonProperty("requiresComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresComment { get; set; } - - /// ResponseCodes - [Newtonsoft.Json.JsonProperty("responseCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ResponseCodes { get; set; } - - /// RestrictSshCommands - [Newtonsoft.Json.JsonProperty("restrictSshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RestrictSshCommands { get; set; } - - /// SecretPolicyId - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// Secret template ID - [Newtonsoft.Json.JsonProperty("secretTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTemplateId { get; set; } - - /// Name of secret template - [Newtonsoft.Json.JsonProperty("secretTemplateName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretTemplateName { get; set; } - - /// Whether session recording is enabled - [Newtonsoft.Json.JsonProperty("sessionRecordingEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SessionRecordingEnabled { get; set; } - - /// SiteId - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// WebLauncherRequiresIncognitoMode - [Newtonsoft.Json.JsonProperty("webLauncherRequiresIncognitoMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WebLauncherRequiresIncognitoMode { get; set; } - - - } - - /// Secret data field item - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RestSecretItem - { - /// Longer description of the secret field. - [Newtonsoft.Json.JsonProperty("fieldDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldDescription { get; set; } - - /// The id of the field definition from the secret template. - [Newtonsoft.Json.JsonProperty("fieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FieldId { get; set; } - - /// The display name of the secret field. - [Newtonsoft.Json.JsonProperty("fieldName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldName { get; set; } - - /// If the field is a file attachment field, the id of the file attachment. - [Newtonsoft.Json.JsonProperty("fileAttachmentId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FileAttachmentId { get; set; } - - /// If the field is a file attachment field, the name of the attached file. - [Newtonsoft.Json.JsonProperty("filename", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Filename { get; set; } - - /// Whether the field is a file attachment. - [Newtonsoft.Json.JsonProperty("isFile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFile { get; set; } - - /// Whether or not the secret field is a list. - [Newtonsoft.Json.JsonProperty("isList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsList { get; set; } - - /// Whether the field is represented as a multi-line text box. Used for long-form text fields. - [Newtonsoft.Json.JsonProperty("isNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsNotes { get; set; } - - /// Whether the field is a password. Password fields are hidden by default in the UI and their value is not returned in GET calls that return secrets. To retrieve a password field value, make a GET call to /api/secrets/{secretId}/fields/{slug}. - [Newtonsoft.Json.JsonProperty("isPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPassword { get; set; } - - /// The id of the secret field item. Leave empty when creating a new secret. - [Newtonsoft.Json.JsonProperty("itemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ItemId { get; set; } - - /// The value of the secret field item. For list fields, this is a comma-delimited list of the list id guids that are assigned to this field. - [Newtonsoft.Json.JsonProperty("itemValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemValue { get; set; } - - /// The type of list. Valid values are “None”, “Generic”, and “URL”. - [Newtonsoft.Json.JsonProperty("listType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretFieldListType? ListType { get; set; } - - /// A unique name for the secret field on the template. Slugs cannot contain spaces and are used in many places to easily refer to a secret field without having to know the field id. - [Newtonsoft.Json.JsonProperty("slug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Slug { get; set; } - - - } - - /// The type of list. Valid values are “None”, “Generic”, and “URL”. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretFieldListType - { - [System.Runtime.Serialization.EnumMember(Value = @"Generic")] - Generic = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"URL")] - URL = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 2, - - } - - /// Current status of heartbeat - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum HeartbeatStatus - { - [System.Runtime.Serialization.EnumMember(Value = @"Failed")] - Failed = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Success")] - Success = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Disabled")] - Disabled = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"UnableToConnect")] - UnableToConnect = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"UnknownError")] - UnknownError = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"IncompatibleHost")] - IncompatibleHost = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"AccountLockedOut")] - AccountLockedOut = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"DnsMismatch")] - DnsMismatch = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"UnableToValidateServerPublicKey")] - UnableToValidateServerPublicKey = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"Processing")] - Processing = 10, - - [System.Runtime.Serialization.EnumMember(Value = @"ArgumentError")] - ArgumentError = 11, - - [System.Runtime.Serialization.EnumMember(Value = @"AccessDenied")] - AccessDenied = 12, - - } - - /// Secret update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretUpdateArgs - { - /// The id of the mapping entity that associates this secret to a specific access request workflow. - [Newtonsoft.Json.JsonProperty("accessRequestWorkflowMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AccessRequestWorkflowMapId { get; set; } - - /// Whether the secret is in an active or deleted state. - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Whether the secret’s password is automatically rotated on a schedule. - [Newtonsoft.Json.JsonProperty("autoChangeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AutoChangeEnabled { get; set; } - - /// Whether the secret should be flagged for immediate password change. - [Newtonsoft.Json.JsonProperty("autoChangeNextPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AutoChangeNextPassword { get; set; } - - /// Whether the secret’s password is automatically changed when a secret is checked in. This is a security feature that prevents a use of the password retrieved from check-out after the secret is checked in. - [Newtonsoft.Json.JsonProperty("checkOutChangePasswordEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutChangePasswordEnabled { get; set; } - - /// Whether the user must check-out the secret to view it. Checking out gives the user exclusive access to the secret for a specified period or until the secret is checked in. - [Newtonsoft.Json.JsonProperty("checkOutEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutEnabled { get; set; } - - /// The number of minutes that a secret will remain checked out. - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutIntervalMinutes { get; set; } - - /// If the secret requires a comment to view or requires approval to view, a reason for accessing the secret must be provided. - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// If the secret is DoubleLocked, this is the DoubleLock password needed to access the secret. - [Newtonsoft.Json.JsonProperty("doubleLockPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DoubleLockPassword { get; set; } - - /// Whether the secret inherits permissions from the containing folder. - [Newtonsoft.Json.JsonProperty("enableInheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritPermissions { get; set; } - - /// Whether the secret policy is inherited from the containing folder. - [Newtonsoft.Json.JsonProperty("enableInheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritSecretPolicy { get; set; } - - /// If the secret is contained in a folder, the id of the containing folder. Set to null or -1 for secrets that are in the root folder. - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Force the secret to be checked in, even if checked out by someone else. The user must have the "Force Check In" permission. - [Newtonsoft.Json.JsonProperty("forceCheckIn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ForceCheckIn { get; set; } - - /// The id of the Secret to update. Must match the {id} in the path. - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int Id { get; set; } - - /// If the secret is deactivated, this must be set to true in order to access the secret. The user must also have the "View Deleted Secrets" permission. - [Newtonsoft.Json.JsonProperty("includeInactive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IncludeInactive { get; set; } - - /// A list of secret item field values. - [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required] - public System.Collections.Generic.ICollection Items { get; set; } = new System.Collections.ObjectModel.Collection(); - - /// When an SSH secret is proxied, you can choose to connect as another user and then do an su to the current secret’s user. This is a common practice for connecting with a lower privileged account and then switching to the root user. - [Newtonsoft.Json.JsonProperty("launcherConnectAsSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherConnectAsSecretId { get; set; } - - /// The name to display for the secret. - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// New secret password. - [Newtonsoft.Json.JsonProperty("newPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NewPassword { get; set; } - - /// Don't check out the secret automatically. - [Newtonsoft.Json.JsonProperty("noAutoCheckout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? NoAutoCheckout { get; set; } - - /// The id of the password change script to use on applicable web password secrets. - [Newtonsoft.Json.JsonProperty("passwordTypeWebScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeWebScriptId { get; set; } - - /// Whether sessions launched on this secret use Secret Server’s proxying or connect directly. - [Newtonsoft.Json.JsonProperty("proxyEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProxyEnabled { get; set; } - - /// Whether the user must enter a comment to view the secret. - [Newtonsoft.Json.JsonProperty("requiresComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresComment { get; set; } - - /// The id of the secret policy that controls the security and other settings of the secret. Set to null to not assign a secret policy. - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// Whether session recording is enabled. - [Newtonsoft.Json.JsonProperty("sessionRecordingEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SessionRecordingEnabled { get; set; } - - /// The id of the distributed engine site that is used by this secret for operations such as password changing. - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int? SiteId { get; set; } - - /// SSH key options - [Newtonsoft.Json.JsonProperty("sshKeyArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshKeyArgs SshKeyArgs { get; set; } - - /// If the secret requires a comment to view or requires approval and a user must provide a help desk a ticket number, this is the ticket number to the help desk request. - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// If the secret requires a comment to view or requires approval and a user must provide a help desk a ticket number, this is the id of the help desk system configured in Secret Server that should be used to validate the ticket number. - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - /// Whether the web launcher will require the browser to run in incognito mode. - [Newtonsoft.Json.JsonProperty("webLauncherRequiresIncognitoMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WebLauncherRequiresIncognitoMode { get; set; } - - - } - - /// SSH key options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshKeyArgs - { - /// Whether to generate an SSH private key passphrase. Only applicable when the Secret template has a password changer with the Private Key Passphrase field mapped. If it is not mapped, this setting is ignored. - [Newtonsoft.Json.JsonProperty("generatePassphrase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? GeneratePassphrase { get; set; } - - /// Whether to generate an SSH private key - [Newtonsoft.Json.JsonProperty("generateSshKeys", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? GenerateSshKeys { get; set; } - - - } - - /// Secret List Field List Args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretListFieldListArgs - { - /// Array of List GUIDs - [Newtonsoft.Json.JsonProperty("listGuids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ListGuids { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Secret summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSummary - { - /// Whether the secret is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Indicates whether or not this Secret an auto changing password - [Newtonsoft.Json.JsonProperty("autoChangeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AutoChangeEnabled { get; set; } - - /// Whether the secret is currently checked out - [Newtonsoft.Json.JsonProperty("checkedOut", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckedOut { get; set; } - - /// Indicates whether or not checkout is enabled for the Secret - [Newtonsoft.Json.JsonProperty("checkOutEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutEnabled { get; set; } - - /// When the Secret was created - [Newtonsoft.Json.JsonProperty("createDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? CreateDate { get; set; } - - /// How many days until this Secret expires - [Newtonsoft.Json.JsonProperty("daysUntilExpiration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DaysUntilExpiration { get; set; } - - /// Indicates whether or not DoubleLock is enabled for this password - [Newtonsoft.Json.JsonProperty("doubleLockEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DoubleLockEnabled { get; set; } - - /// Any requested extended fields from a lookup request - [Newtonsoft.Json.JsonProperty("extendedFields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ExtendedFields { get; set; } - - /// Containing folder ID - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Indicates if the launcher password is set to be hidden - [Newtonsoft.Json.JsonProperty("hidePassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HidePassword { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Indicates if this Secret inherits permissions from its folder - [Newtonsoft.Json.JsonProperty("inheritsPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InheritsPermissions { get; set; } - - /// Out of sync indicates that a Password is setup for autochange and has failed its last password change attempt or has exceeded the maximum RPC attempts - [Newtonsoft.Json.JsonProperty("isOutOfSync", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsOutOfSync { get; set; } - - /// Whether the secret is restricted - [Newtonsoft.Json.JsonProperty("isRestricted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRestricted { get; set; } - - /// When the Secret was last viewed, only populated when scope is Recent - [Newtonsoft.Json.JsonProperty("lastAccessed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastAccessed { get; set; } - - /// Current status of heartbeat - [Newtonsoft.Json.JsonProperty("lastHeartBeatStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public HeartbeatStatus? LastHeartBeatStatus { get; set; } - - /// Time of most recent password change attempt - [Newtonsoft.Json.JsonProperty("lastPasswordChangeAttempt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastPasswordChangeAttempt { get; set; } - - /// Secret name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Reason message if the secret is out of sync - [Newtonsoft.Json.JsonProperty("outOfSyncReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OutOfSyncReason { get; set; } - - /// Indicates if this Secret requires approval - [Newtonsoft.Json.JsonProperty("requiresApproval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresApproval { get; set; } - - /// Indicates if this Secret requires comment - [Newtonsoft.Json.JsonProperty("requiresComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresComment { get; set; } - - /// ResponseCodes - [Newtonsoft.Json.JsonProperty("responseCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ResponseCodes { get; set; } - - /// Secret template ID - [Newtonsoft.Json.JsonProperty("secretTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTemplateId { get; set; } - - /// Name of secret template - [Newtonsoft.Json.JsonProperty("secretTemplateName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretTemplateName { get; set; } - - /// SiteId - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - - } - - /// Any requested extended fields from a lookup request - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ISecretSummaryExtendedField - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Secret create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretCreateArgs - { - /// Whether the secret’s password is automatically rotated on a schedule. - [Newtonsoft.Json.JsonProperty("autoChangeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AutoChangeEnabled { get; set; } - - /// Whether the secret’s password is automatically changed when a secret is checked in. This is a security feature that prevents a use of the password retrieved from check-out after the secret is checked in. - [Newtonsoft.Json.JsonProperty("checkOutChangePasswordEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutChangePasswordEnabled { get; set; } - - /// Whether the user must check-out the secret to view it. Checking out gives the user exclusive access to the secret for a specified period or until the secret is checked in. - [Newtonsoft.Json.JsonProperty("checkOutEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutEnabled { get; set; } - - /// The number of minutes that a secret will remain checked out. - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutIntervalMinutes { get; set; } - - /// Whether the search indexing should be delayed to the background process. This can speed up bulk secret creation scripts by offloading the task of indexing the new secrets to the background task at the trade-off of not having search indexes immediately available. - [Newtonsoft.Json.JsonProperty("delayIndexing", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DelayIndexing { get; set; } - - /// Whether the secret inherits permissions from the containing folder. - [Newtonsoft.Json.JsonProperty("enableInheritPermissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritPermissions { get; set; } - - /// Whether the secret policy is inherited from the containing folder. - [Newtonsoft.Json.JsonProperty("enableInheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritSecretPolicy { get; set; } - - /// If the secret is contained in a folder, the id of the containing folder. Set to null or -1 for secrets that are in the root folder. - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// An array of values for the secret fields defined in the secret template. - [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required] - public System.Collections.Generic.ICollection Items { get; set; } = new System.Collections.ObjectModel.Collection(); - - /// When an SSH secret is proxied, you can choose to connect as another user and then do an su to the current secret’s user. This is a common practice for connecting with a lower privileged account and then switching to the root user. - [Newtonsoft.Json.JsonProperty("launcherConnectAsSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherConnectAsSecretId { get; set; } - - /// The name to display for the secret. - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// The id of the password change script to use on applicable web password secrets. - [Newtonsoft.Json.JsonProperty("passwordTypeWebScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeWebScriptId { get; set; } - - /// Whether sessions launched on this secret use Secret Server’s proxying or connect directly. - [Newtonsoft.Json.JsonProperty("proxyEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProxyEnabled { get; set; } - - /// Whether the user must enter a comment to view the secret. - [Newtonsoft.Json.JsonProperty("requiresComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresComment { get; set; } - - /// The id of the secret policy that controls the security and other settings of the secret. Set to null to not assign a secret policy. - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// The id of the secret template that defines the fields and properties of the secret. - [Newtonsoft.Json.JsonProperty("secretTemplateId", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int SecretTemplateId { get; set; } - - /// Whether session recording is enabled. - [Newtonsoft.Json.JsonProperty("sessionRecordingEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SessionRecordingEnabled { get; set; } - - /// The id of the distributed engine site that is used by this secret for operations such as password changing. - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int? SiteId { get; set; } - - /// SSH key options. - [Newtonsoft.Json.JsonProperty("sshKeyArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshKeyArgs SshKeyArgs { get; set; } - - /// Whether the web launcher will require the browser to run in incognito mode. - [Newtonsoft.Json.JsonProperty("webLauncherRequiresIncognitoMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? WebLauncherRequiresIncognitoMode { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretLookup - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Simple secret representation - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretLookup - { - /// Secret ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Secret name - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Secret field update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretItemUpdateArgs - { - /// If the secret requires a comment to view or requires approval to view, a reason for accessing the secret must be provided. - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// If the secret is DoubleLocked, this is the DoubleLock password needed to access the secret. - [Newtonsoft.Json.JsonProperty("doubleLockPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DoubleLockPassword { get; set; } - - /// Uploaded file (used for file attachment fields with "Content-Type: multipart/form-data") - [Newtonsoft.Json.JsonProperty("file", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] File { get; set; } - - /// Binary file data (used for file attachment fields with "Content-Type: application/json") - [Newtonsoft.Json.JsonProperty("fileAttachment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] FileAttachment { get; set; } - - /// File name (used for file attachment fields with "Content-Type: application/json")) - [Newtonsoft.Json.JsonProperty("fileName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FileName { get; set; } - - /// Force the secret to be checked in, even if checked out by someone else. The user must have the "Force Check In" permission. - [Newtonsoft.Json.JsonProperty("forceCheckIn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ForceCheckIn { get; set; } - - /// If the secret is deactivated, this must be set to true in order to access the secret. The user must also have the "View Deleted Secrets" permission. - [Newtonsoft.Json.JsonProperty("includeInactive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IncludeInactive { get; set; } - - /// New secret password. - [Newtonsoft.Json.JsonProperty("newPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NewPassword { get; set; } - - /// Don't check out the secret automatically. - [Newtonsoft.Json.JsonProperty("noAutoCheckout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? NoAutoCheckout { get; set; } - - /// If the secret requires a comment to view or requires approval and a user must provide a help desk a ticket number, this is the ticket number to the help desk request. - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// If the secret requires a comment to view or requires approval and a user must provide a help desk a ticket number, this is the id of the help desk system configured in Secret Server that should be used to validate the ticket number. - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - /// New value to assign to the secret field. - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// CategorizedListItemValueResult - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CategorizedListItemValueResult - { - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// WidgetSecretModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WidgetSecretModel - { - /// FolderId - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// FolderPath - [Newtonsoft.Json.JsonProperty("folderPath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderPath { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// SecretName - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretAuditModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Secret Audit Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretAuditModel - { - /// Action of Audit - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Action For Display - [Newtonsoft.Json.JsonProperty("actionForDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ActionForDisplay { get; set; } - - /// User that performed action - [Newtonsoft.Json.JsonProperty("byUserDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ByUserDisplayName { get; set; } - - /// Database Name - [Newtonsoft.Json.JsonProperty("databaseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DatabaseName { get; set; } - - /// Date Audit was Recorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Has Proxy Session Data - [Newtonsoft.Json.JsonProperty("hasProxySessionData", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasProxySessionData { get; set; } - - /// Id of Audit - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Notes of Audit - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Recording Message - [Newtonsoft.Json.JsonProperty("recordingMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RecordingMessage { get; set; } - - /// Recording Session Id - [Newtonsoft.Json.JsonProperty("recordingSessionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RecordingSessionId { get; set; } - - /// Status of Recording - [Newtonsoft.Json.JsonProperty("recordingStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RecordingStatus { get; set; } - - /// Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Status { get; set; } - - /// Ticket Number of Audit - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// Username - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } - - - } - - /// Secret Detail State View Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailStateViewModel - { - /// Allowed action for current user - [Newtonsoft.Json.JsonProperty("actions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public System.Collections.Generic.ICollection Actions { get; set; } - - /// Display Name of User that has the secret checked out - [Newtonsoft.Json.JsonProperty("checkedOutUserDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CheckedOutUserDisplayName { get; set; } - - /// User Secret is checked out to - [Newtonsoft.Json.JsonProperty("checkedOutUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckedOutUserId { get; set; } - - /// Number of minutes before checkout - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutIntervalMinutes { get; set; } - - /// Minutes remaining in check out - [Newtonsoft.Json.JsonProperty("checkOutMinutesRemaining", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutMinutesRemaining { get; set; } - - /// Folder Id - [Newtonsoft.Json.JsonProperty("folderId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FolderId { get; set; } - - /// Folder Name - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderName { get; set; } - - /// Secret Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Active indicator - [Newtonsoft.Json.JsonProperty("isActive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsActive { get; set; } - - /// Is the Secret checked out - [Newtonsoft.Json.JsonProperty("isCheckedOut", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCheckedOut { get; set; } - - /// Indicates whether the Secret is checked out by the current user - [Newtonsoft.Json.JsonProperty("isCheckedOutByCurrentUser", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCheckedOutByCurrentUser { get; set; } - - /// Pending Password change on secret indicator - [Newtonsoft.Json.JsonProperty("passwordChangePending", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PasswordChangePending { get; set; } - - /// Role that current user has on Secret - [Newtonsoft.Json.JsonProperty("role", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Role { get; set; } - - /// Secret Name - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// Current State of the Secret - [Newtonsoft.Json.JsonProperty("secretState", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretAccessRequired? SecretState { get; set; } - - - } - - /// Secret Detail Action Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretDetailActionType - { - [System.Runtime.Serialization.EnumMember(Value = @"ChangePasswordNow")] - ChangePasswordNow = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"ConvertTemplate")] - ConvertTemplate = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Copy")] - Copy = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Delete")] - Delete = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Edit")] - Edit = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"EditExpiration")] - EditExpiration = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"EditRpc")] - EditRpc = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"EditSecurity")] - EditSecurity = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"Expire")] - Expire = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"Heartbeat")] - Heartbeat = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"EditShare")] - EditShare = 10, - - [System.Runtime.Serialization.EnumMember(Value = @"ShowSshProxyCredentials")] - ShowSshProxyCredentials = 11, - - [System.Runtime.Serialization.EnumMember(Value = @"StopChangePasswordNow")] - StopChangePasswordNow = 12, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewAudit")] - ViewAudit = 13, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewDependencies")] - ViewDependencies = 14, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewLaunchers")] - ViewLaunchers = 15, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewExpiration")] - ViewExpiration = 16, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewHooks")] - ViewHooks = 17, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewRpc")] - ViewRpc = 18, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewSecurity")] - ViewSecurity = 19, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewSettings")] - ViewSettings = 20, - - [System.Runtime.Serialization.EnumMember(Value = @"Undelete")] - Undelete = 21, - - [System.Runtime.Serialization.EnumMember(Value = @"ForceCheckin")] - ForceCheckin = 22, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewShare")] - ViewShare = 23, - - [System.Runtime.Serialization.EnumMember(Value = @"EditHooks")] - EditHooks = 24, - - [System.Runtime.Serialization.EnumMember(Value = @"EditDependencies")] - EditDependencies = 25, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewGeneralDetails")] - ViewGeneralDetails = 26, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewHeartbeatStatus")] - ViewHeartbeatStatus = 27, - - [System.Runtime.Serialization.EnumMember(Value = @"Checkin")] - Checkin = 28, - - [System.Runtime.Serialization.EnumMember(Value = @"Checkout")] - Checkout = 29, - - [System.Runtime.Serialization.EnumMember(Value = @"GenerateOneTimePassword")] - GenerateOneTimePassword = 30, - - [System.Runtime.Serialization.EnumMember(Value = @"ShowSshTerminalDetails")] - ShowSshTerminalDetails = 31, - - [System.Runtime.Serialization.EnumMember(Value = @"ShowRdpProxyCredentials")] - ShowRdpProxyCredentials = 32, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewMetadata")] - ViewMetadata = 33, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewSecretExposure")] - ViewSecretExposure = 34, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewCheckOut")] - ViewCheckOut = 35, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewApproval")] - ViewApproval = 36, - - [System.Runtime.Serialization.EnumMember(Value = @"ViewListFields")] - ViewListFields = 37, - - [System.Runtime.Serialization.EnumMember(Value = @"Erase")] - Erase = 38, - - } - - /// Secret Access Required - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretAccessRequired - { - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"RequiresApproval")] - RequiresApproval = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"RequiresCheckout")] - RequiresCheckout = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"RequiresComment")] - RequiresComment = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"RequiresDoubleLockPassword")] - RequiresDoubleLockPassword = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"CreateDoubleLockPassword")] - CreateDoubleLockPassword = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"DoubleLockNoAccess")] - DoubleLockNoAccess = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"CannotView")] - CannotView = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"RequiresUndelete")] - RequiresUndelete = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"RequiresCheckoutPendingRPC")] - RequiresCheckoutPendingRPC = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"RequiresCheckoutAndComment")] - RequiresCheckoutAndComment = 10, - - } - - /// Secret Detail Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailSettingsModel - { - /// Expiration Date - [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExpirationDate { get; set; } - - /// Expiration Day Interval - [Newtonsoft.Json.JsonProperty("expirationDayInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExpirationDayInterval { get; set; } - - /// Expiration Template Text - [Newtonsoft.Json.JsonProperty("expirationTemplateText", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ExpirationTemplateText { get; set; } - - /// Expiration Type - [Newtonsoft.Json.JsonProperty("expirationType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretDetailExpirationType? ExpirationType { get; set; } - - /// One Time Password Settings - [Newtonsoft.Json.JsonProperty("oneTimePasswordSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public OneTimePasswordSettingsModel OneTimePasswordSettings { get; set; } - - /// RDP Launcher Settings - [Newtonsoft.Json.JsonProperty("rdpLauncherSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RdpLauncherSettingsModel RdpLauncherSettings { get; set; } - - /// Send Email When Changed - [Newtonsoft.Json.JsonProperty("sendEmailWhenChanged", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendEmailWhenChanged { get; set; } - - /// Send Email When Heartbeat Fails - [Newtonsoft.Json.JsonProperty("sendEmailWhenHeartbeatFails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendEmailWhenHeartbeatFails { get; set; } - - /// Send Email When Viewed - [Newtonsoft.Json.JsonProperty("sendEmailWhenViewed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SendEmailWhenViewed { get; set; } - - /// SSH Launcher Settings - [Newtonsoft.Json.JsonProperty("sshLauncherSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshLauncherSettingsModel SshLauncherSettings { get; set; } - - - } - - /// Expiration Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretDetailExpirationType - { - [System.Runtime.Serialization.EnumMember(Value = @"Template")] - Template = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"DayInterval")] - DayInterval = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"SpecificDate")] - SpecificDate = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Disabled")] - Disabled = 3, - - } - - /// One Time Password Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class OneTimePasswordSettingsModel - { - /// Backup Codes - [Newtonsoft.Json.JsonProperty("backupCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BackupCodes { get; set; } - - /// Date Changed - [Newtonsoft.Json.JsonProperty("dateChanged", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateChanged { get; set; } - - /// Enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Enabled On Template - [Newtonsoft.Json.JsonProperty("enabledOnTemplate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnabledOnTemplate { get; set; } - - /// Key - [Newtonsoft.Json.JsonProperty("key", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Key { get; set; } - - - } - - /// RDP Launcher Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RdpLauncherSettingsModel - { - /// Allow Clipboard - [Newtonsoft.Json.JsonProperty("allowClipboard", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public YesNoPreferenceOption? AllowClipboard { get; set; } - - /// Allow Drives - [Newtonsoft.Json.JsonProperty("allowDrives", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public YesNoPreferenceOption? AllowDrives { get; set; } - - /// Allow Printers - [Newtonsoft.Json.JsonProperty("allowPrinters", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public YesNoPreferenceOption? AllowPrinters { get; set; } - - /// Allow SmartCards - [Newtonsoft.Json.JsonProperty("allowSmartCards", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public YesNoPreferenceOption? AllowSmartCards { get; set; } - - /// Connect To Console - [Newtonsoft.Json.JsonProperty("connectToConsole", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public YesNoPreferenceOption? ConnectToConsole { get; set; } - - /// Launcher Height - [Newtonsoft.Json.JsonProperty("launcherHeight", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherHeight { get; set; } - - /// Launcher Height - [Newtonsoft.Json.JsonProperty("launcherWidth", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherWidth { get; set; } - - /// Use Custom Launcher Resolution - [Newtonsoft.Json.JsonProperty("useCustomLauncherResolution", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public YesNoPreferenceOption? UseCustomLauncherResolution { get; set; } - - - } - - /// Allow Clipboard - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum YesNoPreferenceOption - { - [System.Runtime.Serialization.EnumMember(Value = @"No")] - No = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Yes")] - Yes = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"UsePreferenceNo")] - UsePreferenceNo = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"UsePreferenceYes")] - UsePreferenceYes = 3, - - } - - /// SSH Launcher Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshLauncherSettingsModel - { - /// Can Connect As Credentials - [Newtonsoft.Json.JsonProperty("canConnectAsCredentials", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanConnectAsCredentials { get; set; } - - /// Launcher Type - [Newtonsoft.Json.JsonProperty("launcherType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SshRunLauncherType? LauncherType { get; set; } - - /// Secret Id - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Secret Name - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// SSH Key Extended Type Id - [Newtonsoft.Json.JsonProperty("sshKeyExtendedTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshKeyExtendedTypeId { get; set; } - - - } - - /// Launcher Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SshRunLauncherType - { - [System.Runtime.Serialization.EnumMember(Value = @"ConnectAsSecret")] - ConnectAsSecret = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"ConnectAsDifferentSecret")] - ConnectAsDifferentSecret = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"UseSshKeyOnSecret")] - UseSshKeyOnSecret = 2, - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretLauncherSessionSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Secret Launcher Session Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretLauncherSessionSummary - { - /// Is the session currently Active? - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// The date the session ended - [Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndDate { get; set; } - - /// The Id of the Secret - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The Id of the Secret Session - [Newtonsoft.Json.JsonProperty("secretSessionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretSessionId { get; set; } - - /// The date the session started - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDate { get; set; } - - /// The display user name of the person in the Secret Session - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Secret Launcher Session Args - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretLauncherSessionArgs - { - /// Action To Take - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SessionActions? Action { get; set; } - - /// Message To Send - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Message { get; set; } - - /// Secret Associated To Session - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Launcher Session Id - [Newtonsoft.Json.JsonProperty("secretSessionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretSessionId { get; set; } - - - } - - /// Action To Take - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SessionActions - { - [System.Runtime.Serialization.EnumMember(Value = @"Terminate")] - Terminate = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"LimitSession")] - LimitSession = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"MessageOnly")] - MessageOnly = 2, - - } - - /// Secret Launcher Session Action Result - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretLauncherSessionActionResult - { - /// Was the operation a Success? - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Secret General Settings Update Message - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailUpdateGeneralArgs - { - /// Secret General Settings Update Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailGeneralUpdateModel Data { get; set; } - - - } - - /// Secret General Settings Update - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailGeneralUpdateModel - { - /// Whether the secret is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Whether the secret policy is inherited from the containing folder - [Newtonsoft.Json.JsonProperty("enableInheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableInheritSecretPolicy { get; set; } - - /// Containing folder ID - [Newtonsoft.Json.JsonProperty("folder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 Folder { get; set; } - - /// When true autogenerate new SSH keys - [Newtonsoft.Json.JsonProperty("generateSshKeys", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? GenerateSshKeys { get; set; } - - /// Heartbeat Enabled - [Newtonsoft.Json.JsonProperty("heartbeatEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean HeartbeatEnabled { get; set; } - - /// Whether the secret is out of sync - [Newtonsoft.Json.JsonProperty("isOutOfSync", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean IsOutOfSync { get; set; } - - /// Secret Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// Secret Fields - [Newtonsoft.Json.JsonProperty("secretFields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SecretFields { get; set; } - - /// Secret Policy ID - [Newtonsoft.Json.JsonProperty("secretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 SecretPolicy { get; set; } - - /// Secret Site - [Newtonsoft.Json.JsonProperty("site", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 Site { get; set; } - - /// Secret Template - [Newtonsoft.Json.JsonProperty("template", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 Template { get; set; } - - - } - - /// Update Secret Template Field - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateTemplateFieldOfString - { - /// Whether or not the field is dirty. If false, the field value will not be updated. If true, the field value will be updated. - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Secret template slug name - [Newtonsoft.Json.JsonProperty("slug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Slug { get; set; } - - /// Secret field vlaue - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// Secret Detail General View Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailGeneralViewModel - { - /// Whether the secret is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean Active { get; set; } - - /// Whether the password should automatically change upon expiration. - [Newtonsoft.Json.JsonProperty("autoChangePassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean AutoChangePassword { get; set; } - - /// CanGenerateSshKey - [Newtonsoft.Json.JsonProperty("canGenerateSshKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanGenerateSshKey { get; set; } - - /// Whether the secret policy is inherited from the containing folder - [Newtonsoft.Json.JsonProperty("enableInheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean EnableInheritSecretPolicy { get; set; } - - /// Expiration - [Newtonsoft.Json.JsonProperty("expiration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString Expiration { get; set; } - - /// Fields - [Newtonsoft.Json.JsonProperty("fields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Fields { get; set; } - - /// Containing folder ID - [Newtonsoft.Json.JsonProperty("folder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 Folder { get; set; } - - /// HeartbeatEnabled - [Newtonsoft.Json.JsonProperty("heartbeatEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean HeartbeatEnabled { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IsFavorite - [Newtonsoft.Json.JsonProperty("isFavorite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFavorite { get; set; } - - /// Whether the secret is out of sync - [Newtonsoft.Json.JsonProperty("isOutOfSync", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean IsOutOfSync { get; set; } - - /// IsTotpEnabled - [Newtonsoft.Json.JsonProperty("isTotpEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsTotpEnabled { get; set; } - - /// Time of last heartbeat check - [Newtonsoft.Json.JsonProperty("lastHeartBeatCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalDateTime LastHeartBeatCheck { get; set; } - - /// Current status of heartbeat - [Newtonsoft.Json.JsonProperty("lastHeartBeatStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfSecretDetailHeartbeatStatus LastHeartBeatStatus { get; set; } - - /// Launchers - [Newtonsoft.Json.JsonProperty("launchers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Launchers { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString Name { get; set; } - - /// Reason message if the secret is out of sync - [Newtonsoft.Json.JsonProperty("outOfSyncReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString OutOfSyncReason { get; set; } - - /// SecretPolicy - [Newtonsoft.Json.JsonProperty("secretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 SecretPolicy { get; set; } - - /// Site - [Newtonsoft.Json.JsonProperty("site", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 Site { get; set; } - - /// SlugPrivateKey - [Newtonsoft.Json.JsonProperty("slugPrivateKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SlugPrivateKey { get; set; } - - /// SlugPublicKey - [Newtonsoft.Json.JsonProperty("slugPublicKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SlugPublicKey { get; set; } - - /// Secret template - [Newtonsoft.Json.JsonProperty("template", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 Template { get; set; } - - /// TotpPasswordSlug - [Newtonsoft.Json.JsonProperty("totpPasswordSlug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TotpPasswordSlug { get; set; } - - - } - - /// Fields - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewTemplateFieldOfString - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// DropDownOptions - [Newtonsoft.Json.JsonProperty("dropDownOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection DropDownOptions { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// ListType - [Newtonsoft.Json.JsonProperty("listType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretFieldListType? ListType { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// PasswordRequirementId - [Newtonsoft.Json.JsonProperty("passwordRequirementId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordRequirementId { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// Slug - [Newtonsoft.Json.JsonProperty("slug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Slug { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Type - [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretFieldType? Type { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// DropDownOptions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewTemplateFieldDropDownOption - { - /// FieldValue - [Newtonsoft.Json.JsonProperty("fieldValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldValue { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Text - [Newtonsoft.Json.JsonProperty("text", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Text { get; set; } - - - } - - /// Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretFieldType - { - [System.Runtime.Serialization.EnumMember(Value = @"Text")] - Text = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Notes")] - Notes = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Url")] - Url = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Password")] - Password = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"File")] - File = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"DropDown")] - DropDown = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"List")] - List = 6, - - } - - /// Time of last heartbeat check - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfOptionalDateTime - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Value { get; set; } - - - } - - /// Current status of heartbeat - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfSecretDetailHeartbeatStatus - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretDetailHeartbeatStatus? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretDetailHeartbeatStatus - { - [System.Runtime.Serialization.EnumMember(Value = @"Failed")] - Failed = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Success")] - Success = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Disabled")] - Disabled = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"UnableToConnect")] - UnableToConnect = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"UnknownError")] - UnknownError = 5, - - [System.Runtime.Serialization.EnumMember(Value = @"IncompatibleHost")] - IncompatibleHost = 6, - - [System.Runtime.Serialization.EnumMember(Value = @"AccountLockedOut")] - AccountLockedOut = 7, - - [System.Runtime.Serialization.EnumMember(Value = @"DnsMismatch")] - DnsMismatch = 8, - - [System.Runtime.Serialization.EnumMember(Value = @"UnableToValidateServerPublicKey")] - UnableToValidateServerPublicKey = 9, - - [System.Runtime.Serialization.EnumMember(Value = @"Processing")] - Processing = 10, - - } - - /// Launchers - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailLauncher - { - /// ImagePath - [Newtonsoft.Json.JsonProperty("imagePath", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ImagePath { get; set; } - - /// IsRecorded - [Newtonsoft.Json.JsonProperty("isRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRecorded { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// TypeId - [Newtonsoft.Json.JsonProperty("typeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TypeId { get; set; } - - - } - - /// Secret User Email Update Message - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailUpdateEmailArgs - { - /// Secret User Email Update Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailEmailUpdateModel Data { get; set; } - - - } - - /// Secret Email User Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailEmailUpdateModel - { - /// Send email when Secret is Changed - [Newtonsoft.Json.JsonProperty("sendEmailWhenChanged", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SendEmailWhenChanged { get; set; } - - /// Send email when Secret heartbeat fails - [Newtonsoft.Json.JsonProperty("sendEmailWhenHeartbeatFails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SendEmailWhenHeartbeatFails { get; set; } - - /// Send email when Secret is viewed - [Newtonsoft.Json.JsonProperty("sendEmailWhenViewed", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SendEmailWhenViewed { get; set; } - - - } - - /// Secret General Information Update Message - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailUpdateSecurityGeneralArgs - { - /// Secret General Information Update Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailSecurityGeneralUpdateModel Data { get; set; } - - - } - - /// Secret General Information Update - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailSecurityGeneralUpdateModel - { - /// Which DoubleLock to associate, must also pass EnableDoubleLock true - [Newtonsoft.Json.JsonProperty("doubleLockId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DoubleLockId { get; set; } - - /// Enable DoubleLock, must also pass the DoubleLockId to use - [Newtonsoft.Json.JsonProperty("enableDoubleLock", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean EnableDoubleLock { get; set; } - - /// Hide the launcher password for non-owners - [Newtonsoft.Json.JsonProperty("hideLauncherPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean HideLauncherPassword { get; set; } - - /// Proxy Enabled - [Newtonsoft.Json.JsonProperty("proxyEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean ProxyEnabled { get; set; } - - /// Require a comment to view this Secret - [Newtonsoft.Json.JsonProperty("requiresComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RequiresComment { get; set; } - - /// Session Recording Enabled - [Newtonsoft.Json.JsonProperty("sessionRecordingEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SessionRecordingEnabled { get; set; } - - /// Require Web lancher to be in incognito mode - [Newtonsoft.Json.JsonProperty("webLauncherRequiresIncognitoMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean WebLauncherRequiresIncognitoMode { get; set; } - - - } - - /// SecretDetailSecurityViewModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailSecurityViewModel - { - /// AllowOwnersUnrestrictedSshCommands - [Newtonsoft.Json.JsonProperty("allowOwnersUnrestrictedSshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean AllowOwnersUnrestrictedSshCommands { get; set; } - - /// ApprovalWorkflow - [Newtonsoft.Json.JsonProperty("approvalWorkflow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfWorkflowTemplate ApprovalWorkflow { get; set; } - - /// ApprovalWorkflowOptions - [Newtonsoft.Json.JsonProperty("approvalWorkflowOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfWorkflowTemplateOf ApprovalWorkflowOptions { get; set; } - - /// Approvers - [Newtonsoft.Json.JsonProperty("approvers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfSecretDetailUserViewModelOf Approvers { get; set; } - - /// AvailableDoubleLocks - [Newtonsoft.Json.JsonProperty("availableDoubleLocks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfViewTemplateFieldDropDownOptionOf AvailableDoubleLocks { get; set; } - - /// AvailableRequireApprovalTypes - [Newtonsoft.Json.JsonProperty("availableRequireApprovalTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfSecretDetailApprovalTypeOf AvailableRequireApprovalTypes { get; set; } - - /// CheckOutChangePasswordEnabled - [Newtonsoft.Json.JsonProperty("checkOutChangePasswordEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean CheckOutChangePasswordEnabled { get; set; } - - /// CheckOutDefaultIntervalDisplay - [Newtonsoft.Json.JsonProperty("checkOutDefaultIntervalDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString CheckOutDefaultIntervalDisplay { get; set; } - - /// Whether secret checkout is enabled - [Newtonsoft.Json.JsonProperty("checkOutEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean CheckOutEnabled { get; set; } - - /// CheckOutIntervalDisplay - [Newtonsoft.Json.JsonProperty("checkOutIntervalDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString CheckOutIntervalDisplay { get; set; } - - /// Checkout interval, in minutes - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfOptionalInt32 CheckOutIntervalMinutes { get; set; } - - /// CommandRestrictionType - [Newtonsoft.Json.JsonProperty("commandRestrictionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfCommandRestrictionType CommandRestrictionType { get; set; } - - /// DoubleLockId - [Newtonsoft.Json.JsonProperty("doubleLockId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfInt32 DoubleLockId { get; set; } - - /// DoubleLockName - [Newtonsoft.Json.JsonProperty("doubleLockName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueReadOnlyOfString DoubleLockName { get; set; } - - /// HideLauncherPassword - [Newtonsoft.Json.JsonProperty("hideLauncherPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean HideLauncherPassword { get; set; } - - /// Whether double lock is enabled - [Newtonsoft.Json.JsonProperty("isDoubleLock", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean IsDoubleLock { get; set; } - - /// PasswordRequirements - [Newtonsoft.Json.JsonProperty("passwordRequirements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailSecurityPasswordRequirements PasswordRequirements { get; set; } - - /// ProxyEnabled - [Newtonsoft.Json.JsonProperty("proxyEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean ProxyEnabled { get; set; } - - /// RequireApprovalType - [Newtonsoft.Json.JsonProperty("requireApprovalType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfSecretDetailApprovalType RequireApprovalType { get; set; } - - /// RequiresComment - [Newtonsoft.Json.JsonProperty("requiresComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean RequiresComment { get; set; } - - /// RestrictedSshCommandCount - [Newtonsoft.Json.JsonProperty("restrictedSshCommandCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RestrictedSshCommandCount { get; set; } - - /// RestrictSshCommands - [Newtonsoft.Json.JsonProperty("restrictSshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean RestrictSshCommands { get; set; } - - /// Whether session recording is enabled - [Newtonsoft.Json.JsonProperty("sessionRecordingEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean SessionRecordingEnabled { get; set; } - - /// WebLauncherRequiresIncognitoMode - [Newtonsoft.Json.JsonProperty("webLauncherRequiresIncognitoMode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean WebLauncherRequiresIncognitoMode { get; set; } - - - } - - /// ApprovalWorkflow - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfWorkflowTemplate - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public WorkflowTemplate Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowTemplate - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// ConfigurationJson - [Newtonsoft.Json.JsonProperty("configurationJson", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConfigurationJson { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// ExpirationMinutes - [Newtonsoft.Json.JsonProperty("expirationMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExpirationMinutes { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Reusable - [Newtonsoft.Json.JsonProperty("reusable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Reusable { get; set; } - - /// TypeName - [Newtonsoft.Json.JsonProperty("typeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TypeName { get; set; } - - /// WorkflowTemplateId - [Newtonsoft.Json.JsonProperty("workflowTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowTemplateId { get; set; } - - /// WorkflowType - [Newtonsoft.Json.JsonProperty("workflowType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public WorkflowType? WorkflowType { get; set; } - - - } - - /// WorkflowType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum WorkflowType - { - [System.Runtime.Serialization.EnumMember(Value = @"AccessRequest")] - AccessRequest = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"SecretEraseRequest")] - SecretEraseRequest = 1, - - } - - /// ApprovalWorkflowOptions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfWorkflowTemplateOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Approvers - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfSecretDetailUserViewModelOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailUserViewModel - { - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// IsGroup - [Newtonsoft.Json.JsonProperty("isGroup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsGroup { get; set; } - - - } - - /// AvailableDoubleLocks - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueReadOnlyOfViewTemplateFieldDropDownOptionOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// AvailableRequireApprovalTypes - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfSecretDetailApprovalTypeOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Secret Security Approval Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretDetailApprovalType - { - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"RequireApproval")] - RequireApproval = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"RequireEditorsApproval")] - RequireEditorsApproval = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"RequireEveryoneApproval")] - RequireEveryoneApproval = 3, - - } - - /// CommandRestrictionType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfCommandRestrictionType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public CommandRestrictionType? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum CommandRestrictionType - { - [System.Runtime.Serialization.EnumMember(Value = @"AllowedMenu")] - AllowedMenu = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"BlockedList")] - BlockedList = 1, - - } - - /// PasswordRequirements - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailSecurityPasswordRequirements - { - /// Requirements - [Newtonsoft.Json.JsonProperty("requirements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Requirements { get; set; } - - /// ValidateOnCreate - [Newtonsoft.Json.JsonProperty("validateOnCreate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValidateOnCreate { get; set; } - - /// ValidateOnEdit - [Newtonsoft.Json.JsonProperty("validateOnEdit", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ValidateOnEdit { get; set; } - - - } - - /// Requirements - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailSecurityPasswordRequirement - { - /// FieldDisplayName - [Newtonsoft.Json.JsonProperty("fieldDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldDisplayName { get; set; } - - /// FieldName - [Newtonsoft.Json.JsonProperty("fieldName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldName { get; set; } - - /// IsCustom - [Newtonsoft.Json.JsonProperty("isCustom", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCustom { get; set; } - - /// PasswordRequirementId - [Newtonsoft.Json.JsonProperty("passwordRequirementId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordRequirementId { get; set; } - - /// PasswordRequirementName - [Newtonsoft.Json.JsonProperty("passwordRequirementName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PasswordRequirementName { get; set; } - - - } - - /// RequireApprovalType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfSecretDetailApprovalType - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretDetailApprovalType? Value { get; set; } - - - } - - /// Secret Detail General - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailGeneralModel - { - /// Whether the secret is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Whether the password should automatically change upon expiration. - [Newtonsoft.Json.JsonProperty("autoChangePassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AutoChangePassword { get; set; } - - /// Can Generate SSH Key - [Newtonsoft.Json.JsonProperty("canGenerateSshKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanGenerateSshKey { get; set; } - - /// Whether the secret policy is inherited from the containing folder - [Newtonsoft.Json.JsonProperty("enableInheritSecretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableInheritSecretPolicy { get; set; } - - /// Expiration - [Newtonsoft.Json.JsonProperty("expiration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Expiration { get; set; } - - /// Secret Fields - [Newtonsoft.Json.JsonProperty("fields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Fields { get; set; } - - /// Containing folder ID - [Newtonsoft.Json.JsonProperty("folder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Folder { get; set; } - - /// Heartbeat Enabled - [Newtonsoft.Json.JsonProperty("heartbeatEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HeartbeatEnabled { get; set; } - - /// Secret Detail General Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Is Favorite - [Newtonsoft.Json.JsonProperty("isFavorite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFavorite { get; set; } - - /// Whether the secret is out of sync - [Newtonsoft.Json.JsonProperty("isOutOfSync", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsOutOfSync { get; set; } - - /// Is One Time Password Enabled - [Newtonsoft.Json.JsonProperty("isTotpEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsTotpEnabled { get; set; } - - /// Time of last heartbeat check - [Newtonsoft.Json.JsonProperty("lastHeartBeatCheck", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastHeartBeatCheck { get; set; } - - /// Current status of heartbeat - [Newtonsoft.Json.JsonProperty("lastHeartBeatStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretDetailHeartbeatStatus? LastHeartBeatStatus { get; set; } - - /// Launchers - [Newtonsoft.Json.JsonProperty("launchers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Launchers { get; set; } - - /// Secret Detail General Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Reason message if the secret is out of sync - [Newtonsoft.Json.JsonProperty("outOfSyncReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OutOfSyncReason { get; set; } - - /// Secret Policy - [Newtonsoft.Json.JsonProperty("secretPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicy { get; set; } - - /// Site - [Newtonsoft.Json.JsonProperty("site", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Site { get; set; } - - /// Private Key Field Slug - [Newtonsoft.Json.JsonProperty("slugPrivateKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SlugPrivateKey { get; set; } - - /// Public Key Field Slug - [Newtonsoft.Json.JsonProperty("slugPublicKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SlugPublicKey { get; set; } - - /// Secret template - [Newtonsoft.Json.JsonProperty("template", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Template { get; set; } - - /// One Time Password Field Slug - [Newtonsoft.Json.JsonProperty("totpPasswordSlug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TotpPasswordSlug { get; set; } - - - } - - /// Secret Security Checkout Message - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailUpdateSecurityCheckoutArgs - { - /// Secret Security Checkout Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailSecurityCheckoutUpdateModel Data { get; set; } - - - } - - /// Secret Security Checkout Update - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailSecurityCheckoutUpdateModel - { - /// Change password on Check In - [Newtonsoft.Json.JsonProperty("checkOutChangePasswordEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean CheckOutChangePasswordEnabled { get; set; } - - /// Is CheckOut enabled for this Secret - [Newtonsoft.Json.JsonProperty("checkOutEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean CheckOutEnabled { get; set; } - - /// CheckOut interval minutes - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 CheckOutIntervalMinutes { get; set; } - - - } - - /// Response to indicate if the Secret security settings saved properly. If you still have access to the model the updated model will be returned. If checkout is now enabled then model will be null. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSecurityUpdateResponse - { - /// The updated model which could be null if the recent changes require checkout - [Newtonsoft.Json.JsonProperty("model", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailSecurityModel Model { get; set; } - - /// Returns as true if the update was successful. Note that any failures should throw an error - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Secret Detail Security - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailSecurityModel - { - /// Allow Owners Unrestricted SSH Commands - [Newtonsoft.Json.JsonProperty("allowOwnersUnrestrictedSshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AllowOwnersUnrestrictedSshCommands { get; set; } - - /// Approval Workflow - [Newtonsoft.Json.JsonProperty("approvalWorkflow", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public WorkflowTemplate ApprovalWorkflow { get; set; } - - /// Approvers - [Newtonsoft.Json.JsonProperty("approvers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Approvers { get; set; } - - /// Check Out Change Password Enabled - [Newtonsoft.Json.JsonProperty("checkOutChangePasswordEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutChangePasswordEnabled { get; set; } - - /// Check Out Default Interval Display - [Newtonsoft.Json.JsonProperty("checkOutDefaultIntervalDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CheckOutDefaultIntervalDisplay { get; set; } - - /// Whether secret checkout is enabled - [Newtonsoft.Json.JsonProperty("checkOutEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CheckOutEnabled { get; set; } - - /// Check Out Interval Display - [Newtonsoft.Json.JsonProperty("checkOutIntervalDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CheckOutIntervalDisplay { get; set; } - - /// Checkout interval, in minutes - [Newtonsoft.Json.JsonProperty("checkOutIntervalMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CheckOutIntervalMinutes { get; set; } - - /// Type of command restriction - [Newtonsoft.Json.JsonProperty("commandRestrictionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public CommandRestrictionType? CommandRestrictionType { get; set; } - - /// DoubleLock Id - [Newtonsoft.Json.JsonProperty("doubleLockId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DoubleLockId { get; set; } - - /// DoubleLock Name - [Newtonsoft.Json.JsonProperty("doubleLockName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DoubleLockName { get; set; } - - /// Hide Launcher Password - [Newtonsoft.Json.JsonProperty("hideLauncherPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideLauncherPassword { get; set; } - - /// Whether double lock is enabled - [Newtonsoft.Json.JsonProperty("isDoubleLock", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDoubleLock { get; set; } - - /// Password Requirements - [Newtonsoft.Json.JsonProperty("passwordRequirements", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailSecurityPasswordRequirements PasswordRequirements { get; set; } - - /// Proxy Enabled - [Newtonsoft.Json.JsonProperty("proxyEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ProxyEnabled { get; set; } - - /// Require Approval Type - [Newtonsoft.Json.JsonProperty("requireApprovalType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretDetailApprovalType? RequireApprovalType { get; set; } - - /// Requires Comment - [Newtonsoft.Json.JsonProperty("requiresComment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RequiresComment { get; set; } - - /// Restricted SSH Command Count - [Newtonsoft.Json.JsonProperty("restrictedSshCommandCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RestrictedSshCommandCount { get; set; } - - /// Restrict SSH Commands - [Newtonsoft.Json.JsonProperty("restrictSshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RestrictSshCommands { get; set; } - - /// Whether session recording is enabled - [Newtonsoft.Json.JsonProperty("sessionRecordingEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SessionRecordingEnabled { get; set; } - - - } - - /// Restricted secret update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretRestrictedArgs - { - /// If the secret requires a comment to view or requires approval to view, a reason for accessing the secret must be provided. - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// If the secret is DoubleLocked, this is the DoubleLock password needed to access the secret. - [Newtonsoft.Json.JsonProperty("doubleLockPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DoubleLockPassword { get; set; } - - /// Force the secret to be checked in, even if checked out by someone else. The user must have the "Force Check In" permission. - [Newtonsoft.Json.JsonProperty("forceCheckIn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ForceCheckIn { get; set; } - - /// If the secret is deactivated, this must be set to true in order to access the secret. The user must also have the "View Deleted Secrets" permission. - [Newtonsoft.Json.JsonProperty("includeInactive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IncludeInactive { get; set; } - - /// New secret password. - [Newtonsoft.Json.JsonProperty("newPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NewPassword { get; set; } - - /// Don't check out the secret automatically. - [Newtonsoft.Json.JsonProperty("noAutoCheckout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? NoAutoCheckout { get; set; } - - /// If the secret requires a comment to view or requires approval and a user must provide a help desk a ticket number, this is the ticket number to the help desk request. - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// If the secret requires a comment to view or requires approval and a user must provide a help desk a ticket number, this is the id of the help desk system configured in Secret Server that should be used to validate the ticket number. - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - - } - - /// Secret password change options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretChangePasswordArgs - { - /// If the secret requires a comment to view or requires approval to view, a reason for accessing the secret must be provided. - [Newtonsoft.Json.JsonProperty("comment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Comment { get; set; } - - /// If the secret is DoubleLocked, this is the DoubleLock password needed to access the secret. - [Newtonsoft.Json.JsonProperty("doubleLockPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DoubleLockPassword { get; set; } - - /// Force the secret to be checked in, even if checked out by someone else. The user must have the "Force Check In" permission. - [Newtonsoft.Json.JsonProperty("forceCheckIn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ForceCheckIn { get; set; } - - /// If the secret is deactivated, this must be set to true in order to access the secret. The user must also have the "View Deleted Secrets" permission. - [Newtonsoft.Json.JsonProperty("includeInactive", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IncludeInactive { get; set; } - - /// New secret password. - [Newtonsoft.Json.JsonProperty("newPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NewPassword { get; set; } - - /// Don't check out the secret automatically. - [Newtonsoft.Json.JsonProperty("noAutoCheckout", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? NoAutoCheckout { get; set; } - - /// Options for rotating SSH keys - [Newtonsoft.Json.JsonProperty("sshKeyArgs", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public RotateSshKeyArgs SshKeyArgs { get; set; } - - /// If the secret requires a comment to view or requires approval and a user must provide a help desk a ticket number, this is the ticket number to the help desk request. - [Newtonsoft.Json.JsonProperty("ticketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumber { get; set; } - - /// If the secret requires a comment to view or requires approval and a user must provide a help desk a ticket number, this is the id of the help desk system configured in Secret Server that should be used to validate the ticket number. - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - - } - - /// SSH key rotation options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RotateSshKeyArgs - { - /// Whether to generate the next SSH private key passphrase. Must be true if the passphrase is empty. - [Newtonsoft.Json.JsonProperty("generatePassphrase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? GeneratePassphrase { get; set; } - - /// Whether to generate the next SSH private key. Must be true if the private key is empty. - [Newtonsoft.Json.JsonProperty("generateSshKeys", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? GenerateSshKeys { get; set; } - - /// Private key passphrase - [Newtonsoft.Json.JsonProperty("passphrase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Passphrase { get; set; } - - /// Private key - [Newtonsoft.Json.JsonProperty("privateKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PrivateKey { get; set; } - - - } - - /// SecretResponseCodeModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretResponseCodeModel - { - /// ResponseCodes - [Newtonsoft.Json.JsonProperty("responseCodes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ResponseCodes { get; set; } - - - } - - /// Arguments to load the proxy credentials - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretProxyArgs - { - /// The type of the launcher to proxy - [Newtonsoft.Json.JsonProperty("launcherType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherType { get; set; } - - /// The machine name - [Newtonsoft.Json.JsonProperty("machine", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Machine { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The site ID to use (RDP proxy only) - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - - } - - /// SecretRdpProxyModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretRdpProxyModel - { - /// The domain for the RDP Proxy - [Newtonsoft.Json.JsonProperty("domain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Domain { get; set; } - - /// The host and port for the RDP Proxy - [Newtonsoft.Json.JsonProperty("host", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Host { get; set; } - - /// The password for the SSH Proxy - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password { get; set; } - - /// The username for the SSH Proxy - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } - - - } - - /// SecretSshProxyModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSshProxyModel - { - /// The host for the SSH Proxy - [Newtonsoft.Json.JsonProperty("host", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Host { get; set; } - - /// The password for the SSH Proxy - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password { get; set; } - - /// The port for the SSH Proxy - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Port { get; set; } - - /// The username for the SSH Proxy - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } - - - } - - /// Arguments to load the SSH proxy credentials - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSshTerminalArgs - { - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - - } - - /// SecretSshTerminalModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSshTerminalModel - { - /// The host for the SSH Proxy - [Newtonsoft.Json.JsonProperty("host", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Host { get; set; } - - /// The port for the SSH Proxy - [Newtonsoft.Json.JsonProperty("port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Port { get; set; } - - /// The secret id to launch - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// The username for the SSH Proxy - [Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Username { get; set; } - - - } - - /// Arguments to favorite a secret. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class FavoriteSecretArgs - { - /// Whether or not the secret is a favorite. This is an optional argument. - [Newtonsoft.Json.JsonProperty("isFavorite", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFavorite { get; set; } - - - } - - /// SecretDetailStopPasswordResultModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailStopPasswordResultModel - { - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// RPC Script Update Message - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailUpdateRpcScriptSecretsArgs - { - /// RPC Script Update Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailRpcScriptSecretsUpdateModel Data { get; set; } - - - } - - /// Secrets available for RPC Scripts - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailRpcScriptSecretsUpdateModel - { - /// Secret IDs - this is a replace - [Newtonsoft.Json.JsonProperty("resetSecretIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32Of ResetSecretIds { get; set; } - - - } - - /// Secret Detail RPC - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailRpcModel - { - /// AutoChange Enabled - [Newtonsoft.Json.JsonProperty("autoChangeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AutoChangeEnabled { get; set; } - - /// AutoChange Schedule - [Newtonsoft.Json.JsonProperty("autoChangeSchedule", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailScheduleModel AutoChangeSchedule { get; set; } - - /// Can Enter Next Password - [Newtonsoft.Json.JsonProperty("canEnterNextPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CanEnterNextPassword { get; set; } - - /// Expire Text - [Newtonsoft.Json.JsonProperty("expireText", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ExpireText { get; set; } - - /// Has Next Passphrase - [Newtonsoft.Json.JsonProperty("hasNextPassphrase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNextPassphrase { get; set; } - - /// Has Next Password - [Newtonsoft.Json.JsonProperty("hasNextPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNextPassword { get; set; } - - /// Has Next Private Key - [Newtonsoft.Json.JsonProperty("hasNextPrivateKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNextPrivateKey { get; set; } - - /// is Valid For SSH Key RPC - [Newtonsoft.Json.JsonProperty("isValidForSshKeyRpc", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsValidForSshKeyRpc { get; set; } - - /// Password Status - [Newtonsoft.Json.JsonProperty("passwordStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailPasswordStatus PasswordStatus { get; set; } - - /// Password Type Id - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - /// Password Type Name - [Newtonsoft.Json.JsonProperty("passwordTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PasswordTypeName { get; set; } - - /// Password Type WebScript Id - [Newtonsoft.Json.JsonProperty("passwordTypeWebScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeWebScriptId { get; set; } - - /// Priviliged Account Secret Id - [Newtonsoft.Json.JsonProperty("privilegedAccountSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrivilegedAccountSecretId { get; set; } - - /// Priviliged Account Secret Name - [Newtonsoft.Json.JsonProperty("privilegedAccountSecretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PrivilegedAccountSecretName { get; set; } - - /// Reset Secrets - [Newtonsoft.Json.JsonProperty("resetSecrets", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ResetSecrets { get; set; } - - - } - - /// Secret Detail Autochange Schedule - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailScheduleModel - { - /// Change Every Months - [Newtonsoft.Json.JsonProperty("changeEveryMonths", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ChangeEveryMonths { get; set; } - - /// Change Every Months Day Number - [Newtonsoft.Json.JsonProperty("changeEveryMonthsDayNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ChangeEveryMonthsDayNumber { get; set; } - - /// Change Every Months Instance - [Newtonsoft.Json.JsonProperty("changeEveryMonthsInstance", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ChangeEveryMonthsInstance { get; set; } - - /// Change Every MOnths Instance Target - [Newtonsoft.Json.JsonProperty("changeEveryMonthsInstanceTarget", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ChangeEveryMonthsInstanceTarget { get; set; } - - /// Days - [Newtonsoft.Json.JsonProperty("days", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Days { get; set; } - - /// Friday - [Newtonsoft.Json.JsonProperty("friday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Friday { get; set; } - - /// Monday - [Newtonsoft.Json.JsonProperty("monday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Monday { get; set; } - - /// Month Schedule Type - [Newtonsoft.Json.JsonProperty("monthScheduleType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MonthScheduleType { get; set; } - - /// Number Monthly Day - [Newtonsoft.Json.JsonProperty("numberMonthlyDay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NumberMonthlyDay { get; set; } - - /// Only Change If Expired - [Newtonsoft.Json.JsonProperty("onlyChangeIfExpired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OnlyChangeIfExpired { get; set; } - - /// Saturday - [Newtonsoft.Json.JsonProperty("saturday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Saturday { get; set; } - - /// Schedule Type - [Newtonsoft.Json.JsonProperty("scheduleType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ScheduleType { get; set; } - - /// Starting On - [Newtonsoft.Json.JsonProperty("startingOn", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartingOn { get; set; } - - /// Sunday - [Newtonsoft.Json.JsonProperty("sunday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Sunday { get; set; } - - /// Thursday - [Newtonsoft.Json.JsonProperty("thursday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Thursday { get; set; } - - /// Tuesday - [Newtonsoft.Json.JsonProperty("tuesday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Tuesday { get; set; } - - /// Wednesday - [Newtonsoft.Json.JsonProperty("wednesday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Wednesday { get; set; } - - /// Weeks - [Newtonsoft.Json.JsonProperty("weeks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Weeks { get; set; } - - - } - - /// Password Status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailPasswordStatus - { - /// FailedAttempts - [Newtonsoft.Json.JsonProperty("failedAttempts", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? FailedAttempts { get; set; } - - /// LastRpcDate - [Newtonsoft.Json.JsonProperty("lastRpcDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastRpcDate { get; set; } - - /// NextRpcDate - [Newtonsoft.Json.JsonProperty("nextRpcDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? NextRpcDate { get; set; } - - /// RpcMessage - [Newtonsoft.Json.JsonProperty("rpcMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RpcMessage { get; set; } - - /// Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public PasswordChangeResult? Status { get; set; } - - - } - - /// Status - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum PasswordChangeResult - { - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Pending")] - Pending = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Success")] - Success = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Fail")] - Fail = 3, - - } - - /// Reset Secrets - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailRpcSecrets - { - /// FolderName - [Newtonsoft.Json.JsonProperty("folderName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FolderName { get; set; } - - /// Order - [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Order { get; set; } - - /// SecretId - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// SecretName - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// SecretTemplateName - [Newtonsoft.Json.JsonProperty("secretTemplateName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretTemplateName { get; set; } - - - } - - /// Secret Update Security Approval Message - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailUpdateSecurityApprovalArgs - { - /// Secret Update Security Approval Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailSecurityApprovalUpdateModel Data { get; set; } - - - } - - /// Secret Security Approval Update - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailSecurityApprovalUpdateModel - { - /// Approvers - replaces all with this list - [Newtonsoft.Json.JsonProperty("approvers", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32Of Approvers { get; set; } - - /// Approval Type - [Newtonsoft.Json.JsonProperty("requireApprovalType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalSecretDetailApprovalType RequireApprovalType { get; set; } - - /// Workflow Template ID - [Newtonsoft.Json.JsonProperty("workflowTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 WorkflowTemplateId { get; set; } - - - } - - /// Approval Type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfOptionalSecretDetailApprovalType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// SecretDetailUpdateExpirationArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailUpdateExpirationArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretDetailExpirationUpdateModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretDetailExpirationUpdateModel - { - /// ExpirationDate - [Newtonsoft.Json.JsonProperty("expirationDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalDateTime ExpirationDate { get; set; } - - /// ExpirationDayInterval - [Newtonsoft.Json.JsonProperty("expirationDayInterval", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 ExpirationDayInterval { get; set; } - - /// ExpirationType - [Newtonsoft.Json.JsonProperty("expirationType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfSecretDetailExpirationUpdateType ExpirationType { get; set; } - - - } - - /// ExpirationType - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfSecretDetailExpirationUpdateType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretDetailExpirationUpdateType? Value { get; set; } - - - } - - /// Value - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretDetailExpirationUpdateType - { - [System.Runtime.Serialization.EnumMember(Value = @"Template")] - Template = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"DayInterval")] - DayInterval = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"SpecificDate")] - SpecificDate = 2, - - } - - /// SecretServerSettingsModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretServerSettingsModel - { - /// Advanced Configuration Settings - [Newtonsoft.Json.JsonProperty("advancedSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AdvancedSettings { get; set; } - - /// General Application Configuration Settings - [Newtonsoft.Json.JsonProperty("applicationSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationApplicationSettingsModel ApplicationSettings { get; set; } - - /// Export Configuration Version - [Newtonsoft.Json.JsonProperty("configurationVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConfigurationVersion { get; set; } - - /// Email server configuration - [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationEmailModel Email { get; set; } - - /// ID for specific instance - [Newtonsoft.Json.JsonProperty("externalInstanceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? ExternalInstanceId { get; set; } - - /// Folders Configuration - [Newtonsoft.Json.JsonProperty("folderSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationFoldersModel FolderSettings { get; set; } - - /// Launcher Settings Configuration - [Newtonsoft.Json.JsonProperty("launcherSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLauncherSettingsModel LauncherSettings { get; set; } - - /// License Keys - [Newtonsoft.Json.JsonProperty("licenses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Licenses { get; set; } - - /// Local User Passwords configuration - [Newtonsoft.Json.JsonProperty("localUserPasswords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLocalUserPasswordsModel LocalUserPasswords { get; set; } - - /// Login configuration - [Newtonsoft.Json.JsonProperty("login", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginModel Login { get; set; } - - /// Permission Options Configuration - [Newtonsoft.Json.JsonProperty("permissionOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationPermissionOptionsModel PermissionOptions { get; set; } - - /// Protocol Handler Settings Configuration - [Newtonsoft.Json.JsonProperty("protocolHandlerSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationProtocolHandlerSettingsModel ProtocolHandlerSettings { get; set; } - - /// Saml configuration - [Newtonsoft.Json.JsonProperty("saml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSamlModel Saml { get; set; } - - /// Security configuration - [Newtonsoft.Json.JsonProperty("security", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSecurityModel Security { get; set; } - - /// Session Recording Configuration - [Newtonsoft.Json.JsonProperty("sessionRecording", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSessionRecordingModel SessionRecording { get; set; } - - /// SSH Command configuration - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSshCommandExportModel SshCommands { get; set; } - - /// Ticket Systems Configuration - [Newtonsoft.Json.JsonProperty("ticketSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationTicketSystemModel TicketSystem { get; set; } - - /// User Experience Configuration - [Newtonsoft.Json.JsonProperty("userExperience", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserExperienceModel UserExperience { get; set; } - - /// User Interface Configuration Settings - [Newtonsoft.Json.JsonProperty("userInterface", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserInterfaceModel UserInterface { get; set; } - - - } - - /// Advanced Configuration Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationAdvancedModel - { - /// AdvancedSettingId - [Newtonsoft.Json.JsonProperty("advancedSettingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AdvancedSettingId { get; set; } - - /// SettingName - [Newtonsoft.Json.JsonProperty("settingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingName { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// License Keys - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LicenseModel - { - /// License Description (read-only) - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// License Key - [Newtonsoft.Json.JsonProperty("licenseKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LicenseKey { get; set; } - - /// License Name - [Newtonsoft.Json.JsonProperty("licenseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LicenseName { get; set; } - - - } - - /// SSH Command configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSshCommandExportModel - { - /// SshCommandBlocklists - [Newtonsoft.Json.JsonProperty("sshCommandBlocklists", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandBlocklists { get; set; } - - /// SshCommandMenuMaps - [Newtonsoft.Json.JsonProperty("sshCommandMenuMaps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandMenuMaps { get; set; } - - /// SshCommandMenus - [Newtonsoft.Json.JsonProperty("sshCommandMenus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandMenus { get; set; } - - /// SshCommands - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommands { get; set; } - - - } - - /// SSH command Blocklist - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandBlocklistModel - { - /// Active / inactive - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// SSH command Blocklist description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// SSH command Blocklist name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// SSH command Blocklist ID - [Newtonsoft.Json.JsonProperty("sshCommandBlocklistId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandBlocklistId { get; set; } - - /// SSH commands in Blocklist - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommands { get; set; } - - - } - - /// SSH Command - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandModel - { - /// SSH command - [Newtonsoft.Json.JsonProperty("command", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Command { get; set; } - - /// Allowed or Blocked - [Newtonsoft.Json.JsonProperty("commandPermissionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public CommandPermissionType? CommandPermissionType { get; set; } - - /// SSH command name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Sort order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// SSH command Guid - [Newtonsoft.Json.JsonProperty("sshCommandGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandGuid { get; set; } - - /// SSH command ID - [Newtonsoft.Json.JsonProperty("sshCommandId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandId { get; set; } - - - } - - /// Allowed or Blocked - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum CommandPermissionType - { - [System.Runtime.Serialization.EnumMember(Value = @"Allowed")] - Allowed = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Blocked")] - Blocked = 1, - - } - - /// SshCommandMenuMaps - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSshCommandMenuMapModel - { - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// SshCommandGuid - [Newtonsoft.Json.JsonProperty("sshCommandGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandGuid { get; set; } - - /// SshCommandMenuGuid - [Newtonsoft.Json.JsonProperty("sshCommandMenuGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandMenuGuid { get; set; } - - - } - - /// SshCommandMenus - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSshCommandMenuModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// SshCommandMenuGuid - [Newtonsoft.Json.JsonProperty("sshCommandMenuGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandMenuGuid { get; set; } - - /// SshCommandMenuId - [Newtonsoft.Json.JsonProperty("sshCommandMenuId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandMenuId { get; set; } - - - } - - /// List of Ticket Systems - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationTicketSystemModel - { - /// List of Ticket Systems - [Newtonsoft.Json.JsonProperty("ticketSystemList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection TicketSystemList { get; set; } - - /// Warnings - [Newtonsoft.Json.JsonProperty("warnings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DictionaryOfStringAndString Warnings { get; set; } - - - } - - /// List of Ticket Systems - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TicketSystemModelV2 - { - /// Ticket System Active status - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Send comment to your integrated Ticket System and add it to the incident or change request. - [Newtonsoft.Json.JsonProperty("addCommentsToTicket", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? AddCommentsToTicket { get; set; } - - /// BMC Remedy Incident Management integration only. Select work type for comments added. - [Newtonsoft.Json.JsonProperty("bmcChangeManagementCommentWorkType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BmcChangeManagementCommentWorkType { get; set; } - - /// BMC Remedy Incident Management integration only. Select work type for comments added. - [Newtonsoft.Json.JsonProperty("bmcIncidentManagementCommentWorkType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BmcIncidentManagementCommentWorkType { get; set; } - - /// BMC Remedy integration only. Authentication value that usually represents a login server. - [Newtonsoft.Json.JsonProperty("bmcRemedyAuthentication", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BmcRemedyAuthentication { get; set; } - - /// BMC Remedy integration only. The SOAP URL endpoint for the BMC Remedy Incident or Change Management. Should be the CHG_ChangeInterface_WS or HPD_IncidentInterface_WS endpoint. - [Newtonsoft.Json.JsonProperty("bmcRemedyUrlEndpoint", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BmcRemedyUrlEndpoint { get; set; } - - /// Ticket System Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Ticket System Ticket Title - [Newtonsoft.Json.JsonProperty("displayMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayMessage { get; set; } - - /// Ticket System Comment and/or Number Requirement - [Newtonsoft.Json.JsonProperty("forceRequireTicketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ForceRequireTicketSystemOptions? ForceRequireTicketNumber { get; set; } - - /// Indicates the Ticket System is the default choice. - [Newtonsoft.Json.JsonProperty("isDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDefault { get; set; } - - /// Ticket System Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Ticket System Organization Id - [Newtonsoft.Json.JsonProperty("organizationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? OrganizationId { get; set; } - - /// PowerShell integration only. Optional arguments for the comment script. Arguemnts are separated by a space. - [Newtonsoft.Json.JsonProperty("powerShellAddCommentScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PowerShellAddCommentScriptArguments { get; set; } - - /// PowerShell integration only. Custom PowerSHell script to add a comment to a ticket system. - [Newtonsoft.Json.JsonProperty("powerShellAddCommentScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PowerShellAddCommentScriptId { get; set; } - - /// PowerShell integration only. Optional arguments for the ticket comment script. Arguemnts are separated by a space. - [Newtonsoft.Json.JsonProperty("powerShellAddTicketCommentScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PowerShellAddTicketCommentScriptArguments { get; set; } - - /// PowerShell integration only. Custom PowerSHell script to add a comment to a ticket in a ticket system. - [Newtonsoft.Json.JsonProperty("powerShellAddTicketCommentScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PowerShellAddTicketCommentScriptId { get; set; } - - /// PowerShell integration only. Secret Id for credentials to use to run the Powershell. - [Newtonsoft.Json.JsonProperty("powerShellRunAsAccountSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PowerShellRunAsAccountSecretId { get; set; } - - /// PowerShell integration only. Optional arguments for the ticket status script. Arguemnts are separated by a space. - [Newtonsoft.Json.JsonProperty("powerShellTicketStatusScriptArguments", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PowerShellTicketStatusScriptArguments { get; set; } - - /// Powreshell Integration only. Custom PowerShell script to get the ticket status. - [Newtonsoft.Json.JsonProperty("powerShellTicketStatusScriptId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PowerShellTicketStatusScriptId { get; set; } - - /// ServiceNow integration only. Statuses to accept from ServiceNow separated by commas. - [Newtonsoft.Json.JsonProperty("serviceNowAllowedStatuses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceNowAllowedStatuses { get; set; } - - /// ServiceNow integration only. The domain name that hosts the RESTful web services for Ticket System integration. - [Newtonsoft.Json.JsonProperty("serviceNowDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ServiceNowDomainName { get; set; } - - /// Ticket System Site - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// Privilged Secret Id for credentials to connect to integrated Ticket Systems. - [Newtonsoft.Json.JsonProperty("systemCredentialSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SystemCredentialSecretId { get; set; } - - /// Ticket Number Validation Error Message - [Newtonsoft.Json.JsonProperty("ticketNumberErrorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumberErrorMessage { get; set; } - - /// Ticket Number Validation Regex - [Newtonsoft.Json.JsonProperty("ticketNumberValidation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TicketNumberValidation { get; set; } - - /// The unique Id of the ticket system. - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - /// Ticket System Type - [Newtonsoft.Json.JsonProperty("ticketSystemType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public TicketSystemTypes? TicketSystemType { get; set; } - - /// Ticket System URL pattern - [Newtonsoft.Json.JsonProperty("viewTicketUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ViewTicketUrl { get; set; } - - - } - - /// SecretServerSettingsImportCapabilitiesArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretServerSettingsImportCapabilitiesArgs - { - /// File - [Newtonsoft.Json.JsonProperty("file", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string File { get; set; } - - /// IsImport - [Newtonsoft.Json.JsonProperty("isImport", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsImport { get; set; } - - - } - - /// SecretServerSettingsImportCapabilityModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretServerSettingsImportCapabilityModel - { - /// Advanced Settings configuration - [Newtonsoft.Json.JsonProperty("advancedSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationAdvancedModelOf AdvancedSettings { get; set; } - - /// Application Settings configuration - [Newtonsoft.Json.JsonProperty("applicationSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationApplicationSettingsModel ApplicationSettings { get; set; } - - /// Export Configuration Version - [Newtonsoft.Json.JsonProperty("configurationVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConfigurationVersion { get; set; } - - /// Email configuration - [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationEmailModel Email { get; set; } - - /// ID for specific instance - [Newtonsoft.Json.JsonProperty("externalInstanceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? ExternalInstanceId { get; set; } - - /// Folder configuration - [Newtonsoft.Json.JsonProperty("folderSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationFoldersModel FolderSettings { get; set; } - - /// Launcher Settings configuration - [Newtonsoft.Json.JsonProperty("launcherSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationLauncherSettingsModel LauncherSettings { get; set; } - - /// Licenses (on-perm only) - [Newtonsoft.Json.JsonProperty("licenses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfLicenseModelOf Licenses { get; set; } - - /// Local User Password configuration - [Newtonsoft.Json.JsonProperty("localUserPasswords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationLocalUserPasswordsModel LocalUserPasswords { get; set; } - - /// Login configuration - [Newtonsoft.Json.JsonProperty("login", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationLoginModel Login { get; set; } - - /// Permission Options configuration - [Newtonsoft.Json.JsonProperty("permissionOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationPermissionOptionsModel PermissionOptions { get; set; } - - /// Protocol Handler Settings configuration - [Newtonsoft.Json.JsonProperty("protocolHandlerSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationProtocolHandlerSettingsModel ProtocolHandlerSettings { get; set; } - - /// SAML configuration - [Newtonsoft.Json.JsonProperty("saml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationSamlModel Saml { get; set; } - - /// Security configuration - [Newtonsoft.Json.JsonProperty("security", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationSecurityModel Security { get; set; } - - /// Session Recording configuration - [Newtonsoft.Json.JsonProperty("sessionRecording", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationSessionRecordingModel SessionRecording { get; set; } - - /// SSH Command configuration - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationSshCommandExportModel SshCommands { get; set; } - - /// Ticket System configuration - [Newtonsoft.Json.JsonProperty("ticketSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationTicketSystemModel TicketSystem { get; set; } - - /// User Experience configuration - [Newtonsoft.Json.JsonProperty("userExperience", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationUserExperienceModel UserExperience { get; set; } - - /// User Interface configuration - [Newtonsoft.Json.JsonProperty("userInterface", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfConfigurationUserInterfaceModel UserInterface { get; set; } - - - } - - /// Advanced Settings configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationAdvancedModelOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Application Settings configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationApplicationSettingsModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationApplicationSettingsModel Value { get; set; } - - - } - - /// Email configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationEmailModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationEmailModel Value { get; set; } - - - } - - /// Folder configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationFoldersModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationFoldersModel Value { get; set; } - - - } - - /// Launcher Settings configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationLauncherSettingsModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLauncherSettingsModel Value { get; set; } - - - } - - /// Licenses (on-perm only) - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfLicenseModelOf - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// Local User Password configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationLocalUserPasswordsModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLocalUserPasswordsModel Value { get; set; } - - - } - - /// Login configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationLoginModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginModel Value { get; set; } - - - } - - /// Permission Options configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationPermissionOptionsModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationPermissionOptionsModel Value { get; set; } - - - } - - /// Protocol Handler Settings configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationProtocolHandlerSettingsModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationProtocolHandlerSettingsModel Value { get; set; } - - - } - - /// SAML configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationSamlModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSamlModel Value { get; set; } - - - } - - /// Security configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationSecurityModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSecurityModel Value { get; set; } - - - } - - /// Session Recording configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationSessionRecordingModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSessionRecordingModel Value { get; set; } - - - } - - /// SSH Command configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationSshCommandExportModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSshCommandExportModel Value { get; set; } - - - } - - /// Ticket System configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationTicketSystemModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationTicketSystemModel Value { get; set; } - - - } - - /// User Experience configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationUserExperienceModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserExperienceModel Value { get; set; } - - - } - - /// User Interface configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ViewFieldValueOfConfigurationUserInterfaceModel - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// FieldInputType - [Newtonsoft.Json.JsonProperty("fieldInputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldInputType { get; set; } - - /// HasHistory - [Newtonsoft.Json.JsonProperty("hasHistory", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasHistory { get; set; } - - /// HelpLink - [Newtonsoft.Json.JsonProperty("helpLink", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string HelpLink { get; set; } - - /// Hidden - [Newtonsoft.Json.JsonProperty("hidden", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Hidden { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Label - [Newtonsoft.Json.JsonProperty("label", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Label { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Placeholder - [Newtonsoft.Json.JsonProperty("placeholder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Placeholder { get; set; } - - /// ReadOnly - [Newtonsoft.Json.JsonProperty("readOnly", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadOnly { get; set; } - - /// ReadOnlyReason - [Newtonsoft.Json.JsonProperty("readOnlyReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadOnlyReason { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserInterfaceModel Value { get; set; } - - - } - - /// SecretServerSettingsImportArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretServerSettingsImportArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretServerSettingsPatchModel Data { get; set; } - - /// Filter - [Newtonsoft.Json.JsonProperty("filter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretServerSettingsQuery Filter { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretServerSettingsPatchModel - { - /// Advanced Configuration Settings - [Newtonsoft.Json.JsonProperty("advancedSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AdvancedSettings { get; set; } - - /// Application settings configuration - [Newtonsoft.Json.JsonProperty("applicationSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationApplicationSettingsPatchModel ApplicationSettings { get; set; } - - /// Export Configuration Version - [Newtonsoft.Json.JsonProperty("configurationVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConfigurationVersion { get; set; } - - /// Email configuration - [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationEmailPatchModel Email { get; set; } - - /// ID for specific instance - [Newtonsoft.Json.JsonProperty("externalInstanceId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? ExternalInstanceId { get; set; } - - /// Folder configuration - [Newtonsoft.Json.JsonProperty("folderSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationFoldersPatchModel FolderSettings { get; set; } - - /// Laucher settings configuration - [Newtonsoft.Json.JsonProperty("launcherSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLauncherSettingsPatchModel LauncherSettings { get; set; } - - /// Licenses (on-perm only) - [Newtonsoft.Json.JsonProperty("licenses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Licenses { get; set; } - - /// Local User Password configuration - [Newtonsoft.Json.JsonProperty("localUserPasswords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLocalPasswordPatchModel LocalUserPasswords { get; set; } - - /// Login configuration - [Newtonsoft.Json.JsonProperty("login", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationLoginPatchModel Login { get; set; } - - /// Permission configuration - [Newtonsoft.Json.JsonProperty("permissionOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationPermissionOptionsPatchModel PermissionOptions { get; set; } - - /// Protocol handler settings configuration - [Newtonsoft.Json.JsonProperty("protocolHandlerSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationProtocolHandlerSettingsPatchModel ProtocolHandlerSettings { get; set; } - - /// SAML configuration - [Newtonsoft.Json.JsonProperty("saml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSamlPatchModel Saml { get; set; } - - /// Security configuration - [Newtonsoft.Json.JsonProperty("security", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSecurityPatchModel Security { get; set; } - - /// Session Recording configuration - [Newtonsoft.Json.JsonProperty("sessionRecording", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSessionRecordingPatchModel SessionRecording { get; set; } - - /// SSH Commands configuration - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationSshCommandImportModel SshCommands { get; set; } - - /// Ticket Systems Configuration - [Newtonsoft.Json.JsonProperty("ticketSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationTicketSystemListCreateOrPatchModel TicketSystem { get; set; } - - /// User experience configuration - [Newtonsoft.Json.JsonProperty("userExperience", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserExperiencePatchModel UserExperience { get; set; } - - /// User interface configuration - [Newtonsoft.Json.JsonProperty("userInterface", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ConfigurationUserInterfacePatchModel UserInterface { get; set; } - - - } - - /// Advanced Configuration Settings - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationAdvancedUpdateArgs - { - /// Setting Id - [Newtonsoft.Json.JsonProperty("advancedSettingId", Required = Newtonsoft.Json.Required.Always)] - public int AdvancedSettingId { get; set; } - - /// Setting Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Value { get; set; } - - - } - - /// SSH Commands configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationSshCommandImportModel - { - /// SshCommandBlocklists - [Newtonsoft.Json.JsonProperty("sshCommandBlocklists", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandBlocklists { get; set; } - - /// SshCommandMenuMaps - [Newtonsoft.Json.JsonProperty("sshCommandMenuMaps", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandMenuMaps { get; set; } - - /// SshCommandMenus - [Newtonsoft.Json.JsonProperty("sshCommandMenus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandMenus { get; set; } - - /// SshCommands - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommands { get; set; } - - - } - - /// SshCommandBlocklists - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandBlocklistPatchModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// SshCommandBlocklistId - [Newtonsoft.Json.JsonProperty("sshCommandBlocklistId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandBlocklistId { get; set; } - - /// SshCommandIds - [Newtonsoft.Json.JsonProperty("sshCommandIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfGuidOf SshCommandIds { get; set; } - - - } - - /// SshCommandIds - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfGuidOf - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Value { get; set; } - - - } - - /// SshCommands - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandPatchModel - { - /// Command - [Newtonsoft.Json.JsonProperty("command", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Command { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 SortOrder { get; set; } - - /// SshCommandGuid - [Newtonsoft.Json.JsonProperty("sshCommandGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandGuid { get; set; } - - /// SshCommandId - [Newtonsoft.Json.JsonProperty("sshCommandId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandId { get; set; } - - - } - - /// Ticket Systems Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ConfigurationTicketSystemListCreateOrPatchModel - { - /// TicketSystemList - [Newtonsoft.Json.JsonProperty("ticketSystemList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection TicketSystemList { get; set; } - - - } - - /// Filter - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretServerSettingsQuery - { - /// LoadAdvancedSettings - [Newtonsoft.Json.JsonProperty("loadAdvancedSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadAdvancedSettings { get; set; } - - /// LoadAll - [Newtonsoft.Json.JsonProperty("loadAll", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadAll { get; set; } - - /// LoadApplicationSettings - [Newtonsoft.Json.JsonProperty("loadApplicationSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadApplicationSettings { get; set; } - - /// LoadEmail - [Newtonsoft.Json.JsonProperty("loadEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadEmail { get; set; } - - /// LoadFolderSettings - [Newtonsoft.Json.JsonProperty("loadFolderSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadFolderSettings { get; set; } - - /// LoadLauncherSettings - [Newtonsoft.Json.JsonProperty("loadLauncherSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadLauncherSettings { get; set; } - - /// LoadLicenses - [Newtonsoft.Json.JsonProperty("loadLicenses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadLicenses { get; set; } - - /// LoadLocalUserPasswords - [Newtonsoft.Json.JsonProperty("loadLocalUserPasswords", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadLocalUserPasswords { get; set; } - - /// LoadLogin - [Newtonsoft.Json.JsonProperty("loadLogin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadLogin { get; set; } - - /// LoadPermissionOptions - [Newtonsoft.Json.JsonProperty("loadPermissionOptions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadPermissionOptions { get; set; } - - /// LoadProtocolHandlerSettings - [Newtonsoft.Json.JsonProperty("loadProtocolHandlerSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadProtocolHandlerSettings { get; set; } - - /// LoadSaml - [Newtonsoft.Json.JsonProperty("loadSaml", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadSaml { get; set; } - - /// LoadSecurity - [Newtonsoft.Json.JsonProperty("loadSecurity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadSecurity { get; set; } - - /// LoadSessionRecording - [Newtonsoft.Json.JsonProperty("loadSessionRecording", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadSessionRecording { get; set; } - - /// LoadSshCommands - [Newtonsoft.Json.JsonProperty("loadSshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadSshCommands { get; set; } - - /// LoadTicketSystem - [Newtonsoft.Json.JsonProperty("loadTicketSystem", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadTicketSystem { get; set; } - - /// LoadUserExperience - [Newtonsoft.Json.JsonProperty("loadUserExperience", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadUserExperience { get; set; } - - /// LoadUserInterface - [Newtonsoft.Json.JsonProperty("loadUserInterface", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LoadUserInterface { get; set; } - - - } - - /// Secret Server Settings import results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretServerSettingsImportResultModel - { - /// Errors that occurred during the import process - [Newtonsoft.Json.JsonProperty("errors", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DictionaryOfStringAndString Errors { get; set; } - - /// The current Secret Server Settings - [Newtonsoft.Json.JsonProperty("secretServerSettings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretServerSettingsModel SecretServerSettings { get; set; } - - /// Warnings that occurred during the import process - [Newtonsoft.Json.JsonProperty("warnings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public DictionaryOfStringAndString Warnings { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretSessionSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Recorded session summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSessionSummary - { - /// AccessedByName - [Newtonsoft.Json.JsonProperty("accessedByName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AccessedByName { get; set; } - - /// Whether the recorded session is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Associated access audit record - [Newtonsoft.Json.JsonProperty("auditSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AuditSecretId { get; set; } - - /// Duration of recorded session, in seconds - [Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Duration { get; set; } - - /// Recorded session end time - [Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndDate { get; set; } - - /// Recorded session end time (display format) - [Newtonsoft.Json.JsonProperty("endDateDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EndDateDisplay { get; set; } - - /// Processing error message - [Newtonsoft.Json.JsonProperty("errorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ErrorMessage { get; set; } - - /// FileExtension - [Newtonsoft.Json.JsonProperty("fileExtension", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FileExtension { get; set; } - - /// Whether the recorded session has logged keystrokes - [Newtonsoft.Json.JsonProperty("hasKeyStrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasKeyStrokes { get; set; } - - /// Whether the recorded session has info about running processes - [Newtonsoft.Json.JsonProperty("hasProcesses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasProcesses { get; set; } - - /// Whether an error occurred during video processing - [Newtonsoft.Json.JsonProperty("hasProcessingError", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasProcessingError { get; set; } - - /// Whether the recorded session has been deleted - [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - /// IsLauncher - [Newtonsoft.Json.JsonProperty("isLauncher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsLauncher { get; set; } - - /// Whether the session reached a state where it was active and not expired and had no other errors - [Newtonsoft.Json.JsonProperty("launchedSuccessfully", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LaunchedSuccessfully { get; set; } - - /// Launcher name - [Newtonsoft.Json.JsonProperty("launcherName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LauncherName { get; set; } - - /// Launcher session unique identifier - [Newtonsoft.Json.JsonProperty("launcherSessionGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? LauncherSessionGuid { get; set; } - - /// LauncherSessionStatus - [Newtonsoft.Json.JsonProperty("launcherSessionStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherSessionStatus { get; set; } - - /// Launcher type - [Newtonsoft.Json.JsonProperty("launcherTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherTypeId { get; set; } - - /// Machine name - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// MatchingSearchTypes - [Newtonsoft.Json.JsonProperty("matchingSearchTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MatchingSearchTypes { get; set; } - - /// PbaId - [Newtonsoft.Json.JsonProperty("pbaId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? PbaId { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Secret name - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// Recorded session ID - [Newtonsoft.Json.JsonProperty("secretSessionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretSessionId { get; set; } - - /// Recorded session username - [Newtonsoft.Json.JsonProperty("secretSessionUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretSessionUserName { get; set; } - - /// Whether video processing is complete - [Newtonsoft.Json.JsonProperty("sessionMovieProcessComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SessionMovieProcessComplete { get; set; } - - /// Recorded session start time - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDate { get; set; } - - /// Recorded session start time (display format) - [Newtonsoft.Json.JsonProperty("startDateDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StartDateDisplay { get; set; } - - /// Active Directory domain name - [Newtonsoft.Json.JsonProperty("userDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDomainName { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// Recorded session username (display format) - [Newtonsoft.Json.JsonProperty("userNameForDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserNameForDisplay { get; set; } - - - } - - /// Recorded session - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSessionModel - { - /// AccessedByName - [Newtonsoft.Json.JsonProperty("accessedByName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AccessedByName { get; set; } - - /// Whether the recorded session is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Associated access audit record - [Newtonsoft.Json.JsonProperty("auditSecretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AuditSecretId { get; set; } - - /// Duration of recorded session, in seconds - [Newtonsoft.Json.JsonProperty("duration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Duration { get; set; } - - /// Recorded session end time - [Newtonsoft.Json.JsonProperty("endDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndDate { get; set; } - - /// Recorded session end time (display format) - [Newtonsoft.Json.JsonProperty("endDateDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EndDateDisplay { get; set; } - - /// Processing error message - [Newtonsoft.Json.JsonProperty("errorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ErrorMessage { get; set; } - - /// FileExtension - [Newtonsoft.Json.JsonProperty("fileExtension", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FileExtension { get; set; } - - /// Whether the recorded session has logged keystrokes - [Newtonsoft.Json.JsonProperty("hasKeyStrokes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasKeyStrokes { get; set; } - - /// Whether the recorded session has info about running processes - [Newtonsoft.Json.JsonProperty("hasProcesses", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasProcesses { get; set; } - - /// Whether an error occurred during video processing - [Newtonsoft.Json.JsonProperty("hasProcessingError", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasProcessingError { get; set; } - - /// Whether the recorded session has been deleted - [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDeleted { get; set; } - - /// IsLauncher - [Newtonsoft.Json.JsonProperty("isLauncher", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsLauncher { get; set; } - - /// Whether the session reached a state where it was active and not expired and had no other errors - [Newtonsoft.Json.JsonProperty("launchedSuccessfully", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? LaunchedSuccessfully { get; set; } - - /// LauncherName - [Newtonsoft.Json.JsonProperty("launcherName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LauncherName { get; set; } - - /// Launcher session unique identifier - [Newtonsoft.Json.JsonProperty("launcherSessionGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? LauncherSessionGuid { get; set; } - - /// LauncherSessionStatus - [Newtonsoft.Json.JsonProperty("launcherSessionStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherSessionStatus { get; set; } - - /// Launcher type - [Newtonsoft.Json.JsonProperty("launcherTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LauncherTypeId { get; set; } - - /// Machine name - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// MatchingSearchTypes - [Newtonsoft.Json.JsonProperty("matchingSearchTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MatchingSearchTypes { get; set; } - - /// Pba Event Id if session was caused by an access challenge - [Newtonsoft.Json.JsonProperty("pbaId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? PbaId { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Secret name - [Newtonsoft.Json.JsonProperty("secretName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretName { get; set; } - - /// Recorded session ID - [Newtonsoft.Json.JsonProperty("secretSessionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretSessionId { get; set; } - - /// User name from the recorded session - [Newtonsoft.Json.JsonProperty("secretSessionUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretSessionUserName { get; set; } - - /// Whether video processing is complete - [Newtonsoft.Json.JsonProperty("sessionMovieProcessComplete", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? SessionMovieProcessComplete { get; set; } - - /// Recorded session start time - [Newtonsoft.Json.JsonProperty("startDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartDate { get; set; } - - /// Recorded session start time (display format) - [Newtonsoft.Json.JsonProperty("startDateDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StartDateDisplay { get; set; } - - /// Active Directory domain name - [Newtonsoft.Json.JsonProperty("userDomainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDomainName { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// Display name for user - [Newtonsoft.Json.JsonProperty("userNameForDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserNameForDisplay { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretSessionPointOfInterestModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Recorded session point of interest - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretSessionPointOfInterestModel - { - /// ActivityDetails - [Newtonsoft.Json.JsonProperty("activityDetails", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ActivityDetails { get; set; } - - /// ActivityTitle - [Newtonsoft.Json.JsonProperty("activityTitle", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ActivityTitle { get; set; } - - /// Logged activity type - [Newtonsoft.Json.JsonProperty("activityType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public SecretSessionActivityType? ActivityType { get; set; } - - /// Logged activity type (display format) - [Newtonsoft.Json.JsonProperty("activityTypeDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ActivityTypeDisplayName { get; set; } - - /// Icon - [Newtonsoft.Json.JsonProperty("icon", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Icon { get; set; } - - /// Launcher session unique identifier - [Newtonsoft.Json.JsonProperty("launcherSessionGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? LauncherSessionGuid { get; set; } - - /// Secret ID - [Newtonsoft.Json.JsonProperty("secretId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretId { get; set; } - - /// Recorded session ID - [Newtonsoft.Json.JsonProperty("secretSessionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretSessionId { get; set; } - - /// Point of interest timestamp - [Newtonsoft.Json.JsonProperty("timestamp", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Timestamp { get; set; } - - /// Time since session start - [Newtonsoft.Json.JsonProperty("timestampOffset", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? TimestampOffset { get; set; } - - /// Time since session start (display format) - [Newtonsoft.Json.JsonProperty("timestampOffsetDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TimestampOffsetDisplay { get; set; } - - - } - - /// Logged activity type - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SecretSessionActivityType - { - [System.Runtime.Serialization.EnumMember(Value = @"SshKeyStroke")] - SshKeyStroke = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"ApplicationStartedOrExisting")] - ApplicationStartedOrExisting = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"ApplicationEnd")] - ApplicationEnd = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"Keystroke")] - Keystroke = 3, - - [System.Runtime.Serialization.EnumMember(Value = @"Image")] - Image = 4, - - [System.Runtime.Serialization.EnumMember(Value = @"ApplicationMadeActive")] - ApplicationMadeActive = 5, - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfISecretSessionPointOfInterestSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ISecretSessionPointOfInterestSummaryModel - { - /// ActivityTypeGroup - [Newtonsoft.Json.JsonProperty("activityTypeGroup", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ActivityTypeGroup { get; set; } - - /// LauncherSessionGuid - [Newtonsoft.Json.JsonProperty("launcherSessionGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? LauncherSessionGuid { get; set; } - - /// Score - [Newtonsoft.Json.JsonProperty("score", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Score { get; set; } - - /// SecondsFromStart - [Newtonsoft.Json.JsonProperty("secondsFromStart", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long? SecondsFromStart { get; set; } - - /// TimestampOffset - [Newtonsoft.Json.JsonProperty("timestampOffset", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.TimeSpan? TimestampOffset { get; set; } - - - } - - /// StreamContentResult - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class StreamContentResult - { - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretTemplateGroupSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplateGroupSummary - { - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// DisplayNameWithDomain - [Newtonsoft.Json.JsonProperty("displayNameWithDomain", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayNameWithDomain { get; set; } - - /// DomainName - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// IsPersonal - [Newtonsoft.Json.JsonProperty("isPersonal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPersonal { get; set; } - - /// SecretTypeAccessRoleId - [Newtonsoft.Json.JsonProperty("secretTypeAccessRoleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTypeAccessRoleId { get; set; } - - /// SecretTypeId - [Newtonsoft.Json.JsonProperty("secretTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTypeId { get; set; } - - /// SecretTypeName - [Newtonsoft.Json.JsonProperty("secretTypeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretTypeName { get; set; } - - - } - - /// SecretTemplatePermissionsUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplatePermissionsUpdateArgs - { - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Permissions - [Newtonsoft.Json.JsonProperty("permissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Permissions { get; set; } - - - } - - /// Permissions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PermissionModel - { - /// RoleId - [Newtonsoft.Json.JsonProperty("roleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RoleId { get; set; } - - /// SecretTypeId - [Newtonsoft.Json.JsonProperty("secretTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTypeId { get; set; } - - - } - - /// Secret template - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplatePermissionModel - { - /// Secret template ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Secret template name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Secret template field - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplateField - { - /// Field description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Field display name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Who has editing rights - [Newtonsoft.Json.JsonProperty("editablePermission", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EditablePermission { get; set; } - - /// What option is required to edit this field including Owner, Edit, and Not Editable - [Newtonsoft.Json.JsonProperty("editRequires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EditRequiresOptions? EditRequires { get; set; } - - /// Field Slug Name - [Newtonsoft.Json.JsonProperty("fieldSlugName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldSlugName { get; set; } - - /// Generate password character set. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("generatePasswordCharacterSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GeneratePasswordCharacterSet { get; set; } - - /// Generate password length. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("generatePasswordLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GeneratePasswordLength { get; set; } - - /// Hide this field when viewing - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// History length - [Newtonsoft.Json.JsonProperty("historyLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HistoryLength { get; set; } - - /// Is expiration field - [Newtonsoft.Json.JsonProperty("isExpirationField", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsExpirationField { get; set; } - - /// Is this field a file type - [Newtonsoft.Json.JsonProperty("isFile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFile { get; set; } - - /// Is able to be indexed - [Newtonsoft.Json.JsonProperty("isIndexable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsIndexable { get; set; } - - /// Is this field a list field type - [Newtonsoft.Json.JsonProperty("isList", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsList { get; set; } - - /// Is this field a notes field type - [Newtonsoft.Json.JsonProperty("isNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsNotes { get; set; } - - /// Is this field a password field type - [Newtonsoft.Json.JsonProperty("isPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPassword { get; set; } - - /// Is this field required - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Is this field a url field type - [Newtonsoft.Json.JsonProperty("isUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUrl { get; set; } - - /// What type of contents does this list field contain - [Newtonsoft.Json.JsonProperty("listType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ListType? ListType { get; set; } - - /// Must encrypt. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("mustEncrypt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MustEncrypt { get; set; } - - /// Field name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ID For Password Requirement assigned to field - [Newtonsoft.Json.JsonProperty("passwordRequirementId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordRequirementId { get; set; } - - /// Type of password field - [Newtonsoft.Json.JsonProperty("passwordTypeFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeFieldId { get; set; } - - /// Field Id - [Newtonsoft.Json.JsonProperty("secretTemplateFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTemplateFieldId { get; set; } - - /// Sort Order for Field - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// PasswordDictionaryModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PasswordDictionaryModel - { - /// The dictionary ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// A list of dictionary entries - [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Items { get; set; } - - /// The name of the dictionary - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecretTemplateSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Secret template summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplateSummary - { - /// Is Secret template active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Secret template ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Secret template name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Password Type that the secret template uses for password change - [Newtonsoft.Json.JsonProperty("passwordTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeId { get; set; } - - /// Number of Secrets associated to the template. Only populated when IncludeCount is set to true. - [Newtonsoft.Json.JsonProperty("secretCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretCount { get; set; } - - - } - - /// SecretTemplateCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplateCreateArgs - { - /// Secret Template Fields - [Newtonsoft.Json.JsonProperty("fields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Fields { get; set; } - - /// Secret Template Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Secret Template Fields - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ISecretTemplateFieldCreateArgs - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// EditablePermission - [Newtonsoft.Json.JsonProperty("editablePermission", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EditablePermission { get; set; } - - /// EditRequires - [Newtonsoft.Json.JsonProperty("editRequires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EditRequiresOptions? EditRequires { get; set; } - - /// FieldSlugName - [Newtonsoft.Json.JsonProperty("fieldSlugName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldSlugName { get; set; } - - /// GeneratePasswordCharacterSet - [Newtonsoft.Json.JsonProperty("generatePasswordCharacterSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GeneratePasswordCharacterSet { get; set; } - - /// GeneratePasswordLength - [Newtonsoft.Json.JsonProperty("generatePasswordLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GeneratePasswordLength { get; set; } - - /// HideOnView - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// HistoryLength - [Newtonsoft.Json.JsonProperty("historyLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HistoryLength { get; set; } - - /// IsExpirationField - [Newtonsoft.Json.JsonProperty("isExpirationField", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsExpirationField { get; set; } - - /// IsFile - [Newtonsoft.Json.JsonProperty("isFile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFile { get; set; } - - /// IsIndexable - [Newtonsoft.Json.JsonProperty("isIndexable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsIndexable { get; set; } - - /// IsNotes - [Newtonsoft.Json.JsonProperty("isNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsNotes { get; set; } - - /// IsPassword - [Newtonsoft.Json.JsonProperty("isPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPassword { get; set; } - - /// IsRequired - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// IsUrl - [Newtonsoft.Json.JsonProperty("isUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUrl { get; set; } - - /// ListType - [Newtonsoft.Json.JsonProperty("listType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ListType? ListType { get; set; } - - /// MustEncrypt - [Newtonsoft.Json.JsonProperty("mustEncrypt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MustEncrypt { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// PasswordRequirementId - [Newtonsoft.Json.JsonProperty("passwordRequirementId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordRequirementId { get; set; } - - /// PasswordTypeFieldId - [Newtonsoft.Json.JsonProperty("passwordTypeFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeFieldId { get; set; } - - /// SortOrder - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// AddPasswordDictionaryArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AddPasswordDictionaryArgs - { - /// Dictionary Name - [Newtonsoft.Json.JsonProperty("dictionaryName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DictionaryName { get; set; } - - /// Uploaded file - [Newtonsoft.Json.JsonProperty("file", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] File { get; set; } - - - } - - /// UpdatePasswordDictionaryArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdatePasswordDictionaryArgs - { - /// Dictionary ID to Update - [Newtonsoft.Json.JsonProperty("dictionaryId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DictionaryId { get; set; } - - /// Dictionary Name - [Newtonsoft.Json.JsonProperty("dictionaryName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DictionaryName { get; set; } - - /// Uploaded file - [Newtonsoft.Json.JsonProperty("file", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public byte[] File { get; set; } - - - } - - /// SecretTemplateFieldCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplateFieldCreateArgs - { - /// Field description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Field display name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Who has editing rights - [Newtonsoft.Json.JsonProperty("editablePermission", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EditablePermission { get; set; } - - /// What option is required to edit this field including Owner, Edit, and Not Editable - [Newtonsoft.Json.JsonProperty("editRequires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EditRequiresOptions? EditRequires { get; set; } - - /// Field Slug Name - [Newtonsoft.Json.JsonProperty("fieldSlugName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldSlugName { get; set; } - - /// Generate password character set. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("generatePasswordCharacterSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GeneratePasswordCharacterSet { get; set; } - - /// Generate password length. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("generatePasswordLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GeneratePasswordLength { get; set; } - - /// Hide this field when viewing - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// History length - [Newtonsoft.Json.JsonProperty("historyLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HistoryLength { get; set; } - - /// Is expiration field - [Newtonsoft.Json.JsonProperty("isExpirationField", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsExpirationField { get; set; } - - /// Is this field a file type - [Newtonsoft.Json.JsonProperty("isFile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFile { get; set; } - - /// Is able to be indexed - [Newtonsoft.Json.JsonProperty("isIndexable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsIndexable { get; set; } - - /// Is this field a notes field type - [Newtonsoft.Json.JsonProperty("isNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsNotes { get; set; } - - /// Is this field a password field type - [Newtonsoft.Json.JsonProperty("isPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPassword { get; set; } - - /// Is this field required - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Is this field a url field type - [Newtonsoft.Json.JsonProperty("isUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUrl { get; set; } - - /// What type of contents does this list field contain - [Newtonsoft.Json.JsonProperty("listType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ListType? ListType { get; set; } - - /// Must encrypt. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("mustEncrypt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MustEncrypt { get; set; } - - /// Field name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ID For Password Requirement assigned to field - [Newtonsoft.Json.JsonProperty("passwordRequirementId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordRequirementId { get; set; } - - /// Type of password field - [Newtonsoft.Json.JsonProperty("passwordTypeFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeFieldId { get; set; } - - /// Sort Order for Field - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// SecretTemplateFieldUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplateFieldUpdateArgs - { - /// Field description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Field display name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Who has editing rights - [Newtonsoft.Json.JsonProperty("editablePermission", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EditablePermission { get; set; } - - /// What option is required to edit this field including Owner, Edit, and Not Editable - [Newtonsoft.Json.JsonProperty("editRequires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public EditRequiresOptions? EditRequires { get; set; } - - /// Field Slug Name - [Newtonsoft.Json.JsonProperty("fieldSlugName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FieldSlugName { get; set; } - - /// Generate password character set. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("generatePasswordCharacterSet", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GeneratePasswordCharacterSet { get; set; } - - /// Generate password length. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("generatePasswordLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GeneratePasswordLength { get; set; } - - /// Hide this field when viewing - [Newtonsoft.Json.JsonProperty("hideOnView", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HideOnView { get; set; } - - /// History length - [Newtonsoft.Json.JsonProperty("historyLength", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? HistoryLength { get; set; } - - /// Is expiration field - [Newtonsoft.Json.JsonProperty("isExpirationField", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsExpirationField { get; set; } - - /// Is this field a file type - [Newtonsoft.Json.JsonProperty("isFile", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsFile { get; set; } - - /// Is able to be indexed - [Newtonsoft.Json.JsonProperty("isIndexable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsIndexable { get; set; } - - /// Is this field a notes field type - [Newtonsoft.Json.JsonProperty("isNotes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsNotes { get; set; } - - /// Is this field a password field type - [Newtonsoft.Json.JsonProperty("isPassword", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPassword { get; set; } - - /// Is this field required - [Newtonsoft.Json.JsonProperty("isRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsRequired { get; set; } - - /// Is this field a url field type - [Newtonsoft.Json.JsonProperty("isUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUrl { get; set; } - - /// What type of contents does this list field contain - [Newtonsoft.Json.JsonProperty("listType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ListType? ListType { get; set; } - - /// Must encrypt. Only returned if user can manage secret templates - [Newtonsoft.Json.JsonProperty("mustEncrypt", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MustEncrypt { get; set; } - - /// Field name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ID For Password Requirement assigned to field - [Newtonsoft.Json.JsonProperty("passwordRequirementId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordRequirementId { get; set; } - - /// Type of password field - [Newtonsoft.Json.JsonProperty("passwordTypeFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PasswordTypeFieldId { get; set; } - - /// Field Id - [Newtonsoft.Json.JsonProperty("secretTemplateFieldId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretTemplateFieldId { get; set; } - - /// Sort Order for Field - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - - } - - /// SecretTemplatePatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplatePatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecretTemplatePatchModel Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecretTemplatePatchModel - { - /// Is Template Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - - } - - /// Specify filtering, paging, sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSecurityAuditLogSummaryAndSecurityAuditLogFilter - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Additional query options - [Newtonsoft.Json.JsonProperty("filter", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SecurityAuditLogFilter Filter { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Additional query options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecurityAuditLogFilter - { - /// SearchText - [Newtonsoft.Json.JsonProperty("searchText", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SearchText { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SecurityAuditLogSummary - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// ByUserDisplayName - [Newtonsoft.Json.JsonProperty("byUserDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ByUserDisplayName { get; set; } - - /// DatabaseName - [Newtonsoft.Json.JsonProperty("databaseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DatabaseName { get; set; } - - /// DateRecorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// DateRecordedDisplay - [Newtonsoft.Json.JsonProperty("dateRecordedDisplay", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DateRecordedDisplay { get; set; } - - /// EventEntityType - [Newtonsoft.Json.JsonProperty("eventEntityType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EventEntityType { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// LogSourceName - [Newtonsoft.Json.JsonProperty("logSourceName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LogSourceName { get; set; } - - /// MachineName - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - - } - - /// ServerNodeModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ServerNodeModel - { - /// Background Worker Error - [Newtonsoft.Json.JsonProperty("backgroundWorkerError", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BackgroundWorkerError { get; set; } - - /// Binary Version - [Newtonsoft.Json.JsonProperty("binaryVersion", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string BinaryVersion { get; set; } - - /// Database - [Newtonsoft.Json.JsonProperty("database", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Database { get; set; } - - /// Background Worker Role Enabled - [Newtonsoft.Json.JsonProperty("enableBackgroundWorker", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableBackgroundWorker { get; set; } - - /// Engine Worker Role Enabled - [Newtonsoft.Json.JsonProperty("enableEngineWorker", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableEngineWorker { get; set; } - - /// Session Recording Worker Role Enabled - [Newtonsoft.Json.JsonProperty("enableSessionRecordingWorker", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSessionRecordingWorker { get; set; } - - /// Engine Worker Error - [Newtonsoft.Json.JsonProperty("engineWorkerError", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EngineWorkerError { get; set; } - - /// The node configuration error if one exists - [Newtonsoft.Json.JsonProperty("errorMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ErrorMessage { get; set; } - - /// In Cluster - [Newtonsoft.Json.JsonProperty("inCluster", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InCluster { get; set; } - - /// Whether or not this node is the one which handled the request - [Newtonsoft.Json.JsonProperty("isCurrentNode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsCurrentNode { get; set; } - - /// The date of the last time the node connected - [Newtonsoft.Json.JsonProperty("lastConnected", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LastConnected { get; set; } - - /// Machine Name - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// Node Id - [Newtonsoft.Json.JsonProperty("nodeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NodeId { get; set; } - - /// Readonly Mode Enabled - [Newtonsoft.Json.JsonProperty("readonlyModeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadonlyModeEnabled { get; set; } - - /// The status of readonly mode if it is being disabled or enabled - [Newtonsoft.Json.JsonProperty("readonlyModeStatus", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ReadonlyModeStatus { get; set; } - - /// Session Recording Worker Error - [Newtonsoft.Json.JsonProperty("sessionRecordingWorkerError", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SessionRecordingWorkerError { get; set; } - - - } - - /// Server Node Roles - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ServerNodeConfigurationModel - { - /// Background Worker Role Enabled - [Newtonsoft.Json.JsonProperty("enableBackgroundWorker", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableBackgroundWorker { get; set; } - - /// Engine Worker Role Enabled - [Newtonsoft.Json.JsonProperty("enableEngineWorker", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableEngineWorker { get; set; } - - /// Session Recording Worker Role Enabled - [Newtonsoft.Json.JsonProperty("enableSessionRecordingWorker", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? EnableSessionRecordingWorker { get; set; } - - /// Whether or not the node is in the cluster - [Newtonsoft.Json.JsonProperty("inCluster", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? InCluster { get; set; } - - /// Readonly Mode Enabled - [Newtonsoft.Json.JsonProperty("readonlyModeEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ReadonlyModeEnabled { get; set; } - - - } - - /// SiteModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SiteModel - { - /// Active flag - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Site Id - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// Site Name - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - - } - - /// SlackConfigurationViewModelV2 - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SlackConfigurationViewModelV2 - { - /// AppId - [Newtonsoft.Json.JsonProperty("appId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString AppId { get; set; } - - /// BotToken - [Newtonsoft.Json.JsonProperty("botToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString BotToken { get; set; } - - /// CurrentUserHasSlackId - [Newtonsoft.Json.JsonProperty("currentUserHasSlackId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? CurrentUserHasSlackId { get; set; } - - /// InboxNotificationsEnabled - [Newtonsoft.Json.JsonProperty("inboxNotificationsEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean InboxNotificationsEnabled { get; set; } - - /// SecretInteractionsEnabled - [Newtonsoft.Json.JsonProperty("secretInteractionsEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfBoolean SecretInteractionsEnabled { get; set; } - - /// SignatureKey - [Newtonsoft.Json.JsonProperty("signatureKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ViewFieldValueOfString SignatureKey { get; set; } - - - } - - /// SlackConfigurationUpdateArgsV2 - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SlackConfigurationUpdateArgsV2 - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SlackConfigurationUpdateModelV2 Data { get; set; } - - - } - - /// Data - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SlackConfigurationUpdateModelV2 - { - /// Id of App - [Newtonsoft.Json.JsonProperty("appId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString AppId { get; set; } - - /// Bot Token - [Newtonsoft.Json.JsonProperty("botToken", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString BotToken { get; set; } - - /// Enable inbox notifications in Slack - [Newtonsoft.Json.JsonProperty("inboxNotificationsEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean InboxNotificationsEnabled { get; set; } - - /// Enable secret notifications and interactions with Slack - [Newtonsoft.Json.JsonProperty("secretInteractionsEnabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean SecretInteractionsEnabled { get; set; } - - /// Signature Key - [Newtonsoft.Json.JsonProperty("signatureKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SignatureKey { get; set; } - - - } - - /// SlackConfigurationTestResultModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SlackConfigurationTestResultModel - { - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// SlackResponse - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SlackResponse - { - /// error - [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Error { get; set; } - - /// ok - [Newtonsoft.Json.JsonProperty("ok", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Ok { get; set; } - - /// response_metadata - [Newtonsoft.Json.JsonProperty("response_metadata", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SlackResponseMetadata Response_metadata { get; set; } - - /// warning - [Newtonsoft.Json.JsonProperty("warning", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Warning { get; set; } - - - } - - /// response_metadata - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SlackResponseMetadata - { - /// messages - [Newtonsoft.Json.JsonProperty("messages", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Messages { get; set; } - - /// warnings - [Newtonsoft.Json.JsonProperty("warnings", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Warnings { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSshCommandBlocklistSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// SSH command Blocklist - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandBlocklistSummaryModel - { - /// If the Command Blocklist is enabled - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// A description of the Command Blocklist - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Name the Command Blocklist - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ID of the Command Blocklist - [Newtonsoft.Json.JsonProperty("sshCommandBlocklistId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandBlocklistId { get; set; } - - - } - - /// SshCommandBlocklistDto - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandBlocklistDto - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// SshCommandBlocklistId - [Newtonsoft.Json.JsonProperty("sshCommandBlocklistId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandBlocklistId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfBlocklistSecretPolicySummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class BlocklistSecretPolicySummaryModel - { - /// The Id of the Secret Policy - [Newtonsoft.Json.JsonProperty("secretPolicyId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SecretPolicyId { get; set; } - - /// The Name of the Secret Policy - [Newtonsoft.Json.JsonProperty("secretPolicyName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SecretPolicyName { get; set; } - - - } - - /// SshCommandBlocklistPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandBlocklistPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshCommandBlocklistPatchModel Data { get; set; } - - - } - - /// Options to create SSH Command Blocklist - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandBlocklistCreateArgs - { - /// SSH Command Blocklist to create - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshCommandBlocklistCreateModel Data { get; set; } - - - } - - /// SSH Command Blocklist to create - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandBlocklistCreateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// SshCommandBlocklistId - [Newtonsoft.Json.JsonProperty("sshCommandBlocklistId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandBlocklistId { get; set; } - - /// SshCommandIds - [Newtonsoft.Json.JsonProperty("sshCommandIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SshCommandIds { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSshCommandSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// SSH command - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandSummaryModel - { - /// SSH command - [Newtonsoft.Json.JsonProperty("command", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Command { get; set; } - - /// Allowed or Blocked - [Newtonsoft.Json.JsonProperty("commandPermissionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public CommandPermissionType? CommandPermissionType { get; set; } - - /// SSH command name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Sort order - [Newtonsoft.Json.JsonProperty("sortOrder", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SortOrder { get; set; } - - /// SSH command Guid - [Newtonsoft.Json.JsonProperty("sshCommandGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandGuid { get; set; } - - /// SSH command ID - [Newtonsoft.Json.JsonProperty("sshCommandId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandId { get; set; } - - - } - - /// SshCommandDto - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandDto - { - /// Command - [Newtonsoft.Json.JsonProperty("command", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Command { get; set; } - - /// CommandPermissionType - [Newtonsoft.Json.JsonProperty("commandPermissionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public CommandPermissionType? CommandPermissionType { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// SshCommandGuid - [Newtonsoft.Json.JsonProperty("sshCommandGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandGuid { get; set; } - - /// SshCommandId - [Newtonsoft.Json.JsonProperty("sshCommandId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandId { get; set; } - - - } - - /// SshCommandPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshCommandPatchModel Data { get; set; } - - - } - - /// Options to create SSH Command - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandCreateArgs - { - /// SSH Command to create - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshCommandCreateModel Data { get; set; } - - - } - - /// SSH Command Create Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandCreateModel - { - /// SSH command - [Newtonsoft.Json.JsonProperty("command", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Command { get; set; } - - /// Allowed or Blocked - [Newtonsoft.Json.JsonProperty("commandPermissionType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public CommandPermissionType? CommandPermissionType { get; set; } - - /// SSH command name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// SSH command Guid - [Newtonsoft.Json.JsonProperty("sshCommandGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandGuid { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSshCommandMenuSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// SSH Command Menu Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuSummaryModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// ID of the SSH Command Menu - [Newtonsoft.Json.JsonProperty("sshCommandMenuId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandMenuId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSshCommandMenuAuditSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// SSH Command Menu Audits - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuAuditSummaryModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// The date of the change - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// New Commands - [Newtonsoft.Json.JsonProperty("newCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NewCommands { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Old Commands - [Newtonsoft.Json.JsonProperty("oldCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OldCommands { get; set; } - - /// The name of the command menu - [Newtonsoft.Json.JsonProperty("sshCommandMenuName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshCommandMenuName { get; set; } - - /// Display name of the user making the change - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfSshCommandItemAuditSummaryModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// SSH Command Info Audits (Menu, Blocklist, Command) - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandItemAuditSummaryModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// The date of the change - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// The name of the item - [Newtonsoft.Json.JsonProperty("itemName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemName { get; set; } - - /// Item Type (Command, Menu, Blocklist) - [Newtonsoft.Json.JsonProperty("itemType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ItemType { get; set; } - - /// New Commands (Menu only) - [Newtonsoft.Json.JsonProperty("newCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string NewCommands { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// Old Commands (Menu only) - [Newtonsoft.Json.JsonProperty("oldCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string OldCommands { get; set; } - - /// Display name of the user making the change - [Newtonsoft.Json.JsonProperty("userDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserDisplayName { get; set; } - - - } - - /// SSH Command Menu - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Ssh Command Menu Guid Id - [Newtonsoft.Json.JsonProperty("sshCommandMenuGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandMenuGuid { get; set; } - - /// Ssh Command Menu Id - [Newtonsoft.Json.JsonProperty("sshCommandMenuId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandMenuId { get; set; } - - /// SshCommands - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SshCommands { get; set; } - - - } - - /// SshCommandMenuPatchArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuPatchArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshCommandMenuPatchModel Data { get; set; } - - - } - - /// Patch SSH Command Menu - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuPatchModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - /// Ssh Command Menu Guid Id - [Newtonsoft.Json.JsonProperty("sshCommandMenuGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Guid? SshCommandMenuGuid { get; set; } - - /// Ssh Command Menu Id - [Newtonsoft.Json.JsonProperty("sshCommandMenuId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SshCommandMenuId { get; set; } - - /// SSH Commands should be in the format of commandname = command. Each command should be separated by a carriage return and line feed - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SshCommands { get; set; } - - - } - - /// Available state that can be performed on the SSH command feature such as actions - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuStateModel - { - /// Actions the current user can perform - [Newtonsoft.Json.JsonProperty("actions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public System.Collections.Generic.ICollection Actions { get; set; } - - /// ViewPolicy - [Newtonsoft.Json.JsonProperty("viewPolicy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ViewPolicy { get; set; } - - - } - - /// Actions the current user can perform - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum SshCommandMenuActions - { - [System.Runtime.Serialization.EnumMember(Value = @"CanCreate")] - CanCreate = 0, - - } - - /// Options to create SSH Command Menu - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuCreateArgs - { - /// SSH Command Menu to create - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SshCommandMenuCreateModel Data { get; set; } - - - } - - /// Create a new SSH Command Menu - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SshCommandMenuCreateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Always)] - public bool Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Description { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// SSH Commands should be in the format of commandname = command. Each command should be separated by a carriage return and line feed - [Newtonsoft.Json.JsonProperty("sshCommands", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string SshCommands { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfTeamDetailModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamDetailModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Domain Id - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Should Restrict Lists - [Newtonsoft.Json.JsonProperty("shouldRestrictLists", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ShouldRestrictLists { get; set; } - - /// Should Restrict Sites - [Newtonsoft.Json.JsonProperty("shouldRestrictSites", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? ShouldRestrictSites { get; set; } - - /// Team Description - [Newtonsoft.Json.JsonProperty("teamDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TeamDescription { get; set; } - - /// Team Id - [Newtonsoft.Json.JsonProperty("teamId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamId { get; set; } - - /// Team Name - [Newtonsoft.Json.JsonProperty("teamName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TeamName { get; set; } - - - } - - /// Available options for creating a team - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamCreateArgs - { - /// Id of domain team is in - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// User description of team - [Newtonsoft.Json.JsonProperty("teamDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TeamDescription { get; set; } - - /// Name of the team - [Newtonsoft.Json.JsonProperty("teamName", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string TeamName { get; set; } - - - } - - /// TeamDetailUpdateModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamDetailUpdateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean Active { get; set; } - - /// Domain Id - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 DomainId { get; set; } - - /// Team Description - [Newtonsoft.Json.JsonProperty("teamDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TeamDescription { get; set; } - - /// Team Name - [Newtonsoft.Json.JsonProperty("teamName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString TeamName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfTeamAuditModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamAuditModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Database Name - [Newtonsoft.Json.JsonProperty("databaseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DatabaseName { get; set; } - - /// Date Recordd - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Delegated User Id - [Newtonsoft.Json.JsonProperty("delegatedUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DelegatedUserId { get; set; } - - /// Display Name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// IP Address - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// Machine Name - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// TeamAuditId - [Newtonsoft.Json.JsonProperty("teamAuditId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamAuditId { get; set; } - - /// Team Id - [Newtonsoft.Json.JsonProperty("teamId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamId { get; set; } - - /// User Id - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User Name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// TeamGroupMembershipModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamGroupMembershipModel - { - /// GroupDisplayName - [Newtonsoft.Json.JsonProperty("groupDisplayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupDisplayName { get; set; } - - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// TeamGroupMembershipId - [Newtonsoft.Json.JsonProperty("teamGroupMembershipId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamGroupMembershipId { get; set; } - - /// TeamId - [Newtonsoft.Json.JsonProperty("teamId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamId { get; set; } - - /// Type - [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Type { get; set; } - - - } - - /// TeamMemberUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamMemberUpdateArgs - { - /// DomainId - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 DomainId { get; set; } - - /// GroupIds - [Newtonsoft.Json.JsonProperty("groupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32Of GroupIds { get; set; } - - - } - - /// TeamSiteMap[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamSiteMap - { - /// SiteId - [Newtonsoft.Json.JsonProperty("siteId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SiteId { get; set; } - - /// SiteName - [Newtonsoft.Json.JsonProperty("siteName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SiteName { get; set; } - - /// TeamId - [Newtonsoft.Json.JsonProperty("teamId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamId { get; set; } - - /// TeamSiteMapId - [Newtonsoft.Json.JsonProperty("teamSiteMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamSiteMapId { get; set; } - - - } - - /// TeamSiteUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamSiteUpdateArgs - { - /// ShouldRestrictSites - [Newtonsoft.Json.JsonProperty("shouldRestrictSites", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean ShouldRestrictSites { get; set; } - - /// SiteIds - [Newtonsoft.Json.JsonProperty("siteIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32Of SiteIds { get; set; } - - - } - - /// TeamCategorizedListSummary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamCategorizedListSummary - { - /// Lists - [Newtonsoft.Json.JsonProperty("lists", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Lists { get; set; } - - /// TeamId - [Newtonsoft.Json.JsonProperty("teamId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamId { get; set; } - - - } - - /// TeamCategorizedListUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamCategorizedListUpdateArgs - { - /// ListIds - [Newtonsoft.Json.JsonProperty("listIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfGuidOf ListIds { get; set; } - - /// ShouldRestrictLists - [Newtonsoft.Json.JsonProperty("shouldRestrictLists", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean ShouldRestrictLists { get; set; } - - - } - - /// TicketSystemModel[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TicketSystemModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// DisplayMessage - [Newtonsoft.Json.JsonProperty("displayMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayMessage { get; set; } - - /// ForceRequireTicketNumber - [Newtonsoft.Json.JsonProperty("forceRequireTicketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ForceRequireTicketNumber { get; set; } - - /// IsDefault - [Newtonsoft.Json.JsonProperty("isDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDefault { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// TicketSystemId - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - /// TicketSystemTypeId - [Newtonsoft.Json.JsonProperty("ticketSystemTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemTypeId { get; set; } - - /// ViewTicketUrl - [Newtonsoft.Json.JsonProperty("viewTicketUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ViewTicketUrl { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfTicketSystemSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TicketSystemSummary - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// DisplayMessage - [Newtonsoft.Json.JsonProperty("displayMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayMessage { get; set; } - - /// ForceRequireTicketNumber - [Newtonsoft.Json.JsonProperty("forceRequireTicketNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ForceRequireTicketNumber { get; set; } - - /// IsDefault - [Newtonsoft.Json.JsonProperty("isDefault", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDefault { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// TicketSystemId - [Newtonsoft.Json.JsonProperty("ticketSystemId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemId { get; set; } - - /// TicketSystemTypeId - [Newtonsoft.Json.JsonProperty("ticketSystemTypeId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TicketSystemTypeId { get; set; } - - /// ViewTicketUrl - [Newtonsoft.Json.JsonProperty("viewTicketUrl", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ViewTicketUrl { get; set; } - - - } - - /// User - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserModel - { - /// Active Directory account expiration time - [Newtonsoft.Json.JsonProperty("adAccountExpires", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? AdAccountExpires { get; set; } - - /// Active Directory unique identifier - [Newtonsoft.Json.JsonProperty("adGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string AdGuid { get; set; } - - /// User creation time - [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Created { get; set; } - - /// DateOptionId - [Newtonsoft.Json.JsonProperty("dateOptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DateOptionId { get; set; } - - /// Display name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Active Directory domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Whether Duo two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("duoTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DuoTwoFactor { get; set; } - - /// Email address - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EmailAddress { get; set; } - - /// Whether the user account is enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Source of this external user, if applicable. - [Newtonsoft.Json.JsonProperty("externalUserSource", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ExternalUserSourceTypes? ExternalUserSource { get; set; } - - /// Whether FIDO2 two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("fido2TwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Fido2TwoFactor { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IsApplicationAccount - [Newtonsoft.Json.JsonProperty("isApplicationAccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsApplicationAccount { get; set; } - - /// Whether the email address is derived from the Active Directory account - [Newtonsoft.Json.JsonProperty("isEmailCopiedFromAD", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsEmailCopiedFromAD { get; set; } - - /// Whether the email address has been verified - [Newtonsoft.Json.JsonProperty("isEmailVerified", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsEmailVerified { get; set; } - - /// Whether the user is locked out - [Newtonsoft.Json.JsonProperty("isLockedOut", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsLockedOut { get; set; } - - /// Time of last login - [Newtonsoft.Json.JsonProperty("lastLogin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastLogin { get; set; } - - /// Time of last session activity - [Newtonsoft.Json.JsonProperty("lastSessionActivity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastSessionActivity { get; set; } - - /// The reason for the lock out - [Newtonsoft.Json.JsonProperty("lockOutReason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LockOutReason { get; set; } - - /// An optional description of the reason for the lock out - [Newtonsoft.Json.JsonProperty("lockOutReasonDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LockOutReasonDescription { get; set; } - - /// Number of login failures - [Newtonsoft.Json.JsonProperty("loginFailures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LoginFailures { get; set; } - - /// Whether the user must verify their email address - [Newtonsoft.Json.JsonProperty("mustVerifyEmail", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? MustVerifyEmail { get; set; } - - /// Whether OATH two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("oathTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OathTwoFactor { get; set; } - - /// Whether OATH has been verified - [Newtonsoft.Json.JsonProperty("oathVerified", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OathVerified { get; set; } - - /// Time when the password was last changed - [Newtonsoft.Json.JsonProperty("passwordLastChanged", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? PasswordLastChanged { get; set; } - - /// Whether RADIUS two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("radiusTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RadiusTwoFactor { get; set; } - - /// RADIUS username - [Newtonsoft.Json.JsonProperty("radiusUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RadiusUserName { get; set; } - - /// ResetSessionStarted - [Newtonsoft.Json.JsonProperty("resetSessionStarted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ResetSessionStarted { get; set; } - - /// Slack ID of the user - [Newtonsoft.Json.JsonProperty("slackId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SlackId { get; set; } - - /// TimeOptionId - [Newtonsoft.Json.JsonProperty("timeOptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TimeOptionId { get; set; } - - /// Whether two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("twoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? TwoFactor { get; set; } - - /// Check password, public key, either, or both - [Newtonsoft.Json.JsonProperty("unixAuthenticationMethod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UnixAuthenticationMethodType? UnixAuthenticationMethod { get; set; } - - /// UserLcid - [Newtonsoft.Json.JsonProperty("userLcid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserLcid { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// Time when the verification email was sent - [Newtonsoft.Json.JsonProperty("verifyEmailSentDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? VerifyEmailSentDate { get; set; } - - - } - - /// External user sources. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum ExternalUserSourceTypes - { - [System.Runtime.Serialization.EnumMember(Value = @"None")] - None = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"ThycoticOne")] - ThycoticOne = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Azure")] - Azure = 2, - - } - - /// Check password, public key, either, or both - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum UnixAuthenticationMethodType - { - [System.Runtime.Serialization.EnumMember(Value = @"Password")] - Password = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"PublicKey")] - PublicKey = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"PasswordOrPublicKey")] - PasswordOrPublicKey = 2, - - [System.Runtime.Serialization.EnumMember(Value = @"PasswordAndPublicKey")] - PasswordAndPublicKey = 3, - - } - - /// User update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserUpdateArgs - { - /// The id of the date format to use when displaying dates to this user. These options are defined in Admin > Configuration. - [Newtonsoft.Json.JsonProperty("dateOptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DateOptionId { get; set; } - - /// The user’s name as displayed in the user interface. - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Whether Duo two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("duoTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DuoTwoFactor { get; set; } - - /// The user's email address. Used by the system to send reports, access requests, and other notifications. - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EmailAddress { get; set; } - - /// Whether the user account is enabled. Disabled users are unable to log in and do not consume a user license. - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Whether FIDO2 two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("fido2TwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Fido2TwoFactor { get; set; } - - /// A list of group ids for the groups that can manage this user. If not set, the user is managed by all users with the ‘Administer Users’ role permission. - [Newtonsoft.Json.JsonProperty("groupOwners", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection GroupOwners { get; set; } - - /// User ID. Must match ID in path. - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(1, int.MaxValue)] - public int? Id { get; set; } - - /// Whether this is an application account. Application accounts are used for automation, cannot log in using the UI, and do not consume a user license. - [Newtonsoft.Json.JsonProperty("isApplicationAccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsApplicationAccount { get; set; } - - /// Whether the user is managed by the groups specified in GroupOwners or is managed by all users with the ‘Administer Users’ role permission. - [Newtonsoft.Json.JsonProperty("isGroupOwnerUpdate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsGroupOwnerUpdate { get; set; } - - /// Whether the user is locked out. A locked out user cannot log in. - [Newtonsoft.Json.JsonProperty("isLockedOut", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsLockedOut { get; set; } - - /// Number of login failures to allow before the account is locked out. Set to 0 for unlimited login attempts. - [Newtonsoft.Json.JsonProperty("loginFailures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)] - public int? LoginFailures { get; set; } - - /// Whether OATH two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("oathTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OathTwoFactor { get; set; } - - /// The password used by local accounts to log in. - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password { get; set; } - - /// Whether RADIUS two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("radiusTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RadiusTwoFactor { get; set; } - - /// When a user account uses RADIUS two-factor authentication, this property is the user name of the RADIUS account used to authenticate this user. - [Newtonsoft.Json.JsonProperty("radiusUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RadiusUserName { get; set; } - - /// The id of the time format to use when displaying times to this user. These options are defined in Admin > Configuration. - [Newtonsoft.Json.JsonProperty("timeOptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TimeOptionId { get; set; } - - /// Whether two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("twoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? TwoFactor { get; set; } - - /// Determines the type of Unix authentication to use. Must be Password (0), PublicKey (1), PasswordOrPublicKey (2), or PasswordAndPublicKey (3). - [Newtonsoft.Json.JsonProperty("unixAuthenticationMethod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UnixAuthenticationMethodType? UnixAuthenticationMethod { get; set; } - - - } - - /// PatchUserModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PatchUserModel - { - /// DateOptionId - [Newtonsoft.Json.JsonProperty("dateOptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 DateOptionId { get; set; } - - /// Display name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString DisplayName { get; set; } - - /// Whether Duo two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("duoTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean DuoTwoFactor { get; set; } - - /// Email address - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString EmailAddress { get; set; } - - /// Whether the user account is enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Enabled { get; set; } - - /// Whether FIDO2 two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("fido2TwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Fido2TwoFactor { get; set; } - - /// GroupOwners - [Newtonsoft.Json.JsonProperty("groupOwners", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection GroupOwners { get; set; } - - /// User ID. Must match ID in path - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IsApplicationAccount - [Newtonsoft.Json.JsonProperty("isApplicationAccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean IsApplicationAccount { get; set; } - - /// IsGroupOwnerUpdate - [Newtonsoft.Json.JsonProperty("isGroupOwnerUpdate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsGroupOwnerUpdate { get; set; } - - /// Whether the user is locked out - [Newtonsoft.Json.JsonProperty("isLockedOut", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean IsLockedOut { get; set; } - - /// Number of login failures - [Newtonsoft.Json.JsonProperty("loginFailures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 LoginFailures { get; set; } - - /// Whether OATH two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("oathTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean OathTwoFactor { get; set; } - - /// Password - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Password { get; set; } - - /// Whether RADIUS two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("radiusTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean RadiusTwoFactor { get; set; } - - /// RADIUS username - [Newtonsoft.Json.JsonProperty("radiusUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString RadiusUserName { get; set; } - - /// Slack ID - [Newtonsoft.Json.JsonProperty("slackId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString SlackId { get; set; } - - /// TimeOptionId - [Newtonsoft.Json.JsonProperty("timeOptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfInt32 TimeOptionId { get; set; } - - /// Whether two-factor authentication is enabled - [Newtonsoft.Json.JsonProperty("twoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean TwoFactor { get; set; } - - /// Check password, public key, either, or both - [Newtonsoft.Json.JsonProperty("unixAuthenticationMethod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfUnixAuthenticationMethodType UnixAuthenticationMethod { get; set; } - - - } - - /// Check password, public key, either, or both - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UpdateFieldValueOfUnixAuthenticationMethodType - { - /// Dirty - [Newtonsoft.Json.JsonProperty("dirty", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Dirty { get; set; } - - /// Value - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UnixAuthenticationMethodType? Value { get; set; } - - - } - - /// User owner - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserOwnerModel - { - /// Active Directory domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Group ID - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// User owner ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether the owner is a user (true) or a group (false) - [Newtonsoft.Json.JsonProperty("isUser", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUser { get; set; } - - /// User owner name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// Groups to be assigned. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupAssignments - { - /// Group Ids - [Newtonsoft.Json.JsonProperty("groupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection GroupIds { get; set; } - - - } - - /// The status of the group change action. - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupChangeStatusModel - { - /// The success or failure of the user group action. - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfUserSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// User summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserSummary - { - /// User creation time - [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? Created { get; set; } - - /// Display name - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Active Directory domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Active Directory Domain Name - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - /// Email address - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EmailAddress { get; set; } - - /// Whether the user account is enabled - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Source of this external user, if applicable. - [Newtonsoft.Json.JsonProperty("externalUserSource", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public ExternalUserSourceTypes? ExternalUserSource { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// IsApplicationAccount - [Newtonsoft.Json.JsonProperty("isApplicationAccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsApplicationAccount { get; set; } - - /// Whether the user is locked out - [Newtonsoft.Json.JsonProperty("isLockedOut", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsLockedOut { get; set; } - - /// Time of last login - [Newtonsoft.Json.JsonProperty("lastLogin", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? LastLogin { get; set; } - - /// Number of login failures - [Newtonsoft.Json.JsonProperty("loginFailures", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? LoginFailures { get; set; } - - /// Name of the method used for two factor authentication - [Newtonsoft.Json.JsonProperty("twoFactorMethod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public MultifactorAuthenticationProviderTypes? TwoFactorMethod { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// User create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserCreateArgs - { - /// Active Directory unique identifier. - [Newtonsoft.Json.JsonProperty("adGuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.StringLength(50)] - public string AdGuid { get; set; } - - /// The user’s name as displayed in the user interface. - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string DisplayName { get; set; } - - /// If not null, the Active Directory domain ID. - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [System.ComponentModel.DataAnnotations.Range(-1, int.MaxValue)] - public int? DomainId { get; set; } - - /// Whether Duo two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("duoTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? DuoTwoFactor { get; set; } - - /// The user's email address. Used by the system to send reports, access requests, and other notifications. - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EmailAddress { get; set; } - - /// Whether the user account is enabled. Disabled users are unable to log in and do not consume a user license. - [Newtonsoft.Json.JsonProperty("enabled", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Enabled { get; set; } - - /// Whether Duo two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("fido2TwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Fido2TwoFactor { get; set; } - - /// Whether this is an application account. Application accounts are used for automation, cannot log in using the UI, and do not consume a user license. - [Newtonsoft.Json.JsonProperty("isApplicationAccount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsApplicationAccount { get; set; } - - /// Whether OATH two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("oathTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? OathTwoFactor { get; set; } - - /// The password used by local accounts to log in. - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Password { get; set; } - - /// Whether RADIUS two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("radiusTwoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RadiusTwoFactor { get; set; } - - /// RADIUS username - [Newtonsoft.Json.JsonProperty("radiusUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RadiusUserName { get; set; } - - /// Whether two-factor authentication is enabled. - [Newtonsoft.Json.JsonProperty("twoFactor", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? TwoFactor { get; set; } - - /// Determines the type of Unix authentication to use. Valid values are Password, PublicKey, PasswordOrPublicKey, and PasswordAndPublicKey. - [Newtonsoft.Json.JsonProperty("unixAuthenticationMethod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public UnixAuthenticationMethodType? UnixAuthenticationMethod { get; set; } - - /// The unique string identifying this user. - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string UserName { get; set; } - - - } - - /// Current User - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class CurrentUserModel - { - /// List of admin link options for current user - [Newtonsoft.Json.JsonProperty("adminLinks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AdminLinks { get; set; } - - /// Date option of current user - [Newtonsoft.Json.JsonProperty("dateOptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DateOptionId { get; set; } - - /// Display Name of current user - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// Email Address of current user - [Newtonsoft.Json.JsonProperty("emailAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string EmailAddress { get; set; } - - /// Id of current user - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Permissions assigned to current user - [Newtonsoft.Json.JsonProperty("permissions", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Permissions { get; set; } - - /// List of profile options for current user - [Newtonsoft.Json.JsonProperty("profileLinks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ProfileLinks { get; set; } - - /// Time option of current user - [Newtonsoft.Json.JsonProperty("timeOptionId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TimeOptionId { get; set; } - - /// Language of current user - [Newtonsoft.Json.JsonProperty("userLcid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserLcid { get; set; } - - /// User Name of current user - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// The current users theme - [Newtonsoft.Json.JsonProperty("userTheme", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserTheme { get; set; } - - - } - - /// List of admin link options for current user - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class MenuLink - { - /// Link - [Newtonsoft.Json.JsonProperty("link", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Link { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Permissions assigned to current user - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RestRolePermission - { - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfUserPublicSshKeySummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// User public ssh key - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserPublicSshKeySummary - { - /// Whether the user public ssh key is active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// User public ssh key creation time - [Newtonsoft.Json.JsonProperty("dateCreated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateCreated { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// Whether the user public ssh key is expired - [Newtonsoft.Json.JsonProperty("expired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Expired { get; set; } - - /// The Format of the key - [Newtonsoft.Json.JsonProperty("format", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Format { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Public ssh key - [Newtonsoft.Json.JsonProperty("publicSshKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PublicSshKey { get; set; } - - - } - - /// User public ssh key create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserPublicSshKeyCreateArgs - { - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Description { get; set; } - - /// Format of private key file - [Newtonsoft.Json.JsonProperty("format", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Format { get; set; } - - /// Passphrase - [Newtonsoft.Json.JsonProperty("passphrase", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Passphrase { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfUserOwnerSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// User owner summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserOwnerSummary - { - /// Active Directory domain ID - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// Group ID - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// User owner ID - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// Whether the owner is a user (true) or a group (false) - [Newtonsoft.Json.JsonProperty("isUser", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUser { get; set; } - - /// User owner name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - - } - - /// User owner create options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserOwnerCreateArgs - { - /// Group ID - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group name - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// User ID - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User name - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - - } - - /// Update a list of add and removed owners owners of the user - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserOwnerPatchUserModel - { - /// Group IDs to add as owners of the user - [Newtonsoft.Json.JsonProperty("addedGroupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection AddedGroupIds { get; set; } - - /// Set to remove all owners to make user to be managed by user admins - [Newtonsoft.Json.JsonProperty("removeAllOwners", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? RemoveAllOwners { get; set; } - - /// Group IDs to remove as owners of the user - [Newtonsoft.Json.JsonProperty("removeGroupIds", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection RemoveGroupIds { get; set; } - - - } - - /// UserOwnerPatchResult - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserOwnerPatchResult - { - /// Success of the patch - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfDomainSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class DomainSummary - { - /// DomainId - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// DomainName - [Newtonsoft.Json.JsonProperty("domainName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DomainName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfUserRoleSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// All of the roles a user has - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserRoleSummary - { - /// All of the groups to which the user belongs that have this role - [Newtonsoft.Json.JsonProperty("groups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Groups { get; set; } - - /// Is the role directly assigned to the user - [Newtonsoft.Json.JsonProperty("isDirectAssignment", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDirectAssignment { get; set; } - - /// Role ID - [Newtonsoft.Json.JsonProperty("roleId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? RoleId { get; set; } - - /// Role Name - [Newtonsoft.Json.JsonProperty("roleName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string RoleName { get; set; } - - - } - - /// All of the groups to which the user belongs that have this role - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class GroupAssignedRoleModel - { - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// GroupName - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfUserAuditSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserAuditSummary - { - /// Action that occurred - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// Database name - [Newtonsoft.Json.JsonProperty("databaseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DatabaseName { get; set; } - - /// Date Recorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// The name of the user that made the change - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// The display name that was affected by this change - [Newtonsoft.Json.JsonProperty("displayNameAffected", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayNameAffected { get; set; } - - /// IP Address - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// Machine name - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// The user id of the user that made the change - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// The user id that was affected by this change - [Newtonsoft.Json.JsonProperty("userIdAffected", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserIdAffected { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfUserTeamSummary - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserTeamSummary - { - /// Team Active State - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// Team Domain Id - [Newtonsoft.Json.JsonProperty("domainId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DomainId { get; set; } - - /// If the user is directly assigned to the team - [Newtonsoft.Json.JsonProperty("isDirectlyAssigned", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsDirectlyAssigned { get; set; } - - /// Team Description - [Newtonsoft.Json.JsonProperty("teamDescription", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TeamDescription { get; set; } - - /// The memberships a user has to a team. - [Newtonsoft.Json.JsonProperty("teamGroupMemberships", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection TeamGroupMemberships { get; set; } - - /// Team Id - [Newtonsoft.Json.JsonProperty("teamId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamId { get; set; } - - /// Team Name - [Newtonsoft.Json.JsonProperty("teamName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TeamName { get; set; } - - - } - - /// Team Group Summary - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class TeamGroupSummary - { - /// Group Id - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// Group Name - [Newtonsoft.Json.JsonProperty("groupName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string GroupName { get; set; } - - /// Is Personal Group - [Newtonsoft.Json.JsonProperty("isPersonal", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsPersonal { get; set; } - - /// Team Id - [Newtonsoft.Json.JsonProperty("teamId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? TeamId { get; set; } - - - } - - /// Preference Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PreferenceModel - { - /// Setting Code - [Newtonsoft.Json.JsonProperty("settingCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingCode { get; set; } - - /// Setting Id - [Newtonsoft.Json.JsonProperty("settingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? SettingId { get; set; } - - /// Setting Key - [Newtonsoft.Json.JsonProperty("settingKey", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingKey { get; set; } - - /// Setting Name - [Newtonsoft.Json.JsonProperty("settingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingName { get; set; } - - /// Setting Value - [Newtonsoft.Json.JsonProperty("settingValue", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingValue { get; set; } - - /// User Id - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// User Setting Id - [Newtonsoft.Json.JsonProperty("userSettingId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserSettingId { get; set; } - - - } - - /// Preference update options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class RestPreferenceUpdateArgs - { - /// Setting Code - [Newtonsoft.Json.JsonProperty("settingCode", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingCode { get; set; } - - /// Setting Name - [Newtonsoft.Json.JsonProperty("settingName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string SettingName { get; set; } - - /// Value (True/False for legacy preferences) - [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public Object Value { get; set; } - - - } - - /// User change password options - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserChangePasswordArgs - { - /// Current user password - [Newtonsoft.Json.JsonProperty("currentPassword", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string CurrentPassword { get; set; } - - /// New user password - [Newtonsoft.Json.JsonProperty("newPassword", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string NewPassword { get; set; } - - - } - - /// UserPasswordVerifyArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class UserPasswordVerifyArgs - { - /// Password - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Password { get; set; } - - - } - - /// ResetTwoFactorArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ResetTwoFactorArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ResetTwoFactorRequestModel Data { get; set; } - - - } - - /// Request a 2FA reset - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ResetTwoFactorRequestModel - { - /// The 2FA method set for this user - [Newtonsoft.Json.JsonProperty("twoFactorType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public TwoFactorResetType? TwoFactorType { get; set; } - - - } - - /// Available types of 2FA options that can be reset - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum TwoFactorResetType - { - [System.Runtime.Serialization.EnumMember(Value = @"Oath")] - Oath = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"Fido")] - Fido = 1, - - } - - /// The result of the 2FA reset - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class ResetTwoFactorResponseModel - { - /// Did the 2FA reset succeed - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// PasswordResetArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PasswordResetArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public PasswordResetRequestModel Data { get; set; } - - - } - - /// Reset a users password - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PasswordResetRequestModel - { - /// The new password for this user - [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Password { get; set; } - - /// The user id to reset - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Always)] - public int UserId { get; set; } - - - } - - /// PasswordResetResultModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PasswordResetResultModel - { - /// Success - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// LockOutArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LockOutArgs - { - /// Data - [Newtonsoft.Json.JsonProperty("data", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public LockOutRequestModel Data { get; set; } - - - } - - /// Request a lock out - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LockOutRequestModel - { - /// An optional description of the reason for the lock out - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// The reason for the lock out - [Newtonsoft.Json.JsonProperty("reasonType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public LockOutReasonType? ReasonType { get; set; } - - - } - - /// Available types of reasons for lock out - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public enum LockOutReasonType - { - [System.Runtime.Serialization.EnumMember(Value = @"SuspiciousActivity")] - SuspiciousActivity = 0, - - [System.Runtime.Serialization.EnumMember(Value = @"LoginAttemptsExceeded")] - LoginAttemptsExceeded = 1, - - [System.Runtime.Serialization.EnumMember(Value = @"Other")] - Other = 2, - - } - - /// The result of the lock out - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class LockOutResponseModel - { - /// Did the lock out succeed - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - - } - - /// WorkflowInstanceDto[] - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowInstanceDto - { - /// ConfigurationJson - [Newtonsoft.Json.JsonProperty("configurationJson", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConfigurationJson { get; set; } - - /// CurrentState - [Newtonsoft.Json.JsonProperty("currentState", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CurrentState { get; set; } - - /// CurrentStateInfoJson - [Newtonsoft.Json.JsonProperty("currentStateInfoJson", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CurrentStateInfoJson { get; set; } - - /// CurrentStepId - [Newtonsoft.Json.JsonProperty("currentStepId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentStepId { get; set; } - - /// CurrentStepState - [Newtonsoft.Json.JsonProperty("currentStepState", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public AccessRequestState? CurrentStepState { get; set; } - - /// EndTime - [Newtonsoft.Json.JsonProperty("endTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? EndTime { get; set; } - - /// EntityWorkflowMapId - [Newtonsoft.Json.JsonProperty("entityWorkflowMapId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? EntityWorkflowMapId { get; set; } - - /// ExpirationTime - [Newtonsoft.Json.JsonProperty("expirationTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ExpirationTime { get; set; } - - /// Id - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Id { get; set; } - - /// PendingTransaction - [Newtonsoft.Json.JsonProperty("pendingTransaction", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? PendingTransaction { get; set; } - - /// StartTime - [Newtonsoft.Json.JsonProperty("startTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? StartTime { get; set; } - - /// Status - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Status { get; set; } - - /// WorkflowTemplateId - [Newtonsoft.Json.JsonProperty("workflowTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowTemplateId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfWorkflowStepTemplateDetailModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowStepTemplateDetailModel - { - /// Configuration - [Newtonsoft.Json.JsonProperty("configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public AccessRequestStepConfiguration Configuration { get; set; } - - /// ExpirationMinutes - [Newtonsoft.Json.JsonProperty("expirationMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExpirationMinutes { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Order - [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Order { get; set; } - - /// WorkflowStepTemplateId - [Newtonsoft.Json.JsonProperty("workflowStepTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowStepTemplateId { get; set; } - - /// WorkflowTemplateId - [Newtonsoft.Json.JsonProperty("workflowTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowTemplateId { get; set; } - - - } - - /// Configuration - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AccessRequestStepConfiguration - { - /// ApproverGroups - [Newtonsoft.Json.JsonProperty("approverGroups", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection ApproverGroups { get; set; } - - /// ApproveStep - [Newtonsoft.Json.JsonProperty("approveStep", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ApproveStep { get; set; } - - /// ExpireStep - [Newtonsoft.Json.JsonProperty("expireStep", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExpireStep { get; set; } - - /// NumApprovalsRequired - [Newtonsoft.Json.JsonProperty("numApprovalsRequired", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NumApprovalsRequired { get; set; } - - - } - - /// ApproverGroups - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class AccessReviewer - { - /// AccessReviewerId - [Newtonsoft.Json.JsonProperty("accessReviewerId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? AccessReviewerId { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// GroupId - [Newtonsoft.Json.JsonProperty("groupId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? GroupId { get; set; } - - /// IsOwner - [Newtonsoft.Json.JsonProperty("isOwner", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsOwner { get; set; } - - /// IsUser - [Newtonsoft.Json.JsonProperty("isUser", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? IsUser { get; set; } - - /// WorkflowStepTemplateId - [Newtonsoft.Json.JsonProperty("workflowStepTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowStepTemplateId { get; set; } - - /// WorkflowTemplateId - [Newtonsoft.Json.JsonProperty("workflowTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowTemplateId { get; set; } - - - } - - /// WorkflowStepTemplateCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowStepTemplateCreateArgs - { - /// Configuration - [Newtonsoft.Json.JsonProperty("configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public AccessRequestStepConfiguration Configuration { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Order - [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Order { get; set; } - - /// WorkflowTemplateId - [Newtonsoft.Json.JsonProperty("workflowTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowTemplateId { get; set; } - - - } - - /// WorkflowStepTemplateUpdateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowStepTemplateUpdateArgs - { - /// WorkflowStepTemplates - [Newtonsoft.Json.JsonProperty("workflowStepTemplates", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection WorkflowStepTemplates { get; set; } - - - } - - /// WorkflowTemplateDetailModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowTemplateDetailModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Active { get; set; } - - /// ConfigurationJson - [Newtonsoft.Json.JsonProperty("configurationJson", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConfigurationJson { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// ExpirationMinutes - [Newtonsoft.Json.JsonProperty("expirationMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExpirationMinutes { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Reusable - [Newtonsoft.Json.JsonProperty("reusable", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Reusable { get; set; } - - /// TypeName - [Newtonsoft.Json.JsonProperty("typeName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string TypeName { get; set; } - - /// WorkflowTemplateId - [Newtonsoft.Json.JsonProperty("workflowTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowTemplateId { get; set; } - - /// WorkflowType - [Newtonsoft.Json.JsonProperty("workflowType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public WorkflowType? WorkflowType { get; set; } - - - } - - /// WorkflowStepTemplateUpdateModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowStepTemplateUpdateModel - { - /// Configuration - [Newtonsoft.Json.JsonProperty("configuration", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public AccessRequestStepConfiguration Configuration { get; set; } - - /// ExpirationMinutes - [Newtonsoft.Json.JsonProperty("expirationMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExpirationMinutes { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } - - /// Order - [Newtonsoft.Json.JsonProperty("order", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Order { get; set; } - - /// WorkflowStepTemplateId - [Newtonsoft.Json.JsonProperty("workflowStepTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowStepTemplateId { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfWorkflowTemplateDetailModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// WorkflowTemplateCreateArgs - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowTemplateCreateArgs - { - /// ConfigurationJson - [Newtonsoft.Json.JsonProperty("configurationJson", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string ConfigurationJson { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description { get; set; } - - /// ExpirationMinutes - [Newtonsoft.Json.JsonProperty("expirationMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? ExpirationMinutes { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - public string Name { get; set; } - - /// WorkflowType - [Newtonsoft.Json.JsonProperty("workflowType", Required = Newtonsoft.Json.Required.Always)] - [System.ComponentModel.DataAnnotations.Required(AllowEmptyStrings = true)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public WorkflowType WorkflowType { get; set; } - - - } - - /// WorkflowTemplateUpdateModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowTemplateUpdateModel - { - /// Active - [Newtonsoft.Json.JsonProperty("active", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfBoolean Active { get; set; } - - /// ConfigurationJson - [Newtonsoft.Json.JsonProperty("configurationJson", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString ConfigurationJson { get; set; } - - /// Description - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Description { get; set; } - - /// ExpirationMinutes - [Newtonsoft.Json.JsonProperty("expirationMinutes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalInt32 ExpirationMinutes { get; set; } - - /// IsCopy - [Newtonsoft.Json.JsonProperty("isCopy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfOptionalBoolean IsCopy { get; set; } - - /// Name - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public UpdateFieldValueOfString Name { get; set; } - - - } - - /// Specify paging and sorting options for querying records and returning results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class PagingOfWorkflowTemplateAuditModel - { - /// Number of result batches available with current query options - [Newtonsoft.Json.JsonProperty("batchCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? BatchCount { get; set; } - - /// Index of current result page - [Newtonsoft.Json.JsonProperty("currentPage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? CurrentPage { get; set; } - - /// Whether there are any results in additional pages - [Newtonsoft.Json.JsonProperty("hasNext", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasNext { get; set; } - - /// Whether there are any results in previous pages - [Newtonsoft.Json.JsonProperty("hasPrev", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? HasPrev { get; set; } - - /// Correct value of 'skip' for the next page of results - [Newtonsoft.Json.JsonProperty("nextSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? NextSkip { get; set; } - - /// Number of result pages available with current query options - [Newtonsoft.Json.JsonProperty("pageCount", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PageCount { get; set; } - - /// Correct value of 'skip' for the previous page of results - [Newtonsoft.Json.JsonProperty("prevSkip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? PrevSkip { get; set; } - - /// Query results - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// Severity of any errors - [Newtonsoft.Json.JsonProperty("severity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] - public Severity? Severity { get; set; } - - /// Number of records to skip before taking results - [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Skip { get; set; } - - /// List of sort properties - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - /// Whether the query executed successfully - [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool? Success { get; set; } - - /// Maximum number of records to include in results - [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Take { get; set; } - - /// Total number of results available - [Newtonsoft.Json.JsonProperty("total", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? Total { get; set; } - - - } - - /// Query results - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class WorkflowTemplateAuditModel - { - /// Action - [Newtonsoft.Json.JsonProperty("action", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Action { get; set; } - - /// DatabaseName - [Newtonsoft.Json.JsonProperty("databaseName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DatabaseName { get; set; } - - /// DateRecorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// DelegatedUserName - [Newtonsoft.Json.JsonProperty("delegatedUserName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DelegatedUserName { get; set; } - - /// DelegateUserId - [Newtonsoft.Json.JsonProperty("delegateUserId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? DelegateUserId { get; set; } - - /// DisplayName - [Newtonsoft.Json.JsonProperty("displayName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DisplayName { get; set; } - - /// FormattedDate - [Newtonsoft.Json.JsonProperty("formattedDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string FormattedDate { get; set; } - - /// IpAddress - [Newtonsoft.Json.JsonProperty("ipAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string IpAddress { get; set; } - - /// MachineName - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - /// Notes - [Newtonsoft.Json.JsonProperty("notes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Notes { get; set; } - - /// UserId - [Newtonsoft.Json.JsonProperty("userId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? UserId { get; set; } - - /// UserName - [Newtonsoft.Json.JsonProperty("userName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UserName { get; set; } - - /// WorkflowTemplateAuditId - [Newtonsoft.Json.JsonProperty("workflowTemplateAuditId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowTemplateAuditId { get; set; } - - /// WorkflowTemplateId - [Newtonsoft.Json.JsonProperty("workflowTemplateId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public int? WorkflowTemplateId { get; set; } - - - } - - /// IPagingOfSystemLogSummaryModel - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class IPagingOfSystemLogSummaryModel - { - /// Records - [Newtonsoft.Json.JsonProperty("records", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Records { get; set; } - - /// SortBy - [Newtonsoft.Json.JsonProperty("sortBy", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection SortBy { get; set; } - - - } - - /// System Log Summary Model - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.5.2.0 (Newtonsoft.Json v11.0.0.0)")] - public partial class SystemLogSummaryModel - { - /// Correlation ID - [Newtonsoft.Json.JsonProperty("correlationId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string CorrelationId { get; set; } - - /// Date Log Message was Recorded - [Newtonsoft.Json.JsonProperty("dateRecorded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DateRecorded { get; set; } - - /// Log Level of Message - [Newtonsoft.Json.JsonProperty("logLevel", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LogLevel { get; set; } - - /// Message that was Logged - [Newtonsoft.Json.JsonProperty("logMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string LogMessage { get; set; } - - /// Machine Name that was Logged on - [Newtonsoft.Json.JsonProperty("machineName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string MachineName { get; set; } - - - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ApiException : System.Exception - { - public int StatusCode { get; private set; } - - public string Response { get; private set; } - - public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } - - public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException) - : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) - { - StatusCode = statusCode; - Response = response; - Headers = headers; - } - - public override string ToString() - { - return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.14.8.0 (NJsonSchema v10.5.2.0 (Newtonsoft.Json v11.0.0.0))")] - public partial class ApiException : ApiException - { - public TResult Result { get; private set; } - - public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException) - : base(message, statusCode, response, headers, innerException) - { - Result = result; - } - } - -} - -#pragma warning restore 1591 -#pragma warning restore 1573 -#pragma warning restore 472 -#pragma warning restore 114 -#pragma warning restore 108 -#pragma warning restore 3016 \ No newline at end of file diff --git a/ExternalConnectors/TSS/TSS.ico b/ExternalConnectors/TSS/TSS.ico deleted file mode 100644 index e2b2e903b..000000000 Binary files a/ExternalConnectors/TSS/TSS.ico and /dev/null differ diff --git a/Tools/CreateBulkConnections_ConfCons2_6.ps1 b/Tools/CreateBulkConnections_ConfCons2_6.ps1 deleted file mode 100644 index b39a2598d..000000000 --- a/Tools/CreateBulkConnections_ConfCons2_6.ps1 +++ /dev/null @@ -1,294 +0,0 @@ -##################################### -# Authors: David Sparer & Jack Denton -# Summary: -# This is intended to be a template for creating connections in bulk. This uses the serializers directly from the mRemoteNG binaries. -# You will still need to create the connection info objects, but the library will handle serialization. It is expected that you -# are familiar with PowerShell. If this is not the case, reach out to the mRemoteNG community for help. -# Usage: -# Replace or modify the examples that are shown toward the end of the script to create your own connection info objects. -##################################### - -foreach ($Path in 'HKLM:\SOFTWARE\WOW6432Node\mRemoteNG', 'HKLM:\SOFTWARE\mRemoteNG') { - Try { - $mRNGPath = (Get-ItemProperty -Path $Path -Name InstallDir -ErrorAction Stop).InstallDir - break - } - Catch { - continue - } -} -if (!$mRNGPath) { - Add-Type -AssemblyName System.Windows.Forms - $FolderBrowser = [System.Windows.Forms.FolderBrowserDialog]@{ - Description = 'Please select the folder which contains mRemoteNG.exe' - ShowNewFolderButton = $false - } - - $Response = $FolderBrowser.ShowDialog() - - if ($Response.value__ -eq 1) { - $mRNGPath = $FolderBrowser.SelectedPath - } - elseif ($Response.value__ -eq 2) { - Write-Warning 'A folder containing mRemoteNG.exe has not been selected' - return - } -} -$null = [System.Reflection.Assembly]::LoadFile((Join-Path -Path $mRNGPath -ChildPath "mRemoteNG.exe")) -Add-Type -Path (Join-Path -Path $mRNGPath -ChildPath "BouncyCastle.Crypto.dll") - - - -function ConvertTo-mRNGSerializedXml { - [CmdletBinding()] - Param ( - [Parameter(Mandatory)] - [mRemoteNG.Connection.ConnectionInfo[]] - $Xml -) - - function Get-ChildNodes { - Param ($Xml) - - $Xml - - if ($Xml -is [mRemoteNG.Container.ContainerInfo] -and $Xml.HasChildren()) { - foreach ($Node in $Xml.Children) { - Get-ChildNodes -Xml $Node - } - } - } - - $AllNodes = Get-ChildNodes -Xml $Xml - if ( - $AllNodes.Password -or - $AllNodes.RDGatewayPassword -or - $AllNodes.VNCProxyPassword - ) { - $Password = Read-Host -Message 'If you have password protected your ConfCons.xml please enter the password here otherwise just press enter' -AsSecureString - } - else { - $Password = [securestring]::new() - } - $CryptoProvider = [mRemoteNG.Security.SymmetricEncryption.AeadCryptographyProvider]::new() - $SaveFilter = [mRemoteNG.Security.SaveFilter]::new() - $ConnectionNodeSerializer = [mRemoteNG.Config.Serializers.Xml.XmlConnectionNodeSerializer26]::new($CryptoProvider, $Password, $SaveFilter) - $XmlSerializer = [mRemoteNG.Config.Serializers.Xml.XmlConnectionsSerializer]::new($CryptoProvider, $ConnectionNodeSerializer) - - $RootNode = [mRemoteNG.Tree.Root.RootNodeInfo]::new('Connection') - foreach ($Node in $Xml) { - $RootNode.AddChild($Node) - } - $XmlSerializer.Serialize($RootNode) -} - -function New-mRNGConnection { - [CmdletBinding(DefaultParameterSetName = 'Credential')] - Param ( - [Parameter(Mandatory)] - [string] - $Name, - - [Parameter(Mandatory)] - [string] - $Hostname, - - [Parameter(Mandatory)] - [mRemoteNG.Connection.Protocol.ProtocolType] - $Protocol, - - [Parameter(ParameterSetName = 'Credential')] - [pscredential] - $Credential, - - [Parameter(ParameterSetName = 'InheritCredential')] - [switch] - $InheritCredential, - - [Parameter()] - [mRemoteNG.Container.ContainerInfo] - $ParentContainer, - - [Parameter()] - [switch] - $PassThru - ) - - $Connection = [mRemoteNG.Connection.ConnectionInfo]@{ - Name = $Name - Hostname = $Hostname - Protocol = $Protocol - } - - if ($Credential) { - $Connection.Username = $Credential.GetNetworkCredential().UserName - $Connection.Domain = $Credential.GetNetworkCredential().Domain - $Connection.Password = $Credential.GetNetworkCredential().Password - } - - if ($InheritCredential) { - $Connection.Inheritance.Username = $true - $Connection.Inheritance.Domain = $true - $Connection.Inheritance.Password = $true - } - - if ($ParentContainer) { - $ParentContainer.AddChild($Connection) - - if ($PSBoundParameters.ContainsKey('PassThru')) { - $Connection - } - } - else { - $Connection - } -} - -function New-mRNGContainer { - [CmdletBinding(DefaultParameterSetName = 'Credential')] - Param ( - [Parameter(Mandatory)] - [string] - $Name, - - [Parameter(ParameterSetName = 'Credential')] - [pscredential] - $Credential, - - [Parameter(ParameterSetName = 'InheritCredential')] - [switch] - $InheritCredential, - - [Parameter()] - [mRemoteNG.Container.ContainerInfo] - $ParentContainer - ) - - $Container = [mRemoteNG.Container.ContainerInfo]@{ - Name = $Name - } - - if ($Credential) { - $Container.Username = $Credential.GetNetworkCredential().UserName - $Container.Domain = $Credential.GetNetworkCredential().Domain - $Container.Password = $Credential.GetNetworkCredential().Password - } - - if ($InheritCredential) { - $Container.Inheritance.Username = $true - $Container.Inheritance.Domain = $true - $Container.Inheritance.Password = $true - } - - if ($ParentContainer) { - $ParentContainer.AddChild($Container) - } - - $Container -} - -function Export-mRNGXml { - [CmdletBinding()] - param ( - [Parameter()] - [string] - $Path, - - [Parameter()] - [string] - $SerializedXml - ) - - $FilePathProvider = [mRemoteNG.Config.DataProviders.FileDataProvider]::new($Path) - $filePathProvider.Save($SerializedXml) -} - - - - -#---------------------------------------------------------------- -# Example 1: serialize many connections, no containers -# Here you can define the number of connection info objects to create -# You can also provide a list of desired hostnames and iterate over those - -$Connections = foreach ($i in 1..5) { - # Create new connection - $Splat = @{ - Name = 'Server-{0:D2}' -f $i - Hostname = 'Server-{0:D2}' -f $i - Protocol = 'RDP' - InheritCredential = $true - } - New-mRNGConnection @Splat -} - -# Serialize the connections -$SerializedXml = ConvertTo-mRNGSerializedXml -Xml $Connections - -# Write the XML to a file ready to import into mRemoteNG -Export-mRNGXml -Path "$ENV:APPDATA\mRemoteNG\PowerShellGenerated.xml" -SerializedXml $SerializedXml - -# Now open up mRemoteNG and press Ctrl+O and open up the exported XML file - - - - -#---------------------------------------------------------------- -# Example 2: serialize a container which has connections -# You can also create containers and add connections and containers to them, which will be nested correctly when serialized -# If you specify the ParentContainer parameter for new connections then there will be no output unless the PassThru parameter is also used - -$ProdServerCreds = Get-Credential -$ProdServers = New-mRNGContainer -Name 'ProdServers' -Credential $ProdServerCreds - -foreach ($i in 1..3) { - # Create new connection - $Splat = @{ - Name = 'Server-{0:D2}' -f $i - Hostname = 'Server-{0:D2}' -f $i - Protocol = 'RDP' - InheritCredential = $true - ParentContainer = $ProdServers - } - New-mRNGConnection @Splat -} - -$ProdWebServers = New-mRNGContainer -Name 'WebServers' -ParentContainer $ProdServers -InheritCredential - -foreach ($i in 1..3) { - # Create new connection - $Splat = @{ - Name = 'WebServer-{0:D2}' -f $i - Hostname = 'WebServer-{0:D2}' -f $i - Protocol = 'SSH1' - InheritCredential = $true - ParentContainer = $ProdWebServers - } - New-mRNGConnection @Splat -} - -$DevServers = New-mRNGContainer -Name 'DevServers' - -foreach ($i in 1..3) { - # Create new connection - $Splat = @{ - Name = 'DevServer-{0:D2}' -f $i - Hostname = 'DevServer-{0:D2}' -f $i - Protocol = 'RDP' - InheritCredential = $true - ParentContainer = $DevServers - PassThru = $true - } - - # Specified the PassThru parameter in order to catch the connection and change a property - $Connection = New-mRNGConnection @Splat - $Connection.Resolution = 'FullScreen' -} - -# Serialize the container -$SerializedXml = ConvertTo-mRNGSerializedXml -Xml $ProdServers, $DevServers - -# Write the XML to a file ready to import into mRemoteNG -Export-mRNGXml -Path "$ENV:APPDATA\mRemoteNG\PowerShellGenerated.xml" -SerializedXml $SerializedXml - -# Now open up mRemoteNG and press Ctrl+O and open up the exported XML file diff --git a/Tools/cert/CodeSigning_Cert_mRemoteNG_DigiCert.p12.enc b/Tools/cert/CodeSigning_Cert_mRemoteNG_DigiCert.p12.enc deleted file mode 100644 index 385382598..000000000 Binary files a/Tools/cert/CodeSigning_Cert_mRemoteNG_DigiCert.p12.enc and /dev/null differ diff --git a/Tools/create_upg_chk_files.ps1 b/Tools/create_upg_chk_files.ps1 deleted file mode 100644 index dc90448f4..000000000 --- a/Tools/create_upg_chk_files.ps1 +++ /dev/null @@ -1,109 +0,0 @@ -#Requires -Version 4.0 -param ( - [string] - [Parameter(Mandatory=$true)] - $TagName, - - [string] - [Parameter(Mandatory=$true)] - [ValidateSet("Stable","Beta","Development")] - $UpdateChannel -) - - - -function New-MsiUpdateFileContent { - param ( - [System.IO.FileInfo] - [Parameter(Mandatory=$true)] - $MsiFile, - - [string] - [Parameter(Mandatory=$true)] - $TagName - ) - - $version = $MsiFile.BaseName -replace "[a-zA-Z-]*" - $certThumbprint = (Get-AuthenticodeSignature -FilePath $MsiFile).SignerCertificate.Thumbprint - $hash = Get-FileHash -Algorithm SHA512 $MsiFile | % { $_.Hash } - - $fileContents = ` -"Version: $version -dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$TagName/$($MsiFile.Name) -clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$TagName/CHANGELOG.md -CertificateThumbprint: $certThumbprint -Checksum: $hash" - Write-Output $fileContents -} - - -function New-ZipUpdateFileContent { - param ( - [System.IO.FileInfo] - [Parameter(Mandatory=$true)] - $ZipFile, - - [string] - [Parameter(Mandatory=$true)] - $TagName - ) - - $version = $ZipFile.BaseName -replace "[a-zA-Z-]*" - $hash = Get-FileHash -Algorithm SHA512 $ZipFile | % { $_.Hash } - - $fileContents = ` -"Version: $version -dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$TagName/$($ZipFile.Name) -clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$TagName/CHANGELOG.TXT -Checksum: $hash" - Write-Output $fileContents -} - - -function Resolve-UpdateCheckFileName { - param ( - [string] - [Parameter(Mandatory=$true)] - [ValidateSet("Stable","Beta","Development")] - $UpdateChannel, - - [string] - [Parameter(Mandatory=$true)] - [ValidateSet("Normal","Portable")] - $Type - ) - - $fileName = "" - - if ($UpdateChannel -eq "Beta") { $fileName += "beta-" } - elseif ($UpdateChannel -eq "Development") { $fileName += "dev-" } - - $fileName += "update" - - if ($Type -eq "Portable") { $fileName += "-portable" } - - $fileName += ".txt" - - Write-Output $fileName -} - - - - - -$releaseFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\Release" -Resolve - -# build msi update file -$msiFile = Get-ChildItem -Path "$releaseFolder\*.msi" | sort LastWriteTime | select -last 1 -$msiUpdateContents = New-MsiUpdateFileContent -MsiFile $msiFile -TagName $TagName -$msiUpdateFileName = Resolve-UpdateCheckFileName -UpdateChannel $UpdateChannel -Type Normal -Write-Output "`n`nMSI Update Check File Contents ($msiUpdateFileName)`n------------------------------" -Tee-Object -InputObject $msiUpdateContents -FilePath "$releaseFolder\$msiUpdateFileName" - - -# build zip update file -$zipFile = Get-ChildItem -Path "$releaseFolder\*.zip" | sort LastWriteTime | select -last 1 -$zipUpdateContents = New-ZipUpdateFileContent -ZipFile $zipFile -TagName $TagName -$zipUpdateFileName = Resolve-UpdateCheckFileName -UpdateChannel $UpdateChannel -Type Portable -Write-Output "`n`nZip Update Check File Contents ($zipUpdateFileName)`n------------------------------" -Tee-Object -InputObject $zipUpdateContents -FilePath "$releaseFolder\$zipUpdateFileName" \ No newline at end of file diff --git a/Tools/exes/dumpbin.exe b/Tools/exes/dumpbin.exe deleted file mode 100644 index 140de4d0e..000000000 Binary files a/Tools/exes/dumpbin.exe and /dev/null differ diff --git a/Tools/exes/editbin.exe b/Tools/exes/editbin.exe deleted file mode 100644 index 489043c29..000000000 Binary files a/Tools/exes/editbin.exe and /dev/null differ diff --git a/Tools/exes/link.exe b/Tools/exes/link.exe deleted file mode 100644 index 117c00116..000000000 Binary files a/Tools/exes/link.exe and /dev/null differ diff --git a/Tools/exes/mspdbcore.dll b/Tools/exes/mspdbcore.dll deleted file mode 100644 index 7e87f6fd9..000000000 Binary files a/Tools/exes/mspdbcore.dll and /dev/null differ diff --git a/Tools/exes/sigcheck.exe b/Tools/exes/sigcheck.exe deleted file mode 100644 index 01559ba94..000000000 Binary files a/Tools/exes/sigcheck.exe and /dev/null differ diff --git a/Tools/find_vstool.ps1 b/Tools/find_vstool.ps1 deleted file mode 100644 index da2be6e1b..000000000 --- a/Tools/find_vstool.ps1 +++ /dev/null @@ -1,61 +0,0 @@ -[CmdletBinding()] - -param ( - [string] - # Name of the file to find - $FileName -) - - - -function EditBinCertificateIsValid() { - param ( - [string] - $Path - ) - - # Verify file certificate - $valid_microsoft_cert_thumbprints = @( - "3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC", - "98ED99A67886D020C564923B7DF25E9AC019DF26", - "108E2BA23632620C427C570B6D9DB51AC31387FE", - "5EAD300DC7E4D637948ECB0ED829A072BD152E17" - ) - $file_signature = Get-AuthenticodeSignature -FilePath $Path - if (($file_signature.Status -ne "Valid") -or ($valid_microsoft_cert_thumbprints -notcontains $file_signature.SignerCertificate.Thumbprint)) { - Write-Warning "Could not validate the signature of $Path" - return $false - } else { - return $true - } -} - - -function ToolCanBeExecuted { - param ( - [string] - $Path - ) - $null = & $Path - Write-Output ($LASTEXITCODE -gt 0) -} - -$rootSearchPaths = @( - [System.IO.Directory]::EnumerateFileSystemEntries("C:\Program Files", "*Visual Studio*", [System.IO.SearchOption]::TopDirectoryOnly), - [System.IO.Directory]::EnumerateFileSystemEntries("C:\Program Files (x86)", "*Visual Studio*", [System.IO.SearchOption]::TopDirectoryOnly) -) - -# Returns the first full path to the $FileName that our search can find -foreach ($searchPath in $rootSearchPaths) { - foreach ($visualStudioFolder in $searchPath) { - Write-Verbose "Searching in folder '$visualStudioFolder'" - $matchingExes = [System.IO.Directory]::EnumerateFileSystemEntries($visualStudioFolder, $FileName, [System.IO.SearchOption]::AllDirectories) - foreach ($matchingExe in $matchingExes) { - if ((EditBinCertificateIsValid -Path $matchingExe) -and (ToolCanBeExecuted -Path $matchingExe)) { - return $matchingExe - } - } - } -} - -Write-Error "Could not find any valid file by the name $FileName." -ErrorAction Stop \ No newline at end of file diff --git a/Tools/github_functions.ps1 b/Tools/github_functions.ps1 deleted file mode 100644 index f4b3881a3..000000000 --- a/Tools/github_functions.ps1 +++ /dev/null @@ -1,235 +0,0 @@ -$githubUrl = 'https://api.github.com' -# GitHub doesn't support the default powershell protocol (TLS 1.0) -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - -function Publish-GitHubRelease { - param ( - [string] - [Parameter(Mandatory=$true)] - # - $Owner, - - [string] - [Parameter(Mandatory=$true)] - # - $Repository, - - [string] - [Parameter(Mandatory=$true)] - # - $ReleaseTitle, - - [string] - [Parameter(Mandatory=$true)] - # - $TagName, - - [string] - [Parameter(Mandatory=$true)] - # Either the SHA of the commit to target or the branch name. - $TargetCommitish, - - [string] - [Parameter(Mandatory=$true)] - # - $Description, - - [bool] - [Parameter(Mandatory=$true)] - # - $IsDraft, - - [bool] - [Parameter(Mandatory=$true)] - # - $IsPrerelease, - - [string] - [Parameter(Mandatory=$true)] - # The OAuth2 token to use for authentication. - $AuthToken - ) - - $body = New-GitHubReleaseRequestBody -TagName $TagName -TargetCommitish $TargetCommitish -ReleaseTitle $ReleaseTitle -Description $Description -IsDraft $IsDraft -IsPrerelease $IsPrerelease - $req_publishRelease = Invoke-WebRequest -Uri "$githubUrl/repos/$Owner/$Repository/releases" -Method Post -Headers @{"Authorization"="token $AuthToken"} -Body $body -ErrorAction Stop - $response_publishRelease = ConvertFrom-Json -InputObject $req_publishRelease.Content - - Write-Output $response_publishRelease -} - - -function Edit-GitHubRelease { - param ( - [string] - #[Parameter(Mandatory=$true)] - # - $Owner, - - [string] - #[Parameter(Mandatory=$true)] - # - $Repository, - - [string] - #[Parameter(Mandatory=$true)] - # - $ReleaseId, - - [string] - # - $ReleaseTitle, - - [string] - # - $TagName, - - [string] - # Either the SHA of the commit to target or the branch name. - $TargetCommitish, - - [string] - # - $Description, - - [bool] - # - $IsDraft, - - [bool] - # - $IsPrerelease, - - [string] - #[Parameter(Mandatory=$true)] - # The OAuth2 token to use for authentication. - $AuthToken - ) - - $body_params = @{ - "TagName" = $TagName - "TargetCommitish" = $TargetCommitish - "ReleaseTitle" = $ReleaseTitle - "Description" = $Description - } - if ($PSBoundParameters.ContainsKey("IsDraft")) { $body_params.Add("IsDraft", $IsDraft) } - if ($PSBoundParameters.ContainsKey("IsPrerelease")) { $body_params.Add("IsPrerelease", $IsPrerelease) } - - $body = New-GitHubReleaseRequestBody @body_params - $req_editRelease = Invoke-WebRequest -Uri "$githubUrl/repos/$Owner/$Repository/releases/$ReleaseId" -Method Post -Headers @{"Authorization"="token $AuthToken"} -Body $body -ErrorAction Stop - $response_editRelease = ConvertFrom-Json -InputObject $req_editRelease.Content - - Write-Output $response_editRelease -} - - -function Get-GitHubRelease { - param ( - [string] - [Parameter(Mandatory=$true)] - # - $Owner, - - [string] - [Parameter(Mandatory=$true)] - # - $Repository, - - [string] - [Parameter(Mandatory=$true)] - # - $ReleaseId, - - [string] - [Parameter(Mandatory=$true)] - # The OAuth2 token to use for authentication. - $AuthToken - ) - - $req_getRelease = Invoke-WebRequest -Uri "$githubUrl/repos/$Owner/$Repository/releases/$ReleaseId" -Method Get -Headers @{"Authorization"="token $AuthToken"} -ErrorAction Stop - $response_getRelease = ConvertFrom-Json -InputObject $req_getRelease.Content - - Write-Output $response_getRelease -} - - -function Upload-GitHubReleaseAsset { - param ( - [string] - [Parameter(Mandatory=$true)] - $UploadUri, - - [string] - [Parameter(Mandatory=$true)] - # Path to the file to upload with the release - $FilePath, - - [string] - [Parameter(Mandatory=$true)] - # Content type of the file - $ContentType, - - [string] - [Parameter(Mandatory=$true)] - # The OAuth2 token to use for authentication. - $AuthToken, - - [string] - # A short description label for the asset - $Label = "" - ) - - $UploadUri = $UploadUri -replace "(\{[\w,\?]*\})$" - $files = Get-Item -Path $FilePath - - $labelParam = "" - if ($Label -ne "") { - $labelParam = "&label=$Label" - } - - # Get-Item could produce an array of files if a wildcard is provided. (C:\*.txt) - # Upload each matching item individually - foreach ($file in $files) { - Write-Output "Uploading asset to GitHub release: '$($file.FullName)'" - $req_uploadZipAsset = Invoke-WebRequest -Uri "$($UploadUri)?name=$($file.Name)$labelParam" -Method Post -Headers @{"Authorization"="token $AuthToken"} -ContentType $ContentType -InFile $file.FullName -ErrorAction Stop - } -} - - -function New-GitHubReleaseRequestBody { - param ( - [string] - # - $TagName, - - [string] - # Either the SHA of the commit to target or the branch name. - $TargetCommitish, - - [string] - # Title of the release - $ReleaseTitle, - - [string] - # Description of the release - $Description, - - [bool] - # Is this a draft? - $IsDraft, - - [bool] - # Is this a pre-release? - $IsPrerelease - ) - - $body_params = [ordered]@{} - if ($TagName -ne "") { $body_params.Add("tag_name", $TagName) } - if ($TargetCommitish -ne "") { $body_params.Add("target_commitish", $TargetCommitish) } - if ($ReleaseTitle -ne "") { $body_params.Add("name", $ReleaseTitle) } - if ($Description -ne "") { $body_params.Add("body", $Description) } - if ($PSBoundParameters.ContainsKey("IsDraft")) { $body_params.Add("draft", $IsDraft) } - if ($PSBoundParameters.ContainsKey("IsPrerelease")) { $body_params.Add("prerelease", $IsPrerelease) } - - $json_body = ConvertTo-Json -InputObject $body_params -Compress - Write-Output $json_body -} \ No newline at end of file diff --git a/Tools/postbuild_installer.ps1 b/Tools/postbuild_installer.ps1 deleted file mode 100644 index 89623f9a4..000000000 --- a/Tools/postbuild_installer.ps1 +++ /dev/null @@ -1,43 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - $SolutionDir, - - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $TargetFileName, - - [string] - [Parameter(Mandatory=$true)] - $ConfigurationName, - - [string] - $CertificatePath, - - [string] - $CertificatePassword, - - [string[]] - $ExcludeFromSigning -) - -Write-Output "+===========================================================================================+" -Write-Output "| Beginning mRemoteNG Installer Post Build |" -Write-Output "+===========================================================================================+" -Format-Table -AutoSize -Wrap -InputObject @{ - "SolutionDir" = $SolutionDir - "TargetDir" = $TargetDir - "TargetFileName" = $TargetFileName - "ConfigurationName" = $ConfigurationName - "CertificatePath" = $CertificatePath - "ExcludeFromSigning" = $ExcludeFromSigning -} - - -& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning -SolutionDir $SolutionDir -& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir -& "$PSScriptRoot\rename_and_copy_installer.ps1" -SolutionDir $SolutionDir diff --git a/Tools/postbuild_mremoteng.ps1 b/Tools/postbuild_mremoteng.ps1 deleted file mode 100644 index fe7b7382a..000000000 --- a/Tools/postbuild_mremoteng.ps1 +++ /dev/null @@ -1,61 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - $SolutionDir, - - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $TargetFileName, - - [string] - [Parameter(Mandatory=$true)] - $ConfigurationName, - - [string] - $CertificatePath, - - [string] - $CertificatePassword, - - [string[]] - $ExcludeFromSigning -) - -Write-Output "+===========================================================================================+" -Write-Output "| Beginning mRemoteNG Post Build |" -Write-Output "+===========================================================================================+" -Format-Table -AutoSize -Wrap -InputObject @{ - "SolutionDir" = $SolutionDir - "TargetDir" = $TargetDir - "TargetFileName" = $TargetFileName - "ConfigurationName" = $ConfigurationName - "CertificatePath" = $CertificatePath - "ExcludeFromSigning" = $ExcludeFromSigning -} - -# Move dlls resurses into folder -#Remove-Item -Path "$TargetDir\libs" -Recurse -ErrorAction Ignore -#New-Item -ItemType "directory" -Force -Path $TargetDir -Name "libs" -#Move-Item -Path "$TargetDir\*.dll" -Destination "$TargetDir\libs" -force - - -### - -# Move lang resurses into folder -#Remove-Item -Path "$TargetDir\languages" -Recurse -ErrorAction Ignore -#New-Item -ItemType "directory" -Force -Path $TargetDir -Name "languages" -#"cs-CZ,de,el,en-US,es-AR,es,fr,hu,it,lt,ja-JP,ko-KR,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW,fi-FI".Split(",") | ForEach { -# Move-Item -Path "$TargetDir\$_" -Destination "$TargetDir\languages" -force -# } -### - -& "$PSScriptRoot\set_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName -& "$PSScriptRoot\verify_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName -& "$PSScriptRoot\tidy_files_for_release.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning -SolutionDir $SolutionDir -& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir -& "$PSScriptRoot\zip_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName diff --git a/Tools/publish_draft_github_release.ps1 b/Tools/publish_draft_github_release.ps1 deleted file mode 100644 index ab5f0ec87..000000000 --- a/Tools/publish_draft_github_release.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - # - $Owner, - - [string] - [Parameter(Mandatory=$true)] - # - $Repository, - - [string] - [Parameter(Mandatory=$true)] - # - $ReleaseId, - - [string] - [Parameter(Mandatory=$true)] - # The OAuth2 token to use for authentication. - $AuthToken -) - -. "$PSScriptRoot\github_functions.ps1" - -Edit-GitHubRelease -Owner $Owner -Repository $Repository -ReleaseId $ReleaseId -AuthToken $AuthToken -IsDraft $false \ No newline at end of file diff --git a/Tools/publish_to_github.ps1 b/Tools/publish_to_github.ps1 deleted file mode 100644 index ca8ed0a46..000000000 --- a/Tools/publish_to_github.ps1 +++ /dev/null @@ -1,81 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - # - $Owner, - - [string] - [Parameter(Mandatory=$true)] - # - $Repository, - - [string] - [Parameter(Mandatory=$true)] - # - $ReleaseTitle, - - [string] - [Parameter(Mandatory=$true)] - # - $TagName, - - [string] - [Parameter(Mandatory=$true)] - # Either the SHA of the commit to target or the branch name. - $TargetCommitish, - - [string] - [Parameter(Mandatory=$true)] - # - $Description, - - [string] - [Parameter(Mandatory=$true)] - [ValidateSet("true","false")] - # true/false - $IsDraft, - - [string] - [Parameter(Mandatory=$true)] - [ValidateSet("true","false")] - # true/false - $IsPrerelease, - - [string] - [Parameter(Mandatory=$true)] - # Path to the folder which contains release assets to upload - $ReleaseFolderPath, - - [string] - [Parameter(Mandatory=$true)] - # The OAuth2 token to use for authentication. - $AuthToken, - - [switch] - # Enable this switch to treat $Description as a Base64 encoded string. It will be decoded before being used elsewhere in the script. - $DescriptionIsBase64Encoded -) - - -if ($DescriptionIsBase64Encoded) { - $Description = ([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($Description))) -} - - -. "$PSScriptRoot\github_functions.ps1" - - -$releaseFolderItems = Get-ChildItem -Path $ReleaseFolderPath -$mrngPortablePath = ($releaseFolderItems | ?{$_.Name -match "portable-[\d\.]+\.zip"}).FullName -$mrngNormalPath = ($releaseFolderItems | ?{$_.Name -match "installer-[\d\.]+\.msi"}).FullName -$mrngPortableSymbolsPath = ($releaseFolderItems | ?{$_.Name -match "mremoteng-portable-symbols-[\d\.]+\.zip"}).FullName -$mrngNormalSymbolsPath = ($releaseFolderItems | ?{$_.Name -match "mremoteng-symbols-[\d\.]+\.zip"}).FullName - - -$release = Publish-GitHubRelease -Owner $Owner -Repository $Repository -ReleaseTitle $ReleaseTitle -TagName $TagName -TargetCommitish $TargetCommitish -Description $Description -IsDraft ([bool]::Parse($IsDraft)) -IsPrerelease ([bool]::Parse($IsPrerelease)) -AuthToken $AuthToken -$zipUpload = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $mrngPortablePath -ContentType "application/zip" -AuthToken $AuthToken -Label "Portable Edition (zip)" -$msiUpload = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $mrngNormalPath -ContentType "application/octet-stream" -AuthToken $AuthToken -Label "Normal Edition (msi)" - -$portableEditionSymbols = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $mrngPortableSymbolsPath -ContentType "application/zip" -AuthToken $AuthToken -Label "Portable Edition Debug Symbols" -$normalEditionSymbols = Upload-GitHubReleaseAsset -UploadUri $release.upload_url -FilePath $mrngNormalSymbolsPath -ContentType "application/zip" -AuthToken $AuthToken -Label "Normal Edition Debug Symbols" -Write-Output (Get-GitHubRelease -Owner $Owner -Repository $Repository -ReleaseId $release.id -AuthToken $AuthToken) \ No newline at end of file diff --git a/Tools/rename_and_copy_installer.ps1 b/Tools/rename_and_copy_installer.ps1 deleted file mode 100644 index 24e9dd59a..000000000 --- a/Tools/rename_and_copy_installer.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -param ( - [string] - $SolutionDir -) - - -$targetVersionedFile = "$SolutionDir\mRemoteNG\bin\x64\Release\mRemoteNG.exe" -$version = &"$SolutionDir\Tools\exes\sigcheck.exe" /accepteula -q -n $targetVersionedFile -$src = $SolutionDir + "mRemoteNGInstaller\Installer\bin\Release\en-US\mRemoteNG-Installer.msi" -$dst = $SolutionDir + "mRemoteNG\bin\x64\Release\mRemoteNG-Installer-" + $version + ".msi" - -# Copy file -Copy-Item $src -Destination $dst -Force diff --git a/Tools/set_LargeAddressAware.ps1 b/Tools/set_LargeAddressAware.ps1 deleted file mode 100644 index de3783510..000000000 --- a/Tools/set_LargeAddressAware.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -[CmdletBinding()] - -param ( - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $TargetFileName -) - -Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" - -$path_editBin = Join-Path -Path $PSScriptRoot -ChildPath "exes\editbin.exe" -$path_outputExe = Join-Path -Path $TargetDir -ChildPath $TargetFileName - -# Set LargeAddressAware -Write-Output "Setting LargeAddressAware on binary file:`n`"$path_outputExe`" `nwith:`n`"$path_editBin`"" -& "$path_editBin" /largeaddressaware "$path_outputExe" - -Write-Output "" \ No newline at end of file diff --git a/Tools/sign_binaries.ps1 b/Tools/sign_binaries.ps1 deleted file mode 100644 index 3e1277ca0..000000000 --- a/Tools/sign_binaries.ps1 +++ /dev/null @@ -1,88 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $ConfigurationName, - - [string[]] - # File names to exclude from signing - $Exclude, - - [string] - [AllowEmptyString()] - # The code signing certificate to use when signing the files. - $CertificatePath, - - [string] - # Password to unlock the code signing certificate. - $CertificatePassword, - - [string] - $SolutionDir -) - -Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" - - -$timeserver = "http://timestamp.verisign.com/scripts/timstamp.dll" - - -# validate release versions and if the certificate value was passed -if ($ConfigurationName -match "Release" -And ($CertificatePath)) { - - if(-Not ([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) ) { - $CertificatePath = Join-Path -Path $SolutionDir -ChildPath $CertificatePath - } - - # make sure the cert is actually available - if ($CertificatePath -eq "" -or !(Test-Path -Path $CertificatePath -PathType Leaf)) - { - Write-Output "Certificate is not present - we won't sign files." - return - } - - if ($CertificatePassword -eq "") { - Write-Output "No certificate password was provided - we won't sign files." - return - } - - try { - $certKeyStore = [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::MachineKeySet - $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertificatePath, $CertificatePassword, $certKeyStore) -ErrorAction Stop - } catch { - Write-Output "Error loading certificate file - we won't sign files." - Write-Output $Error[0] - return - } - - # Sign MSI if we are building a release version and the certificate is available - Write-Output "Signing Binaries" - Write-Output "Getting files from path: $TargetDir" - $signableFiles = Get-ChildItem -Path $TargetDir -Recurse | ?{$_.Extension -match "dll|exe|msi"} | ?{$Exclude -notcontains $_.Name} - - $excluded_files = Get-ChildItem -Path $TargetDir -Recurse | ?{$_.Extension -match "dll|exe|msi"} | ?{$Exclude -contains $_.Name} - $excluded_files | ForEach-Object ` - -Begin { Write-Output "The following files were excluded from signing due to being on the exclusion list:" } ` - -Process { Write-Output "-- $($_.FullName)" } - - Write-Output "Signable files count: $($signableFiles.Count)" - - - foreach ($file in $signableFiles) { - Set-AuthenticodeSignature -Certificate $cert -TimestampServer $timeserver -IncludeChain all -FilePath $file.FullName - } - - - # Release certificate - if ($cert -ne $null) { - $cert.Dispose() - } -} else { - Write-Output "This is not a release build or CertificatePath wasn't provided - we won't sign files." - Write-Output "Config: $($ConfigurationName)`tCertPath: $($CertificatePath)" -} - -Write-Output "" \ No newline at end of file diff --git a/Tools/signfiles.ps1 b/Tools/signfiles.ps1 deleted file mode 100644 index 5b59cd1e5..000000000 --- a/Tools/signfiles.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -param( - [string] - [Parameter(Mandatory=$true)] - # Folder path that contains the files you would like to sign. Recursive. - $PathToSignableFiles, - - [string] - # The code signing certificate to use when signing the files. - $CertificatePath = "C:\mRemoteNG_code_signing_cert.pfx", - - [SecureString] - # Password to unlock the code signing certificate. - $CertificatePassword = (Get-Credential -Message "Enter password for the mRemoteNG code signing certificate" -UserName "USERNAME NOT NEEDED").Password, - - [string[]] - # File names to exclude from signing - $Exclude -) - - -$timeserver = "http://timestamp.verisign.com/scripts/timstamp.dll" -$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($CertificatePath, $CertificatePassword) - - -Write-Output "Getting files from path: $PathToSignableFiles" -$signableFiles = Get-ChildItem -Path $PathToSignableFiles -Recurse | ?{$_.Extension -match "dll|exe|msi"} | ?{$Exclude -notcontains $_.Name} -Write-Output "Signable files count: $($signableFiles.Count)" - -foreach ($file in $signableFiles) { - Set-AuthenticodeSignature -Certificate $cert -TimestampServer $timeserver -IncludeChain all -FilePath $file.FullName -} \ No newline at end of file diff --git a/Tools/tidy_files_for_release.ps1 b/Tools/tidy_files_for_release.ps1 deleted file mode 100644 index fc8fdb651..000000000 --- a/Tools/tidy_files_for_release.ps1 +++ /dev/null @@ -1,47 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $ConfigurationName -) -Write-Output "" -Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" - -# Remove unnecessary files from Release versions -if ($ConfigurationName -match "Release") -{ - $test = Join-Path -Path $TargetDir -ChildPath "app.publish" - if (Test-Path $test -PathType Container) - { - Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "app.publish") -Recurse -Force - } - - $filesToDelete = Get-ChildItem -Path $TargetDir -Recurse -Include @( - "*.publish", - "*.xml", - "*.backup", - "*.log", - "*vshost*", - "*.tmp" - ) -Exclude @( - "mRemoteNG.VisualElementsManifest.xml" - ) - if ($filesToDelete) - { - Write-Output "Unnecessary files are detected and will be removed" - Remove-Item -Path $filesToDelete.FullName - Write-Output $filesToDelete.FullName - } else - { - Write-Output " No unnecessary files are detected" - } -} -else -{ - Write-Output "We will not remove anything - this is not a release build." -} - -Write-Output "" \ No newline at end of file diff --git a/Tools/validate_microsoft_tool.ps1 b/Tools/validate_microsoft_tool.ps1 deleted file mode 100644 index 96329658a..000000000 --- a/Tools/validate_microsoft_tool.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -# $FullPath Full path to the Microsoft executable to validate -param ( - [string] - [Parameter(Mandatory=$true)] - $FullPath -) - -$validMSCertThumbprints = @("3BDA323E552DB1FDE5F4FBEE75D6D5B2B187EEDC", "108E2BA23632620C427C570B6D9DB51AC31387FE", "98ED99A67886D020C564923B7DF25E9AC019DF26", "5EAD300DC7E4D637948ECB0ED829A072BD152E17") -$exeSignature = Get-AuthenticodeSignature -FilePath $FullPath -$baseErrorMsg = "Could not validate the certificate of $FullPath. " - -if ($exeSignature.Status -ne "Valid") { - Write-Error -Message ($baseErrorMsg+"The signature was invalid.") -ErrorAction Stop -} -elseif ($validMSCertThumbprints -notcontains $exeSignature.SignerCertificate.Thumbprint) { - Write-Error -Message ($baseErrorMsg+"The certificate thumbprint ($($exeSignature.SignerCertificate.Thumbprint)) is not trusted.") -ErrorAction Stop -} \ No newline at end of file diff --git a/Tools/verify_LargeAddressAware.ps1 b/Tools/verify_LargeAddressAware.ps1 deleted file mode 100644 index 0c77bef8f..000000000 --- a/Tools/verify_LargeAddressAware.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -[CmdletBinding()] - -param ( - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $TargetFileName -) - -Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" - -$path_dumpBin = Join-Path -Path $PSScriptRoot -ChildPath "exes\dumpbin.exe" -$path_outputExe = Join-Path -Path $TargetDir -ChildPath $TargetFileName - -# Dump exe header -$output = & "$path_dumpBin" /NOLOGO /HEADERS "$path_outputExe" | Select-String large - -if ($output -eq $null) -{ - Write-Warning "Could not validate LargeAddressAware" -} -else -{ - Write-Output $output.ToString().TrimStart(" ") -} - -Write-Output "" \ No newline at end of file diff --git a/Tools/verify_binary_signatures.ps1 b/Tools/verify_binary_signatures.ps1 deleted file mode 100644 index 2cd64091e..000000000 --- a/Tools/verify_binary_signatures.ps1 +++ /dev/null @@ -1,60 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $ConfigurationName, - - [string] - [Parameter(Mandatory=$true)] - [AllowEmptyString()] - # The code signing certificate to use when signing the files. - $CertificatePath, - - [string] - [Parameter(Mandatory=$true)] - $SolutionDir -) - -Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" - - -# validate release versions and if the certificate value was passed -if ($ConfigurationName -match "Release" -And ($CertificatePath)) { - - if(-Not ([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) ) { - $CertificatePath = Join-Path -Path $SolutionDir -ChildPath $CertificatePath - } - - # make sure the cert is actually available - if ($CertificatePath -eq "" -or !(Test-Path -Path $CertificatePath -PathType Leaf)) - { - Write-Output "Certificate is not present - files likely not signed - we won't verify file signatures." - return - } - - Write-Output "Verifying signature of binaries" - Write-Output "Getting files from path: $TargetDir" - $signableFiles = Get-ChildItem -Path $TargetDir -Recurse | ?{$_.Extension -match "dll|exe|msi"} - Write-Output "Signable files count: $($signableFiles.Count)" - $badSignatureFound = $false - foreach ($file in $signableFiles) { - $signature = Get-AuthenticodeSignature -FilePath $file.FullName - if ($signature.Status -ne "Valid") { - Write-Warning "File $($file.FullName) does not have a valid signature." - $badSignatureFound = $true - } - } - if ($badSignatureFound) { - Write-Output "One or more files were improperly signed." - } else { - Write-Output "All files have valid signatures." - } -} else { - Write-Output "This is not a release build or CertificatePath wasn't provided - we won't verify file signatures." - Write-Output "Config: $($ConfigurationName)`tCertPath: $($CertificatePath)" -} - -Write-Output "" \ No newline at end of file diff --git a/Tools/zip_files.ps1 b/Tools/zip_files.ps1 deleted file mode 100644 index b8a991f14..000000000 --- a/Tools/zip_files.ps1 +++ /dev/null @@ -1,83 +0,0 @@ -param ( - [string] - [Parameter(Mandatory=$true)] - $SolutionDir, - - [string] - [Parameter(Mandatory=$true)] - $TargetDir, - - [string] - [Parameter(Mandatory=$true)] - $ConfigurationName -) - -Write-Output "" -Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) =====" - -$ConfigurationName = $ConfigurationName.Trim() -Write-Output "Config Name (trimmed): '$($ConfigurationName)'" -$exe = Join-Path -Path $TargetDir -ChildPath $TargetFileName -$Version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($exe).FileVersion -Write-Output "Version is $($version)" - -# Fix for AppVeyor -if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) { - if(!(test-path "Release")) { - New-Item -ItemType Directory -Force -Path "Release" | Out-Null - } -} - -# Package debug symbols zip file -if ($ConfigurationName -match "Release") { - Write-Output "Packaging debug symbols" - - if ($ConfigurationName -match "Portable") { - $zipFilePrefix = "mRemoteNG-Portable-symbols" - } else { - $zipFilePrefix = "mRemoteNG-symbols" - } - - $debugFile = Join-Path -Path $TargetDir -ChildPath "mRemoteNG.pdb" - - # AppVeyor build - if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) { - $outputZipPath = Join-Path -Path $SolutionDir -ChildPath "Release\$zipFilePrefix-$($version).zip" - 7z a $outputZipPath $debugFile - } - # Local build - else { - if (!(Test-Path -Path $debugFile -PathType Leaf)) - { - $outputZipPath = "$($SolutionDir)Release\$zipFilePrefix-$($version).zip" - Compress-Archive $debugFile $outputZipPath -Force - } else { - write-host "File do not exist:" $debugFile", nothing to compress" - } - } - - Remove-Item $debugFile -} - -# Package portable release zip file -if ($ConfigurationName -eq "Release Portable") { - Write-Output "Packaging portable ZIP file" - - # AppVeyor build - if(!([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER))) { - $outputZipPath = Join-Path -Path $SolutionDir -ChildPath "Release\mRemoteNG-Portable-$($version).zip" - 7z a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath $TargetDir\* - } - # Local build - else { - if ($Source) - { - $outputZipPath="$($SolutionDir)\Release\mRemoteNG-Portable-$($version).zip" - Compress-Archive $Source $outputZipPath -Force - } else { - write-host "File do not exist:" $Source", nothing to compress" - } - } -} - -Write-Output "" \ No newline at end of file diff --git a/mRemoteNG.sln b/mRemoteNG.sln deleted file mode 100644 index 087044eed..000000000 --- a/mRemoteNG.sln +++ /dev/null @@ -1,87 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31912.275 -MinimumVisualStudioVersion = 14.0.25420.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mRemoteNG", "mRemoteNG\mRemoteNG.csproj", "{4934A491-40BC-4E5B-9166-EA1169A220F6}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mRemoteNGTests", "mRemoteNGTests\mRemoteNGTests.csproj", "{1453B37F-8621-499E-B0B2-6091F76DC0BB}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "mRemoteNGInstaller", "mRemoteNGInstaller", "{4FE795BE-646E-4F1B-BAD0-A68EA26394DD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomActions", "mRemoteNGInstaller\CustomActions\CustomActions.csproj", "{5423D985-CB48-4344-B47F-E8C6D60C8B04}" -EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "mRemoteNGInstaller\Installer\Installer.wixproj", "{F0168B9F-6815-40DF-BA53-46CEE7683B68}" - ProjectSection(ProjectDependencies) = postProject - {5423D985-CB48-4344-B47F-E8C6D60C8B04} = {5423D985-CB48-4344-B47F-E8C6D60C8B04} - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mRemoteNGSpecs", "mRemoteNGSpecs\mRemoteNGSpecs.csproj", "{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExternalConnectors", "ExternalConnectors\ExternalConnectors.csproj", "{A56A2029-79B8-492A-ABE5-D2BFE05801BD}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug Portable|x64 = Debug Portable|x64 - Debug|x64 = Debug|x64 - Release Installer|x64 = Release Installer|x64 - Release Portable|x64 = Release Portable|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x64.ActiveCfg = Debug Portable|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x64.Build.0 = Debug Portable|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.ActiveCfg = Debug|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.Build.0 = Debug|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer|x64.ActiveCfg = Release|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Installer|x64.Build.0 = Release|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.ActiveCfg = Release Portable|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.Build.0 = Release Portable|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x64.ActiveCfg = Release|x64 - {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x64.Build.0 = Release|x64 - {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|x64.ActiveCfg = Debug Portable|x64 - {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|x64.ActiveCfg = Debug|x64 - {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Installer|x64.ActiveCfg = Release|x64 - {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x64.ActiveCfg = Release Portable|x64 - {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x64.Build.0 = Release Portable|x64 - {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x64.ActiveCfg = Release|x64 - {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x64.Build.0 = Release|x64 - {5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Portable|x64.ActiveCfg = Debug Portable|x64 - {5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug|x64.ActiveCfg = Debug|x64 - {5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Installer|x64.ActiveCfg = Release|x64 - {5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Installer|x64.Build.0 = Release|x64 - {5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Portable|x64.ActiveCfg = Release Portable|x64 - {5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release|x64.ActiveCfg = Release|x64 - {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug Portable|x64.ActiveCfg = Debug Portable|x64 - {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug|x64.ActiveCfg = Debug|x64 - {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer|x64.ActiveCfg = Release|x64 - {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer|x64.Build.0 = Release|x64 - {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x64.ActiveCfg = Release Portable|x64 - {F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x64.ActiveCfg = Release|x64 - {16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x64.ActiveCfg = Debug Portable|x64 - {16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x64.ActiveCfg = Debug|x64 - {16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x64.ActiveCfg = Release|x64 - {16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x64.ActiveCfg = Release Portable|x64 - {16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x64.ActiveCfg = Release|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug Portable|x64.ActiveCfg = Debug Portable|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug Portable|x64.Build.0 = Debug Portable|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.ActiveCfg = Debug|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.Build.0 = Debug|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer|x64.ActiveCfg = Release|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Installer|x64.Build.0 = Release|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Portable|x64.ActiveCfg = Release Portable|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release Portable|x64.Build.0 = Release Portable|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release|x64.ActiveCfg = Release|x64 - {A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {5423D985-CB48-4344-B47F-E8C6D60C8B04} = {4FE795BE-646E-4F1B-BAD0-A68EA26394DD} - {F0168B9F-6815-40DF-BA53-46CEE7683B68} = {4FE795BE-646E-4F1B-BAD0-A68EA26394DD} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {5D390A0C-2FC4-4908-B86E-7E4DEF5916EC} - EndGlobalSection -EndGlobal diff --git a/mRemoteNG/.editorconfig b/mRemoteNG/.editorconfig deleted file mode 100644 index 376391252..000000000 --- a/mRemoteNG/.editorconfig +++ /dev/null @@ -1,53 +0,0 @@ -# top-most EditorConfig file -root = true - -[*] -end_of_line = crlf -indent_style = space - -[*.xml] -indent_size = 4 - -[*.cs] -indent_size = 4 -trim_trailing_whitespace = true -charset = utf-8-bom - -# reStructuredText -[*.rst] -charset = utf-8 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true -indent_size = 3 -max_line_length = 120 - -# Organize usings -dotnet_sort_system_directives_first = true - -# this. preferences -dotnet_style_qualification_for_field = false:none -dotnet_style_qualification_for_property = false:none -dotnet_style_qualification_for_method = false:none -dotnet_style_qualification_for_event = false:none - -# New line preferences -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_between_query_expression_clauses = true - -# Space preferences -csharp_space_after_cast = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_parentheses = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_around_binary_operators = before_and_after -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false diff --git a/mRemoteNG/App/CompatibilityChecker.cs b/mRemoteNG/App/CompatibilityChecker.cs deleted file mode 100644 index cc60270dd..000000000 --- a/mRemoteNG/App/CompatibilityChecker.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Diagnostics; -using System.Windows.Forms; -using Microsoft.Win32; -using mRemoteNG.App.Info; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.TaskDialog; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.App -{ - public static class CompatibilityChecker - { - public static void CheckCompatibility(MessageCollector messageCollector) - { - CheckFipsPolicy(messageCollector); - CheckLenovoAutoScrollUtility(messageCollector); - } - - private static void CheckFipsPolicy(MessageCollector messageCollector) - { - if (Settings.Default.OverrideFIPSCheck) - { - messageCollector.AddMessage(MessageClass.InformationMsg, "OverrideFIPSCheck is set. Will skip check", true); - return; - } - - messageCollector.AddMessage(MessageClass.InformationMsg, "Checking FIPS policy...", true); - messageCollector.AddMessage(MessageClass.InformationMsg, $"FIPS2003: {FipsPolicyEnabledForServer2003()}", true); - messageCollector.AddMessage(MessageClass.InformationMsg, $"FIPS2008+: {FipsPolicyEnabledForServer2008AndNewer()}", true); - - if (!FipsPolicyEnabledForServer2003() && !FipsPolicyEnabledForServer2008AndNewer()) return; - - var errorText = string.Format(Language.ErrorFipsPolicyIncompatible, GeneralAppInfo.ProductName); - messageCollector.AddMessage(MessageClass.ErrorMsg, errorText, true); - - //About to pop up a message, let's not block it... - FrmSplashScreen.getInstance().Close(); - - var ShouldIStayOrShouldIGo = CTaskDialog.MessageBox(Application.ProductName, - Language.CompatibilityProblemDetected, errorText, "", - "", - Language.CheckboxDoNotShowThisMessageAgain, - ETaskDialogButtons.OkCancel, ESysIcons.Warning, - ESysIcons.Warning); - if (CTaskDialog.VerificationChecked && ShouldIStayOrShouldIGo == DialogResult.OK) - { - messageCollector.AddMessage(MessageClass.ErrorMsg, "User requests that FIPS check be overridden", true); - Settings.Default.OverrideFIPSCheck = true; - Settings.Default.Save(); - return; - } - - if (ShouldIStayOrShouldIGo == DialogResult.Cancel) - Environment.Exit(1); - } - - private static bool FipsPolicyEnabledForServer2003() - { - var regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa"); - if (!(regKey?.GetValue("FIPSAlgorithmPolicy") is int fipsPolicy)) - return false; - return fipsPolicy != 0; - } - - private static bool FipsPolicyEnabledForServer2008AndNewer() - { - var regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy"); - if (!(regKey?.GetValue("Enabled") is int fipsPolicy)) - return false; - return fipsPolicy != 0; - } - - private static void CheckLenovoAutoScrollUtility(MessageCollector messageCollector) - { - messageCollector.AddMessage(MessageClass.InformationMsg, "Checking Lenovo AutoScroll Utility...", true); - - if (!Settings.Default.CompatibilityWarnLenovoAutoScrollUtility) - return; - - var proccesses = new Process[] { }; - try - { - proccesses = Process.GetProcessesByName("virtscrl"); - } - catch (InvalidOperationException ex) - { - messageCollector.AddExceptionMessage("Error in CheckLenovoAutoScrollUtility", ex); - } - - if (proccesses.Length <= 0) - { - messageCollector.AddMessage(MessageClass.InformationMsg, "Lenovo AutoScroll Utility not found", true); - return; - } - - messageCollector.AddMessage(MessageClass.WarningMsg, "Lenovo AutoScroll Utility found", true); - - CTaskDialog.MessageBox(Application.ProductName, Language.CompatibilityProblemDetected, - string.Format(Language.CompatibilityLenovoAutoScrollUtilityDetected, - Application.ProductName), "", - "", Language.CheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.Ok, - ESysIcons.Warning, - ESysIcons.Warning); - if (CTaskDialog.VerificationChecked) - Settings.Default.CompatibilityWarnLenovoAutoScrollUtility = false; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Export.cs b/mRemoteNG/App/Export.cs deleted file mode 100644 index 4878ebc81..000000000 --- a/mRemoteNG/App/Export.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.Config.Connections; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI.Forms; - - -namespace mRemoteNG.App -{ - public static class Export - { - public static void ExportToFile(ConnectionInfo selectedNode, ConnectionTreeModel connectionTreeModel) - { - try - { - var saveFilter = new SaveFilter(); - - using (var exportForm = new FrmExport()) - { - if (selectedNode?.GetTreeNodeType() == TreeNodeType.Container) - exportForm.SelectedFolder = selectedNode as ContainerInfo; - else if (selectedNode?.GetTreeNodeType() == TreeNodeType.Connection) - { - if (selectedNode.Parent.GetTreeNodeType() == TreeNodeType.Container) - exportForm.SelectedFolder = selectedNode.Parent; - exportForm.SelectedConnection = selectedNode; - } - - if (exportForm.ShowDialog(FrmMain.Default) != DialogResult.OK) - return; - - ConnectionInfo exportTarget; - switch (exportForm.Scope) - { - case FrmExport.ExportScope.SelectedFolder: - exportTarget = exportForm.SelectedFolder; - break; - case FrmExport.ExportScope.SelectedConnection: - exportTarget = exportForm.SelectedConnection; - break; - default: - exportTarget = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo); - break; - } - - saveFilter.SaveUsername = exportForm.IncludeUsername; - saveFilter.SavePassword = exportForm.IncludePassword; - saveFilter.SaveDomain = exportForm.IncludeDomain; - saveFilter.SaveInheritance = exportForm.IncludeInheritance; - saveFilter.SaveCredentialId = exportForm.IncludeAssignedCredential; - - SaveExportFile(exportForm.FileName, exportForm.SaveFormat, saveFilter, exportTarget); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("App.Export.ExportToFile() failed.", ex); - } - } - - private static void SaveExportFile(string fileName, - SaveFormat saveFormat, - SaveFilter saveFilter, - ConnectionInfo exportTarget) - { - try - { - ISerializer serializer; - switch (saveFormat) - { - case SaveFormat.mRXML: - var cryptographyProvider = new CryptoProviderFactoryFromSettings().Build(); - var rootNode = exportTarget.GetRootParent() as RootNodeInfo; - var connectionNodeSerializer = new XmlConnectionNodeSerializer27( - cryptographyProvider, - rootNode?.PasswordString - .ConvertToSecureString() ?? - new RootNodeInfo(RootNodeType - .Connection) - .PasswordString - .ConvertToSecureString(), - saveFilter); - serializer = new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer); - break; - case SaveFormat.mRCSV: - serializer = - new CsvConnectionsSerializerMremotengFormat(saveFilter, Runtime.CredentialProviderCatalog); - break; - default: - throw new ArgumentOutOfRangeException(nameof(saveFormat), saveFormat, null); - } - - var serializedData = serializer.Serialize(exportTarget); - var fileDataProvider = new FileDataProvider(fileName); - fileDataProvider.Save(serializedData); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace($"Export.SaveExportFile(\"{fileName}\") failed.", ex); - } - finally - { - Runtime.ConnectionsService.RemoteConnectionsSyncronizer?.Enable(); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Import.cs b/mRemoteNG/App/Import.cs deleted file mode 100644 index 60b502051..000000000 --- a/mRemoteNG/App/Import.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Windows.Forms; -using mRemoteNG.Config.Import; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.App -{ - public static class Import - { - public static void ImportFromFile(ContainerInfo importDestinationContainer) - { - try - { - using (var openFileDialog = new OpenFileDialog()) - { - openFileDialog.CheckFileExists = true; - openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); - openFileDialog.Multiselect = true; - - var fileTypes = new List(); - fileTypes.AddRange(new[] {Language.FilterAllImportable, "*.xml;*.rdp;*.rdg;*.dat;*.csv"}); - fileTypes.AddRange(new[] {Language.FiltermRemoteXML, "*.xml"}); - fileTypes.AddRange(new[] {Language.FiltermRemoteCSV, "*.csv"}); - fileTypes.AddRange(new[] {Language.FilterRDP, "*.rdp"}); - fileTypes.AddRange(new[] {Language.FilterRdgFiles, "*.rdg"}); - fileTypes.AddRange(new[] {Language.FilterPuttyConnectionManager, "*.dat"}); - fileTypes.AddRange(new[] {Language.FilterAll, "*.*"}); - - openFileDialog.Filter = string.Join("|", fileTypes.ToArray()); - - if (openFileDialog.ShowDialog() != DialogResult.OK) - return; - - HeadlessFileImport( - openFileDialog.FileNames, - importDestinationContainer, - Runtime.ConnectionsService, - fileName => MessageBox.Show(string.Format(Language.ImportFileFailedContent, fileName), Language.AskUpdatesMainInstruction, - MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("Unable to import file.", ex); - } - } - - public static void HeadlessFileImport( - IEnumerable filePaths, - ContainerInfo importDestinationContainer, - ConnectionsService connectionsService, - Action exceptionAction = null) - { - using (connectionsService.BatchedSavingContext()) - { - foreach (var fileName in filePaths) - { - try - { - var importer = BuildConnectionImporterFromFileExtension(fileName); - importer.Import(fileName, importDestinationContainer); - } - catch (Exception ex) - { - exceptionAction?.Invoke(fileName); - Runtime.MessageCollector.AddExceptionMessage($"Error occurred while importing file '{fileName}'.", ex); - } - } - } - } - - public static void ImportFromActiveDirectory(string ldapPath, - ContainerInfo importDestinationContainer, - bool importSubOu) - { - try - { - using (Runtime.ConnectionsService.BatchedSavingContext()) - { - ActiveDirectoryImporter.Import(ldapPath, importDestinationContainer, importSubOu); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromActiveDirectory() failed.", ex); - } - } - - public static void ImportFromPortScan(IEnumerable hosts, - ProtocolType protocol, - ContainerInfo importDestinationContainer) - { - try - { - using (Runtime.ConnectionsService.BatchedSavingContext()) - { - var importer = new PortScanImporter(protocol); - importer.Import(hosts, importDestinationContainer); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromPortScan() failed.", ex); - } - } - - private static IConnectionImporter BuildConnectionImporterFromFileExtension(string fileName) - { - // TODO: Use the file contents to determine the file type instead of trusting the extension - var extension = Path.GetExtension(fileName) ?? ""; - switch (extension.ToLowerInvariant()) - { - case ".xml": - return new MRemoteNGXmlImporter(); - case ".csv": - return new MRemoteNGCsvImporter(); - case ".rdp": - return new RemoteDesktopConnectionImporter(); - case ".rdg": - return new RemoteDesktopConnectionManagerImporter(); - case ".dat": - return new PuttyConnectionManagerImporter(); - default: - throw new FileFormatException("Unrecognized file format."); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Info/ConnectionsFileInfo.cs b/mRemoteNG/App/Info/ConnectionsFileInfo.cs deleted file mode 100644 index f3434e035..000000000 --- a/mRemoteNG/App/Info/ConnectionsFileInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace mRemoteNG.App.Info -{ - public static class ConnectionsFileInfo - { - public static readonly string DefaultConnectionsPath = SettingsFileInfo.SettingsPath; - public static readonly string DefaultConnectionsFile = "confCons.xml"; - public static readonly string DefaultConnectionsFileNew = "confConsNew.xml"; - public static readonly Version ConnectionFileVersion = new Version(2, 9); - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Info/CredentialsFileInfo.cs b/mRemoteNG/App/Info/CredentialsFileInfo.cs deleted file mode 100644 index fce3d07d7..000000000 --- a/mRemoteNG/App/Info/CredentialsFileInfo.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace mRemoteNG.App.Info -{ - public class CredentialsFileInfo - { - public static readonly string CredentialsPath = SettingsFileInfo.SettingsPath; - public static readonly string CredentialsFile = "confCreds.xml"; - public static readonly string CredentialsFileNew = "confCredsNew.xml"; - public static readonly double CredentialsFileVersion = 1.0; - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Info/GeneralAppInfo.cs b/mRemoteNG/App/Info/GeneralAppInfo.cs deleted file mode 100644 index 49dbdf55e..000000000 --- a/mRemoteNG/App/Info/GeneralAppInfo.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Threading; -using System.Windows.Forms; -using static System.Environment; - - -namespace mRemoteNG.App.Info -{ - public static class GeneralAppInfo - { - public const string UrlHome = "https://www.mremoteng.org"; - public const string UrlDonate = "https://mremoteng.org/contribute"; - public const string UrlForum = "https://www.reddit.com/r/mRemoteNG"; - public const string UrlBugs = "https://bugs.mremoteng.org"; - public const string UrlDocumentation = "https://mremoteng.readthedocs.io/en/latest/"; - public static string ApplicationVersion = Application.ProductVersion; - public static readonly string ProductName = Application.ProductName; - - public static readonly string Copyright = - ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), - typeof(AssemblyCopyrightAttribute), false)) - .Copyright; - - public static readonly string HomePath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location); - - //public static string ReportingFilePath = ""; - public static readonly string PuttyPath = HomePath + "\\PuTTYNG.exe"; - - public static string UserAgent - { - get - { - var details = new List - { - "compatible", - OSVersion.Platform == PlatformID.Win32NT - ? $"Windows NT {OSVersion.Version.Major}.{OSVersion.Version.Minor}" - : OSVersion.VersionString - }; - if (Is64BitProcess) - { - details.Add("WOW64"); - } - - details.Add(Thread.CurrentThread.CurrentUICulture.Name); - details.Add($".NET CLR {Environment.Version}"); - var detailsString = string.Join("; ", details.ToArray()); - - return $"Mozilla/5.0 ({detailsString}) {ProductName}/{ApplicationVersion}"; - } - } - - public static Version GetApplicationVersion() - { - System.Version.TryParse(ApplicationVersion, out var v); - return v; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Info/SettingsFileInfo.cs b/mRemoteNG/App/Info/SettingsFileInfo.cs deleted file mode 100644 index e6007b9f8..000000000 --- a/mRemoteNG/App/Info/SettingsFileInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Windows.Forms; -using mRemoteNG.Connection; - -namespace mRemoteNG.App.Info -{ - public static class SettingsFileInfo - { - private static readonly string ExePath = - Path.GetDirectoryName(Assembly.GetAssembly(typeof(ConnectionInfo))?.Location); - - public static string SettingsPath => - Runtime.IsPortableEdition - ? ExePath - : Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" + Application.ProductName; - - public static string LayoutFileName { get; } = "pnlLayout.xml"; - public static string ExtAppsFilesName { get; } = "extApps.xml"; - public static string ThemesFileName { get; } = "Themes.xml"; - - public static string ThemeFolder { get; } = - SettingsPath != null ? Path.Combine(SettingsPath, "Themes") : String.Empty; - - public static string InstalledThemeFolder { get; } = - ExePath != null ? Path.Combine(ExePath, "Themes") : String.Empty; - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Info/UpdateChannelInfo.cs b/mRemoteNG/App/Info/UpdateChannelInfo.cs deleted file mode 100644 index de1f014c9..000000000 --- a/mRemoteNG/App/Info/UpdateChannelInfo.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using mRemoteNG.Properties; - -// ReSharper disable InconsistentNaming - -namespace mRemoteNG.App.Info -{ - public static class UpdateChannelInfo - { - public const string STABLE = "Stable"; - public const string PREVIEW = "Preview"; - public const string NIGHTLY = "Nightly"; - - public const string STABLE_PORTABLE = "update-portable.txt"; - public const string PREVIEW_PORTABLE = "preview-update-portable.txt"; - public const string NIGHTLY_PORTABLE = "nightly-update-portable.txt"; - - public const string STABLE_MSI = "update.txt"; - public const string PREVIEW_MSI = "preview-update.txt"; - public const string NIGHTLY_MSI = "nightly-update.txt"; - - - public static Uri GetUpdateChannelInfo() - { - var channel = IsValidChannel(Settings.Default.UpdateChannel) ? Settings.Default.UpdateChannel : STABLE; - return GetUpdateTxtUri(channel); - } - - private static string GetChannelFileName(string channel) - { - return Runtime.IsPortableEdition - ? GetChannelFileNamePortableEdition(channel) - : GetChannelFileNameNormalEdition(channel); - } - - private static string GetChannelFileNameNormalEdition(string channel) - { - switch (channel) - { - case STABLE: - return STABLE_MSI; - case PREVIEW: - return PREVIEW_MSI; - case NIGHTLY: - return NIGHTLY_MSI; - default: - return STABLE_MSI; - } - } - - private static string GetChannelFileNamePortableEdition(string channel) - { - switch (channel) - { - case STABLE: - return STABLE_PORTABLE; - case PREVIEW: - return PREVIEW_PORTABLE; - case NIGHTLY: - return NIGHTLY_PORTABLE; - default: - return STABLE_PORTABLE; - } - } - - private static Uri GetUpdateTxtUri(string channel) - { - return new Uri(new Uri(Settings.Default.UpdateAddress), - new Uri(GetChannelFileName(channel), UriKind.Relative)); - } - - private static bool IsValidChannel(string s) - { - return s.Equals(STABLE) || s.Equals(PREVIEW) || s.Equals(NIGHTLY); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Initialization/ConnectionIconLoader.cs b/mRemoteNG/App/Initialization/ConnectionIconLoader.cs deleted file mode 100644 index b9267f632..000000000 --- a/mRemoteNG/App/Initialization/ConnectionIconLoader.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.IO; -using mRemoteNG.Connection; - - -namespace mRemoteNG.App.Initialization -{ - public class ConnectionIconLoader - { - private readonly string _path; - - public ConnectionIconLoader(string folderPath) - { - if (string.IsNullOrEmpty(folderPath)) - throw new ArgumentException($"{nameof(folderPath)} must be a valid folder path."); - - _path = folderPath; - } - - public void GetConnectionIcons() - { - if (Directory.Exists(_path) == false) - return; - - foreach (var f in Directory.GetFiles(_path, "*.ico", SearchOption.AllDirectories)) - { - var fInfo = new FileInfo(f); - Array.Resize(ref ConnectionIcon.Icons, ConnectionIcon.Icons.Length + 1); - ConnectionIcon.Icons.SetValue(fInfo.Name.Replace(".ico", ""), ConnectionIcon.Icons.Length - 1); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Initialization/CredsAndConsSetup.cs b/mRemoteNG/App/Initialization/CredsAndConsSetup.cs deleted file mode 100644 index 935e3eeaa..000000000 --- a/mRemoteNG/App/Initialization/CredsAndConsSetup.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.IO; -using mRemoteNG.Config.Connections; -using mRemoteNG.Properties; - -namespace mRemoteNG.App.Initialization -{ - public class CredsAndConsSetup - { - public void LoadCredsAndCons() - { - new SaveConnectionsOnEdit(Runtime.ConnectionsService); - - if (Settings.Default.FirstStart && !Settings.Default.LoadConsFromCustomLocation && - !File.Exists(Runtime.ConnectionsService.GetStartupConnectionFileName())) - Runtime.ConnectionsService.NewConnectionsFile(Runtime.ConnectionsService - .GetStartupConnectionFileName()); - - Runtime.LoadConnections(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Initialization/MessageCollectorSetup.cs b/mRemoteNG/App/Initialization/MessageCollectorSetup.cs deleted file mode 100644 index 9c51237a3..000000000 --- a/mRemoteNG/App/Initialization/MessageCollectorSetup.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Messages; -using mRemoteNG.Messages.MessageFilteringOptions; -using mRemoteNG.Messages.MessageWriters; -using mRemoteNG.Messages.WriterDecorators; - -namespace mRemoteNG.App.Initialization -{ - public class MessageCollectorSetup - { - public static void SetupMessageCollector(MessageCollector messageCollector, - IList messageWriterList) - { - messageCollector.CollectionChanged += (o, args) => - { - var messages = args.NewItems.Cast().ToArray(); - foreach (var printer in messageWriterList) - foreach (var message in messages) - printer.Write(message); - }; - } - - public static void BuildMessageWritersFromSettings(IList messageWriterList) - { -#if DEBUG - messageWriterList.Add(BuildDebugConsoleWriter()); -#endif - messageWriterList.Add(BuildTextLogMessageWriter()); - messageWriterList.Add(BuildNotificationPanelMessageWriter()); - messageWriterList.Add(BuildPopupMessageWriter()); - } - - private static IMessageWriter BuildDebugConsoleWriter() - { - return new DebugConsoleMessageWriter(); - } - - private static IMessageWriter BuildTextLogMessageWriter() - { - return new MessageTypeFilterDecorator( - new LogMessageTypeFilteringOptions(), - new TextLogMessageWriter(Logger.Instance) - ); - } - - private static IMessageWriter BuildNotificationPanelMessageWriter() - { - return new OnlyLogMessageFilter( - new MessageTypeFilterDecorator( - new - NotificationPanelMessageFilteringOptions(), - new MessageFocusDecorator( - Windows.ErrorsForm, - new - NotificationPanelSwitchOnMessageFilteringOptions(), - new - NotificationPanelMessageWriter(Windows - .ErrorsForm) - ) - ) - ); - } - - private static IMessageWriter BuildPopupMessageWriter() - { - return new OnlyLogMessageFilter( - new MessageTypeFilterDecorator( - new PopupMessageFilteringOptions(), - new PopupMessageWriter() - ) - ); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Initialization/StartupDataLogger.cs b/mRemoteNG/App/Initialization/StartupDataLogger.cs deleted file mode 100644 index eab7a3c78..000000000 --- a/mRemoteNG/App/Initialization/StartupDataLogger.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.Management; -using System.Threading; -using System.Windows.Forms; -using mRemoteNG.Messages; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.App.Initialization -{ - public class StartupDataLogger - { - private readonly MessageCollector _messageCollector; - - public StartupDataLogger(MessageCollector messageCollector) - { - if (messageCollector == null) - throw new ArgumentNullException(nameof(messageCollector)); - - _messageCollector = messageCollector; - } - - public void LogStartupData() - { - LogApplicationData(); - LogCmdLineArgs(); - LogSystemData(); - LogClrData(); - LogCultureData(); - } - - private void LogSystemData() - { - var osData = GetOperatingSystemData(); - var architecture = GetArchitectureData(); - var nonEmptyData = Array.FindAll(new[] {osData, architecture}, s => !string.IsNullOrEmpty(s)); - var data = string.Join(" ", nonEmptyData); - _messageCollector.AddMessage(MessageClass.InformationMsg, data, true); - } - - private string GetOperatingSystemData() - { - var osVersion = string.Empty; - var servicePack = string.Empty; - - try - { - foreach (var o in new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem WHERE Primary=True") - .Get()) - { - var managementObject = (ManagementObject)o; - osVersion = Convert.ToString(managementObject.GetPropertyValue("Caption")).Trim(); - servicePack = GetOSServicePack(servicePack, managementObject); - } - } - catch (Exception ex) - { - _messageCollector.AddExceptionMessage("Error retrieving operating system information from WMI.", ex); - } - - var osData = string.Join(" ", osVersion, servicePack); - return osData; - } - - private string GetOSServicePack(string servicePack, ManagementObject managementObject) - { - var servicePackNumber = Convert.ToInt32(managementObject.GetPropertyValue("ServicePackMajorVersion")); - if (servicePackNumber != 0) - { - servicePack = $"Service Pack {servicePackNumber}"; - } - - return servicePack; - } - - private string GetArchitectureData() - { - var architecture = string.Empty; - try - { - foreach (var o in new ManagementObjectSearcher("SELECT AddressWidth FROM Win32_Processor WHERE DeviceID=\'CPU0\'") - .Get()) - { - var managementObject = (ManagementObject)o; - var addressWidth = Convert.ToInt32(managementObject.GetPropertyValue("AddressWidth")); - architecture = $"{addressWidth}-bit"; - } - } - catch (Exception ex) - { - _messageCollector.AddExceptionMessage("Error retrieving operating system address width from WMI.", ex); - } - - return architecture; - } - - private void LogApplicationData() - { - var data = $"{Application.ProductName} {Application.ProductVersion}"; - if (Runtime.IsPortableEdition) - data += $" {Language.PortableEdition}"; - data += " starting."; - _messageCollector.AddMessage(MessageClass.InformationMsg, data, true); - } - - private void LogCmdLineArgs() - { - var data = $"Command Line: {string.Join(" ", Environment.GetCommandLineArgs())}"; - _messageCollector.AddMessage(MessageClass.InformationMsg, data, true); - } - - private void LogClrData() - { - var data = $"Microsoft .NET CLR {Environment.Version}"; - _messageCollector.AddMessage(MessageClass.InformationMsg, data, true); - } - - private void LogCultureData() - { - var data = - $"System Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}"; - _messageCollector.AddMessage(MessageClass.InformationMsg, data, true); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Logger.cs b/mRemoteNG/App/Logger.cs deleted file mode 100644 index 7981cff69..000000000 --- a/mRemoteNG/App/Logger.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Windows.Forms; -using log4net; -using log4net.Appender; -using log4net.Config; -using mRemoteNG.Properties; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.App -{ - public class Logger - { - public static readonly Logger Instance = new Logger(); - - public ILog Log { get; private set; } - - public static string DefaultLogPath => BuildLogFilePath(); - - private Logger() - { - Initialize(); - } - - private void Initialize() - { - XmlConfigurator.Configure(LogManager.CreateRepository("mRemoteNG")); - if (string.IsNullOrEmpty(Settings.Default.LogFilePath)) - Settings.Default.LogFilePath = BuildLogFilePath(); - - SetLogPath(Settings.Default.LogToApplicationDirectory ? DefaultLogPath : Settings.Default.LogFilePath); - } - - public void SetLogPath(string path) - { - var repository = LogManager.GetRepository("mRemoteNG"); - XmlConfigurator.Configure(repository, new FileInfo("log4net.config")); - var appenders = repository.GetAppenders(); - - foreach (var appender in appenders) - { - var fileAppender = (RollingFileAppender)appender; - if (fileAppender == null || fileAppender.Name != "LogFileAppender") continue; - fileAppender.File = path; - fileAppender.ActivateOptions(); - } - - Log = LogManager.GetLogger("mRemoteNG", "Logger"); - } - - private static string BuildLogFilePath() - { - var logFilePath = Runtime.IsPortableEdition ? GetLogPathPortableEdition() : GetLogPathNormalEdition(); - var logFileName = Path.ChangeExtension(Application.ProductName, ".log"); - if (logFileName == null) return "mRemoteNG.log"; - var logFile = Path.Combine(logFilePath, logFileName); - return logFile; - } - - private static string GetLogPathNormalEdition() - { - return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - Application.ProductName); - } - - private static string GetLogPathPortableEdition() - { - return Application.StartupPath; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/NativeMethods.cs b/mRemoteNG/App/NativeMethods.cs deleted file mode 100644 index 43df4c26f..000000000 --- a/mRemoteNG/App/NativeMethods.cs +++ /dev/null @@ -1,552 +0,0 @@ -using System; -using System.Drawing; -using System.Runtime.ConstrainedExecution; -using System.Runtime.InteropServices; -using System.Text; - -#pragma warning disable 649 -#pragma warning disable 169 - -namespace mRemoteNG.App -{ - public static class NativeMethods - { - #region Functions - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern bool AppendMenu(IntPtr hMenu, int uFlags, IntPtr uIDNewItem, string lpNewItem); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr CreatePopupMenu(); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr FindWindowEx(IntPtr parentHandle, - IntPtr childAfter, - string lclassName, - string windowTitle); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr GetForegroundWindow(); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern bool InsertMenu(IntPtr hMenu, - int uPosition, - int uFlags, - IntPtr uIDNewItem, - string lpNewItem); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern int IsIconic(IntPtr hWnd); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern bool PostMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, StringBuilder lParam); - - [DllImport("user32.dll", CharSet = CharSet.Unicode)] - internal static extern IntPtr SendMessage(IntPtr hWnd, uint msg, IntPtr wParam, string lParam); - - [DllImport("user32.dll", CharSet = CharSet.Unicode)] - internal static extern IntPtr SendMessage([In] IntPtr hWnd, - [In] uint msg, - [Out] StringBuilder wParam, - [In] IntPtr lParam); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr SetClipboardViewer(IntPtr hWndNewViewer); - - [DllImport("User32.dll", CharSet = CharSet.Auto)] - internal static extern bool ChangeClipboardChain( - IntPtr hWndRemove, // handle to window to remove - IntPtr hWndNewNext // handle to next window - ); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern bool SetForegroundWindow(IntPtr hWnd); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern bool SetMenuItemBitmaps(IntPtr hMenu, - int uPosition, - int uFlags, - IntPtr hBitmapUnchecked, - IntPtr hBitmapChecked); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern long SetParent(IntPtr hWndChild, IntPtr hWndNewParent); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern int ShowWindow(IntPtr hWnd, int nCmdShow); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern IntPtr WindowFromPoint(Point point); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern int GetDlgCtrlID(IntPtr hwndCtl); - - [DllImport("user32", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] - internal static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl); - - [DllImport("user32", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] - internal static extern bool SetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl); - - [DllImport("kernel32", SetLastError = true)] - internal static extern bool CloseHandle(IntPtr handle); - - #endregion - - #region Structures - - [StructLayout(LayoutKind.Sequential)] - internal struct WINDOWPOS - { - public IntPtr hwnd; - public IntPtr hwndInsertAfter; - public int x; - public int y; - public int cx; - public int cy; - public int flags; - } - - internal struct WINDOWPLACEMENT - { - public uint length; - public uint flags; - public uint showCmd; - public POINT ptMinPosition; - public POINT ptMaxPosition; - public RECT rcNormalPosition; - } - - internal struct POINT - { - public long x; - public long y; - } - - internal struct RECT - { - public long left; - public long top; - public long right; - public long bottom; - } - - #endregion - - #region Helpers - - public static int MAKELONG(int wLow, int wHigh) - { - return wLow | wHigh << 16; - } - - public static int MAKELPARAM(ref int wLow, ref int wHigh) - { - return MAKELONG(wLow, wHigh); - } - - public static int LOWORD(int value) - { - return value & 0xFFFF; - } - - public static int LOWORD(IntPtr value) - { - return LOWORD(value.ToInt32()); - } - - public static int HIWORD(int value) - { - return value >> 16; - } - - public static int HIWORD(IntPtr value) - { - return HIWORD(value.ToInt32()); - } - - #endregion - - #region Constants - - public const int TRUE = 1; - - #region GetWindowLong - - public const int GWL_STYLE = (-16); - - #endregion - - #region AppendMenu / ModifyMenu / DeleteMenu / RemoveMenu - - public const int MF_BYCOMMAND = 0x0; - public const int MF_BYPOSITION = 0x400; - public const int MF_STRING = 0x0; - public const int MF_POPUP = 0x10; - public const int MF_SEPARATOR = 0x800; - - #endregion - - #region WM_LBUTTONDOWN / WM_LBUTTONUP - - public const int MK_LBUTTON = 0x1; - - #endregion - - #region ShowWindow - - public const uint SW_HIDE = 0; - public const uint SW_SHOWNORMAL = 1; - public const uint SW_SHOWMINIMIZED = 2; - public const uint SW_SHOWMAXIMIZED = 3; - public const uint SW_MAXIMIZE = 3; - public const uint SW_SHOWNOACTIVATE = 4; - public const uint SW_SHOW = 5; - public const uint SW_MINIMIZE = 6; - public const uint SW_SHOWMINNOACTIVE = 7; - public const uint SW_SHOWNA = 8; - public const uint SW_RESTORE = 9; - - #endregion - - #region SetWindowPos / WM_WINDOWPOSCHANGING / WM_WINDOWPOSCHANGED - - /// - /// Retains the current size (ignores the cx and cy parameters). - /// - public const int SWP_NOSIZE = 0x1; - - /// - /// Retains the current position (ignores the x and y parameters). - /// - public const int SWP_NOMOVE = 0x2; - - /// - /// Retains the current Z order (ignores the hWndInsertAfter parameter). - /// - public const int SWP_NOZORDER = 0x4; - - /// - /// Does not redraw changes. If this flag is set, no repainting of any kind occurs. This applies to the client area, the nonclient area (including the title bar and scroll bars), and any part of the parent window uncovered as a result of the window being moved. When this flag is set, the application must explicitly invalidate or redraw any parts of the window and parent window that need redrawing. - /// - public const int SWP_NOREDRAW = 0x8; - - /// - /// Does not activate the window. If this flag is not set, the window is activated and moved to the top of either the topmost or non-topmost group (depending on the setting of the hWndInsertAfter parameter). - /// - public const int SWP_NOACTIVATE = 0x10; - - /// - /// Draws a frame (defined in the window's class description) around the window. - /// - public const int SWP_DRAWFRAME = 0x20; - - /// - /// Sends a WM_NCCALCSIZE message to the window, even if the window's size is not being changed. If this flag is not specified, WM_NCCALCSIZE is sent only when the window's size is being changed. - /// - public const int SWP_FRAMECHANGED = 0x20; - - /// - /// Displays the window. - /// - public const int SWP_SHOWWINDOW = 0x40; - - /// - /// Hides the window. - /// - public const int SWP_HIDEWINDOW = 0x80; - - /// - /// Discards the entire contents of the client area. If this flag is not specified, the valid contents of the client area are saved and copied back into the client area after the window is sized or repositioned. - /// - public const int SWP_NOCOPYBITS = 0x100; - - /// - /// Does not change the owner window's position in the Z order. - /// - public const int SWP_NOOWNERZORDER = 0x200; - - /// - /// Prevents the window from receiving the WM_WINDOWPOSCHANGING message. - /// - public const int SWP_NOSENDCHANGING = 0x400; - - /// - /// - /// - public const int SWP_NOCLIENTSIZE = 0x800; - - /// - /// - /// - public const int SWP_NOCLIENTMOVE = 0x1000; - - /// - /// Prevents generation of the WM_SYNCPAINT message. - /// - public const int SWP_DEFERERASE = 0x2000; - - /// - /// If the calling thread and the thread that owns the window are attached to different input queues, the system posts the request to the thread that owns the window. This prevents the calling thread from blocking its execution while other threads process the request. - /// - public const int SWP_ASYNCWINDOWPOS = 0x4000; - - /// - /// - /// - public const int SWP_STATECHANGED = 0x8000; - - #endregion - - #region Window Placement Flags (WPF) - - public const uint WPF_SETMINPOSITION = 0x1; - public const uint WPF_RESTORETOMAXIMIZED = 0x2; - public const uint WPF_ASYNCWINDOWPLACEMENT = 0x4; - - #endregion - - #region WM_ACTIVATE - - /// - /// - /// - public const int WA_INACTIVE = 0x0; - - /// - /// - /// - public const int WA_ACTIVE = 0x1; - - /// - /// Sent to both the window being activated and the window being deactivated. - /// If the windows use the same input queue, the message is sent synchronously, first to the window procedure of the - /// top-level window being deactivated, then to the window procedure of the top-level window being activated. If the - /// windows use different input queues, the message is sent asynchronously, so the window is activated immediately. - /// - public const int WA_CLICKACTIVE = 0x2; - - #endregion - - #region Window Messages - - /// - /// Sent when an application requests that a window be created by calling the CreateWindowEx or CreateWindow function. (The message is sent before the function returns.) The window procedure of the new window receives this message after the window is created, but before the window becomes visible. - /// - public const int WM_CREATE = 0x1; - - /// - /// Sent when a window is being destroyed. It is sent to the window procedure of the window being destroyed after the window is removed from the screen. This message is sent first to the window being destroyed and then to the child windows(if any) as they are destroyed.During the processing of the message, it can be assumed that all child windows still exist. - /// - public const int WM_DESTROY = 0x2; - - /// - /// Sent to both the window being activated and the window being deactivated. If the windows use the same input queue, the message is sent synchronously, first to the window procedure of the top-level window being deactivated, then to the window procedure of the top-level window being activated. If the windows use different input queues, the message is sent asynchronously, so the window is activated immediately. - /// - public const int WM_ACTIVATE = 0x6; - - /// - /// - /// - public const int WM_SETTEXT = 0xC; - - /// - /// Copies the text that corresponds to a window into a buffer provided by the caller. - /// - public const int WM_GETTEXT = 0xD; - - /// - /// Sent as a signal that a window or an application should terminate. - /// - public const int WM_CLOSE = 0x10; - - /// - /// Sent when a window belonging to a different application than the active window is about to be activated. The message is sent to the application whose window is being activated and to the application whose window is being deactivated. - /// - public const int WM_ACTIVATEAPP = 0x1C; - - /// - /// Sent to a window if the mouse causes the cursor to move within a window and mouse input is not captured. - /// - public const int WM_SETCURSOR = 0x20; - - /// - /// Sent when the cursor is in an inactive window and the user presses a mouse button. The parent window receives this message only if the child window passes it to the DefWindowProc function. - /// - public const int WM_MOUSEACTIVATE = 0x21; - - /// - /// Sent to a window when the size or position of the window is about to change. An application can use this message to override the window's default maximized size and position, or its default minimum or maximum tracking size. - /// - public const int WM_GETMINMAXINFO = 0x24; - - /// - /// Sent to a window whose size, position, or place in the Z order is about to change as a result of a call to the SetWindowPos function or another window-management function. - /// - public const int WM_WINDOWPOSCHANGING = 0x46; - - /// - /// Sent to a window whose size, position, or place in the Z order has changed as a result of a call to the SetWindowPos function or another window-management function. - /// - public const int WM_WINDOWPOSCHANGED = 0x47; - - /// - /// Posted to the window with the keyboard focus when a nonsystem key is pressed. A nonsystem key is a key that is pressed when the ALT key is not pressed. - /// - public const int WM_KEYDOWN = 0x100; - - /// - /// Posted to the window with the keyboard focus when a nonsystem key is released. A nonsystem key is a key that is pressed when the ALT key is not pressed, or a keyboard key that is pressed when a window has the keyboard focus. - /// - public const int WM_KEYUP = 0x101; - - /// - /// Posted to the window with the keyboard focus when a WM_KEYDOWN message is translated by the TranslateMessage function. The WM_CHAR message contains the character code of the key that was pressed. - /// - public const int WM_CHAR = 0x102; - - /// - /// Sent when the user selects a command item from a menu, when a control sends a notification message to its parent window, or when an accelerator keystroke is translated. - /// - public const int WM_COMMAND = 0x111; - - /// - /// A window receives this message when the user chooses a command from the Window menu (formerly known as the system or control menu) or when the user chooses the maximize button, minimize button, restore button, or close button. - /// - public const int WM_SYSCOMMAND = 0x112; - - /// - /// Posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_MOUSEMOVE = 0x200; - - /// - /// Posted when the user presses the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_LBUTTONDOWN = 0x201; - - /// - /// Posted when the user releases the left mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_LBUTTONUP = 0x202; - - /// - /// Posted when the user presses the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_RBUTTONDOWN = 0x204; - - /// - /// Posted when the user releases the right mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_RBUTTONUP = 0x205; - - /// - /// Posted when the user presses the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_MBUTTONDOWN = 0x207; - - /// - /// Posted when the user releases the middle mouse button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_MBUTTONUP = 0x208; - - /// - /// Posted when the user presses the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_XBUTTONDOWN = 0x20B; - - /// - /// Posted when the user releases the first or second X button while the cursor is in the client area of a window. If the mouse is not captured, the message is posted to the window beneath the cursor. Otherwise, the message is posted to the window that has captured the mouse. - /// - public const int WM_XBUTTONUP = 0x20C; - - /// - /// Sent to a window when a significant action occurs on a descendant window. This message is now extended to include the WM_POINTERDOWN event. When the child window is being created, the system sends WM_PARENTNOTIFY just before the CreateWindow or CreateWindowEx function that creates the window returns. When the child window is being destroyed, the system sends the message before any processing to destroy the window takes place. - /// - public const int WM_PARENTNOTIFY = 0x210; - - /// - /// Sent one time to a window after it enters the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns. - /// - public const int WM_ENTERSIZEMOVE = 0x231; - - /// - /// Sent one time to a window, after it has exited the moving or sizing modal loop. The window enters the moving or sizing modal loop when the user clicks the window's title bar or sizing border, or when the window passes the WM_SYSCOMMAND message to the DefWindowProc function and the wParam parameter of the message specifies the SC_MOVE or SC_SIZE value. The operation is complete when DefWindowProc returns. - /// - public const int WM_EXITSIZEMOVE = 0x232; - - /// - /// Sent to the first window in the clipboard viewer chain when the content of the clipboard changes. This enables a clipboard viewer window to display the new content of the clipboard. - /// - public const int WM_DRAWCLIPBOARD = 0x308; - - /// - /// Sent to the first window in the clipboard viewer chain when a window is being removed from the chain. - /// - public const int WM_CHANGECBCHAIN = 0x30D; - - #endregion - - #region Window Styles - - public const int WS_MAXIMIZE = 0x1000000; - public const int WS_VISIBLE = 0x10000000; - public const int WS_CHILD = 0x40000000; - public const int WS_EX_MDICHILD = 0x40; - - #endregion - - #region Virtual Key Codes - - public const int VK_CONTROL = 0x11; - public const int VK_C = 0x67; - - #endregion - - #region EM - - public const uint ECM_FIRST = 0x1500; - public const uint EM_SETCUEBANNER = ECM_FIRST + 1; - public const uint EM_GETCUEBANNER = ECM_FIRST + 2; - - #endregion - - #region LB - - public const int LB_ERR = -1; - public const int LB_SELECTSTRING = 0x18C; - - #endregion - - #region TCM - - internal const int TCM_ADJUSTRECT = 0x1328; - - #endregion - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/App/ProgramRoot.cs b/mRemoteNG/App/ProgramRoot.cs deleted file mode 100644 index d30edebed..000000000 --- a/mRemoteNG/App/ProgramRoot.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Windows.Forms; -using mRemoteNG.Properties; -using mRemoteNG.UI.Forms; - -namespace mRemoteNG.App -{ - public static class ProgramRoot - { - private static Mutex _mutex; - - /// - /// The main entry point for the application. - /// - [STAThread] - public static void Main(string[] args) - { - if (Settings.Default.SingleInstance) - StartApplicationAsSingleInstance(); - else - StartApplication(); - } - - private static void StartApplication() - { - CatchAllUnhandledExceptions(); - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - var frmSplashScreen = FrmSplashScreen.getInstance(); - frmSplashScreen.Show(); - Application.Run(FrmMain.Default); - } - - public static void CloseSingletonInstanceMutex() - { - _mutex?.Close(); - } - - private static void StartApplicationAsSingleInstance() - { - const string mutexID = "mRemoteNG_SingleInstanceMutex"; - _mutex = new Mutex(false, mutexID, out var newInstanceCreated); - if (!newInstanceCreated) - { - SwitchToCurrentInstance(); - return; - } - - StartApplication(); - GC.KeepAlive(_mutex); - } - - private static void SwitchToCurrentInstance() - { - var singletonInstanceWindowHandle = GetRunningSingletonInstanceWindowHandle(); - if (singletonInstanceWindowHandle == IntPtr.Zero) return; - if (NativeMethods.IsIconic(singletonInstanceWindowHandle) != 0) - NativeMethods.ShowWindow(singletonInstanceWindowHandle, (int)NativeMethods.SW_RESTORE); - NativeMethods.SetForegroundWindow(singletonInstanceWindowHandle); - } - - private static IntPtr GetRunningSingletonInstanceWindowHandle() - { - var windowHandle = IntPtr.Zero; - var currentProcess = Process.GetCurrentProcess(); - foreach (var enumeratedProcess in Process.GetProcessesByName(currentProcess.ProcessName)) - { - if (enumeratedProcess.Id != currentProcess.Id && - enumeratedProcess.MainModule.FileName == currentProcess.MainModule.FileName && - enumeratedProcess.MainWindowHandle != IntPtr.Zero) - windowHandle = enumeratedProcess.MainWindowHandle; - } - - return windowHandle; - } - - private static void CatchAllUnhandledExceptions() - { - Application.ThreadException += ApplicationOnThreadException; - Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); - AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; - } - - private static void ApplicationOnThreadException(object sender, ThreadExceptionEventArgs e) - { - if (!FrmSplashScreen.getInstance().IsDisposed) - FrmSplashScreen.getInstance().Close(); - - if (FrmMain.Default.IsDisposed) return; - - var window = new FrmUnhandledException(e.Exception, false); - window.ShowDialog(FrmMain.Default); - - } - - private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e) - { - if (!FrmSplashScreen.getInstance().IsDisposed) - FrmSplashScreen.getInstance().Close(); - - var window = new FrmUnhandledException(e.ExceptionObject as Exception, e.IsTerminating); - window.ShowDialog(FrmMain.Default); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Runtime.cs b/mRemoteNG/App/Runtime.cs deleted file mode 100644 index 2347d0745..000000000 --- a/mRemoteNG/App/Runtime.cs +++ /dev/null @@ -1,231 +0,0 @@ -using mRemoteNG.App.Info; -using mRemoteNG.Config.Putty; -using mRemoteNG.Connection; -using mRemoteNG.Credential; -using mRemoteNG.Credential.Repositories; -using mRemoteNG.Messages; -using mRemoteNG.Security; -using mRemoteNG.Tools; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.TaskDialog; -using System; -using System.IO; -using System.Security; -using System.Threading; -using System.Windows.Forms; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.App -{ - public static class Runtime - { - public static bool IsPortableEdition - { - get - { -#if PORTABLE - return true; -#else - return false; -#endif - } - } - - /// - /// Feature flag to enable the credential manager feature - /// - public static bool UseCredentialManager => false; - - public static WindowList WindowList { get; set; } - public static MessageCollector MessageCollector { get; } = new MessageCollector(); - public static NotificationAreaIcon NotificationAreaIcon { get; set; } - public static ExternalToolsService ExternalToolsService { get; } = new ExternalToolsService(); - - public static SecureString EncryptionKey { get; set; } = - new RootNodeInfo(RootNodeType.Connection).PasswordString.ConvertToSecureString(); - - public static ICredentialRepositoryList CredentialProviderCatalog { get; } = new CredentialRepositoryList(); - - public static ConnectionInitiator ConnectionInitiator { get; set; } = new ConnectionInitiator(); - - public static ConnectionsService ConnectionsService { get; } = - new ConnectionsService(PuttySessionsManager.Instance); - - #region Connections Loading/Saving - - public static void LoadConnectionsAsync() - { - var t = new Thread(LoadConnectionsBGd); - t.SetApartmentState(ApartmentState.STA); - t.Start(); - } - - private static void LoadConnectionsBGd() - { - LoadConnections(); - } - - /// - /// - /// - /// - /// Should we show the file selection dialog to allow the user to select - /// a connection file - /// - public static void LoadConnections(bool withDialog = false) - { - var connectionFileName = ""; - - try - { - // disable sql update checking while we are loading updates - ConnectionsService.RemoteConnectionsSyncronizer?.Disable(); - - if (withDialog) - { - var loadDialog = DialogFactory.BuildLoadConnectionsDialog(); - if (loadDialog.ShowDialog() != DialogResult.OK) - return; - - connectionFileName = loadDialog.FileName; - Settings.Default.UseSQLServer = false; - Settings.Default.Save(); - } - else if (!Settings.Default.UseSQLServer) - { - connectionFileName = ConnectionsService.GetStartupConnectionFileName(); - } - - ConnectionsService.LoadConnections(Settings.Default.UseSQLServer, false, connectionFileName); - - if (Settings.Default.UseSQLServer) - { - ConnectionsService.LastSqlUpdate = DateTime.Now; - } - else - { - ConnectionsService.LastFileUpdate = System.IO.File.GetLastWriteTime(connectionFileName); - } - - // re-enable sql update checking after updates are loaded - ConnectionsService.RemoteConnectionsSyncronizer?.Enable(); - } - catch (Exception ex) - { - FrmSplashScreen.getInstance().Close(); - - if (Settings.Default.UseSQLServer) - { - MessageCollector.AddExceptionMessage(Language.LoadFromSqlFailed, ex); - var commandButtons = string.Join("|", Language._TryAgain, - Language.CommandOpenConnectionFile, - string.Format(Language.CommandExitProgram, - Application.ProductName)); - CTaskDialog.ShowCommandBox(Application.ProductName, Language.LoadFromSqlFailed, - Language.LoadFromSqlFailedContent, - MiscTools.GetExceptionMessageRecursive(ex), "", "", - commandButtons, false, ESysIcons.Error, ESysIcons.Error); - switch (CTaskDialog.CommandButtonResult) - { - case 0: - LoadConnections(withDialog); - return; - case 1: - Settings.Default.UseSQLServer = false; - LoadConnections(true); - return; - default: - Application.Exit(); - return; - } - } - - if (ex is FileNotFoundException && !withDialog) - { - MessageCollector.AddExceptionMessage( - string.Format(Language.ConnectionsFileCouldNotBeLoadedNew, - connectionFileName), ex, - MessageClass.InformationMsg); - - string[] commandButtons = - { - Language.ConfigurationCreateNew, - Language.ConfigurationCustomPath, - Language.ConfigurationImportFile, - Language.Exit - }; - - var answered = false; - while (!answered) - { - try - { - CTaskDialog.ShowTaskDialogBox( - GeneralAppInfo.ProductName, - Language.ConnectionFileNotFound, - "", "", "", "", "", - string.Join(" | ", commandButtons), - ETaskDialogButtons.None, - ESysIcons.Question, - ESysIcons.Question); - - switch (CTaskDialog.CommandButtonResult) - { - case 0: - ConnectionsService.NewConnectionsFile(connectionFileName); - answered = true; - break; - case 1: - LoadConnections(true); - answered = true; - break; - case 2: - ConnectionsService.NewConnectionsFile(connectionFileName); - Import.ImportFromFile(ConnectionsService.ConnectionTreeModel.RootNodes[0]); - answered = true; - break; - case 3: - Application.Exit(); - answered = true; - break; - } - } - catch (Exception exc) - { - MessageCollector.AddExceptionMessage( - string - .Format(Language.ConnectionsFileCouldNotBeLoadedNew, - connectionFileName), exc, - MessageClass.InformationMsg); - } - } - - return; - } - - MessageCollector.AddExceptionStackTrace( - string.Format(Language.ConnectionsFileCouldNotBeLoaded, - connectionFileName), ex); - if (connectionFileName != ConnectionsService.GetStartupConnectionFileName()) - { - LoadConnections(withDialog); - } - else - { - MessageBox.Show(FrmMain.Default, - string.Format(Language.ErrorStartupConnectionFileLoad, Environment.NewLine, - Application.ProductName, - ConnectionsService.GetStartupConnectionFileName(), - MiscTools.GetExceptionMessageRecursive(ex)), - @"Could not load startup file.", MessageBoxButtons.OK, MessageBoxIcon.Error); - Application.Exit(); - } - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Screens.cs b/mRemoteNG/App/Screens.cs deleted file mode 100644 index b561fbdbb..000000000 --- a/mRemoteNG/App/Screens.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Windows.Forms; -using mRemoteNG.UI.Forms; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.App -{ - public static class Screens - { - public static void SendFormToScreen(Screen screen) - { - var frmMain = FrmMain.Default; - var wasMax = false; - - if (frmMain.WindowState == FormWindowState.Maximized) - { - wasMax = true; - frmMain.WindowState = FormWindowState.Normal; - } - - frmMain.Location = screen.Bounds.Location; - - if (wasMax) - { - frmMain.WindowState = FormWindowState.Maximized; - } - } - - public static void SendPanelToScreen(DockContent panel, Screen screen) - { - panel.DockState = DockState.Float; - if (panel.ParentForm == null) return; - panel.ParentForm.Left = screen.Bounds.Location.X; - panel.ParentForm.Top = screen.Bounds.Location.Y; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Shutdown.cs b/mRemoteNG/App/Shutdown.cs deleted file mode 100644 index 2067cbdb0..000000000 --- a/mRemoteNG/App/Shutdown.cs +++ /dev/null @@ -1,126 +0,0 @@ -using mRemoteNG.Tools; -using System; -using System.Diagnostics; -using System.Windows.Forms; -using mRemoteNG.Config.Connections; -using mRemoteNG.Config.Putty; -using mRemoteNG.Properties; -using mRemoteNG.UI.Controls; -using mRemoteNG.UI.Forms; -using mRemoteNG.Resources.Language; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.App -{ - public static class Shutdown - { - private static string _updateFilePath; - - private static bool UpdatePending - { - get { return !string.IsNullOrEmpty(_updateFilePath); } - } - - public static void Quit(string updateFilePath = null) - { - _updateFilePath = updateFilePath; - FrmMain.Default.Close(); - ProgramRoot.CloseSingletonInstanceMutex(); - } - - public static void Cleanup(Control quickConnectToolStrip, - ExternalToolsToolStrip externalToolsToolStrip, - MultiSshToolStrip multiSshToolStrip, - FrmMain frmMain) - { - try - { - StopPuttySessionWatcher(); - DisposeNotificationAreaIcon(); - SaveConnections(); - SaveSettings(quickConnectToolStrip, externalToolsToolStrip, multiSshToolStrip, frmMain); - UnregisterBrowsers(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.SettingsCouldNotBeSavedOrTrayDispose, ex); - } - } - - private static void StopPuttySessionWatcher() - { - PuttySessionsManager.Instance.StopWatcher(); - } - - private static void DisposeNotificationAreaIcon() - { - if (Runtime.NotificationAreaIcon != null && Runtime.NotificationAreaIcon.Disposed == false) - Runtime.NotificationAreaIcon.Dispose(); - } - - private static void SaveConnections() - { - DateTime lastUpdate; - DateTime updateDate; - DateTime currentDate = DateTime.Now; - - //OBSOLETE: Settings.Default.SaveConsOnExit is obsolete and should be removed in a future release - if (Settings.Default.SaveConsOnExit || (Settings.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnExit)) - { - Runtime.ConnectionsService.SaveConnections(); - return; - } - lastUpdate = Runtime.ConnectionsService.UsingDatabase ? Runtime.ConnectionsService.LastSqlUpdate : Runtime.ConnectionsService.LastFileUpdate; - - switch (Settings.Default.SaveConnectionsFrequency) - { - case (int)ConnectionsBackupFrequencyEnum.Daily: - updateDate = lastUpdate.AddDays(1); - break; - case (int)ConnectionsBackupFrequencyEnum.Weekly: - updateDate = lastUpdate.AddDays(7); - break; - default: - return; - } - - if (currentDate >= updateDate) - { - Runtime.ConnectionsService.SaveConnections(); - } - } - - private static void SaveSettings(Control quickConnectToolStrip, - ExternalToolsToolStrip externalToolsToolStrip, - MultiSshToolStrip multiSshToolStrip, - FrmMain frmMain) - { - Config.Settings.SettingsSaver.SaveSettings(quickConnectToolStrip, externalToolsToolStrip, multiSshToolStrip, - frmMain); - } - - private static void UnregisterBrowsers() - { - IeBrowserEmulation.Unregister(); - } - - public static void StartUpdate() - { - try - { - RunUpdateFile(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("The update could not be started.", ex); - } - } - - private static void RunUpdateFile() - { - if (UpdatePending) - Process.Start(new ProcessStartInfo(_updateFilePath) { UseShellExecute = true }); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Startup.cs b/mRemoteNG/App/Startup.cs deleted file mode 100644 index e7a13bce0..000000000 --- a/mRemoteNG/App/Startup.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Globalization; -using System.Threading.Tasks; -using mRemoteNG.App.Info; -using mRemoteNG.App.Initialization; -using mRemoteNG.App.Update; -using mRemoteNG.Config.Connections.Multiuser; -using mRemoteNG.Connection; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.Tools; -using mRemoteNG.Tools.Cmdline; -using mRemoteNG.UI; -using mRemoteNG.UI.Forms; - - -namespace mRemoteNG.App -{ - public class Startup - { - private AppUpdater _appUpdate; - private readonly ConnectionIconLoader _connectionIconLoader; - private readonly FrmMain _frmMain = FrmMain.Default; - - public static Startup Instance { get; } = new Startup(); - - private Startup() - { - _appUpdate = new AppUpdater(); - _connectionIconLoader = new ConnectionIconLoader(GeneralAppInfo.HomePath + "\\Icons\\"); - } - - static Startup() - { - } - - public void InitializeProgram(MessageCollector messageCollector) - { - Debug.Print("---------------------------" + Environment.NewLine + "[START] - " + - Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture)); - var startupLogger = new StartupDataLogger(messageCollector); - startupLogger.LogStartupData(); - CompatibilityChecker.CheckCompatibility(messageCollector); - ParseCommandLineArgs(messageCollector); - IeBrowserEmulation.Register(); - _connectionIconLoader.GetConnectionIcons(); - DefaultConnectionInfo.Instance.LoadFrom(Settings.Default, a => "ConDefault" + a); - DefaultConnectionInheritance.Instance.LoadFrom(Settings.Default, a => "InhDefault" + a); - } - - private static void ParseCommandLineArgs(MessageCollector messageCollector) - { - var interpreter = new StartupArgumentsInterpreter(messageCollector); - interpreter.ParseArguments(Environment.GetCommandLineArgs()); - } - - public void CreateConnectionsProvider(MessageCollector messageCollector) - { - messageCollector.AddMessage(MessageClass.DebugMsg, "Determining if we need a database syncronizer"); - if (!Settings.Default.UseSQLServer) return; - messageCollector.AddMessage(MessageClass.DebugMsg, "Creating database syncronizer"); - Runtime.ConnectionsService.RemoteConnectionsSyncronizer = - new RemoteConnectionsSyncronizer(new SqlConnectionsUpdateChecker()); - Runtime.ConnectionsService.RemoteConnectionsSyncronizer.Enable(); - } - - public async Task CheckForUpdate() - { - if (_appUpdate == null) - { - _appUpdate = new AppUpdater(); - } - else if (_appUpdate.IsGetUpdateInfoRunning) - { - return; - } - - var nextUpdateCheck = - Convert.ToDateTime(Settings.Default.CheckForUpdatesLastCheck.Add( - TimeSpan - .FromDays(Convert.ToDouble(Settings - .Default - .CheckForUpdatesFrequencyDays)))); - if (!Settings.Default.UpdatePending && DateTime.UtcNow < nextUpdateCheck) - { - return; - } - - try - { - await _appUpdate.GetUpdateInfoAsync(); - if (_appUpdate.IsUpdateAvailable()) - { - Windows.Show(WindowType.Update); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("CheckForUpdate() failed.", ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/SupportedCultures.cs b/mRemoteNG/App/SupportedCultures.cs deleted file mode 100644 index b3e2511ce..000000000 --- a/mRemoteNG/App/SupportedCultures.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.Serialization; -using mRemoteNG.Properties; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.App -{ - [Serializable] - public sealed class SupportedCultures : Dictionary - { - private static SupportedCultures _Instance; - - private static SupportedCultures SingletonInstance - { - get { return _Instance ?? (_Instance = new SupportedCultures()); } - } - - - private SupportedCultures() - { - foreach (var CultureName in Settings.Default.SupportedUICultures.Split(',')) - { - try - { - var CultureInfo = new CultureInfo(CultureName.Trim()); - Add(CultureInfo.Name, CultureInfo.TextInfo.ToTitleCase(CultureInfo.NativeName)); - } - catch (Exception ex) - { - Debug.Print( - $"An exception occurred while adding the culture {CultureName} to the list of supported cultures. {ex.StackTrace}"); - } - } - } - - // fix CA2229 - https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2229-implement-serialization-constructors?view=vs-2017 - private SupportedCultures(SerializationInfo info, StreamingContext context) - { - throw new NotImplementedException(); - } - - public static bool IsNameSupported(string CultureName) - { - return SingletonInstance.ContainsKey(CultureName); - } - - public static bool IsNativeNameSupported(string CultureNativeName) - { - return SingletonInstance.ContainsValue(CultureNativeName); - } - - public static string get_CultureName(string CultureNativeName) - { - var Names = new string[SingletonInstance.Count + 1]; - var NativeNames = new string[SingletonInstance.Count + 1]; - - SingletonInstance.Keys.CopyTo(Names, 0); - SingletonInstance.Values.CopyTo(NativeNames, 0); - - for (var Index = 0; Index <= SingletonInstance.Count; Index++) - { - if (NativeNames[Index] == CultureNativeName) - { - return Names[Index]; - } - } - - throw (new KeyNotFoundException()); - } - - public static string get_CultureNativeName(string CultureName) - { - return SingletonInstance[CultureName]; - } - - public static List CultureNativeNames - { - get - { - var ValueList = new List(); - foreach (var Value in SingletonInstance.Values) - { - ValueList.Add(Value); - } - - return ValueList; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Update/AppUpdater.cs b/mRemoteNG/App/Update/AppUpdater.cs deleted file mode 100644 index 4bfc6b069..000000000 --- a/mRemoteNG/App/Update/AppUpdater.cs +++ /dev/null @@ -1,269 +0,0 @@ -using System; -using System.IO; -using System.Net; -using System.Net.Http; -using System.Threading; -using mRemoteNG.App.Info; -using mRemoteNG.Security.SymmetricEncryption; -using System.Security.Cryptography; -using System.Threading.Tasks; -using mRemoteNG.Properties; -#if !PORTABLE -using mRemoteNG.Tools; - -#else -using System.Windows.Forms; - -#endif -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.App.Update -{ - public class AppUpdater - { - private const int _bufferLength = 8192; - private WebProxy _webProxy; - private HttpClient _httpClient; - private CancellationTokenSource _changeLogCancelToken; - private CancellationTokenSource _getUpdateInfoCancelToken; - - #region Public Properties - - public UpdateInfo CurrentUpdateInfo { get; private set; } - - public bool IsGetUpdateInfoRunning - { - get - { - return _getUpdateInfoCancelToken != null; - } - } - - private bool IsGetChangeLogRunning - { - get - { - return _changeLogCancelToken != null; - } - } - - #endregion - - #region Public Methods - - public AppUpdater() - { - SetDefaultProxySettings(); - } - - private void SetDefaultProxySettings() - { - var shouldWeUseProxy = Settings.Default.UpdateUseProxy; - var proxyAddress = Settings.Default.UpdateProxyAddress; - var port = Settings.Default.UpdateProxyPort; - var useAuthentication = Settings.Default.UpdateProxyUseAuthentication; - var username = Settings.Default.UpdateProxyAuthUser; - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - var password = cryptographyProvider.Decrypt(Settings.Default.UpdateProxyAuthPass, Runtime.EncryptionKey); - - SetProxySettings(shouldWeUseProxy, proxyAddress, port, useAuthentication, username, password); - } - - public void SetProxySettings(bool useProxy, - string address, - int port, - bool useAuthentication, - string username, - string password) - { - if (useProxy && !string.IsNullOrEmpty(address)) - { - _webProxy = port != 0 ? new WebProxy(address, port) : new WebProxy(address); - _webProxy.Credentials = useAuthentication ? new NetworkCredential(username, password) : null; - } - else - { - _webProxy = null; - } - - UpdateHttpClient(); - } - - public bool IsUpdateAvailable() - { - if (CurrentUpdateInfo == null || !CurrentUpdateInfo.IsValid) - { - return false; - } - - return CurrentUpdateInfo.Version > GeneralAppInfo.GetApplicationVersion(); - } - - public async Task DownloadUpdateAsync(IProgress progress) - { - if (IsGetUpdateInfoRunning) - { - _getUpdateInfoCancelToken.Cancel(); - _getUpdateInfoCancelToken.Dispose(); - _getUpdateInfoCancelToken = null; - - throw new InvalidOperationException("A previous call to DownloadUpdateAsync() is still in progress."); - } - - if (CurrentUpdateInfo == null || !CurrentUpdateInfo.IsValid) - { - throw new InvalidOperationException("CurrentUpdateInfo is not valid. GetUpdateInfoAsync() must be called before calling DownloadUpdateAsync()."); - } -#if !PORTABLE - CurrentUpdateInfo.UpdateFilePath = Path.Combine(Path.GetTempPath(), Path.ChangeExtension(Path.GetRandomFileName(), "msi")); -#else - var sfd = new SaveFileDialog - { - InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), - FileName = CurrentUpdateInfo.FileName, - RestoreDirectory = true - }; - if (sfd.ShowDialog() == DialogResult.OK) - { - CurrentUpdateInfo.UpdateFilePath = sfd.FileName; - } - else - { - return; - } -#endif - try - { - _getUpdateInfoCancelToken = new CancellationTokenSource(); - using var response = await _httpClient.GetAsync(CurrentUpdateInfo.DownloadAddress, HttpCompletionOption.ResponseHeadersRead, _getUpdateInfoCancelToken.Token); - var buffer = new byte[_bufferLength]; - var totalBytes = response.Content.Headers.ContentLength ?? 0; - var readBytes = 0L; - - await using (var httpStream = await response.Content.ReadAsStreamAsync(_getUpdateInfoCancelToken.Token)) - { - await using var fileStream = new FileStream(CurrentUpdateInfo.UpdateFilePath, FileMode.Create, - FileAccess.Write, FileShare.None, _bufferLength, true); - - while (readBytes <= totalBytes || !_getUpdateInfoCancelToken.IsCancellationRequested) - { - var bytesRead = - await httpStream.ReadAsync(buffer, 0, _bufferLength, _getUpdateInfoCancelToken.Token); - if (bytesRead == 0) - { - progress.Report(100); - break; - } - - await fileStream.WriteAsync(buffer, 0, bytesRead, _getUpdateInfoCancelToken.Token); - - readBytes += bytesRead; - - var percentComplete = (int)(readBytes * 100 / totalBytes); - progress.Report(percentComplete); - } - } - -#if !PORTABLE - var updateAuthenticode = new Authenticode(CurrentUpdateInfo.UpdateFilePath) - { - RequireThumbprintMatch = true, - ThumbprintToMatch = CurrentUpdateInfo.CertificateThumbprint - }; - - if (updateAuthenticode.Verify() != Authenticode.StatusValue.Verified) - { - if (updateAuthenticode.Status == Authenticode.StatusValue.UnhandledException) - { - throw updateAuthenticode.Exception; - } - - throw new Exception(updateAuthenticode.GetStatusMessage()); - } -#endif - - using var checksum = SHA512.Create(); - await using var stream = File.OpenRead(CurrentUpdateInfo.UpdateFilePath); - var hash = await checksum.ComputeHashAsync(stream); - var hashString = BitConverter.ToString(hash).Replace("-", "").ToUpperInvariant(); - if (!hashString.Equals(CurrentUpdateInfo.Checksum)) - throw new Exception("SHA512 Hashes didn't match!"); - } finally{ - _getUpdateInfoCancelToken?.Dispose(); - _getUpdateInfoCancelToken = null; - } - } - - #endregion - - #region Private Methods - - private void UpdateHttpClient() - { - if (_httpClient != null) - { - _httpClient.Dispose(); - } - - var httpClientHandler = new HttpClientHandler(); - if (_webProxy != null) - { - httpClientHandler.UseProxy = true; - httpClientHandler.Proxy = _webProxy; - } - _httpClient = new HttpClient(httpClientHandler); - _httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(GeneralAppInfo.UserAgent); - } - - public async Task GetUpdateInfoAsync() - { - if (IsGetUpdateInfoRunning) - { - _getUpdateInfoCancelToken.Cancel(); - _getUpdateInfoCancelToken.Dispose(); - _getUpdateInfoCancelToken = null; - } - - try - { - _getUpdateInfoCancelToken = new CancellationTokenSource(); - var updateInfo = await _httpClient.GetStringAsync(UpdateChannelInfo.GetUpdateChannelInfo(), _getUpdateInfoCancelToken.Token); - CurrentUpdateInfo = UpdateInfo.FromString(updateInfo); - Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow; - - if (!Settings.Default.UpdatePending) - { - Settings.Default.UpdatePending = IsUpdateAvailable(); - } - } - finally - { - _getUpdateInfoCancelToken?.Dispose(); - _getUpdateInfoCancelToken = null; - } - } - - public async Task GetChangeLogAsync() - { - if (IsGetChangeLogRunning) - { - _changeLogCancelToken.Cancel(); - _changeLogCancelToken.Dispose(); - _changeLogCancelToken = null; - } - - try - { - _changeLogCancelToken = new CancellationTokenSource(); - return await _httpClient.GetStringAsync(CurrentUpdateInfo.ChangeLogAddress, _changeLogCancelToken.Token); - } - finally - { - _changeLogCancelToken?.Dispose(); - _changeLogCancelToken = null; - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Update/UpdateFile.cs b/mRemoteNG/App/Update/UpdateFile.cs deleted file mode 100644 index fae08418b..000000000 --- a/mRemoteNG/App/Update/UpdateFile.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; - -namespace mRemoteNG.App.Update -{ - public class UpdateFile - { - #region Public Properties - - // ReSharper disable MemberCanBePrivate.Local - // ReSharper disable once MemberCanBePrivate.Global - public Dictionary Items { get; } = - new Dictionary(StringComparer.InvariantCultureIgnoreCase); - - #endregion - - #region Public Methods - - public UpdateFile(string content) - { - FromString(content); - } - - // ReSharper disable MemberCanBePrivate.Local - // ReSharper disable once MemberCanBePrivate.Global - public void FromString(string content) - { - if (string.IsNullOrEmpty(content)) return; - - char[] keyValueSeparators = {':', '='}; - char[] commentCharacters = {'#', ';', '\''}; - - // no separators means no valid update data... - if (content.Trim().IndexOfAny(keyValueSeparators) == -1) return; - - using (var sr = new StringReader(content)) - { - string line; - while ((line = sr.ReadLine()) != null) - { - var trimmedLine = line.Trim(); - if (trimmedLine.Length == 0) - continue; - - if (trimmedLine.Substring(0, 1).IndexOfAny(commentCharacters) != -1) - continue; - - var parts = trimmedLine.Split(keyValueSeparators, 2); - if (parts.Length != 2) - continue; - - // make sure we have valid data in both parts before adding to the collection. If either part is empty, then it's not valid data. - if (string.IsNullOrEmpty(parts[0].Trim()) || string.IsNullOrEmpty(parts[1].Trim())) - continue; - - Items.Add(parts[0].Trim(), parts[1].Trim()); - } - } - } - - // ReSharper disable MemberCanBePrivate.Local - private string GetString(string key) - { - // ReSharper restore MemberCanBePrivate.Local - return !Items.ContainsKey(key) ? string.Empty : Items[key]; - } - - public Version GetVersion(string key = "Version") - { - var value = GetString(key); - return string.IsNullOrEmpty(value) ? null : new Version(value); - } - - public Uri GetUri(string key) - { - var value = GetString(key); - return string.IsNullOrEmpty(value) ? null : new Uri(value); - } - - public string GetThumbprint(string key = "CertificateThumbprint") - { - return GetString(key).Replace(" ", "").ToUpperInvariant(); - } - - public string GetFileName() - { - var value = GetString("dURL"); - var sv = value.Split('/'); - return sv[sv.Length - 1]; - } - - public string GetChecksum(string key = "Checksum") - { - return GetString(key).Replace(" ", "").ToUpperInvariant(); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Update/UpdateInfo.cs b/mRemoteNG/App/Update/UpdateInfo.cs deleted file mode 100644 index 0d2ad4c60..000000000 --- a/mRemoteNG/App/Update/UpdateInfo.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; - -// ReSharper disable UnusedAutoPropertyAccessor.Local - -namespace mRemoteNG.App.Update -{ - public class UpdateInfo - { - public bool IsValid { get; private set; } - public Version Version { get; private set; } - public Uri DownloadAddress { get; private set; } - public string UpdateFilePath { get; set; } - public Uri ChangeLogAddress { get; private set; } - public Uri ImageAddress { get; private set; } - public Uri ImageLinkAddress { get; private set; } -#if !PORTABLE - public string CertificateThumbprint { get; private set; } -#endif - // ReSharper disable once MemberCanBePrivate.Global - public string FileName { get; set; } - public string Checksum { get; private set; } - - public static UpdateInfo FromString(string input) - { - var newInfo = new UpdateInfo(); - if (string.IsNullOrEmpty(input)) - { - newInfo.IsValid = false; - } - else - { - var updateFile = new UpdateFile(input); - newInfo.Version = updateFile.GetVersion(); - newInfo.DownloadAddress = updateFile.GetUri("dURL"); - newInfo.ChangeLogAddress = updateFile.GetUri("clURL"); -#if false - newInfo.ImageAddress = updateFile.GetUri("imgURL"); - newInfo.ImageLinkAddress = updateFile.GetUri("imgURLLink"); -#endif -#if !PORTABLE - newInfo.CertificateThumbprint = updateFile.GetThumbprint(); -#endif - newInfo.FileName = updateFile.GetFileName(); - newInfo.Checksum = updateFile.GetChecksum(); - newInfo.IsValid = newInfo.CheckIfValid(); - } - - return newInfo; - } - - public bool CheckIfValid() - { - if (string.IsNullOrEmpty(Version.ToString())) - return false; - if (string.IsNullOrEmpty(DownloadAddress.AbsoluteUri)) - return false; - if (string.IsNullOrEmpty(ChangeLogAddress.AbsoluteUri)) - return false; -#if false - if (string.IsNullOrEmpty(ImageAddress.AbsoluteUri)) - return false; - if (string.IsNullOrEmpty(ImageLinkAddress.AbsoluteUri)) - return false; -#endif -#if !PORTABLE - if (string.IsNullOrEmpty(CertificateThumbprint)) - return false; -#endif - if (string.IsNullOrEmpty(FileName)) - return false; - // ReSharper disable once ConvertIfStatementToReturnStatement - if (string.IsNullOrEmpty(Checksum)) - return false; - - return true; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/App/Windows.cs b/mRemoteNG/App/Windows.cs deleted file mode 100644 index a1085cc29..000000000 --- a/mRemoteNG/App/Windows.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using mRemoteNG.UI; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Window; - -namespace mRemoteNG.App -{ - public static class Windows - { - private static ActiveDirectoryImportWindow _adimportForm; - private static ExternalToolsWindow _externalappsForm; - private static PortScanWindow _portscanForm; - private static UltraVNCWindow _ultravncscForm; - private static ConnectionTreeWindow _treeForm; - - internal static ConnectionTreeWindow TreeForm - { - get => _treeForm ?? (_treeForm = new ConnectionTreeWindow()); - set => _treeForm = value; - } - - internal static ConfigWindow ConfigForm { get; set; } = new ConfigWindow(); - internal static ErrorAndInfoWindow ErrorsForm { get; set; } = new ErrorAndInfoWindow(); - private static UpdateWindow UpdateForm { get; set; } = new UpdateWindow(); - internal static SSHTransferWindow SshtransferForm { get; private set; } = new SSHTransferWindow(); - - - public static void Show(WindowType windowType) - { - try - { - var dockPanel = FrmMain.Default.pnlDock; - // ReSharper disable once SwitchStatementMissingSomeCases - switch (windowType) - { - case WindowType.ActiveDirectoryImport: - if (_adimportForm == null || _adimportForm.IsDisposed) - _adimportForm = new ActiveDirectoryImportWindow(); - _adimportForm.Show(dockPanel); - break; - case WindowType.Options: - using (var optionsForm = new FrmOptions()) - { - optionsForm.ShowDialog(dockPanel); - } - - break; - case WindowType.SSHTransfer: - if (SshtransferForm == null || SshtransferForm.IsDisposed) - SshtransferForm = new SSHTransferWindow(); - SshtransferForm.Show(dockPanel); - break; - case WindowType.Update: - if (UpdateForm == null || UpdateForm.IsDisposed) - UpdateForm = new UpdateWindow(); - UpdateForm.Show(dockPanel); - break; - case WindowType.ExternalApps: - if (_externalappsForm == null || _externalappsForm.IsDisposed) - _externalappsForm = new ExternalToolsWindow(); - _externalappsForm.Show(dockPanel); - break; - case WindowType.PortScan: - _portscanForm = new PortScanWindow(); - _portscanForm.Show(dockPanel); - break; - case WindowType.UltraVNCSC: - if (_ultravncscForm == null || _ultravncscForm.IsDisposed) - _ultravncscForm = new UltraVNCWindow(); - _ultravncscForm.Show(dockPanel); - break; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("App.Runtime.Windows.Show() failed.", ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/ConfirmCloseEnum.cs b/mRemoteNG/Config/ConfirmCloseEnum.cs deleted file mode 100644 index ff4e615ee..000000000 --- a/mRemoteNG/Config/ConfirmCloseEnum.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace mRemoteNG.Config -{ - public enum ConfirmCloseEnum - { - Unspecified = 0, - Never = 1, - Exit = 2, - Multiple = 3, - All = 4 - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/ConnectionsBackupFrequencyEnum.cs b/mRemoteNG/Config/Connections/ConnectionsBackupFrequencyEnum.cs deleted file mode 100644 index 03967d3eb..000000000 --- a/mRemoteNG/Config/Connections/ConnectionsBackupFrequencyEnum.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace mRemoteNG.Config.Connections -{ - public enum ConnectionsBackupFrequencyEnum - { - Unassigned = 0, - Never = 1, - OnEdit = 2, - OnExit = 3, - Daily = 4, - Weekly = 5, - Custom = 6 - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/ConnectionsLoadedEventArgs.cs b/mRemoteNG/Config/Connections/ConnectionsLoadedEventArgs.cs deleted file mode 100644 index 3d136faf4..000000000 --- a/mRemoteNG/Config/Connections/ConnectionsLoadedEventArgs.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using mRemoteNG.Tools; -using mRemoteNG.Tree; - -namespace mRemoteNG.Config.Connections -{ - public class ConnectionsLoadedEventArgs : EventArgs - { - /// - /// The previous that is being - /// unloaded. - /// - public Optional PreviousConnectionTreeModel { get; } - - /// - /// True if the previous was loaded from - /// a database. - /// - public bool PreviousSourceWasDatabase { get; } - - /// - /// The new that is being loaded. - /// - public ConnectionTreeModel NewConnectionTreeModel { get; } - - /// - /// True if the new was loaded from - /// a database. - /// - public bool NewSourceIsDatabase { get; } - - /// - /// The path to the new connections source. - /// If is True, this will be the server and database name. - /// If False, it will be a file path to the connection file. - /// - public string NewSourcePath { get; } - - public ConnectionsLoadedEventArgs(Optional previousTreeModelModel, - ConnectionTreeModel newTreeModelModel, - bool previousSourceWasDatabase, - bool newSourceIsDatabase, - string newSourcePath) - { - if (previousTreeModelModel == null) - throw new ArgumentNullException(nameof(previousTreeModelModel)); - if (newTreeModelModel == null) - throw new ArgumentNullException(nameof(newTreeModelModel)); - if (newSourcePath == null) - throw new ArgumentNullException(nameof(newSourcePath)); - - PreviousConnectionTreeModel = previousTreeModelModel; - PreviousSourceWasDatabase = previousSourceWasDatabase; - NewConnectionTreeModel = newTreeModelModel; - NewSourceIsDatabase = newSourceIsDatabase; - NewSourcePath = newSourcePath; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/ConnectionsSavedEventArgs.cs b/mRemoteNG/Config/Connections/ConnectionsSavedEventArgs.cs deleted file mode 100644 index 0522cd7f1..000000000 --- a/mRemoteNG/Config/Connections/ConnectionsSavedEventArgs.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using mRemoteNG.Tree; - -namespace mRemoteNG.Config.Connections -{ - public class ConnectionsSavedEventArgs - { - public ConnectionTreeModel ModelThatWasSaved { get; } - public bool PreviouslyUsingDatabase { get; } - public bool UsingDatabase { get; } - public string ConnectionFileName { get; } - - public ConnectionsSavedEventArgs(ConnectionTreeModel modelThatWasSaved, - bool previouslyUsingDatabase, - bool usingDatabase, - string connectionFileName) - { - if (modelThatWasSaved == null) - throw new ArgumentNullException(nameof(modelThatWasSaved)); - - ModelThatWasSaved = modelThatWasSaved; - PreviouslyUsingDatabase = previouslyUsingDatabase; - UsingDatabase = usingDatabase; - ConnectionFileName = connectionFileName; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/CsvConnectionsSaver.cs b/mRemoteNG/Config/Connections/CsvConnectionsSaver.cs deleted file mode 100644 index 94a94f11d..000000000 --- a/mRemoteNG/Config/Connections/CsvConnectionsSaver.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using mRemoteNG.App; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv; -using mRemoteNG.Security; -using mRemoteNG.Tree; - -namespace mRemoteNG.Config.Connections -{ - public class CsvConnectionsSaver : ISaver - { - private readonly string _connectionFileName; - private readonly SaveFilter _saveFilter; - - public CsvConnectionsSaver(string connectionFileName, SaveFilter saveFilter) - { - if (string.IsNullOrEmpty(connectionFileName)) - throw new ArgumentException($"Argument '{nameof(connectionFileName)}' cannot be null or empty"); - if (saveFilter == null) - throw new ArgumentNullException(nameof(saveFilter)); - - _connectionFileName = connectionFileName; - _saveFilter = saveFilter; - } - - public void Save(ConnectionTreeModel connectionTreeModel, string propertyNameTrigger = "") - { - var csvConnectionsSerializer = - new CsvConnectionsSerializerMremotengFormat(_saveFilter, Runtime.CredentialProviderCatalog); - var dataProvider = new FileDataProvider(_connectionFileName); - var csvContent = csvConnectionsSerializer.Serialize(connectionTreeModel); - dataProvider.Save(csvContent); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/IConnectionsLoader.cs b/mRemoteNG/Config/Connections/IConnectionsLoader.cs deleted file mode 100644 index a4669757d..000000000 --- a/mRemoteNG/Config/Connections/IConnectionsLoader.cs +++ /dev/null @@ -1,9 +0,0 @@ -using mRemoteNG.Tree; - -namespace mRemoteNG.Config.Connections -{ - public interface IConnectionsLoader - { - ConnectionTreeModel Load(); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/Multiuser/ConnectionsUpdateAvailableEventArgs.cs b/mRemoteNG/Config/Connections/Multiuser/ConnectionsUpdateAvailableEventArgs.cs deleted file mode 100644 index 589bd4db2..000000000 --- a/mRemoteNG/Config/Connections/Multiuser/ConnectionsUpdateAvailableEventArgs.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using mRemoteNG.Config.DatabaseConnectors; - -namespace mRemoteNG.Config.Connections.Multiuser -{ - public delegate void - ConnectionsUpdateAvailableEventHandler(object sender, ConnectionsUpdateAvailableEventArgs args); - - public class ConnectionsUpdateAvailableEventArgs : EventArgs - { - public IDatabaseConnector DatabaseConnector { get; private set; } - public DateTime UpdateTime { get; private set; } - public bool Handled { get; set; } - - public ConnectionsUpdateAvailableEventArgs(IDatabaseConnector databaseConnector, DateTime updateTime) - { - if (databaseConnector == null) - throw new ArgumentNullException(nameof(databaseConnector)); - DatabaseConnector = databaseConnector; - UpdateTime = updateTime; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/Multiuser/ConnectionsUpdateCheckFinishedEventArgs.cs b/mRemoteNG/Config/Connections/Multiuser/ConnectionsUpdateCheckFinishedEventArgs.cs deleted file mode 100644 index 71355a9de..000000000 --- a/mRemoteNG/Config/Connections/Multiuser/ConnectionsUpdateCheckFinishedEventArgs.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace mRemoteNG.Config.Connections.Multiuser -{ - public delegate void UpdateCheckFinishedEventHandler(object sender, ConnectionsUpdateCheckFinishedEventArgs args); - - public class ConnectionsUpdateCheckFinishedEventArgs : EventArgs - { - public bool UpdateAvailable { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/Multiuser/IConnectionsUpdateChecker.cs b/mRemoteNG/Config/Connections/Multiuser/IConnectionsUpdateChecker.cs deleted file mode 100644 index ccdc2adb3..000000000 --- a/mRemoteNG/Config/Connections/Multiuser/IConnectionsUpdateChecker.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace mRemoteNG.Config.Connections.Multiuser -{ - public interface IConnectionsUpdateChecker : IDisposable - { - bool IsUpdateAvailable(); - - void IsUpdateAvailableAsync(); - - event EventHandler UpdateCheckStarted; - event UpdateCheckFinishedEventHandler UpdateCheckFinished; - event ConnectionsUpdateAvailableEventHandler ConnectionsUpdateAvailable; - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/Multiuser/RemoteConnectionsSyncronizer.cs b/mRemoteNG/Config/Connections/Multiuser/RemoteConnectionsSyncronizer.cs deleted file mode 100644 index d9c7c9d6f..000000000 --- a/mRemoteNG/Config/Connections/Multiuser/RemoteConnectionsSyncronizer.cs +++ /dev/null @@ -1,93 +0,0 @@ -using mRemoteNG.App; -using System; -using System.Timers; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Config.Connections.Multiuser -{ - public class RemoteConnectionsSyncronizer : IConnectionsUpdateChecker - { - private readonly System.Timers.Timer _updateTimer; - private readonly IConnectionsUpdateChecker _updateChecker; - - public double TimerIntervalInMilliseconds - { - get { return _updateTimer.Interval; } - } - - public RemoteConnectionsSyncronizer(IConnectionsUpdateChecker updateChecker) - { - _updateChecker = updateChecker; - _updateTimer = new System.Timers.Timer(3000); - SetEventListeners(); - } - - private void SetEventListeners() - { - _updateChecker.UpdateCheckStarted += OnUpdateCheckStarted; - _updateChecker.UpdateCheckFinished += OnUpdateCheckFinished; - _updateChecker.ConnectionsUpdateAvailable += - (sender, args) => ConnectionsUpdateAvailable?.Invoke(sender, args); - _updateTimer.Elapsed += (sender, args) => _updateChecker.IsUpdateAvailableAsync(); - ConnectionsUpdateAvailable += Load; - } - - private void Load(object sender, ConnectionsUpdateAvailableEventArgs args) - { - Runtime.ConnectionsService.LoadConnections(true, false, ""); - args.Handled = true; - } - - public void Enable() - { - _updateTimer.Start(); - } - - public void Disable() - { - _updateTimer.Stop(); - } - - public bool IsUpdateAvailable() - { - return _updateChecker.IsUpdateAvailable(); - } - - public void IsUpdateAvailableAsync() - { - _updateChecker.IsUpdateAvailableAsync(); - } - - - private void OnUpdateCheckStarted(object sender, EventArgs eventArgs) - { - _updateTimer.Stop(); - UpdateCheckStarted?.Invoke(sender, eventArgs); - } - - private void OnUpdateCheckFinished(object sender, ConnectionsUpdateCheckFinishedEventArgs eventArgs) - { - _updateTimer.Start(); - UpdateCheckFinished?.Invoke(sender, eventArgs); - } - - public event EventHandler UpdateCheckStarted; - public event UpdateCheckFinishedEventHandler UpdateCheckFinished; - public event ConnectionsUpdateAvailableEventHandler ConnectionsUpdateAvailable; - - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - private void Dispose(bool itIsSafeToAlsoFreeManagedObjects) - { - if (!itIsSafeToAlsoFreeManagedObjects) return; - _updateTimer.Dispose(); - _updateChecker.Dispose(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/Multiuser/SqlConnectionsUpdateChecker.cs b/mRemoteNG/Config/Connections/Multiuser/SqlConnectionsUpdateChecker.cs deleted file mode 100644 index 5ae462a4f..000000000 --- a/mRemoteNG/Config/Connections/Multiuser/SqlConnectionsUpdateChecker.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Data; -using System.Data.Common; -using System.Threading; -using mRemoteNG.App; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; - -namespace mRemoteNG.Config.Connections.Multiuser -{ - public class SqlConnectionsUpdateChecker : IConnectionsUpdateChecker - { - private readonly IDatabaseConnector _dbConnector; - private readonly DbCommand _dbQuery; - private DateTime LastUpdateTime => Runtime.ConnectionsService.LastSqlUpdate; - private DateTime _lastDatabaseUpdateTime; - - - public SqlConnectionsUpdateChecker() - { - _dbConnector = DatabaseConnectorFactory.DatabaseConnectorFromSettings(); - _dbQuery = _dbConnector.DbCommand("SELECT * FROM tblUpdate"); - _lastDatabaseUpdateTime = default(DateTime); - } - - public bool IsUpdateAvailable() - { - RaiseUpdateCheckStartedEvent(); - ConnectToSqlDb(); - var updateIsAvailable = DatabaseIsMoreUpToDateThanUs(); - if (updateIsAvailable) - RaiseConnectionsUpdateAvailableEvent(); - RaiseUpdateCheckFinishedEvent(updateIsAvailable); - return updateIsAvailable; - } - - public void IsUpdateAvailableAsync() - { - var thread = new Thread(() => IsUpdateAvailable()); - thread.SetApartmentState(ApartmentState.STA); - thread.Start(); - } - - private void ConnectToSqlDb() - { - try - { - _dbConnector.Connect(); - } - catch (Exception e) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "Unable to connect to Sql DB to check for updates." + - Environment.NewLine + e.Message, true); - } - } - - private bool DatabaseIsMoreUpToDateThanUs() - { - var lastUpdateInDb = GetLastUpdateTimeFromDbResponse(); - var amTheLastoneUpdated = CheckIfIAmTheLastOneUpdated(lastUpdateInDb); - return (lastUpdateInDb > LastUpdateTime && !amTheLastoneUpdated); - } - - private bool CheckIfIAmTheLastOneUpdated(DateTime lastUpdateInDb) - { - DateTime lastSqlUpdateWithoutMilliseconds = - new DateTime(LastUpdateTime.Ticks - (LastUpdateTime.Ticks % TimeSpan.TicksPerSecond), - LastUpdateTime.Kind); - return lastUpdateInDb == lastSqlUpdateWithoutMilliseconds; - } - - private DateTime GetLastUpdateTimeFromDbResponse() - { - var lastUpdateInDb = default(DateTime); - try - { - var sqlReader = _dbQuery.ExecuteReader(CommandBehavior.CloseConnection); - sqlReader.Read(); - if (sqlReader.HasRows) - lastUpdateInDb = Convert.ToDateTime(sqlReader["LastUpdate"]); - sqlReader.Close(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "Error executing Sql query to get updates from the DB." + - Environment.NewLine + ex.Message, true); - } - - _lastDatabaseUpdateTime = lastUpdateInDb; - return lastUpdateInDb; - } - - - public event EventHandler UpdateCheckStarted; - - private void RaiseUpdateCheckStartedEvent() - { - UpdateCheckStarted?.Invoke(this, EventArgs.Empty); - } - - public event UpdateCheckFinishedEventHandler UpdateCheckFinished; - - private void RaiseUpdateCheckFinishedEvent(bool updateAvailable) - { - var args = new ConnectionsUpdateCheckFinishedEventArgs {UpdateAvailable = updateAvailable}; - UpdateCheckFinished?.Invoke(this, args); - } - - public event ConnectionsUpdateAvailableEventHandler ConnectionsUpdateAvailable; - - private void RaiseConnectionsUpdateAvailableEvent() - { - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Remote connection update is available"); - var args = new ConnectionsUpdateAvailableEventArgs(_dbConnector, _lastDatabaseUpdateTime); - ConnectionsUpdateAvailable?.Invoke(this, args); - } - - public void Dispose() - { - Dispose(true); - } - - private void Dispose(bool itIsSafeToDisposeManagedObjects) - { - if (!itIsSafeToDisposeManagedObjects) return; - _dbConnector.Disconnect(); - _dbConnector.Dispose(); - _dbQuery.Dispose(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/SaveConnectionsOnEdit.cs b/mRemoteNG/Config/Connections/SaveConnectionsOnEdit.cs deleted file mode 100644 index 168d42c99..000000000 --- a/mRemoteNG/Config/Connections/SaveConnectionsOnEdit.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections.Specialized; -using System.ComponentModel; -using mRemoteNG.Connection; -using mRemoteNG.UI.Forms; -using mRemoteNG.Properties; - -namespace mRemoteNG.Config.Connections -{ - public class SaveConnectionsOnEdit - { - private readonly ConnectionsService _connectionsService; - - public SaveConnectionsOnEdit(ConnectionsService connectionsService) - { - if (connectionsService == null) - throw new ArgumentNullException(nameof(connectionsService)); - - _connectionsService = connectionsService; - connectionsService.ConnectionsLoaded += ConnectionsServiceOnConnectionsLoaded; - } - - private void ConnectionsServiceOnConnectionsLoaded(object sender, - ConnectionsLoadedEventArgs connectionsLoadedEventArgs) - { - connectionsLoadedEventArgs.NewConnectionTreeModel.CollectionChanged += - ConnectionTreeModelOnCollectionChanged; - connectionsLoadedEventArgs.NewConnectionTreeModel.PropertyChanged += ConnectionTreeModelOnPropertyChanged; - - foreach (var oldTree in connectionsLoadedEventArgs.PreviousConnectionTreeModel) - { - oldTree.CollectionChanged -= ConnectionTreeModelOnCollectionChanged; - oldTree.PropertyChanged -= ConnectionTreeModelOnPropertyChanged; - } - } - - private void ConnectionTreeModelOnPropertyChanged(object sender, - PropertyChangedEventArgs propertyChangedEventArgs) - { - SaveConnectionOnEdit(propertyChangedEventArgs.PropertyName); - } - - private void ConnectionTreeModelOnCollectionChanged(object sender, - NotifyCollectionChangedEventArgs - notifyCollectionChangedEventArgs) - { - SaveConnectionOnEdit(); - } - - private void SaveConnectionOnEdit(string propertyName = "") - { - //OBSOLETE: mRemoteNG.Settings.Default.SaveConnectionsAfterEveryEdit is obsolete and should be removed in a future release - if (mRemoteNG.Properties.Settings.Default.SaveConnectionsAfterEveryEdit || (mRemoteNG.Properties.Settings.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnEdit)) - { - if (FrmMain.Default.IsClosing) - return; - - _connectionsService.SaveConnectionsAsync(propertyName); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/SaveFormat.cs b/mRemoteNG/Config/Connections/SaveFormat.cs deleted file mode 100644 index fa577f417..000000000 --- a/mRemoteNG/Config/Connections/SaveFormat.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace mRemoteNG.Config.Connections -{ - public enum SaveFormat - { - None, - mRXML, - mRCSV, - SQL - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/SqlConnectionsLoader.cs b/mRemoteNG/Config/Connections/SqlConnectionsLoader.cs deleted file mode 100644 index 29701d7be..000000000 --- a/mRemoteNG/Config/Connections/SqlConnectionsLoader.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers; -using mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql; -using mRemoteNG.Config.Serializers.Versioning; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Security.Authentication; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Connections -{ - public class SqlConnectionsLoader : IConnectionsLoader - { - private readonly IDeserializer> - _localConnectionPropertiesDeserializer; - - private readonly IDataProvider _dataProvider; - - public Func> AuthenticationRequestor { get; set; } = - () => MiscTools.PasswordDialog("", false); - - public SqlConnectionsLoader( - IDeserializer> localConnectionPropertiesDeserializer, - IDataProvider dataProvider) - { - _localConnectionPropertiesDeserializer = - localConnectionPropertiesDeserializer.ThrowIfNull(nameof(localConnectionPropertiesDeserializer)); - _dataProvider = dataProvider.ThrowIfNull(nameof(dataProvider)); - } - - public ConnectionTreeModel Load() - { - var connector = DatabaseConnectorFactory.DatabaseConnectorFromSettings(); - var dataProvider = new SqlDataProvider(connector); - var metaDataRetriever = new SqlDatabaseMetaDataRetriever(); - var databaseVersionVerifier = new SqlDatabaseVersionVerifier(connector); - var cryptoProvider = new LegacyRijndaelCryptographyProvider(); - - var metaData = metaDataRetriever.GetDatabaseMetaData(connector) ?? - HandleFirstRun(metaDataRetriever, connector); - var decryptionKey = GetDecryptionKey(metaData); - - if (!decryptionKey.Any()) - throw new Exception("Could not load SQL connections"); - - databaseVersionVerifier.VerifyDatabaseVersion(metaData.ConfVersion); - var dataTable = dataProvider.Load(); - var deserializer = new DataTableDeserializer(cryptoProvider, decryptionKey.First()); - var connectionTree = deserializer.Deserialize(dataTable); - ApplyLocalConnectionProperties(connectionTree.RootNodes.First(i => i is RootNodeInfo)); - return connectionTree; - } - - private Optional GetDecryptionKey(SqlConnectionListMetaData metaData) - { - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - var cipherText = metaData.Protected; - var authenticator = new PasswordAuthenticator(cryptographyProvider, cipherText, AuthenticationRequestor); - var authenticated = - authenticator.Authenticate(new RootNodeInfo(RootNodeType.Connection).DefaultPassword - .ConvertToSecureString()); - - if (authenticated) - return authenticator.LastAuthenticatedPassword; - return Optional.Empty; - } - - private void ApplyLocalConnectionProperties(ContainerInfo rootNode) - { - var localPropertiesXml = _dataProvider.Load(); - var localConnectionProperties = _localConnectionPropertiesDeserializer.Deserialize(localPropertiesXml); - - rootNode - .GetRecursiveChildList() - .Join(localConnectionProperties, - con => con.ConstantID, - locals => locals.ConnectionId, - (con, locals) => new {Connection = con, LocalProperties = locals}) - .ForEach(x => - { - x.Connection.PleaseConnect = x.LocalProperties.Connected; - x.Connection.Favorite = x.LocalProperties.Favorite; - if (x.Connection is ContainerInfo container) - container.IsExpanded = x.LocalProperties.Expanded; - }); - } - - private SqlConnectionListMetaData HandleFirstRun(SqlDatabaseMetaDataRetriever metaDataRetriever, IDatabaseConnector connector) - { - metaDataRetriever.WriteDatabaseMetaData(new RootNodeInfo(RootNodeType.Connection), connector); - return metaDataRetriever.GetDatabaseMetaData(connector); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/SqlConnectionsSaver.cs b/mRemoteNG/Config/Connections/SqlConnectionsSaver.cs deleted file mode 100644 index 4be3dce94..000000000 --- a/mRemoteNG/Config/Connections/SqlConnectionsSaver.cs +++ /dev/null @@ -1,184 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers; -using mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql; -using mRemoteNG.Config.Serializers.Versioning; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Messages; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Config.Connections -{ - public class SqlConnectionsSaver : ISaver - { - private readonly SaveFilter _saveFilter; - private readonly ISerializer, string> _localPropertiesSerializer; - private readonly IDataProvider _dataProvider; - - public SqlConnectionsSaver(SaveFilter saveFilter, - ISerializer, string> - localPropertieSerializer, - IDataProvider localPropertiesDataProvider) - { - if (saveFilter == null) - throw new ArgumentNullException(nameof(saveFilter)); - _saveFilter = saveFilter; - _localPropertiesSerializer = localPropertieSerializer.ThrowIfNull(nameof(localPropertieSerializer)); - _dataProvider = localPropertiesDataProvider.ThrowIfNull(nameof(localPropertiesDataProvider)); - } - - public void Save(ConnectionTreeModel connectionTreeModel, string propertyNameTrigger = "") - { - var rootTreeNode = connectionTreeModel.RootNodes.OfType().First(); - - UpdateLocalConnectionProperties(rootTreeNode); - - if (PropertyIsLocalOnly(propertyNameTrigger)) - { - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - $"Property {propertyNameTrigger} is local only. Not saving to database."); - return; - } - - if (SqlUserIsReadOnly()) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Trying to save connection tree but the SQL read only checkbox is checked, aborting!"); - return; - } - - using (var dbConnector = DatabaseConnectorFactory.DatabaseConnectorFromSettings()) - { - dbConnector.Connect(); - var databaseVersionVerifier = new SqlDatabaseVersionVerifier(dbConnector); - var metaDataRetriever = new SqlDatabaseMetaDataRetriever(); - var metaData = metaDataRetriever.GetDatabaseMetaData(dbConnector); - - if (!databaseVersionVerifier.VerifyDatabaseVersion(metaData.ConfVersion)) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ErrorConnectionListSaveFailed); - return; - } - - metaDataRetriever.WriteDatabaseMetaData(rootTreeNode, dbConnector); - UpdateConnectionsTable(rootTreeNode, dbConnector); - UpdateUpdatesTable(dbConnector); - - } - - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Saved connections to database"); - } - - /// - /// Determines if a given property name should be only saved - /// locally. - /// - /// - /// The name of the property that triggered the save event - /// - /// - private bool PropertyIsLocalOnly(string property) - { - return property == nameof(ConnectionInfo.OpenConnections) || - property == nameof(ContainerInfo.IsExpanded) || - property == nameof(ContainerInfo.Favorite); - } - - private void UpdateLocalConnectionProperties(ContainerInfo rootNode) - { - var a = rootNode.GetRecursiveChildList().Select(info => new LocalConnectionPropertiesModel - { - ConnectionId = info.ConstantID, - Connected = info.OpenConnections.Count > 0, - Expanded = info is ContainerInfo c && c.IsExpanded, - Favorite = info.Favorite, - }); - - var serializedProperties = _localPropertiesSerializer.Serialize(a); - _dataProvider.Save(serializedProperties); - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Saved local connection properties"); - } - - private void UpdateRootNodeTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector) - { - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - string strProtected; - if (rootTreeNode != null) - { - if (rootTreeNode.Password) - { - var password = rootTreeNode.PasswordString.ConvertToSecureString(); - strProtected = cryptographyProvider.Encrypt("ThisIsProtected", password); - } - else - { - strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey); - } - } - else - { - strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey); - } - - var dbQuery = databaseConnector.DbCommand("DELETE FROM tblRoot"); - dbQuery.ExecuteNonQuery(); - - if (rootTreeNode != null) - { - dbQuery = - databaseConnector.DbCommand( - "INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES('" + - MiscTools.PrepareValueForDB(rootTreeNode.Name) + "', 0, '" + strProtected + "','" + - ConnectionsFileInfo.ConnectionFileVersion.ToString() + "')"); - dbQuery.ExecuteNonQuery(); - } - else - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - $"UpdateRootNodeTable: rootTreeNode was null. Could not insert!"); - } - } - - private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector) - { - var dataProvider = new SqlDataProvider(databaseConnector); - var currentDataTable = dataProvider.Load(); - - var cryptoProvider = new LegacyRijndaelCryptographyProvider(); - var serializer = new DataTableSerializer(_saveFilter, cryptoProvider, - rootTreeNode.PasswordString.ConvertToSecureString()); - serializer.SetSourceDataTable(currentDataTable); - var dataTable = serializer.Serialize(rootTreeNode); - //var dbQuery = databaseConnector.DbCommand("DELETE FROM tblCons"); - //dbQuery.ExecuteNonQuery(); - - dataProvider.Save(dataTable); - } - - private void UpdateUpdatesTable(IDatabaseConnector databaseConnector) - { - var dbQuery = databaseConnector.DbCommand("DELETE FROM tblUpdate"); - dbQuery.ExecuteNonQuery(); - dbQuery = databaseConnector.DbCommand("INSERT INTO tblUpdate (LastUpdate) VALUES('" + MiscTools.DBDate(DateTime.Now) + "')"); - dbQuery.ExecuteNonQuery(); - } - - private bool SqlUserIsReadOnly() - { - return Properties.Settings.Default.SQLReadOnly; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/XmlConnectionsLoader.cs b/mRemoteNG/Config/Connections/XmlConnectionsLoader.cs deleted file mode 100644 index b1e3bf5fd..000000000 --- a/mRemoteNG/Config/Connections/XmlConnectionsLoader.cs +++ /dev/null @@ -1,40 +0,0 @@ -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using System; -using System.IO; -using System.Security; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; - -namespace mRemoteNG.Config.Connections -{ - public class XmlConnectionsLoader : IConnectionsLoader - { - private readonly string _connectionFilePath; - - public XmlConnectionsLoader(string connectionFilePath) - { - if (string.IsNullOrEmpty(connectionFilePath)) - throw new ArgumentException($"{nameof(connectionFilePath)} cannot be null or empty"); - - if (!File.Exists(connectionFilePath)) - throw new FileNotFoundException($"{connectionFilePath} does not exist"); - - _connectionFilePath = connectionFilePath; - } - - public ConnectionTreeModel Load() - { - var dataProvider = new FileDataProvider(_connectionFilePath); - var xmlString = dataProvider.Load(); - var deserializer = new XmlConnectionsDeserializer(PromptForPassword); - return deserializer.Deserialize(xmlString); - } - - private Optional PromptForPassword() - { - var password = MiscTools.PasswordDialog(Path.GetFileName(_connectionFilePath), false); - return password; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Connections/XmlConnectionsSaver.cs b/mRemoteNG/Config/Connections/XmlConnectionsSaver.cs deleted file mode 100644 index 003658077..000000000 --- a/mRemoteNG/Config/Connections/XmlConnectionsSaver.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Linq; -using mRemoteNG.App; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Connections -{ - public class XmlConnectionsSaver : ISaver - { - private readonly string _connectionFileName; - private readonly SaveFilter _saveFilter; - - public XmlConnectionsSaver(string connectionFileName, SaveFilter saveFilter) - { - if (string.IsNullOrEmpty(connectionFileName)) - throw new ArgumentException($"Argument '{nameof(connectionFileName)}' cannot be null or empty"); - if (saveFilter == null) - throw new ArgumentNullException(nameof(saveFilter)); - - _connectionFileName = connectionFileName; - _saveFilter = saveFilter; - } - - public void Save(ConnectionTreeModel connectionTreeModel, string propertyNameTrigger = "") - { - try - { - var cryptographyProvider = new CryptoProviderFactoryFromSettings().Build(); - var serializerFactory = new XmlConnectionSerializerFactory(); - - var xmlConnectionsSerializer = serializerFactory.Build( - cryptographyProvider, - connectionTreeModel, - _saveFilter, - Properties.Settings.Default.EncryptCompleteConnectionsFile); - - var rootNode = connectionTreeModel.RootNodes.OfType().First(); - var xml = xmlConnectionsSerializer.Serialize(rootNode); - - var fileDataProvider = new FileDataProviderWithRollingBackup(_connectionFileName); - fileDataProvider.Save(xml); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionStackTrace("SaveToXml failed", ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/CredentialHarvester.cs b/mRemoteNG/Config/CredentialHarvester.cs deleted file mode 100644 index c1e19c429..000000000 --- a/mRemoteNG/Config/CredentialHarvester.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security; -using System.Xml.Linq; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; - -namespace mRemoteNG.Config -{ - public class CredentialHarvester - { - private readonly IEqualityComparer _credentialComparer = new CredentialDomainUserComparer(); - - // maps a connectioninfo (by its id) to the credential object that was harvested - public Dictionary ConnectionToCredentialMap { get; } = - new Dictionary(); - - public IEnumerable Harvest(XDocument xDocument, SecureString decryptionKey) - { - if (xDocument == null) - throw new ArgumentNullException(nameof(xDocument)); - - var cryptoProvider = new CryptoProviderFactoryFromXml(xDocument.Root).Build(); - - foreach (var element in xDocument.Descendants("Node")) - { - if (!EntryHasSomeCredentialData(element)) continue; - var newCredential = BuildCredential(element, cryptoProvider, decryptionKey); - - Guid connectionId; - Guid.TryParse(element.Attribute("Id")?.Value, out connectionId); - if (connectionId == Guid.Empty) - { - //error - } - - if (ConnectionToCredentialMap.Values.Contains(newCredential, _credentialComparer)) - { - var existingCredential = - ConnectionToCredentialMap.Values.First(record => - _credentialComparer.Equals(newCredential, record)); - ConnectionToCredentialMap.Add(connectionId, existingCredential); - } - else - ConnectionToCredentialMap.Add(connectionId, newCredential); - } - - return ConnectionToCredentialMap.Values.Distinct(_credentialComparer); - } - - private ICredentialRecord BuildCredential(XElement element, - ICryptographyProvider cryptographyProvider, - SecureString decryptionKey) - { - var credential = new CredentialRecord - { - Title = $"{element.Attribute("Username")?.Value}\\{element.Attribute("Domain")?.Value}", - Username = element.Attribute("Username")?.Value, - Domain = element.Attribute("Domain")?.Value, - Password = cryptographyProvider.Decrypt(element.Attribute("Password")?.Value, decryptionKey) - .ConvertToSecureString() - }; - return credential; - } - - private static bool EntryHasSomeCredentialData(XElement e) - { - return e.Attribute("Username")?.Value != "" || - e.Attribute("Domain")?.Value != "" || - e.Attribute("Password")?.Value != ""; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/CredentialRecordLoader.cs b/mRemoteNG/Config/CredentialRecordLoader.cs deleted file mode 100644 index f74525bdd..000000000 --- a/mRemoteNG/Config/CredentialRecordLoader.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers; -using mRemoteNG.Credential; - - -namespace mRemoteNG.Config -{ - public class CredentialRecordLoader - { - private readonly IDataProvider _dataProvider; - private readonly ISecureDeserializer> _deserializer; - - public CredentialRecordLoader(IDataProvider dataProvider, - ISecureDeserializer> deserializer) - { - if (dataProvider == null) - throw new ArgumentNullException(nameof(dataProvider)); - if (deserializer == null) - throw new ArgumentNullException(nameof(deserializer)); - - _dataProvider = dataProvider; - _deserializer = deserializer; - } - - public IEnumerable Load(SecureString key) - { - var serializedCredentials = _dataProvider.Load(); - return _deserializer.Deserialize(serializedCredentials, key); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/CredentialRecordSaver.cs b/mRemoteNG/Config/CredentialRecordSaver.cs deleted file mode 100644 index 5f7d70ae9..000000000 --- a/mRemoteNG/Config/CredentialRecordSaver.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers; -using mRemoteNG.Credential; - - -namespace mRemoteNG.Config -{ - public class CredentialRecordSaver - { - private readonly IDataProvider _dataProvider; - private readonly ISecureSerializer, string> _serializer; - - public CredentialRecordSaver(IDataProvider dataProvider, - ISecureSerializer, string> serializer) - { - if (dataProvider == null) - throw new ArgumentNullException(nameof(dataProvider)); - if (serializer == null) - throw new ArgumentNullException(nameof(serializer)); - - _dataProvider = dataProvider; - _serializer = serializer; - } - - public void Save(IEnumerable credentialRecords, SecureString key) - { - var serializedCredentials = _serializer.Serialize(credentialRecords, key); - _dataProvider.Save(serializedCredentials); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/CredentialRepositoryListLoader.cs b/mRemoteNG/Config/CredentialRepositoryListLoader.cs deleted file mode 100644 index be0bd72f2..000000000 --- a/mRemoteNG/Config/CredentialRepositoryListLoader.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.CredentialProviderSerializer; -using mRemoteNG.Credential; - -namespace mRemoteNG.Config -{ - public class CredentialRepositoryListLoader : ILoader> - { - private readonly IDataProvider _dataProvider; - private readonly CredentialRepositoryListDeserializer _deserializer; - - public CredentialRepositoryListLoader(IDataProvider dataProvider, - CredentialRepositoryListDeserializer deserializer) - { - if (dataProvider == null) - throw new ArgumentNullException(nameof(dataProvider)); - if (deserializer == null) - throw new ArgumentNullException(nameof(deserializer)); - - _dataProvider = dataProvider; - _deserializer = deserializer; - } - - public IEnumerable Load() - { - var data = _dataProvider.Load(); - return _deserializer.Deserialize(data); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/CredentialRepositoryListSaver.cs b/mRemoteNG/Config/CredentialRepositoryListSaver.cs deleted file mode 100644 index 6a4a549d7..000000000 --- a/mRemoteNG/Config/CredentialRepositoryListSaver.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.CredentialProviderSerializer; -using mRemoteNG.Credential; - -namespace mRemoteNG.Config -{ - public class CredentialRepositoryListSaver : ISaver> - { - private readonly IDataProvider _dataProvider; - - public CredentialRepositoryListSaver(IDataProvider dataProvider) - { - if (dataProvider == null) - throw new ArgumentNullException(nameof(dataProvider)); - - _dataProvider = dataProvider; - } - - public void Save(IEnumerable repositories, string propertyNameTrigger = "") - { - var serializer = new CredentialRepositoryListSerializer(); - var data = serializer.Serialize(repositories); - _dataProvider.Save(data); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DataProviders/FileBackupCreator.cs b/mRemoteNG/Config/DataProviders/FileBackupCreator.cs deleted file mode 100644 index 57c9fbefe..000000000 --- a/mRemoteNG/Config/DataProviders/FileBackupCreator.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.IO; -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Config.DataProviders -{ - public class FileBackupCreator - { - public void CreateBackupFile(string fileName) - { - try - { - if (WeDontNeedToBackup(fileName)) - return; - - var backupFileName = - string.Format(Properties.Settings.Default.BackupFileNameFormat, fileName, DateTime.Now); - File.Copy(fileName, backupFileName); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.ConnectionsFileBackupFailed, ex, - MessageClass.WarningMsg); - throw; - } - } - - private bool WeDontNeedToBackup(string filePath) - { - return FeatureIsTurnedOff() || FileDoesntExist(filePath); - } - - private bool FileDoesntExist(string filePath) - { - return !File.Exists(filePath); - } - - private bool FeatureIsTurnedOff() - { - return Properties.Settings.Default.BackupFileKeepCount == 0; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DataProviders/FileBackupPruner.cs b/mRemoteNG/Config/DataProviders/FileBackupPruner.cs deleted file mode 100644 index eeec7873a..000000000 --- a/mRemoteNG/Config/DataProviders/FileBackupPruner.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.IO; -using System.Linq; - -namespace mRemoteNG.Config.DataProviders -{ - public class FileBackupPruner - { - public void PruneBackupFiles(string filePath, int maxBackupsToKeep) - { - var fileName = Path.GetFileName(filePath); - var directoryName = Path.GetDirectoryName(filePath); - - if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(directoryName)) - return; - - var searchPattern = string.Format(Properties.Settings.Default.BackupFileNameFormat, fileName, "*"); - var files = Directory.GetFiles(directoryName, searchPattern); - - if (files.Length <= maxBackupsToKeep) - return; - - var filesToDelete = files - .OrderByDescending(s => s) - .Skip(maxBackupsToKeep); - - foreach (var file in filesToDelete) - { - File.Delete(file); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DataProviders/FileDataProvider.cs b/mRemoteNG/Config/DataProviders/FileDataProvider.cs deleted file mode 100644 index 093f81054..000000000 --- a/mRemoteNG/Config/DataProviders/FileDataProvider.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.IO; -using mRemoteNG.App; - -namespace mRemoteNG.Config.DataProviders -{ - public class FileDataProvider : IDataProvider - { - public string FilePath { get; set; } - - public FileDataProvider(string filePath) - { - FilePath = filePath; - } - - public virtual string Load() - { - var fileContents = ""; - try - { - fileContents = File.ReadAllText(FilePath); - } - catch (FileNotFoundException ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - $"Could not load file. File does not exist '{FilePath}'", - ex); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace($"Failed to load file {FilePath}", ex); - } - - return fileContents; - } - - public virtual void Save(string content) - { - try - { - CreateMissingDirectories(); - File.WriteAllText(FilePath, content); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace($"Failed to save file {FilePath}", ex); - } - } - - public virtual void MoveTo(string newPath) - { - try - { - File.Move(FilePath, newPath); - FilePath = newPath; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace($"Failed to move file {FilePath} to {newPath}", ex); - } - } - - private void CreateMissingDirectories() - { - var dirname = Path.GetDirectoryName(FilePath); - if (dirname == null) return; - Directory.CreateDirectory(dirname); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DataProviders/FileDataProviderWithRollingBackup.cs b/mRemoteNG/Config/DataProviders/FileDataProviderWithRollingBackup.cs deleted file mode 100644 index 74b3a3807..000000000 --- a/mRemoteNG/Config/DataProviders/FileDataProviderWithRollingBackup.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace mRemoteNG.Config.DataProviders -{ - public class FileDataProviderWithRollingBackup : FileDataProvider - { - private readonly FileBackupCreator _fileBackupCreator; - - public FileDataProviderWithRollingBackup(string filePath) : base(filePath) - { - _fileBackupCreator = new FileBackupCreator(); - } - - public override void Save(string content) - { - _fileBackupCreator.CreateBackupFile(FilePath); - base.Save(content); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DataProviders/IDataProvider.cs b/mRemoteNG/Config/DataProviders/IDataProvider.cs deleted file mode 100644 index b6e529886..000000000 --- a/mRemoteNG/Config/DataProviders/IDataProvider.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace mRemoteNG.Config.DataProviders -{ - public interface IDataProvider - { - TFormat Load(); - - void Save(TFormat contents); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DataProviders/InMemoryStringDataProvider.cs b/mRemoteNG/Config/DataProviders/InMemoryStringDataProvider.cs deleted file mode 100644 index fa0e16ba7..000000000 --- a/mRemoteNG/Config/DataProviders/InMemoryStringDataProvider.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace mRemoteNG.Config.DataProviders -{ - public class InMemoryStringDataProvider : IDataProvider - { - private string _contents; - - public InMemoryStringDataProvider(string initialContents = "") - { - _contents = initialContents; - } - - public string Load() - { - return _contents; - } - - public void Save(string contents) - { - _contents = contents; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DataProviders/SqlDataProvider.cs b/mRemoteNG/Config/DataProviders/SqlDataProvider.cs deleted file mode 100644 index 2bb27d990..000000000 --- a/mRemoteNG/Config/DataProviders/SqlDataProvider.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System.Data; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using mRemoteNG.App; -using MySql.Data.MySqlClient; -using System.Data.SqlClient; - -namespace mRemoteNG.Config.DataProviders -{ - public class SqlDataProvider : IDataProvider - { - public IDatabaseConnector DatabaseConnector { get; } - - public SqlDataProvider(IDatabaseConnector databaseConnector) - { - DatabaseConnector = databaseConnector; - } - - public DataTable Load() - { - var dataTable = new DataTable(); - var dbQuery = DatabaseConnector.DbCommand("SELECT * FROM tblCons ORDER BY PositionID ASC"); - DatabaseConnector.AssociateItemToThisConnector(dbQuery); - if (!DatabaseConnector.IsConnected) - OpenConnection(); - var dbDataReader = dbQuery.ExecuteReader(CommandBehavior.CloseConnection); - - if (dbDataReader.HasRows) - dataTable.Load(dbDataReader); - dbDataReader.Close(); - return dataTable; - } - - public void Save(DataTable dataTable) - { - if (DbUserIsReadOnly()) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Trying to save connections but the SQL read only checkbox is checked, aborting!"); - return; - } - - if (!DatabaseConnector.IsConnected) - OpenConnection(); - if (DatabaseConnector.GetType() == typeof(MSSqlDatabaseConnector)) - { - SqlConnection sqlConnection = (SqlConnection)DatabaseConnector.DbConnection(); - using (SqlTransaction transaction = sqlConnection.BeginTransaction(System.Data.IsolationLevel.Serializable)) - { - using (SqlCommand sqlCommand = new SqlCommand()) - { - sqlCommand.Connection = sqlConnection; - sqlCommand.Transaction = transaction; - sqlCommand.CommandText = "SELECT * FROM tblCons"; - using (SqlDataAdapter dataAdpater = new SqlDataAdapter()) - { - dataAdpater.SelectCommand = sqlCommand; - - SqlCommandBuilder builder = new SqlCommandBuilder(dataAdpater); - // Avoid optimistic concurrency, check if it is necessary. - builder.ConflictOption = ConflictOption.OverwriteChanges; - - dataAdpater.UpdateCommand = builder.GetUpdateCommand(); - - dataAdpater.DeleteCommand = builder.GetDeleteCommand(); - dataAdpater.InsertCommand = builder.GetInsertCommand(); - - dataAdpater.Update(dataTable); - transaction.Commit(); - } - } - } - - } - else if (DatabaseConnector.GetType() == typeof(MySqlDatabaseConnector)) - { - var dbConnection = (MySqlConnection) DatabaseConnector.DbConnection(); - using (MySqlTransaction transaction = dbConnection.BeginTransaction(System.Data.IsolationLevel.Serializable)) - { - using (MySqlCommand sqlCommand = new MySqlCommand()) - { - sqlCommand.Connection = dbConnection; - sqlCommand.Transaction = transaction; - sqlCommand.CommandText = "SELECT * FROM tblCons"; - using (MySqlDataAdapter dataAdapter = new MySqlDataAdapter(sqlCommand)) - { - dataAdapter.UpdateBatchSize = 1000; - using (MySqlCommandBuilder cb = new MySqlCommandBuilder(dataAdapter)) - { - dataAdapter.Update(dataTable); - transaction.Commit(); - } - } - } - } - } - } - - public void OpenConnection() - { - DatabaseConnector.Connect(); - } - - public void CloseConnection() - { - DatabaseConnector.Disconnect(); - } - - private bool DbUserIsReadOnly() - { - return Properties.Settings.Default.SQLReadOnly; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DatabaseConnectors/ConnectionTestResult.cs b/mRemoteNG/Config/DatabaseConnectors/ConnectionTestResult.cs deleted file mode 100644 index 23bcbbb5d..000000000 --- a/mRemoteNG/Config/DatabaseConnectors/ConnectionTestResult.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace mRemoteNG.Config.DatabaseConnectors -{ - public enum ConnectionTestResult - { - ConnectionSucceded, - ServerNotAccessible, - UnknownDatabase, - CredentialsRejected, - UnknownError - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DatabaseConnectors/DatabaseConnectionTester.cs b/mRemoteNG/Config/DatabaseConnectors/DatabaseConnectionTester.cs deleted file mode 100644 index 2fd6b21df..000000000 --- a/mRemoteNG/Config/DatabaseConnectors/DatabaseConnectionTester.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Data.SqlClient; -using System.Threading.Tasks; - -namespace mRemoteNG.Config.DatabaseConnectors -{ - /// - /// A helper class for testing database connectivity - /// - public class DatabaseConnectionTester - { - public async Task TestConnectivity(string type, - string server, - string database, - string username, - string password) - { - using (var dbConnector = DatabaseConnectorFactory.DatabaseConnector(type, server, database, username, password)) - { - try - { - await dbConnector.ConnectAsync(); - return ConnectionTestResult.ConnectionSucceded; - } - catch (SqlException sqlException) - { - if (sqlException.Message.Contains("The server was not found")) - return ConnectionTestResult.ServerNotAccessible; - if (sqlException.Message.Contains("Cannot open database")) - return ConnectionTestResult.UnknownDatabase; - if (sqlException.Message.Contains("Login failed for user")) - return ConnectionTestResult.CredentialsRejected; - return ConnectionTestResult.UnknownError; - } - catch (Exception) - { - return ConnectionTestResult.UnknownError; - } - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DatabaseConnectors/DatabaseConnectorFactory.cs b/mRemoteNG/Config/DatabaseConnectors/DatabaseConnectorFactory.cs deleted file mode 100644 index 9b6e7cfad..000000000 --- a/mRemoteNG/Config/DatabaseConnectors/DatabaseConnectorFactory.cs +++ /dev/null @@ -1,32 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Security.SymmetricEncryption; - -namespace mRemoteNG.Config.DatabaseConnectors -{ - public class DatabaseConnectorFactory - { - public static IDatabaseConnector DatabaseConnectorFromSettings() - { - var sqlType = Properties.Settings.Default.SQLServerType; - var sqlHost = Properties.Settings.Default.SQLHost; - var sqlCatalog = Properties.Settings.Default.SQLDatabaseName; - var sqlUsername = Properties.Settings.Default.SQLUser; - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - var sqlPassword = cryptographyProvider.Decrypt(Properties.Settings.Default.SQLPass, Runtime.EncryptionKey); - - return DatabaseConnector(sqlType, sqlHost, sqlCatalog, sqlUsername, sqlPassword); - } - - public static IDatabaseConnector DatabaseConnector(string type, string server, string database, string username, string password) - { - switch (type) - { - case "mysql": - return new MySqlDatabaseConnector(server, database, username, password); - case "mssql": - default: - return new MSSqlDatabaseConnector(server, database, username, password); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DatabaseConnectors/IDatabaseConnector.cs b/mRemoteNG/Config/DatabaseConnectors/IDatabaseConnector.cs deleted file mode 100644 index 96eaece8a..000000000 --- a/mRemoteNG/Config/DatabaseConnectors/IDatabaseConnector.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Data.Common; -using System.Threading.Tasks; - -namespace mRemoteNG.Config.DatabaseConnectors -{ - public interface IDatabaseConnector : IDisposable - { - DbConnection DbConnection(); - DbCommand DbCommand(string dbCommand); - bool IsConnected { get; } - void Connect(); - Task ConnectAsync(); - void Disconnect(); - void AssociateItemToThisConnector(DbCommand dbCommand); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DatabaseConnectors/MSSqlDatabaseConnector.cs b/mRemoteNG/Config/DatabaseConnectors/MSSqlDatabaseConnector.cs deleted file mode 100644 index a93fbfb24..000000000 --- a/mRemoteNG/Config/DatabaseConnectors/MSSqlDatabaseConnector.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System.Data; -using System.Data.Common; -using System.Data.SqlClient; -using System.Threading.Tasks; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Config.DatabaseConnectors -{ - public class MSSqlDatabaseConnector : IDatabaseConnector - { - private DbConnection _dbConnection { get; set; } = default(SqlConnection); - private string _dbConnectionString = ""; - private readonly string _dbHost; - private readonly string _dbCatalog; - private readonly string _dbUsername; - private readonly string _dbPassword; - - public DbConnection DbConnection() - { - return _dbConnection; - } - - public DbCommand DbCommand(string dbCommand) - { - return new SqlCommand(dbCommand, (SqlConnection) _dbConnection); - } - - public bool IsConnected => (_dbConnection.State == ConnectionState.Open); - - public MSSqlDatabaseConnector(string sqlServer, string catalog, string username, string password) - { - _dbHost = sqlServer; - _dbCatalog = catalog; - _dbUsername = username; - _dbPassword = password; - Initialize(); - } - - private void Initialize() - { - BuildSqlConnectionString(); - _dbConnection = new SqlConnection(_dbConnectionString); - } - - private void BuildSqlConnectionString() - { - if (_dbUsername != "") - BuildDbConnectionStringWithCustomCredentials(); - else - BuildDbConnectionStringWithDefaultCredentials(); - } - - private void BuildDbConnectionStringWithCustomCredentials() - { - string[] hostParts = _dbHost.Split(new char[] { ':' }, 2); - var _dbPort = (hostParts.Length == 2) ? hostParts[1] : "1433"; - - _dbConnectionString = new SqlConnectionStringBuilder - { - DataSource = $"{hostParts[0]},{_dbPort}", - InitialCatalog = _dbCatalog, - UserID = _dbUsername, - Password = _dbPassword, - }.ToString(); - } - - private void BuildDbConnectionStringWithDefaultCredentials() - { - _dbConnectionString = new SqlConnectionStringBuilder - { - DataSource = _dbHost, - InitialCatalog = _dbCatalog, - IntegratedSecurity = true - }.ToString(); - } - - public void Connect() - { - _dbConnection.Open(); - } - - public async Task ConnectAsync() - { - await _dbConnection.OpenAsync(); - } - - public void Disconnect() - { - _dbConnection.Close(); - } - - public void AssociateItemToThisConnector(DbCommand dbCommand) - { - dbCommand.Connection = (SqlConnection) _dbConnection; - } - - public void Dispose() - { - Dispose(true); - } - - private void Dispose(bool itIsSafeToFreeManagedObjects) - { - if (!itIsSafeToFreeManagedObjects) return; - _dbConnection.Close(); - _dbConnection.Dispose(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/DatabaseConnectors/MySqlDatabaseConnector.cs b/mRemoteNG/Config/DatabaseConnectors/MySqlDatabaseConnector.cs deleted file mode 100644 index a4a29a776..000000000 --- a/mRemoteNG/Config/DatabaseConnectors/MySqlDatabaseConnector.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System.Data; -using System.Data.Common; -using System.Threading.Tasks; -using MySql.Data.MySqlClient; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Config.DatabaseConnectors -{ - public class MySqlDatabaseConnector : IDatabaseConnector - { - private DbConnection _dbConnection { get; set; } = default(MySqlConnection); - private string _dbConnectionString = ""; - private readonly string _dbHost; - private readonly string _dbPort; - private readonly string _dbName; - private readonly string _dbUsername; - private readonly string _dbPassword; - - public DbConnection DbConnection() - { - return _dbConnection; - } - - public DbCommand DbCommand(string dbCommand) - { - return new MySqlCommand(dbCommand, (MySqlConnection) _dbConnection); - } - - public bool IsConnected => (_dbConnection.State == ConnectionState.Open); - - public MySqlDatabaseConnector(string host, string database, string username, string password) - { - string[] hostParts = host.Split(new char[]{':'}, 2); - _dbHost = hostParts[0]; - _dbPort = (hostParts.Length == 2)?hostParts[1]:"3306"; - _dbName = database; - _dbUsername = username; - _dbPassword = password; - Initialize(); - } - - private void Initialize() - { - BuildSqlConnectionString(); - _dbConnection = new MySqlConnection(_dbConnectionString); - } - - private void BuildSqlConnectionString() - { - _dbConnectionString = $"server={_dbHost};user={_dbUsername};database={_dbName};port={_dbPort};password={_dbPassword}"; - } - - public void Connect() - { - _dbConnection.Open(); - } - - public async Task ConnectAsync() - { - await _dbConnection.OpenAsync(); - } - - public void Disconnect() - { - _dbConnection.Close(); - } - - public void AssociateItemToThisConnector(DbCommand dbCommand) - { - dbCommand.Connection = (MySqlConnection) _dbConnection; - } - - public void Dispose() - { - Dispose(true); - } - private void Dispose(bool itIsSafeToFreeManagedObjects) - { - if (!itIsSafeToFreeManagedObjects) return; - _dbConnection.Close(); - _dbConnection.Dispose(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/ILoader.cs b/mRemoteNG/Config/ILoader.cs deleted file mode 100644 index 8ed5881cc..000000000 --- a/mRemoteNG/Config/ILoader.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Config -{ - public interface ILoader - { - T Load(); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/ISaver.cs b/mRemoteNG/Config/ISaver.cs deleted file mode 100644 index 1f9700be8..000000000 --- a/mRemoteNG/Config/ISaver.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Config -{ - public interface ISaver - { - void Save(T model, string propertyNameTrigger = ""); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Import/ActiveDirectoryImporter.cs b/mRemoteNG/Config/Import/ActiveDirectoryImporter.cs deleted file mode 100644 index 8d81e6cc9..000000000 --- a/mRemoteNG/Config/Import/ActiveDirectoryImporter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Linq; -using mRemoteNG.App; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Container; -using mRemoteNG.Tools; - -namespace mRemoteNG.Config.Import -{ - public class ActiveDirectoryImporter : IConnectionImporter - { - public void Import(string ldapPath, ContainerInfo destinationContainer) - { - Import(ldapPath, destinationContainer, false); - } - - public static void Import(string ldapPath, ContainerInfo destinationContainer, bool importSubOu) - { - try - { - ldapPath.ThrowIfNullOrEmpty(nameof(ldapPath)); - var deserializer = new ActiveDirectoryDeserializer(ldapPath, importSubOu); - var connectionTreeModel = deserializer.Deserialize(); - var importedRootNode = connectionTreeModel.RootNodes.First(); - if (importedRootNode == null) return; - var childrenToAdd = importedRootNode.Children.ToArray(); - destinationContainer.AddChildRange(childrenToAdd); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.Import() failed.", ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Import/IConnectionImporter.cs b/mRemoteNG/Config/Import/IConnectionImporter.cs deleted file mode 100644 index 5614c42ec..000000000 --- a/mRemoteNG/Config/Import/IConnectionImporter.cs +++ /dev/null @@ -1,10 +0,0 @@ -using mRemoteNG.Container; - -namespace mRemoteNG.Config.Import -{ - public interface IConnectionImporter - where TSource : class - { - void Import(TSource source, ContainerInfo destinationContainer); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Import/MRemoteNGCsvImporter.cs b/mRemoteNG/Config/Import/MRemoteNGCsvImporter.cs deleted file mode 100644 index 0e5a230da..000000000 --- a/mRemoteNG/Config/Import/MRemoteNGCsvImporter.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.IO; -using System.Linq; -using mRemoteNG.App; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv; -using mRemoteNG.Container; -using mRemoteNG.Messages; - -namespace mRemoteNG.Config.Import -{ - public class MRemoteNGCsvImporter : IConnectionImporter - { - public void Import(string filePath, ContainerInfo destinationContainer) - { - if (string.IsNullOrEmpty(filePath)) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "Unable to import file. File path is null."); - return; - } - - if (!File.Exists(filePath)) - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - $"Unable to import file. File does not exist. Path: {filePath}"); - - var dataProvider = new FileDataProvider(filePath); - var xmlString = dataProvider.Load(); - var xmlConnectionsDeserializer = new CsvConnectionsDeserializerMremotengFormat(); - var connectionTreeModel = xmlConnectionsDeserializer.Deserialize(xmlString); - - var rootImportContainer = new ContainerInfo {Name = Path.GetFileNameWithoutExtension(filePath)}; - rootImportContainer.AddChildRange(connectionTreeModel.RootNodes.First().Children.ToArray()); - destinationContainer.AddChild(rootImportContainer); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Import/MRemoteNGXmlImporter.cs b/mRemoteNG/Config/Import/MRemoteNGXmlImporter.cs deleted file mode 100644 index 35e78a968..000000000 --- a/mRemoteNG/Config/Import/MRemoteNGXmlImporter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.IO; -using System.Linq; -using mRemoteNG.App; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; -using mRemoteNG.Container; -using mRemoteNG.Messages; - - -namespace mRemoteNG.Config.Import -{ - // ReSharper disable once InconsistentNaming - public class MRemoteNGXmlImporter : IConnectionImporter - { - public void Import(string fileName, ContainerInfo destinationContainer) - { - if (fileName == null) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "Unable to import file. File path is null."); - return; - } - - if (!File.Exists(fileName)) - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - $"Unable to import file. File does not exist. Path: {fileName}"); - - var dataProvider = new FileDataProvider(fileName); - var xmlString = dataProvider.Load(); - var xmlConnectionsDeserializer = new XmlConnectionsDeserializer(); - var connectionTreeModel = xmlConnectionsDeserializer.Deserialize(xmlString, true); - - var rootImportContainer = new ContainerInfo {Name = Path.GetFileNameWithoutExtension(fileName)}; - rootImportContainer.AddChildRange(connectionTreeModel.RootNodes.First().Children.ToArray()); - destinationContainer.AddChild(rootImportContainer); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Import/PortScanImporter.cs b/mRemoteNG/Config/Import/PortScanImporter.cs deleted file mode 100644 index 6a6cb9dbe..000000000 --- a/mRemoteNG/Config/Import/PortScanImporter.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Tools; - - -namespace mRemoteNG.Config.Import -{ - public class PortScanImporter : IConnectionImporter> - { - private readonly ProtocolType _targetProtocolType; - - public PortScanImporter(ProtocolType targetProtocolType) - { - _targetProtocolType = targetProtocolType; - } - - public void Import(IEnumerable hosts, ContainerInfo destinationContainer) - { - var deserializer = new PortScanDeserializer(_targetProtocolType); - var connectionTreeModel = deserializer.Deserialize(hosts); - - var importedRootNode = connectionTreeModel.RootNodes.First(); - if (importedRootNode == null) return; - var childrenToAdd = importedRootNode.Children.ToArray(); - destinationContainer.AddChildRange(childrenToAdd); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Import/PuttyConnectionManagerImporter.cs b/mRemoteNG/Config/Import/PuttyConnectionManagerImporter.cs deleted file mode 100644 index f7f103699..000000000 --- a/mRemoteNG/Config/Import/PuttyConnectionManagerImporter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Linq; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Container; - - -namespace mRemoteNG.Config.Import -{ - public class PuttyConnectionManagerImporter : IConnectionImporter - { - public void Import(string filePath, ContainerInfo destinationContainer) - { - var dataProvider = new FileDataProvider(filePath); - var xmlContent = dataProvider.Load(); - - var deserializer = new PuttyConnectionManagerDeserializer(); - var connectionTreeModel = deserializer.Deserialize(xmlContent); - - var importedRootNode = connectionTreeModel.RootNodes.First(); - if (importedRootNode == null) return; - var childrenToAdd = importedRootNode.Children.ToArray(); - destinationContainer.AddChildRange(childrenToAdd); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Import/RemoteDesktopConnectionImporter.cs b/mRemoteNG/Config/Import/RemoteDesktopConnectionImporter.cs deleted file mode 100644 index 321308318..000000000 --- a/mRemoteNG/Config/Import/RemoteDesktopConnectionImporter.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.IO; -using System.Linq; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Container; - - -namespace mRemoteNG.Config.Import -{ - public class RemoteDesktopConnectionImporter : IConnectionImporter - { - public void Import(string fileName, ContainerInfo destinationContainer) - { - var dataProvider = new FileDataProvider(fileName); - var content = dataProvider.Load(); - - var deserializer = new RemoteDesktopConnectionDeserializer(); - var connectionTreeModel = deserializer.Deserialize(content); - - var importedConnection = connectionTreeModel.RootNodes.First().Children.First(); - - if (importedConnection == null) return; - importedConnection.Name = Path.GetFileNameWithoutExtension(fileName); - destinationContainer.AddChild(importedConnection); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Import/RemoteDesktopConnectionManagerImporter.cs b/mRemoteNG/Config/Import/RemoteDesktopConnectionManagerImporter.cs deleted file mode 100644 index c68fb4ed9..000000000 --- a/mRemoteNG/Config/Import/RemoteDesktopConnectionManagerImporter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Linq; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Container; - - -namespace mRemoteNG.Config.Import -{ - public class RemoteDesktopConnectionManagerImporter : IConnectionImporter - { - public void Import(string filePath, ContainerInfo destinationContainer) - { - var dataProvider = new FileDataProvider(filePath); - var fileContent = dataProvider.Load(); - - var deserializer = new RemoteDesktopConnectionManagerDeserializer(); - var connectionTreeModel = deserializer.Deserialize(fileContent); - - var importedRootNode = connectionTreeModel.RootNodes.First(); - if (importedRootNode == null) return; - var childrenToAdd = importedRootNode.Children.ToArray(); - destinationContainer.AddChildRange(childrenToAdd); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Putty/AbstractPuttySessionsProvider.cs b/mRemoteNG/Config/Putty/AbstractPuttySessionsProvider.cs deleted file mode 100644 index c6efb46d2..000000000 --- a/mRemoteNG/Config/Putty/AbstractPuttySessionsProvider.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Tree.Root; -using System.Net; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Config.Putty -{ - public abstract class AbstractPuttySessionsProvider - { - public virtual RootPuttySessionsNodeInfo RootInfo { get; } = new RootPuttySessionsNodeInfo(); - - protected virtual List Sessions => RootInfo.Children.OfType().ToList(); - - #region Public Methods - - public abstract string[] GetSessionNames(bool raw = false); - public abstract PuttySessionInfo GetSession(string sessionName); - - public virtual IEnumerable GetSessions() - { - var sessionNamesFromProvider = GetSessionNames(true); - foreach (var sessionName in GetSessionNamesToAdd(sessionNamesFromProvider)) - { - var sessionInfo = GetSession(sessionName); - AddSession(sessionInfo); - } - - foreach (var session in GetSessionToRemove(sessionNamesFromProvider)) - { - RemoveSession(session); - } - - RootInfo.SortRecursive(); - return Sessions; - } - - private IEnumerable GetSessionNamesToAdd(IEnumerable sessionNamesFromProvider) - { - var currentlyKnownSessionNames = Sessions.Select(session => session.Name); - var sessionNamesToAdd = sessionNamesFromProvider.Except(currentlyKnownSessionNames); - return sessionNamesToAdd; - } - - private IEnumerable GetSessionToRemove(IEnumerable sessionNamesFromProvider) - { - var currentlyKnownSessionNames = Sessions.Select(session => session.Name); - var normalizedSessionNames = - sessionNamesFromProvider.Select(name => - WebUtility.UrlDecode(name)); - var sessionNamesToRemove = currentlyKnownSessionNames.Except(normalizedSessionNames); - return Sessions.Where(session => sessionNamesToRemove.Contains(session.Name)); - } - - protected virtual void AddSession(PuttySessionInfo sessionInfo) - { - if (string.IsNullOrEmpty(sessionInfo?.Name) || Sessions.Any(child => child.Name == sessionInfo.Name)) - return; - RootInfo.AddChild(sessionInfo); - RaisePuttySessionCollectionChangedEvent( - new - NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, - sessionInfo)); - } - - protected virtual void RemoveSession(PuttySessionInfo sessionInfo) - { - if (!Sessions.Contains(sessionInfo)) return; - RootInfo.RemoveChild(sessionInfo); - RaisePuttySessionCollectionChangedEvent( - new - NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, - sessionInfo)); - } - - public virtual void StartWatcher() - { - } - - public virtual void StopWatcher() - { - } - - #endregion - - public delegate void PuttySessionChangedEventHandler(object sender, PuttySessionChangedEventArgs e); - - public event PuttySessionChangedEventHandler PuttySessionChanged; - - protected virtual void RaiseSessionChangedEvent(PuttySessionChangedEventArgs args) - { - PuttySessionChanged?.Invoke(this, args); - } - - public event NotifyCollectionChangedEventHandler PuttySessionsCollectionChanged; - - protected void RaisePuttySessionCollectionChangedEvent(NotifyCollectionChangedEventArgs args) - { - PuttySessionsCollectionChanged?.Invoke(this, args); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Putty/PuttySessionChangedEventArgs.cs b/mRemoteNG/Config/Putty/PuttySessionChangedEventArgs.cs deleted file mode 100644 index febb5f425..000000000 --- a/mRemoteNG/Config/Putty/PuttySessionChangedEventArgs.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using mRemoteNG.Connection; - - -namespace mRemoteNG.Config.Putty -{ - public class PuttySessionChangedEventArgs : EventArgs - { - public PuttySessionInfo Session { get; set; } - - public PuttySessionChangedEventArgs(PuttySessionInfo sessionChanged = null) - { - Session = sessionChanged; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Putty/PuttySessionsManager.cs b/mRemoteNG/Config/Putty/PuttySessionsManager.cs deleted file mode 100644 index e937e4124..000000000 --- a/mRemoteNG/Config/Putty/PuttySessionsManager.cs +++ /dev/null @@ -1,168 +0,0 @@ -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using mRemoteNG.Tools; -using mRemoteNG.Tree.Root; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Config.Putty -{ - public class PuttySessionsManager - { - public static PuttySessionsManager Instance { get; } = new PuttySessionsManager(); - - private readonly List _providers = new List(); - - public IEnumerable Providers => _providers; - - public List RootPuttySessionsNodes { get; } = new List(); - - private PuttySessionsManager() - { - AddProvider(new PuttySessionsRegistryProvider()); - } - - - #region Public Methods - - public void AddSessions() - { - foreach (var provider in Providers) - { - AddSessionsFromProvider(provider); - } - } - - private void AddSessionsFromProvider(AbstractPuttySessionsProvider puttySessionProvider) - { - puttySessionProvider.ThrowIfNull(nameof(puttySessionProvider)); - - var rootTreeNode = puttySessionProvider.RootInfo; - puttySessionProvider.GetSessions(); - - if (!RootPuttySessionsNodes.Contains(rootTreeNode) && rootTreeNode.HasChildren()) - RootPuttySessionsNodes.Add(rootTreeNode); - rootTreeNode.SortRecursive(); - } - - public void StartWatcher() - { - foreach (var provider in Providers) - { - provider.StartWatcher(); - provider.PuttySessionChanged += PuttySessionChanged; - } - } - - public void StopWatcher() - { - foreach (var provider in Providers) - { - provider.StopWatcher(); - provider.PuttySessionChanged -= PuttySessionChanged; - } - } - - public void AddProvider(AbstractPuttySessionsProvider newProvider) - { - if (_providers.Contains(newProvider)) return; - _providers.Add(newProvider); - newProvider.PuttySessionsCollectionChanged += RaisePuttySessionCollectionChangedEvent; - RaiseSessionProvidersCollectionChangedEvent( - new - NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, - newProvider)); - } - - public void AddProviders(IEnumerable newProviders) - { - foreach (var provider in newProviders) - AddProvider(provider); - } - - public void RemoveProvider(AbstractPuttySessionsProvider providerToRemove) - { - if (!_providers.Contains(providerToRemove)) return; - _providers.Remove(providerToRemove); - providerToRemove.PuttySessionsCollectionChanged -= RaisePuttySessionCollectionChangedEvent; - RaiseSessionProvidersCollectionChangedEvent( - new - NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, - providerToRemove)); - } - - public void PuttySessionChanged(object sender, PuttySessionChangedEventArgs e) - { - AddSessions(); - } - - #endregion - - #region Private Methods - - private string[] GetSessionNames(bool raw = false) - { - var sessionNames = new List(); - foreach (var provider in Providers) - { - if (!IsProviderEnabled(provider)) - { - continue; - } - - sessionNames.AddRange(provider.GetSessionNames(raw)); - } - - return sessionNames.ToArray(); - } - - private bool IsProviderEnabled(AbstractPuttySessionsProvider puttySessionsProvider) - { - var enabled = true; - if (!(puttySessionsProvider is PuttySessionsRegistryProvider)) enabled = false; - - return enabled; - } - - #endregion - - #region Public Classes - - public class SessionList : StringConverter - { - public static string[] Names => Instance.GetSessionNames(); - - public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) - { - return new StandardValuesCollection(Names); - } - - public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) - { - return true; - } - - public override bool GetStandardValuesSupported(ITypeDescriptorContext context) - { - return true; - } - } - - #endregion - - public event NotifyCollectionChangedEventHandler PuttySessionsCollectionChanged; - - protected void RaisePuttySessionCollectionChangedEvent(object sender, NotifyCollectionChangedEventArgs args) - { - PuttySessionsCollectionChanged?.Invoke(sender, args); - } - - public event NotifyCollectionChangedEventHandler SessionProvidersCollectionChanged; - - protected void RaiseSessionProvidersCollectionChangedEvent(NotifyCollectionChangedEventArgs args) - { - SessionProvidersCollectionChanged?.Invoke(this, args); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Putty/PuttySessionsRegistryProvider.cs b/mRemoteNG/Config/Putty/PuttySessionsRegistryProvider.cs deleted file mode 100644 index 3f91a472b..000000000 --- a/mRemoteNG/Config/Putty/PuttySessionsRegistryProvider.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Management; -using System.Net; -using System.Security.Principal; -using Microsoft.Win32; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Messages; - - -namespace mRemoteNG.Config.Putty -{ - public class PuttySessionsRegistryProvider : AbstractPuttySessionsProvider - { - private const string PuttySessionsKey = "Software\\SimonTatham\\PuTTY\\Sessions"; - private static ManagementEventWatcher _eventWatcher; - - #region Public Methods - - public override string[] GetSessionNames(bool raw = false) - { - var sessionsKey = Registry.CurrentUser.OpenSubKey(PuttySessionsKey); - if (sessionsKey == null) return new string[] { }; - - var sessionNames = new List(); - foreach (var sessionName in sessionsKey.GetSubKeyNames()) - { - sessionNames.Add(raw ? sessionName - : WebUtility.UrlDecode(sessionName.Replace("+", "%2B"))); - } - - if (raw && !sessionNames.Contains("Default%20Settings")) - sessionNames.Insert(0, "Default%20Settings"); - else if (!raw && !sessionNames.Contains("Default Settings")) - sessionNames.Insert(0, "Default Settings"); - - return sessionNames.ToArray(); - } - - public override PuttySessionInfo GetSession(string sessionName) - { - if (string.IsNullOrEmpty(sessionName)) - return null; - - var sessionsKey = Registry.CurrentUser.OpenSubKey(PuttySessionsKey); - var sessionKey = sessionsKey?.OpenSubKey(sessionName); - if (sessionKey == null) return null; - - sessionName = WebUtility.UrlDecode(sessionName.Replace("+", "%2B")); - - var sessionInfo = new PuttySessionInfo - { - PuttySession = sessionName, - Name = sessionName, - Hostname = sessionKey.GetValue("HostName")?.ToString() ?? "", - Username = sessionKey.GetValue("UserName")?.ToString() ?? "" - }; - - - var protocol = string.IsNullOrEmpty(sessionKey.GetValue("Protocol")?.ToString()) - ? "ssh" - : sessionKey.GetValue("Protocol").ToString(); - - switch (protocol.ToLowerInvariant()) - { - case "raw": - sessionInfo.Protocol = ProtocolType.RAW; - break; - case "rlogin": - sessionInfo.Protocol = ProtocolType.Rlogin; - break; - case "serial": - return null; - case "ssh": - int.TryParse(sessionKey.GetValue("SshProt")?.ToString(), out var sshVersion); - /* Per PUTTY.H in PuTTYNG & PuTTYNG Upstream (PuTTY proper currently) - * expect 0 for SSH1, 3 for SSH2 ONLY - * 1 for SSH1 with a 2 fallback - * 2 for SSH2 with a 1 fallback - * - * default to SSH2 if any other value is received - */ - sessionInfo.Protocol = sshVersion == 1 || sshVersion == 0 ? ProtocolType.SSH1 : ProtocolType.SSH2; - break; - case "telnet": - sessionInfo.Protocol = ProtocolType.Telnet; - break; - default: - return null; - } - - int.TryParse(sessionKey.GetValue("PortNumber")?.ToString(), out var portNumber); - if (portNumber == default(int)) - sessionInfo.SetDefaultPort(); - else - sessionInfo.Port = portNumber; - - return sessionInfo; - } - - public override void StartWatcher() - { - if (_eventWatcher != null) return; - - try - { - var currentUserSid = WindowsIdentity.GetCurrent().User?.Value; - var key = string.Join("\\", currentUserSid, PuttySessionsKey).Replace("\\", "\\\\"); - var query = new WqlEventQuery( - $"SELECT * FROM RegistryTreeChangeEvent WHERE Hive = \'HKEY_USERS\' AND RootPath = \'{key}\'"); - _eventWatcher = new ManagementEventWatcher(query); - _eventWatcher.EventArrived += OnManagementEventArrived; - _eventWatcher.Start(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("PuttySessions.Watcher.StartWatching() failed.", ex, - MessageClass.WarningMsg); - } - } - - public override void StopWatcher() - { - if (_eventWatcher == null) return; - _eventWatcher.Stop(); - _eventWatcher.Dispose(); - } - - #endregion - - private void OnManagementEventArrived(object sender, EventArrivedEventArgs e) - { - RaiseSessionChangedEvent(new PuttySessionChangedEventArgs()); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConfConsEnsureConnectionsHaveIds.cs b/mRemoteNG/Config/Serializers/ConfConsEnsureConnectionsHaveIds.cs deleted file mode 100644 index 085d948ab..000000000 --- a/mRemoteNG/Config/Serializers/ConfConsEnsureConnectionsHaveIds.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Xml.Linq; - - -namespace mRemoteNG.Config.Serializers -{ - public class ConfConsEnsureConnectionsHaveIds - { - public void EnsureElementsHaveIds(XDocument xdoc) - { - foreach (var element in xdoc.Descendants("Node")) - { - if (element.Attribute("Id") != null) continue; - var id = Guid.NewGuid(); - element.Add(new XAttribute("Id", id)); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs deleted file mode 100644 index f445fac85..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs +++ /dev/null @@ -1,867 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv -{ - public class CsvConnectionsDeserializerMremotengFormat : IDeserializer - { - public ConnectionTreeModel Deserialize(string serializedData) - { - var lines = serializedData.Split(new[] {"\r\n", "\r", "\n"}, StringSplitOptions.RemoveEmptyEntries); - var csvHeaders = new List(); - // used to map a connectioninfo to it's parent's GUID - var parentMapping = new Dictionary(); - - for (var lineNumber = 0; lineNumber < lines.Length; lineNumber++) - { - var line = lines[lineNumber].Split(';'); - if (lineNumber == 0) - csvHeaders = line.ToList(); - else - { - var connectionInfo = ParseConnectionInfo(csvHeaders, line); - parentMapping.Add(connectionInfo, line[csvHeaders.IndexOf("Parent")]); - } - } - - var root = CreateTreeStructure(parentMapping); - var connectionTreeModel = new ConnectionTreeModel(); - connectionTreeModel.AddRootNode(root); - return connectionTreeModel; - } - - private RootNodeInfo CreateTreeStructure(Dictionary parentMapping) - { - var root = new RootNodeInfo(RootNodeType.Connection); - - foreach (var node in parentMapping) - { - // no parent mapped, add to root - if (string.IsNullOrEmpty(node.Value)) - { - root.AddChild(node.Key); - continue; - } - - // search for parent in the list by GUID - var parent = parentMapping - .Keys - .OfType() - .FirstOrDefault(info => info.ConstantID == node.Value); - - if (parent != null) - { - parent.AddChild(node.Key); - } - else - { - root.AddChild(node.Key); - } - } - - return root; - } - - private ConnectionInfo ParseConnectionInfo(IList headers, string[] connectionCsv) - { - var nodeType = headers.Contains("NodeType") - ? (TreeNodeType)Enum.Parse(typeof(TreeNodeType), connectionCsv[headers.IndexOf("NodeType")], true) - : TreeNodeType.Connection; - - var nodeId = headers.Contains("Id") - ? connectionCsv[headers.IndexOf("Id")] - : Guid.NewGuid().ToString(); - - var connectionRecord = nodeType == TreeNodeType.Connection - ? new ConnectionInfo(nodeId) - : new ContainerInfo(nodeId); - - connectionRecord.Name = headers.Contains("Name") - ? connectionCsv[headers.IndexOf("Name")] - : ""; - - connectionRecord.Description = headers.Contains("Description") - ? connectionCsv[headers.IndexOf("Description")] - : ""; - - connectionRecord.Icon = headers.Contains("Icon") - ? connectionCsv[headers.IndexOf("Icon")] - : ""; - - connectionRecord.Panel = headers.Contains("Panel") - ? connectionCsv[headers.IndexOf("Panel")] - : ""; - - connectionRecord.Username = headers.Contains("UserViaAPI") - ? connectionCsv[headers.IndexOf("UserViaAPI")] - : ""; - - connectionRecord.Username = headers.Contains("Username") - ? connectionCsv[headers.IndexOf("Username")] - : ""; - - connectionRecord.Password = headers.Contains("Password") - ? connectionCsv[headers.IndexOf("Password")] - : ""; - - connectionRecord.Domain = headers.Contains("Domain") - ? connectionCsv[headers.IndexOf("Domain")] - : ""; - - connectionRecord.Hostname = headers.Contains("Hostname") - ? connectionCsv[headers.IndexOf("Hostname")] - : ""; - - connectionRecord.VmId = headers.Contains("VmId") - ? connectionCsv[headers.IndexOf("VmId")] : ""; - - connectionRecord.SSHOptions =headers.Contains("SSHOptions") - ? connectionCsv[headers.IndexOf("SSHOptions")] - : ""; - - connectionRecord.SSHTunnelConnectionName = headers.Contains("SSHTunnelConnectionName") - ? connectionCsv[headers.IndexOf("SSHTunnelConnectionName")] - : ""; - - connectionRecord.PuttySession = headers.Contains("PuttySession") - ? connectionCsv[headers.IndexOf("PuttySession")] - : ""; - - connectionRecord.LoadBalanceInfo = headers.Contains("LoadBalanceInfo") - ? connectionCsv[headers.IndexOf("LoadBalanceInfo")] - : ""; - - connectionRecord.OpeningCommand = headers.Contains("OpeningCommand") - ? connectionCsv[headers.IndexOf("OpeningCommand")] - : ""; - - connectionRecord.PreExtApp = headers.Contains("PreExtApp") - ? connectionCsv[headers.IndexOf("PreExtApp")] - : ""; - - connectionRecord.PostExtApp = - headers.Contains("PostExtApp") - ? connectionCsv[headers.IndexOf("PostExtApp")] - : ""; - - connectionRecord.MacAddress = - headers.Contains("MacAddress") - ? connectionCsv[headers.IndexOf("MacAddress")] - : ""; - - connectionRecord.UserField = - headers.Contains("UserField") - ? connectionCsv[headers.IndexOf("UserField")] - : ""; - - connectionRecord.ExtApp = headers.Contains("ExtApp") - ? connectionCsv[headers.IndexOf("ExtApp")] : ""; - - connectionRecord.VNCProxyUsername = headers.Contains("VNCProxyUsername") - ? connectionCsv[headers.IndexOf("VNCProxyUsername")] - : ""; - - connectionRecord.VNCProxyPassword = headers.Contains("VNCProxyPassword") - ? connectionCsv[headers.IndexOf("VNCProxyPassword")] - : ""; - - connectionRecord.RDGatewayUsername = headers.Contains("RDGatewayUsername") - ? connectionCsv[headers.IndexOf("RDGatewayUsername")] - : ""; - - connectionRecord.RDGatewayPassword = headers.Contains("RDGatewayPassword") - ? connectionCsv[headers.IndexOf("RDGatewayPassword")] - : ""; - - connectionRecord.RDGatewayDomain = headers.Contains("RDGatewayDomain") - ? connectionCsv[headers.IndexOf("RDGatewayDomain")] - : ""; - - connectionRecord.VNCProxyIP = headers.Contains("VNCProxyIP") - ? connectionCsv[headers.IndexOf("VNCProxyIP")] - : ""; - - connectionRecord.RDGatewayHostname = headers.Contains("RDGatewayHostname") - ? connectionCsv[headers.IndexOf("RDGatewayHostname")] - : ""; - - connectionRecord.RDPStartProgram = headers.Contains("RDPStartProgram") - ? connectionCsv[headers.IndexOf("RDPStartProgram")] - : ""; - - connectionRecord.RDPStartProgramWorkDir = headers.Contains("RDPStartProgramWorkDir") - ? connectionCsv[headers.IndexOf("RDPStartProgramWorkDir")] - : ""; - - if (headers.Contains("Protocol")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("Protocol")], out ProtocolType protocolType)) - connectionRecord.Protocol = protocolType; - } - - if (headers.Contains("Port")) - { - if (int.TryParse(connectionCsv[headers.IndexOf("Port")], out int port)) - connectionRecord.Port = port; - } - - if (headers.Contains("ConnectToConsole")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("ConnectToConsole")], out bool useConsoleSession)) - connectionRecord.UseConsoleSession = useConsoleSession; - } - - if (headers.Contains("UseCredSsp")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("UseCredSsp")], out bool value)) - connectionRecord.UseCredSsp = value; - } - - if (headers.Contains("UseVmId")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("UseVmId")], out bool value)) - connectionRecord.UseVmId = value; - } - - if (headers.Contains("UseEnhancedMode")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("UseEnhancedMode")], out bool value)) - connectionRecord.UseEnhancedMode = value; - } - - if (headers.Contains("RenderingEngine")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("RenderingEngine")], out HTTPBase.RenderingEngine value)) - connectionRecord.RenderingEngine = value; - } - - if (headers.Contains("RDPAuthenticationLevel")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("RDPAuthenticationLevel")], out AuthenticationLevel value)) - connectionRecord.RDPAuthenticationLevel = value; - } - - if (headers.Contains("Colors")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("Colors")], out RDPColors value)) - connectionRecord.Colors = value; - } - - if (headers.Contains("Resolution")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("Resolution")], out RDPResolutions value)) - connectionRecord.Resolution = value; - } - - if (headers.Contains("AutomaticResize")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("AutomaticResize")], out bool value)) - connectionRecord.AutomaticResize = value; - } - - if (headers.Contains("DisplayWallpaper")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("DisplayWallpaper")], out bool value)) - connectionRecord.DisplayWallpaper = value; - } - - if (headers.Contains("DisplayThemes")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("DisplayThemes")], out bool value)) - connectionRecord.DisplayThemes = value; - } - - if (headers.Contains("EnableFontSmoothing")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("EnableFontSmoothing")], out bool value)) - connectionRecord.EnableFontSmoothing = value; - } - - if (headers.Contains("EnableDesktopComposition")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("EnableDesktopComposition")], out bool value)) - connectionRecord.EnableDesktopComposition = value; - } - - if (headers.Contains("DisableFullWindowDrag")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("DisableFullWindowDrag")], out bool value)) - connectionRecord.DisableFullWindowDrag = value; - } - - if (headers.Contains("DisableMenuAnimations")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("DisableMenuAnimations")], out bool value)) - connectionRecord.DisableMenuAnimations = value; - } - - if (headers.Contains("DisableCursorShadow")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("DisableCursorShadow")], out bool value)) - connectionRecord.DisableCursorShadow = value; - } - - if (headers.Contains("DisableCursorBlinking")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("DisableCursorBlinking")], out bool value)) - connectionRecord.DisableCursorBlinking = value; - } - - if (headers.Contains("CacheBitmaps")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("CacheBitmaps")], out bool value)) - connectionRecord.CacheBitmaps = value; - } - - if (headers.Contains("RedirectDiskDrives")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectDiskDrives")], out bool value)) - connectionRecord.RedirectDiskDrives = value; - } - - if (headers.Contains("RedirectPorts")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectPorts")], out bool value)) - connectionRecord.RedirectPorts = value; - } - - if (headers.Contains("RedirectPrinters")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectPrinters")], out bool value)) - connectionRecord.RedirectPrinters = value; - } - - if (headers.Contains("RedirectClipboard")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectClipboard")], out bool value)) - connectionRecord.RedirectClipboard = value; - } - - if (headers.Contains("RedirectSmartCards")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectSmartCards")], out bool value)) - connectionRecord.RedirectSmartCards = value; - } - - if (headers.Contains("RedirectSound")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("RedirectSound")], out RDPSounds value)) - connectionRecord.RedirectSound = value; - } - - if (headers.Contains("RedirectAudioCapture")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectAudioCapture")], out bool value)) - connectionRecord.RedirectAudioCapture = value; - } - - if (headers.Contains("RedirectKeys")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectKeys")], out bool value)) - connectionRecord.RedirectKeys = value; - } - - if (headers.Contains("VNCCompression")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("VNCCompression")], out ProtocolVNC.Compression value)) - connectionRecord.VNCCompression = value; - } - - if (headers.Contains("VNCEncoding")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("VNCEncoding")], out ProtocolVNC.Encoding value)) - connectionRecord.VNCEncoding = value; - } - - if (headers.Contains("VNCAuthMode")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("VNCAuthMode")], out ProtocolVNC.AuthMode value)) - connectionRecord.VNCAuthMode = value; - } - - if (headers.Contains("VNCProxyType")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("VNCProxyType")], out ProtocolVNC.ProxyType value)) - connectionRecord.VNCProxyType = value; - } - - if (headers.Contains("VNCProxyPort")) - { - if (int.TryParse(connectionCsv[headers.IndexOf("VNCProxyPort")], out int value)) - connectionRecord.VNCProxyPort = value; - } - - if (headers.Contains("VNCColors")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("VNCColors")], out ProtocolVNC.Colors value)) - connectionRecord.VNCColors = value; - } - - if (headers.Contains("VNCSmartSizeMode")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("VNCSmartSizeMode")], out ProtocolVNC.SmartSizeMode value)) - connectionRecord.VNCSmartSizeMode = value; - } - - if (headers.Contains("VNCViewOnly")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("VNCViewOnly")], out bool value)) - connectionRecord.VNCViewOnly = value; - } - - if (headers.Contains("RDGatewayUsageMethod")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayUsageMethod")], out RDGatewayUsageMethod value)) - connectionRecord.RDGatewayUsageMethod = value; - } - - if (headers.Contains("RDGatewayUseConnectionCredentials")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayUseConnectionCredentials")], out RDGatewayUseConnectionCredentials value)) - connectionRecord.RDGatewayUseConnectionCredentials = value; - } - - if (headers.Contains("Favorite")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("Favorite")], out bool value)) - connectionRecord.Favorite = value; - } - - if (headers.Contains("RdpVersion")) - { - if (Enum.TryParse(connectionCsv[headers.IndexOf("RdpVersion")], true, out RdpVersion version)) - connectionRecord.RdpVersion = version; - } - - #region Inheritance - - if (headers.Contains("InheritCacheBitmaps")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritCacheBitmaps")], out bool value)) - connectionRecord.Inheritance.CacheBitmaps = value; - } - - if (headers.Contains("InheritColors")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritColors")], out bool value)) - connectionRecord.Inheritance.Colors = value; - } - - if (headers.Contains("InheritDescription")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritDescription")], out bool value)) - connectionRecord.Inheritance.Description = value; - } - - if (headers.Contains("InheritDisplayThemes")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritDisplayThemes")], out bool value)) - connectionRecord.Inheritance.DisplayThemes = value; - } - - if (headers.Contains("InheritDisplayWallpaper")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritDisplayWallpaper")], out bool value)) - connectionRecord.Inheritance.DisplayWallpaper = value; - } - - if (headers.Contains("InheritEnableFontSmoothing")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritEnableFontSmoothing")], out bool value)) - connectionRecord.Inheritance.EnableFontSmoothing = value; - } - - if (headers.Contains("InheritEnableDesktopComposition")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritEnableDesktopComposition")], out bool value)) - connectionRecord.Inheritance.EnableDesktopComposition = value; - } - - if (headers.Contains("InheritDisableFullWindowDrag")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritDisableFullWindowDrag")], out bool value)) - connectionRecord.Inheritance.DisableFullWindowDrag = value; - } - - if (headers.Contains("InheritDisableMenuAnimations")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritDisableMenuAnimations")], out bool value)) - connectionRecord.Inheritance.DisableMenuAnimations = value; - } - - if (headers.Contains("InheritDisableCursorShadow")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritDisableCursorShadow")], out bool value)) - connectionRecord.Inheritance.DisableCursorShadow = value; - } - - if (headers.Contains("InheritDisableCursorBlinking")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritDisableCursorBlinking")], out bool value)) - connectionRecord.Inheritance.DisableCursorBlinking = value; - } - - if (headers.Contains("InheritDomain")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritDomain")], out bool value)) - connectionRecord.Inheritance.Domain = value; - } - - if (headers.Contains("InheritIcon")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritIcon")], out bool value)) - connectionRecord.Inheritance.Icon = value; - } - - if (headers.Contains("InheritPanel")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritPanel")], out bool value)) - connectionRecord.Inheritance.Panel = value; - } - - if (headers.Contains("InheritPassword")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritPassword")], out bool value)) - connectionRecord.Inheritance.Password = value; - } - - if (headers.Contains("InheritPort")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritPort")], out bool value)) - connectionRecord.Inheritance.Port = value; - } - - if (headers.Contains("InheritProtocol")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritProtocol")], out bool value)) - connectionRecord.Inheritance.Protocol = value; - } - - if (headers.Contains("InheritSSHTunnelConnectionName")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritSSHTunnelConnectionName")], out bool value)) - connectionRecord.Inheritance.SSHTunnelConnectionName = value; - } - - if (headers.Contains("InheritOpeningCommand")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritOpeningCommand")], out bool value)) - connectionRecord.Inheritance.OpeningCommand = value; - } - - if (headers.Contains("InheritSSHOptions")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritSSHOptions")], out bool value)) - connectionRecord.Inheritance.SSHOptions = value; - } - - if (headers.Contains("InheritPuttySession")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritPuttySession")], out bool value)) - connectionRecord.Inheritance.PuttySession = value; - } - - if (headers.Contains("InheritRedirectDiskDrives")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectDiskDrives")], out bool value)) - connectionRecord.Inheritance.RedirectDiskDrives = value; - } - - if (headers.Contains("InheritRedirectKeys")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectKeys")], out bool value)) - connectionRecord.Inheritance.RedirectKeys = value; - } - - if (headers.Contains("InheritRedirectPorts")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectPorts")], out bool value)) - connectionRecord.Inheritance.RedirectPorts = value; - } - - if (headers.Contains("InheritRedirectPrinters")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectPrinters")], out bool value)) - connectionRecord.Inheritance.RedirectPrinters = value; - } - - if (headers.Contains("InheritRedirectClipboard")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectClipboard")], out bool value)) - connectionRecord.Inheritance.RedirectClipboard = value; - } - - if (headers.Contains("InheritRedirectSmartCards")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectSmartCards")], out bool value)) - connectionRecord.Inheritance.RedirectSmartCards = value; - } - - if (headers.Contains("InheritRedirectSound")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectSound")], out bool value)) - connectionRecord.Inheritance.RedirectSound = value; - } - - if (headers.Contains("InheritResolution")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritResolution")], out bool value)) - connectionRecord.Inheritance.Resolution = value; - } - - if (headers.Contains("InheritAutomaticResize")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritAutomaticResize")], out bool value)) - connectionRecord.Inheritance.AutomaticResize = value; - } - - if (headers.Contains("InheritUseConsoleSession")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseConsoleSession")], out bool value)) - connectionRecord.Inheritance.UseConsoleSession = value; - } - - if (headers.Contains("InheritUseCredSsp")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseCredSsp")], out bool value)) - connectionRecord.Inheritance.UseCredSsp = value; - } - - if (headers.Contains("InheritUseVmId")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseVmId")], out bool value)) - connectionRecord.Inheritance.UseVmId = value; - } - - if (headers.Contains("InheritUseEnhancedMode")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseEnhancedMode")], out bool value)) - connectionRecord.Inheritance.UseEnhancedMode = value; - } - - if (headers.Contains("InheritRenderingEngine")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRenderingEngine")], out bool value)) - connectionRecord.Inheritance.RenderingEngine = value; - } - - if (headers.Contains("InheritUserViaAPI")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUserViaAPI")], out bool value)) - connectionRecord.Inheritance.UserViaAPI = value; - } - - if (headers.Contains("InheritUsername")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUsername")], out bool value)) - connectionRecord.Inheritance.Username = value; - } - - if (headers.Contains("InheritVmId")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVmId")], out bool value)) - connectionRecord.Inheritance.VmId = value; - } - - if (headers.Contains("InheritRDPAuthenticationLevel")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDPAuthenticationLevel")], out bool value)) - connectionRecord.Inheritance.RDPAuthenticationLevel = value; - } - - if (headers.Contains("InheritLoadBalanceInfo")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritLoadBalanceInfo")], out bool value)) - connectionRecord.Inheritance.LoadBalanceInfo = value; - } - - if (headers.Contains("InheritOpeningCommand")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritOpeningCommand")], out bool value)) - connectionRecord.Inheritance.OpeningCommand = value; - } - - if (headers.Contains("InheritPreExtApp")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritPreExtApp")], out bool value)) - connectionRecord.Inheritance.PreExtApp = value; - } - - if (headers.Contains("InheritPostExtApp")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritPostExtApp")], out bool value)) - connectionRecord.Inheritance.PostExtApp = value; - } - - if (headers.Contains("InheritMacAddress")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritMacAddress")], out bool value)) - connectionRecord.Inheritance.MacAddress = value; - } - - if (headers.Contains("InheritUserField")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUserField")], out bool value)) - connectionRecord.Inheritance.UserField = value; - } - - if (headers.Contains("InheritFavorite")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritFavorite")], out bool value)) - connectionRecord.Inheritance.Favorite = value; - } - - if (headers.Contains("InheritExtApp")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritExtApp")], out bool value)) - connectionRecord.Inheritance.ExtApp = value; - } - - if (headers.Contains("InheritVNCCompression")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCCompression")], out bool value)) - connectionRecord.Inheritance.VNCCompression = value; - } - - if (headers.Contains("InheritVNCEncoding")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCEncoding")], out bool value)) - connectionRecord.Inheritance.VNCEncoding = value; - } - - if (headers.Contains("InheritVNCAuthMode")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCAuthMode")], out bool value)) - connectionRecord.Inheritance.VNCAuthMode = value; - } - - if (headers.Contains("InheritVNCProxyType")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCProxyType")], out bool value)) - connectionRecord.Inheritance.VNCProxyType = value; - } - - if (headers.Contains("InheritVNCProxyIP")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCProxyIP")], out bool value)) - connectionRecord.Inheritance.VNCProxyIP = value; - } - - if (headers.Contains("InheritVNCProxyPort")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCProxyPort")], out bool value)) - connectionRecord.Inheritance.VNCProxyPort = value; - } - - if (headers.Contains("InheritVNCProxyUsername")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCProxyUsername")], out bool value)) - connectionRecord.Inheritance.VNCProxyUsername = value; - } - - if (headers.Contains("InheritVNCProxyPassword")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCProxyPassword")], out bool value)) - connectionRecord.Inheritance.VNCProxyPassword = value; - } - - if (headers.Contains("InheritVNCColors")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCColors")], out bool value)) - connectionRecord.Inheritance.VNCColors = value; - } - - if (headers.Contains("InheritVNCSmartSizeMode")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCSmartSizeMode")], out bool value)) - connectionRecord.Inheritance.VNCSmartSizeMode = value; - } - - if (headers.Contains("InheritVNCViewOnly")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVNCViewOnly")], out bool value)) - connectionRecord.Inheritance.VNCViewOnly = value; - } - - if (headers.Contains("InheritRDGatewayUsageMethod")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayUsageMethod")], out bool value)) - connectionRecord.Inheritance.RDGatewayUsageMethod = value; - } - - if (headers.Contains("InheritRDGatewayHostname")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayHostname")], out bool value)) - connectionRecord.Inheritance.RDGatewayHostname = value; - } - - if (headers.Contains("InheritRDGatewayUseConnectionCredentials")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayUseConnectionCredentials")], - out bool value)) - connectionRecord.Inheritance.RDGatewayUseConnectionCredentials = value; - } - - if (headers.Contains("InheritRDGatewayUsername")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayUsername")], out bool value)) - connectionRecord.Inheritance.RDGatewayUsername = value; - } - - if (headers.Contains("InheritRDGatewayPassword")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayPassword")], out bool value)) - connectionRecord.Inheritance.RDGatewayPassword = value; - } - - if (headers.Contains("InheritRDGatewayDomain")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayDomain")], out bool value)) - connectionRecord.Inheritance.RDGatewayDomain = value; - } - - if (headers.Contains("InheritRDPAlertIdleTimeout")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDPAlertIdleTimeout")], out bool value)) - connectionRecord.Inheritance.RDPAlertIdleTimeout = value; - } - - if (headers.Contains("InheritRDPMinutesToIdleTimeout")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDPMinutesToIdleTimeout")], out bool value)) - connectionRecord.Inheritance.RDPMinutesToIdleTimeout = value; - } - - if (headers.Contains("InheritSoundQuality")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritSoundQuality")], out bool value)) - connectionRecord.Inheritance.SoundQuality = value; - } - - if (headers.Contains("InheritRedirectAudioCapture")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectAudioCapture")], out bool value)) - connectionRecord.Inheritance.RedirectAudioCapture = value; - } - - if (headers.Contains("InheritRdpVersion")) - { - if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRdpVersion")], out bool value)) - connectionRecord.Inheritance.RdpVersion = value; - } - - #endregion - - return connectionRecord; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs deleted file mode 100644 index 5952bc3b9..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs +++ /dev/null @@ -1,263 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv -{ - public class CsvConnectionsSerializerMremotengFormat : ISerializer - { - private readonly SaveFilter _saveFilter; - private readonly ICredentialRepositoryList _credentialRepositoryList; - - public Version Version { get; } = new Version(2, 7); - - public CsvConnectionsSerializerMremotengFormat(SaveFilter saveFilter, - ICredentialRepositoryList credentialRepositoryList) - { - saveFilter.ThrowIfNull(nameof(saveFilter)); - credentialRepositoryList.ThrowIfNull(nameof(credentialRepositoryList)); - - _saveFilter = saveFilter; - _credentialRepositoryList = credentialRepositoryList; - } - - public string Serialize(ConnectionTreeModel connectionTreeModel) - { - connectionTreeModel.ThrowIfNull(nameof(connectionTreeModel)); - - var rootNode = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo); - return Serialize(rootNode); - } - - public string Serialize(ConnectionInfo serializationTarget) - { - serializationTarget.ThrowIfNull(nameof(serializationTarget)); - var sb = new StringBuilder(); - - WriteCsvHeader(sb); - SerializeNodesRecursive(serializationTarget, sb); - return sb.ToString(); - } - - private void WriteCsvHeader(StringBuilder sb) - { - sb.Append("Name;Id;Parent;NodeType;Description;Icon;Panel;"); - if (_saveFilter.SaveUsername) - sb.Append("Username;"); - if (_saveFilter.SavePassword) - sb.Append("Password;"); - if (_saveFilter.SaveDomain) - sb.Append("Domain;"); - - sb.Append("Hostname;Port;VmId;Protocol;SSHTunnelConnectionName;OpeningCommand;SSHOptions;PuttySession;ConnectToConsole;UseCredSsp;UseVmId;UseEnhancedMode;RenderingEngine;RDPAuthenticationLevel;" + - "LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;DisableFullWindowDrag;DisableMenuAnimations;DisableCursorShadow;DisableCursorBlinking;" + - "CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;" + - "PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;" + - "VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;" + - "RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;RDPStartProgram;RDPStartProgramWorkDir;UserViaAPI;EC2InstanceId;EC2Region;"); - - if (_saveFilter.SaveInheritance) - sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" + - "InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDisableFullWindowDrag;InheritDisableMenuAnimations;InheritDisableCursorShadow;InheritDisableCursorBlinking;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;" + - "InheritProtocol;InheritSSHTunnelConnectionName;InheritOpeningCommand;InheritSSHOptions;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;" + - "InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;" + - "InheritUseConsoleSession;InheritUseCredSsp;InheritUseVmId;InheritUseEnhancedMode;InheritVmId;InheritRenderingEngine;InheritUsername;" + - "InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;" + - "InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" + - "InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" + - "InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;" + - "InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;InheritUserViaAPI;" + - "InheritRedirectAudioCapture;InheritRdpVersion"); - } - - private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb) - { - var nodeAsContainer = node as ContainerInfo; - if (nodeAsContainer != null) - { - foreach (var child in nodeAsContainer.Children) - { - SerializeNodesRecursive(child, sb); - } - } - - // dont serialize the root node - if (node is RootNodeInfo) - return; - - SerializeConnectionInfo(node, sb); - } - - private void SerializeConnectionInfo(ConnectionInfo con, StringBuilder sb) - { - sb.AppendLine(); - sb.Append(FormatForCsv(con.Name)) - .Append(FormatForCsv(con.ConstantID)) - .Append(FormatForCsv(con.Parent?.ConstantID ?? "")) - .Append(FormatForCsv(con.GetTreeNodeType())) - .Append(FormatForCsv(con.Description)) - .Append(FormatForCsv(con.Icon)) - .Append(FormatForCsv(con.Panel)); - - if (_saveFilter.SaveUsername) - sb.Append(FormatForCsv(con.Username)); - - if (_saveFilter.SavePassword) - sb.Append(FormatForCsv(con.Password)); - - if (_saveFilter.SaveDomain) - sb.Append(FormatForCsv(con.Domain)); - - sb.Append(FormatForCsv(con.Hostname)) - .Append(FormatForCsv(con.Port)) - .Append(FormatForCsv(con.VmId)) - .Append(FormatForCsv(con.Protocol)) - .Append(FormatForCsv(con.SSHTunnelConnectionName)) - .Append(FormatForCsv(con.OpeningCommand)) - .Append(FormatForCsv(con.SSHOptions)) - .Append(FormatForCsv(con.PuttySession)) - .Append(FormatForCsv(con.UseConsoleSession)) - .Append(FormatForCsv(con.UseCredSsp)) - .Append(FormatForCsv(con.UseVmId)) - .Append(FormatForCsv(con.UseEnhancedMode)) - .Append(FormatForCsv(con.RenderingEngine)) - .Append(FormatForCsv(con.RDPAuthenticationLevel)) - .Append(FormatForCsv(con.LoadBalanceInfo)) - .Append(FormatForCsv(con.Colors)) - .Append(FormatForCsv(con.Resolution)) - .Append(FormatForCsv(con.AutomaticResize)) - .Append(FormatForCsv(con.DisplayWallpaper)) - .Append(FormatForCsv(con.DisplayThemes)) - .Append(FormatForCsv(con.EnableFontSmoothing)) - .Append(FormatForCsv(con.EnableDesktopComposition)) - .Append(FormatForCsv(con.DisableFullWindowDrag)) - .Append(FormatForCsv(con.DisableMenuAnimations)) - .Append(FormatForCsv(con.DisableCursorShadow)) - .Append(FormatForCsv(con.DisableCursorBlinking)) - .Append(FormatForCsv(con.CacheBitmaps)) - .Append(FormatForCsv(con.RedirectDiskDrives)) - .Append(FormatForCsv(con.RedirectPorts)) - .Append(FormatForCsv(con.RedirectPrinters)) - .Append(FormatForCsv(con.RedirectClipboard)) - .Append(FormatForCsv(con.RedirectSmartCards)) - .Append(FormatForCsv(con.RedirectSound)) - .Append(FormatForCsv(con.RedirectKeys)) - .Append(FormatForCsv(con.PreExtApp)) - .Append(FormatForCsv(con.PostExtApp)) - .Append(FormatForCsv(con.MacAddress)) - .Append(FormatForCsv(con.UserField)) - .Append(FormatForCsv(con.ExtApp)) - .Append(FormatForCsv(con.Favorite)) - .Append(FormatForCsv(con.VNCCompression)) - .Append(FormatForCsv(con.VNCEncoding)) - .Append(FormatForCsv(con.VNCAuthMode)) - .Append(FormatForCsv(con.VNCProxyType)) - .Append(FormatForCsv(con.VNCProxyIP)) - .Append(FormatForCsv(con.VNCProxyPort)) - .Append(FormatForCsv(con.VNCProxyUsername)) - .Append(FormatForCsv(con.VNCProxyPassword)) - .Append(FormatForCsv(con.VNCColors)) - .Append(FormatForCsv(con.VNCSmartSizeMode)) - .Append(FormatForCsv(con.VNCViewOnly)) - .Append(FormatForCsv(con.RDGatewayUsageMethod)) - .Append(FormatForCsv(con.RDGatewayHostname)) - .Append(FormatForCsv(con.RDGatewayUseConnectionCredentials)) - .Append(FormatForCsv(con.RDGatewayUsername)) - .Append(FormatForCsv(con.RDGatewayPassword)) - .Append(FormatForCsv(con.RDGatewayDomain)) - .Append(FormatForCsv(con.RedirectAudioCapture)) - .Append(FormatForCsv(con.RdpVersion)) - .Append(FormatForCsv(con.RDPStartProgram)) - .Append(FormatForCsv(con.RDPStartProgramWorkDir)) - .Append(FormatForCsv(con.UserViaAPI)) - .Append(FormatForCsv(con.EC2InstanceId)) - .Append(FormatForCsv(con.EC2Region)); - - - if (!_saveFilter.SaveInheritance) - return; - - sb.Append(FormatForCsv(con.Inheritance.CacheBitmaps)) - .Append(FormatForCsv(con.Inheritance.Colors)) - .Append(FormatForCsv(con.Inheritance.Description)) - .Append(FormatForCsv(con.Inheritance.DisplayThemes)) - .Append(FormatForCsv(con.Inheritance.DisplayWallpaper)) - .Append(FormatForCsv(con.Inheritance.EnableFontSmoothing)) - .Append(FormatForCsv(con.Inheritance.EnableDesktopComposition)) - .Append(FormatForCsv(con.Inheritance.DisableFullWindowDrag)) - .Append(FormatForCsv(con.Inheritance.DisableMenuAnimations)) - .Append(FormatForCsv(con.Inheritance.DisableCursorShadow)) - .Append(FormatForCsv(con.Inheritance.DisableCursorBlinking)) - .Append(FormatForCsv(con.Inheritance.Domain)) - .Append(FormatForCsv(con.Inheritance.Icon)) - .Append(FormatForCsv(con.Inheritance.Panel)) - .Append(FormatForCsv(con.Inheritance.Password)) - .Append(FormatForCsv(con.Inheritance.Port)) - .Append(FormatForCsv(con.Inheritance.Protocol)) - .Append(FormatForCsv(con.Inheritance.SSHTunnelConnectionName)) - .Append(FormatForCsv(con.Inheritance.OpeningCommand)) - .Append(FormatForCsv(con.Inheritance.SSHOptions)) - .Append(FormatForCsv(con.Inheritance.PuttySession)) - .Append(FormatForCsv(con.Inheritance.RedirectDiskDrives)) - .Append(FormatForCsv(con.Inheritance.RedirectKeys)) - .Append(FormatForCsv(con.Inheritance.RedirectPorts)) - .Append(FormatForCsv(con.Inheritance.RedirectPrinters)) - .Append(FormatForCsv(con.Inheritance.RedirectClipboard)) - .Append(FormatForCsv(con.Inheritance.RedirectSmartCards)) - .Append(FormatForCsv(con.Inheritance.RedirectSound)) - .Append(FormatForCsv(con.Inheritance.Resolution)) - .Append(FormatForCsv(con.Inheritance.AutomaticResize)) - .Append(FormatForCsv(con.Inheritance.UseConsoleSession)) - .Append(FormatForCsv(con.Inheritance.UseCredSsp)) - .Append(FormatForCsv(con.Inheritance.UseVmId)) - .Append(FormatForCsv(con.Inheritance.UseEnhancedMode)) - .Append(FormatForCsv(con.Inheritance.VmId)) - .Append(FormatForCsv(con.Inheritance.RenderingEngine)) - .Append(FormatForCsv(con.Inheritance.Username)) - .Append(FormatForCsv(con.Inheritance.RDPAuthenticationLevel)) - .Append(FormatForCsv(con.Inheritance.LoadBalanceInfo)) - .Append(FormatForCsv(con.Inheritance.PreExtApp)) - .Append(FormatForCsv(con.Inheritance.PostExtApp)) - .Append(FormatForCsv(con.Inheritance.MacAddress)) - .Append(FormatForCsv(con.Inheritance.UserField)) - .Append(FormatForCsv(con.Inheritance.Favorite)) - .Append(FormatForCsv(con.Inheritance.ExtApp)) - .Append(FormatForCsv(con.Inheritance.VNCCompression)) - .Append(FormatForCsv(con.Inheritance.VNCEncoding)) - .Append(FormatForCsv(con.Inheritance.VNCAuthMode)) - .Append(FormatForCsv(con.Inheritance.VNCProxyType)) - .Append(FormatForCsv(con.Inheritance.VNCProxyIP)) - .Append(FormatForCsv(con.Inheritance.VNCProxyPort)) - .Append(FormatForCsv(con.Inheritance.VNCProxyUsername)) - .Append(FormatForCsv(con.Inheritance.VNCProxyPassword)) - .Append(FormatForCsv(con.Inheritance.VNCColors)) - .Append(FormatForCsv(con.Inheritance.VNCSmartSizeMode)) - .Append(FormatForCsv(con.Inheritance.VNCViewOnly)) - .Append(FormatForCsv(con.Inheritance.RDGatewayUsageMethod)) - .Append(FormatForCsv(con.Inheritance.RDGatewayHostname)) - .Append(FormatForCsv(con.Inheritance.RDGatewayUseConnectionCredentials)) - .Append(FormatForCsv(con.Inheritance.RDGatewayUsername)) - .Append(FormatForCsv(con.Inheritance.RDGatewayPassword)) - .Append(FormatForCsv(con.Inheritance.RDGatewayDomain)) - .Append(FormatForCsv(con.Inheritance.RDPAlertIdleTimeout)) - .Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout)) - .Append(FormatForCsv(con.Inheritance.SoundQuality)) - .Append(FormatForCsv(con.Inheritance.RedirectAudioCapture)) - .Append(FormatForCsv(con.Inheritance.RdpVersion)) - .Append(FormatForCsv(con.Inheritance.UserViaAPI)); - } - - private string FormatForCsv(object value) - { - var cleanedString = value.ToString().Replace(";", ""); - return cleanedString + ";"; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableDeserializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableDeserializer.cs deleted file mode 100644 index faf6fe580..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableDeserializer.cs +++ /dev/null @@ -1,263 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Security; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql -{ - public class DataTableDeserializer : IDeserializer - { - private readonly ICryptographyProvider _cryptographyProvider; - private readonly SecureString _decryptionKey; - - public DataTableDeserializer(ICryptographyProvider cryptographyProvider, SecureString decryptionKey) - { - _cryptographyProvider = cryptographyProvider.ThrowIfNull(nameof(cryptographyProvider)); - _decryptionKey = decryptionKey.ThrowIfNull(nameof(decryptionKey)); - } - - public ConnectionTreeModel Deserialize(DataTable table) - { - var connectionList = CreateNodesFromTable(table); - var connectionTreeModel = CreateNodeHierarchy(connectionList, table); - Runtime.ConnectionsService.IsConnectionsFileLoaded = true; - return connectionTreeModel; - } - - private List CreateNodesFromTable(DataTable table) - { - var nodeList = new List(); - foreach (DataRow row in table.Rows) - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch ((string)row["Type"]) - { - case "Connection": - nodeList.Add(DeserializeConnectionInfo(row)); - break; - case "Container": - nodeList.Add(DeserializeContainerInfo(row)); - break; - } - } - - return nodeList; - } - - private ConnectionInfo DeserializeConnectionInfo(DataRow row) - { - var connectionId = row["ConstantID"] as string ?? Guid.NewGuid().ToString(); - var connectionInfo = new ConnectionInfo(connectionId); - PopulateConnectionInfoFromDatarow(row, connectionInfo); - return connectionInfo; - } - - private ContainerInfo DeserializeContainerInfo(DataRow row) - { - var containerId = row["ConstantID"] as string ?? Guid.NewGuid().ToString(); - var containerInfo = new ContainerInfo(containerId); - PopulateConnectionInfoFromDatarow(row, containerInfo); - return containerInfo; - } - - private void PopulateConnectionInfoFromDatarow(DataRow dataRow, ConnectionInfo connectionInfo) - { - connectionInfo.Name = (string)dataRow["Name"]; - - // This throws a NPE - Parent is a connectionInfo object which will be null at this point. - // The Parent object is linked properly later in CreateNodeHierarchy() - //connectionInfo.Parent.ConstantID = (string)dataRow["ParentID"]; - - connectionInfo.Description = (string)dataRow["Description"]; - connectionInfo.Icon = (string)dataRow["Icon"]; - connectionInfo.Panel = (string)dataRow["Panel"]; - connectionInfo.Username = (string)dataRow["Username"]; - connectionInfo.Domain = (string)dataRow["Domain"]; - connectionInfo.Password = DecryptValue((string)dataRow["Password"]); - connectionInfo.Hostname = (string)dataRow["Hostname"]; - connectionInfo.VmId = (string)dataRow["VmId"]; - connectionInfo.UseEnhancedMode = (bool)dataRow["UseEnhancedMode"]; - connectionInfo.Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), (string)dataRow["Protocol"]); - connectionInfo.SSHTunnelConnectionName = (string)dataRow["SSHTunnelConnectionName"]; - connectionInfo.OpeningCommand = (string)dataRow["OpeningCommand"]; - connectionInfo.SSHOptions = (string)dataRow["SSHOptions"]; - connectionInfo.PuttySession = (string)dataRow["PuttySession"]; - connectionInfo.Port = (int)dataRow["Port"]; - connectionInfo.UseConsoleSession = (bool)dataRow["ConnectToConsole"]; - connectionInfo.UseCredSsp = (bool)dataRow["UseCredSsp"]; - connectionInfo.UseVmId = (bool)dataRow["UseVmId"]; - connectionInfo.RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine), (string)dataRow["RenderingEngine"]); - connectionInfo.RDPAuthenticationLevel = (AuthenticationLevel)Enum.Parse(typeof(AuthenticationLevel), (string)dataRow["RDPAuthenticationLevel"]); - connectionInfo.RDPMinutesToIdleTimeout = (int)dataRow["RDPMinutesToIdleTimeout"]; - connectionInfo.RDPAlertIdleTimeout = (bool)dataRow["RDPAlertIdleTimeout"]; - connectionInfo.LoadBalanceInfo = (string)dataRow["LoadBalanceInfo"]; - connectionInfo.Colors = (RDPColors)Enum.Parse(typeof(RDPColors), (string)dataRow["Colors"]); - connectionInfo.Resolution = (RDPResolutions)Enum.Parse(typeof(RDPResolutions), (string)dataRow["Resolution"]); - connectionInfo.AutomaticResize = (bool)dataRow["AutomaticResize"]; - connectionInfo.DisplayWallpaper = (bool)dataRow["DisplayWallpaper"]; - connectionInfo.DisplayThemes = (bool)dataRow["DisplayThemes"]; - connectionInfo.EnableFontSmoothing = (bool)dataRow["EnableFontSmoothing"]; - connectionInfo.EnableDesktopComposition = (bool)dataRow["EnableDesktopComposition"]; - connectionInfo.DisableFullWindowDrag = (bool)dataRow["DisableFullWindowDrag"]; - connectionInfo.DisableMenuAnimations = (bool)dataRow["DisableMenuAnimations"]; - connectionInfo.DisableCursorShadow = (bool)dataRow["DisableCursorShadow"]; - connectionInfo.DisableCursorBlinking = (bool)dataRow["DisableCursorBlinking"]; - connectionInfo.CacheBitmaps = (bool)dataRow["CacheBitmaps"]; - connectionInfo.RedirectDiskDrives = (bool)dataRow["RedirectDiskDrives"]; - connectionInfo.RedirectPorts = (bool)dataRow["RedirectPorts"]; - connectionInfo.RedirectPrinters = (bool)dataRow["RedirectPrinters"]; - connectionInfo.RedirectClipboard = (bool)dataRow["RedirectClipboard"]; - connectionInfo.RedirectSmartCards = (bool)dataRow["RedirectSmartCards"]; - connectionInfo.RedirectSound = (RDPSounds)Enum.Parse(typeof(RDPSounds), (string)dataRow["RedirectSound"]); - connectionInfo.SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality), (string)dataRow["SoundQuality"]); - connectionInfo.RedirectAudioCapture = (bool)dataRow["RedirectAudioCapture"]; - connectionInfo.RDPStartProgram = (string)dataRow["StartProgram"]; - connectionInfo.RDPStartProgramWorkDir = (string)dataRow["StartProgramWorkDir"]; - connectionInfo.RedirectKeys = (bool)dataRow["RedirectKeys"]; - connectionInfo.OpeningCommand = (string)dataRow["OpeningCommand"]; - connectionInfo.PreExtApp = (string)dataRow["PreExtApp"]; - connectionInfo.PostExtApp = (string)dataRow["PostExtApp"]; - connectionInfo.MacAddress = (string)dataRow["MacAddress"]; - connectionInfo.UserField = (string)dataRow["UserField"]; - connectionInfo.ExtApp = (string)dataRow["ExtApp"]; - connectionInfo.VNCCompression = (ProtocolVNC.Compression)Enum.Parse(typeof(ProtocolVNC.Compression), (string)dataRow["VNCCompression"]); - connectionInfo.VNCEncoding = (ProtocolVNC.Encoding)Enum.Parse(typeof(ProtocolVNC.Encoding), (string)dataRow["VNCEncoding"]); - connectionInfo.VNCAuthMode = (ProtocolVNC.AuthMode)Enum.Parse(typeof(ProtocolVNC.AuthMode), (string)dataRow["VNCAuthMode"]); - connectionInfo.VNCProxyType = (ProtocolVNC.ProxyType)Enum.Parse(typeof(ProtocolVNC.ProxyType), (string)dataRow["VNCProxyType"]); - connectionInfo.VNCProxyIP = (string)dataRow["VNCProxyIP"]; - connectionInfo.VNCProxyPort = (int)dataRow["VNCProxyPort"]; - connectionInfo.VNCProxyUsername = (string)dataRow["VNCProxyUsername"]; - connectionInfo.VNCProxyPassword = DecryptValue((string)dataRow["VNCProxyPassword"]); - connectionInfo.VNCColors = (ProtocolVNC.Colors)Enum.Parse(typeof(ProtocolVNC.Colors), (string)dataRow["VNCColors"]); - connectionInfo.VNCSmartSizeMode = (ProtocolVNC.SmartSizeMode)Enum.Parse(typeof(ProtocolVNC.SmartSizeMode), (string)dataRow["VNCSmartSizeMode"]); - connectionInfo.VNCViewOnly = (bool)dataRow["VNCViewOnly"]; - connectionInfo.RDGatewayUsageMethod = (RDGatewayUsageMethod)Enum.Parse(typeof(RDGatewayUsageMethod), (string)dataRow["RDGatewayUsageMethod"]); - connectionInfo.RDGatewayHostname = (string)dataRow["RDGatewayHostname"]; - connectionInfo.RDGatewayUseConnectionCredentials = (RDGatewayUseConnectionCredentials)Enum.Parse(typeof(RDGatewayUseConnectionCredentials), (string)dataRow["RDGatewayUseConnectionCredentials"]); - connectionInfo.RDGatewayUsername = (string)dataRow["RDGatewayUsername"]; - connectionInfo.RDGatewayPassword = DecryptValue((string)dataRow["RDGatewayPassword"]); - connectionInfo.RDGatewayDomain = (string)dataRow["RDGatewayDomain"]; - - if (!dataRow.IsNull("RdpVersion")) // table allows null values which must be handled - if (Enum.TryParse((string)dataRow["RdpVersion"], true, out RdpVersion rdpVersion)) - connectionInfo.RdpVersion = rdpVersion; - - connectionInfo.Inheritance.CacheBitmaps = (bool)dataRow["InheritCacheBitmaps"]; - connectionInfo.Inheritance.Colors = (bool)dataRow["InheritColors"]; - connectionInfo.Inheritance.Description = (bool)dataRow["InheritDescription"]; - connectionInfo.Inheritance.DisplayThemes = (bool)dataRow["InheritDisplayThemes"]; - connectionInfo.Inheritance.DisplayWallpaper = (bool)dataRow["InheritDisplayWallpaper"]; - connectionInfo.Inheritance.EnableFontSmoothing = (bool)dataRow["InheritEnableFontSmoothing"]; - connectionInfo.Inheritance.EnableDesktopComposition = (bool)dataRow["InheritEnableDesktopComposition"]; - connectionInfo.Inheritance.DisableFullWindowDrag = (bool)dataRow["InheritDisableFullWindowDrag"]; - connectionInfo.Inheritance.DisableMenuAnimations = (bool)dataRow["InheritDisableMenuAnimations"]; - connectionInfo.Inheritance.DisableCursorShadow = (bool)dataRow["InheritDisableCursorShadow"]; - connectionInfo.Inheritance.DisableCursorBlinking = (bool)dataRow["InheritDisableCursorBlinking"]; - connectionInfo.Inheritance.Domain = (bool)dataRow["InheritDomain"]; - connectionInfo.Inheritance.Icon = (bool)dataRow["InheritIcon"]; - connectionInfo.Inheritance.Panel = (bool)dataRow["InheritPanel"]; - connectionInfo.Inheritance.Password = (bool)dataRow["InheritPassword"]; - connectionInfo.Inheritance.Port = (bool)dataRow["InheritPort"]; - connectionInfo.Inheritance.Protocol = (bool)dataRow["InheritProtocol"]; - connectionInfo.Inheritance.SSHTunnelConnectionName = (bool)dataRow["InheritSSHTunnelConnectionName"]; - connectionInfo.Inheritance.OpeningCommand = (bool)dataRow["InheritOpeningCommand"]; - connectionInfo.Inheritance.SSHOptions = (bool)dataRow["InheritSSHOptions"]; - connectionInfo.Inheritance.PuttySession = (bool)dataRow["InheritPuttySession"]; - connectionInfo.Inheritance.RedirectDiskDrives = (bool)dataRow["InheritRedirectDiskDrives"]; - connectionInfo.Inheritance.RedirectKeys = (bool)dataRow["InheritRedirectKeys"]; - connectionInfo.Inheritance.RedirectPorts = (bool)dataRow["InheritRedirectPorts"]; - connectionInfo.Inheritance.RedirectPrinters = (bool)dataRow["InheritRedirectPrinters"]; - connectionInfo.Inheritance.RedirectClipboard = (bool)dataRow["InheritRedirectClipboard"]; - connectionInfo.Inheritance.RedirectSmartCards = (bool)dataRow["InheritRedirectSmartCards"]; - connectionInfo.Inheritance.RedirectSound = (bool)dataRow["InheritRedirectSound"]; - connectionInfo.Inheritance.SoundQuality = (bool)dataRow["InheritSoundQuality"]; - connectionInfo.Inheritance.RedirectAudioCapture = (bool)dataRow["InheritRedirectAudioCapture"]; - connectionInfo.Inheritance.Resolution = (bool)dataRow["InheritResolution"]; - connectionInfo.Inheritance.AutomaticResize = (bool)dataRow["InheritAutomaticResize"]; - connectionInfo.Inheritance.UseConsoleSession = (bool)dataRow["InheritUseConsoleSession"]; - connectionInfo.Inheritance.UseCredSsp = (bool)dataRow["InheritUseCredSsp"]; - connectionInfo.Inheritance.UseVmId = (bool)dataRow["InheritUseVmId"]; - connectionInfo.Inheritance.UseEnhancedMode = (bool)dataRow["InheritUseEnhancedMode"]; - connectionInfo.Inheritance.VmId = (bool)dataRow["InheritVmId"]; - connectionInfo.Inheritance.RenderingEngine = (bool)dataRow["InheritRenderingEngine"]; - connectionInfo.Inheritance.Username = (bool)dataRow["InheritUsername"]; - connectionInfo.Inheritance.RDPAuthenticationLevel = (bool)dataRow["InheritRDPAuthenticationLevel"]; - connectionInfo.Inheritance.RDPAlertIdleTimeout = (bool)dataRow["InheritRDPAlertIdleTimeout"]; - connectionInfo.Inheritance.RDPMinutesToIdleTimeout = (bool)dataRow["InheritRDPMinutesToIdleTimeout"]; - connectionInfo.Inheritance.LoadBalanceInfo = (bool)dataRow["InheritLoadBalanceInfo"]; - connectionInfo.Inheritance.OpeningCommand = (bool)dataRow["InheritOpeningCommand"]; - connectionInfo.Inheritance.PreExtApp = (bool)dataRow["InheritPreExtApp"]; - connectionInfo.Inheritance.PostExtApp = (bool)dataRow["InheritPostExtApp"]; - connectionInfo.Inheritance.MacAddress = (bool)dataRow["InheritMacAddress"]; - connectionInfo.Inheritance.UserField = (bool)dataRow["InheritUserField"]; - connectionInfo.Inheritance.ExtApp = (bool)dataRow["InheritExtApp"]; - connectionInfo.Inheritance.VNCCompression = (bool)dataRow["InheritVNCCompression"]; - connectionInfo.Inheritance.VNCEncoding = (bool)dataRow["InheritVNCEncoding"]; - connectionInfo.Inheritance.VNCAuthMode = (bool)dataRow["InheritVNCAuthMode"]; - connectionInfo.Inheritance.VNCProxyType = (bool)dataRow["InheritVNCProxyType"]; - connectionInfo.Inheritance.VNCProxyIP = (bool)dataRow["InheritVNCProxyIP"]; - connectionInfo.Inheritance.VNCProxyPort = (bool)dataRow["InheritVNCProxyPort"]; - connectionInfo.Inheritance.VNCProxyUsername = (bool)dataRow["InheritVNCProxyUsername"]; - connectionInfo.Inheritance.VNCProxyPassword = (bool)dataRow["InheritVNCProxyPassword"]; - connectionInfo.Inheritance.VNCColors = (bool)dataRow["InheritVNCColors"]; - connectionInfo.Inheritance.VNCSmartSizeMode = (bool)dataRow["InheritVNCSmartSizeMode"]; - connectionInfo.Inheritance.VNCViewOnly = (bool)dataRow["InheritVNCViewOnly"]; - connectionInfo.Inheritance.RDGatewayUsageMethod = (bool)dataRow["InheritRDGatewayUsageMethod"]; - connectionInfo.Inheritance.RDGatewayHostname = (bool)dataRow["InheritRDGatewayHostname"]; - connectionInfo.Inheritance.RDGatewayUseConnectionCredentials = (bool)dataRow["InheritRDGatewayUseConnectionCredentials"]; - connectionInfo.Inheritance.RDGatewayUsername = (bool)dataRow["InheritRDGatewayUsername"]; - connectionInfo.Inheritance.RDGatewayPassword = (bool)dataRow["InheritRDGatewayPassword"]; - connectionInfo.Inheritance.RDGatewayDomain = (bool)dataRow["InheritRDGatewayDomain"]; - connectionInfo.Inheritance.RdpVersion = (bool)dataRow["InheritRdpVersion"]; - } - - private string DecryptValue(string cipherText) - { - try - { - return _cryptographyProvider.Decrypt(cipherText, _decryptionKey); - } - catch (EncryptionException) - { - // value may not be encrypted - return cipherText; - } - } - - private ConnectionTreeModel CreateNodeHierarchy(List connectionList, DataTable dataTable) - { - var connectionTreeModel = new ConnectionTreeModel(); - var rootNode = new RootNodeInfo(RootNodeType.Connection, "0") - { - PasswordString = _decryptionKey.ConvertToUnsecureString() - }; - connectionTreeModel.AddRootNode(rootNode); - - foreach (DataRow row in dataTable.Rows) - { - var id = (string)row["ConstantID"]; - var connectionInfo = connectionList.First(node => node.ConstantID == id); - var parentId = (string)row["ParentID"]; - if (parentId == "0" || connectionList.All(node => node.ConstantID != parentId)) - rootNode.AddChild(connectionInfo); - else - (connectionList.First(node => node.ConstantID == parentId) as ContainerInfo)?.AddChild( - connectionInfo); - } - - return connectionTreeModel; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableSerializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableSerializer.cs deleted file mode 100644 index 9e73857c9..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/DataTableSerializer.cs +++ /dev/null @@ -1,739 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Security; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql -{ - public class DataTableSerializer : ISerializer - { - public readonly int DELETE = 0; - private readonly ICryptographyProvider _cryptographyProvider; - private readonly SecureString _encryptionKey; - private DataTable _dataTable; - private DataTable _sourceDataTable; - private Dictionary sourcePrimaryKeyDict = new Dictionary(); - private const string TableName = "tblCons"; - private readonly SaveFilter _saveFilter; - private int _currentNodeIndex; - - public Version Version { get; } = new Version(2, 8); - - public DataTableSerializer(SaveFilter saveFilter, - ICryptographyProvider cryptographyProvider, - SecureString encryptionKey) - { - _saveFilter = saveFilter.ThrowIfNull(nameof(saveFilter)); - _cryptographyProvider = cryptographyProvider.ThrowIfNull(nameof(cryptographyProvider)); - _encryptionKey = encryptionKey.ThrowIfNull(nameof(encryptionKey)); - } - - public void SetSourceDataTable(DataTable sourceDataTable) - { - _sourceDataTable = sourceDataTable; - } - - - public DataTable Serialize(ConnectionTreeModel connectionTreeModel) - { - try - { - _dataTable = BuildTable(); - _currentNodeIndex = 0; - var rootNode = connectionTreeModel.RootNodes.First(node => node is RootNodeInfo); - return Serialize(rootNode); - } - catch - { - return _dataTable; - } - } - - public DataTable Serialize(ConnectionInfo serializationTarget) - { - _dataTable = BuildTable(); - _currentNodeIndex = 0; - // Register add or update row - SerializeNodesRecursive(serializationTarget); - var entryToDelete = sourcePrimaryKeyDict.Keys.ToList(); - foreach( var entry in entryToDelete) - { - _dataTable.Rows.Find(entry).Delete(); - } - return _dataTable; - } - - private DataTable BuildTable() - { - DataTable dataTable; - if (_sourceDataTable != null) - { - dataTable = _sourceDataTable; - }else - { - dataTable = new DataTable(TableName); - - } - if (dataTable.Columns.Count == 0) CreateSchema(dataTable); - if (dataTable.PrimaryKey.Length == 0 ) SetPrimaryKey(dataTable); - foreach(DataRow row in dataTable.Rows) - { - sourcePrimaryKeyDict.Add((string)row["ConstantID"], DELETE); - } - return dataTable; - } - - private void CreateSchema(DataTable dataTable) - { - // Note: these columns must be defined in the same order that they exist in the DB - dataTable.Columns.Add("ID", typeof(int)); - dataTable.Columns[0].AutoIncrement = true; - dataTable.Columns.Add("ConstantID", typeof(string)); - dataTable.Columns.Add("PositionID", typeof(int)); - dataTable.Columns.Add("ParentID", typeof(string)); - dataTable.Columns.Add("LastChange", MiscTools.DBTimeStampType()); - dataTable.Columns.Add("Name", typeof(string)); - dataTable.Columns.Add("Type", typeof(string)); - dataTable.Columns.Add("Expanded", typeof(bool)); - dataTable.Columns.Add("Description", typeof(string)); - dataTable.Columns.Add("Icon", typeof(string)); - dataTable.Columns.Add("Panel", typeof(string)); - dataTable.Columns.Add("Username", typeof(string)); - dataTable.Columns.Add("Domain", typeof(string)); - dataTable.Columns.Add("Password", typeof(string)); - dataTable.Columns.Add("Hostname", typeof(string)); - dataTable.Columns.Add("Port", typeof(int)); - dataTable.Columns.Add("Protocol", typeof(string)); - dataTable.Columns.Add("SSHTunnelConnectionName", typeof(string)); - dataTable.Columns.Add("SSHOptions", typeof(string)); - dataTable.Columns.Add("PuttySession", typeof(string)); - dataTable.Columns.Add("ConnectToConsole", typeof(bool)); - dataTable.Columns.Add("UseCredSsp", typeof(bool)); - dataTable.Columns.Add("RenderingEngine", typeof(string)); - dataTable.Columns.Add("RDPAuthenticationLevel", typeof(string)); - dataTable.Columns.Add("Colors", typeof(string)); - dataTable.Columns.Add("Resolution", typeof(string)); - dataTable.Columns.Add("DisplayWallpaper", typeof(bool)); - dataTable.Columns.Add("DisplayThemes", typeof(bool)); - dataTable.Columns.Add("EnableFontSmoothing", typeof(bool)); - dataTable.Columns.Add("EnableDesktopComposition", typeof(bool)); - dataTable.Columns.Add("DisableFullWindowDrag", typeof(bool)); - dataTable.Columns.Add("DisableMenuAnimations", typeof(bool)); - dataTable.Columns.Add("DisableCursorShadow", typeof(bool)); - dataTable.Columns.Add("DisableCursorBlinking", typeof(bool)); - dataTable.Columns.Add("CacheBitmaps", typeof(bool)); - dataTable.Columns.Add("RedirectDiskDrives", typeof(bool)); - dataTable.Columns.Add("RedirectPorts", typeof(bool)); - dataTable.Columns.Add("RedirectPrinters", typeof(bool)); - dataTable.Columns.Add("RedirectClipboard", typeof(bool)); - dataTable.Columns.Add("RedirectSmartCards", typeof(bool)); - dataTable.Columns.Add("RedirectSound", typeof(string)); - dataTable.Columns.Add("RedirectAudioCapture", typeof(bool)); - dataTable.Columns.Add("RedirectKeys", typeof(bool)); - dataTable.Columns.Add("Connected", typeof(bool)); - dataTable.Columns.Add("OpeningCommand", typeof(string)); - dataTable.Columns.Add("PreExtApp", typeof(string)); - dataTable.Columns.Add("PostExtApp", typeof(string)); - dataTable.Columns.Add("MacAddress", typeof(string)); - dataTable.Columns.Add("UserField", typeof(string)); - dataTable.Columns.Add("ExtApp", typeof(string)); - dataTable.Columns.Add("VNCCompression", typeof(string)); - dataTable.Columns.Add("VNCEncoding", typeof(string)); - dataTable.Columns.Add("VNCAuthMode", typeof(string)); - dataTable.Columns.Add("VNCProxyType", typeof(string)); - dataTable.Columns.Add("VNCProxyIP", typeof(string)); - dataTable.Columns.Add("VNCProxyPort", typeof(int)); - dataTable.Columns.Add("VNCProxyUsername", typeof(string)); - dataTable.Columns.Add("VNCProxyPassword", typeof(string)); - dataTable.Columns.Add("VNCColors", typeof(string)); - dataTable.Columns.Add("VNCSmartSizeMode", typeof(string)); - dataTable.Columns.Add("VNCViewOnly", typeof(bool)); - dataTable.Columns.Add("RDGatewayUsageMethod", typeof(string)); - dataTable.Columns.Add("RDGatewayHostname", typeof(string)); - dataTable.Columns.Add("RDGatewayUseConnectionCredentials", typeof(string)); - dataTable.Columns.Add("RDGatewayUsername", typeof(string)); - dataTable.Columns.Add("RDGatewayPassword", typeof(string)); - dataTable.Columns.Add("RDGatewayDomain", typeof(string)); - dataTable.Columns.Add("InheritCacheBitmaps", typeof(bool)); - dataTable.Columns.Add("InheritColors", typeof(bool)); - dataTable.Columns.Add("InheritDescription", typeof(bool)); - dataTable.Columns.Add("InheritDisplayThemes", typeof(bool)); - dataTable.Columns.Add("InheritDisplayWallpaper", typeof(bool)); - dataTable.Columns.Add("InheritEnableFontSmoothing", typeof(bool)); - dataTable.Columns.Add("InheritEnableDesktopComposition", typeof(bool)); - dataTable.Columns.Add("InheritDisableFullWindowDrag", typeof(bool)); - dataTable.Columns.Add("InheritDisableMenuAnimations", typeof(bool)); - dataTable.Columns.Add("InheritDisableCursorShadow", typeof(bool)); - dataTable.Columns.Add("InheritDisableCursorBlinking", typeof(bool)); - dataTable.Columns.Add("InheritDomain", typeof(bool)); - dataTable.Columns.Add("InheritIcon", typeof(bool)); - dataTable.Columns.Add("InheritPanel", typeof(bool)); - dataTable.Columns.Add("InheritPassword", typeof(bool)); - dataTable.Columns.Add("InheritPort", typeof(bool)); - dataTable.Columns.Add("InheritProtocol", typeof(bool)); - dataTable.Columns.Add("InheritSSHTunnelConnectionName", typeof(bool)); - dataTable.Columns.Add("InheritSSHOptions", typeof(bool)); - dataTable.Columns.Add("InheritPuttySession", typeof(bool)); - dataTable.Columns.Add("InheritRedirectDiskDrives", typeof(bool)); - dataTable.Columns.Add("InheritRedirectKeys", typeof(bool)); - dataTable.Columns.Add("InheritRedirectPorts", typeof(bool)); - dataTable.Columns.Add("InheritRedirectPrinters", typeof(bool)); - dataTable.Columns.Add("InheritRedirectClipboard", typeof(bool)); - dataTable.Columns.Add("InheritRedirectSmartCards", typeof(bool)); - dataTable.Columns.Add("InheritRedirectSound", typeof(bool)); - dataTable.Columns.Add("InheritRedirectAudioCapture", typeof(bool)); - dataTable.Columns.Add("InheritResolution", typeof(bool)); - dataTable.Columns.Add("InheritUseConsoleSession", typeof(bool)); - dataTable.Columns.Add("InheritUseCredSsp", typeof(bool)); - dataTable.Columns.Add("InheritRenderingEngine", typeof(bool)); - dataTable.Columns.Add("InheritRDPAuthenticationLevel", typeof(bool)); - dataTable.Columns.Add("InheritUsername", typeof(bool)); - dataTable.Columns.Add("InheritOpeningCommand", typeof(bool)); - dataTable.Columns.Add("InheritPreExtApp", typeof(bool)); - dataTable.Columns.Add("InheritPostExtApp", typeof(bool)); - dataTable.Columns.Add("InheritMacAddress", typeof(bool)); - dataTable.Columns.Add("InheritUserField", typeof(bool)); - dataTable.Columns.Add("InheritExtApp", typeof(bool)); - dataTable.Columns.Add("InheritVNCCompression", typeof(bool)); - dataTable.Columns.Add("InheritVNCEncoding", typeof(bool)); - dataTable.Columns.Add("InheritVNCAuthMode", typeof(bool)); - dataTable.Columns.Add("InheritVNCProxyType", typeof(bool)); - dataTable.Columns.Add("InheritVNCProxyIP", typeof(bool)); - dataTable.Columns.Add("InheritVNCProxyPort", typeof(bool)); - dataTable.Columns.Add("InheritVNCProxyUsername", typeof(bool)); - dataTable.Columns.Add("InheritVNCProxyPassword", typeof(bool)); - dataTable.Columns.Add("InheritVNCColors", typeof(bool)); - dataTable.Columns.Add("InheritVNCSmartSizeMode", typeof(bool)); - dataTable.Columns.Add("InheritVNCViewOnly", typeof(bool)); - dataTable.Columns.Add("InheritRDGatewayUsageMethod", typeof(bool)); - dataTable.Columns.Add("InheritRDGatewayHostname", typeof(bool)); - dataTable.Columns.Add("InheritRDGatewayUseConnectionCredentials", typeof(bool)); - dataTable.Columns.Add("InheritRDGatewayUsername", typeof(bool)); - dataTable.Columns.Add("InheritRDGatewayPassword", typeof(bool)); - dataTable.Columns.Add("InheritRDGatewayDomain", typeof(bool)); - dataTable.Columns.Add("LoadBalanceInfo", typeof(string)); - dataTable.Columns.Add("AutomaticResize", typeof(bool)); - dataTable.Columns.Add("InheritLoadBalanceInfo", typeof(bool)); - dataTable.Columns.Add("InheritAutomaticResize", typeof(bool)); - dataTable.Columns.Add("RDPMinutesToIdleTimeout", typeof(int)); - dataTable.Columns.Add("RDPAlertIdleTimeout", typeof(bool)); - dataTable.Columns.Add("SoundQuality", typeof(string)); - dataTable.Columns.Add("InheritRDPMinutesToIdleTimeout", typeof(bool)); - dataTable.Columns.Add("InheritRDPAlertIdleTimeout", typeof(bool)); - dataTable.Columns.Add("InheritSoundQuality", typeof(bool)); - dataTable.Columns.Add("VmId", typeof(string)); - dataTable.Columns.Add("UseVmId", typeof(bool)); - dataTable.Columns.Add("UseEnhancedMode", typeof(bool)); - dataTable.Columns.Add("InheritVmId", typeof(bool)); - dataTable.Columns.Add("InheritUseVmId", typeof(bool)); - dataTable.Columns.Add("InheritUseEnhancedMode", typeof(bool)); - dataTable.Columns.Add("RdpVersion", typeof(string)); - dataTable.Columns.Add("InheritRdpVersion", typeof(bool)); - dataTable.Columns.Add("EnhancedMode", typeof(bool)); - dataTable.Columns.Add("InheritEnhancedMode", typeof(bool)); - dataTable.Columns.Add("Favorite", typeof(bool)); - dataTable.Columns.Add("InheritFavorite", typeof(bool)); - dataTable.Columns.Add("ICAEncryptionStrength", typeof(string)); - dataTable.Columns.Add("InheritICAEncryptionStrength", typeof(bool)); - dataTable.Columns.Add("StartProgram", typeof(string)); - dataTable.Columns.Add("StartProgramWorkDir", typeof(string)); - } - - private void SetPrimaryKey(DataTable dataTable) - { - dataTable.PrimaryKey = new[] {dataTable.Columns["ConstantID"]}; - } - - private void SerializeNodesRecursive(ConnectionInfo connectionInfo) - { - if (!(connectionInfo is RootNodeInfo)) - SerializeConnectionInfo(connectionInfo); - var containerInfo = connectionInfo as ContainerInfo; - if (containerInfo == null) return; - foreach (var child in containerInfo.Children) - SerializeNodesRecursive(child); - } - - public bool isRowUpdated(ConnectionInfo connectionInfo, DataRow dataRow) - { - var isFieldNotChange = dataRow["Name"].Equals(connectionInfo.Name) && - dataRow["Type"].Equals(connectionInfo.GetTreeNodeType().ToString()) && - dataRow["ParentID"].Equals(connectionInfo.Parent?.ConstantID ?? "") && - dataRow["PositionID"].Equals(_currentNodeIndex) && - dataRow["Expanded"].Equals(false) && - dataRow["Description"].Equals(connectionInfo.Description) && - dataRow["Icon"].Equals(connectionInfo.Icon) && - dataRow["Panel"].Equals(connectionInfo.Panel) && - dataRow["Username"].Equals(_saveFilter.SaveUsername ? connectionInfo.Username : "") && - dataRow["Domain"].Equals(_saveFilter.SaveDomain ? connectionInfo.Domain : ""); - - isFieldNotChange = isFieldNotChange && dataRow["Hostname"].Equals(connectionInfo.Hostname); - isFieldNotChange = isFieldNotChange && dataRow["VmId"].Equals(connectionInfo.VmId); - isFieldNotChange = isFieldNotChange && dataRow["Protocol"].Equals(connectionInfo.Protocol.ToString()); - isFieldNotChange = isFieldNotChange && dataRow["PuttySession"].Equals(connectionInfo.PuttySession); - isFieldNotChange = isFieldNotChange && - dataRow["Port"].Equals(connectionInfo.Port); - isFieldNotChange = isFieldNotChange && - dataRow["ConnectToConsole"].Equals(connectionInfo.UseConsoleSession); - isFieldNotChange = isFieldNotChange && - dataRow["UseCredSsp"].Equals(connectionInfo.UseCredSsp); - isFieldNotChange = isFieldNotChange && - dataRow["UseVmId"].Equals(connectionInfo.UseVmId); - isFieldNotChange = isFieldNotChange && - dataRow["UseEnhancedMode"].Equals(connectionInfo.UseEnhancedMode); - isFieldNotChange = isFieldNotChange && - dataRow["RenderingEngine"].Equals(connectionInfo.RenderingEngine.ToString()); - isFieldNotChange = isFieldNotChange && - dataRow["RDPAuthenticationLevel"].Equals(connectionInfo.RDPAuthenticationLevel.ToString()); - isFieldNotChange = isFieldNotChange && - dataRow["RDPMinutesToIdleTimeout"].Equals(connectionInfo.RDPMinutesToIdleTimeout); - isFieldNotChange = isFieldNotChange && - dataRow["RDPAlertIdleTimeout"].Equals(connectionInfo.RDPAlertIdleTimeout); - isFieldNotChange = isFieldNotChange && - dataRow["LoadBalanceInfo"].Equals(connectionInfo.LoadBalanceInfo); - isFieldNotChange = isFieldNotChange && - dataRow["Colors"].Equals(connectionInfo.Colors.ToString()); - isFieldNotChange = isFieldNotChange && - dataRow["Resolution"].Equals(connectionInfo.Resolution.ToString()); - isFieldNotChange = isFieldNotChange && - dataRow["AutomaticResize"].Equals(connectionInfo.AutomaticResize); - isFieldNotChange = isFieldNotChange && - dataRow["DisplayWallpaper"].Equals(connectionInfo.DisplayWallpaper) && - dataRow["DisplayThemes"].Equals(connectionInfo.DisplayThemes) && - dataRow["EnableFontSmoothing"].Equals(connectionInfo.EnableFontSmoothing) && - dataRow["EnableDesktopComposition"].Equals(connectionInfo.EnableDesktopComposition) && - dataRow["DisableFullWindowDrag"].Equals(connectionInfo.DisableFullWindowDrag) && - dataRow["DisableMenuAnimations"].Equals(connectionInfo.DisableMenuAnimations) && - dataRow["DisableCursorShadow"].Equals(connectionInfo.DisableCursorShadow) && - dataRow["DisableCursorBlinking"].Equals(connectionInfo.DisableCursorBlinking) && - dataRow["CacheBitmaps"].Equals(connectionInfo.CacheBitmaps) && - dataRow["RedirectDiskDrives"].Equals(connectionInfo.RedirectDiskDrives) && - dataRow["RedirectPorts"].Equals(connectionInfo.RedirectPorts) && - dataRow["RedirectPrinters"].Equals(connectionInfo.RedirectPrinters) && - dataRow["RedirectClipboard"].Equals(connectionInfo.RedirectClipboard) && - dataRow["RedirectSmartCards"].Equals(connectionInfo.RedirectSmartCards) && - dataRow["RedirectSound"].Equals(connectionInfo.RedirectSound.ToString()) && - dataRow["SoundQuality"].Equals(connectionInfo.SoundQuality.ToString()) && - dataRow["RedirectAudioCapture"].Equals(connectionInfo.RedirectAudioCapture) && - dataRow["RedirectKeys"].Equals(connectionInfo.RedirectKeys) && - dataRow["StartProgram"].Equals(connectionInfo.RDPStartProgram) && - dataRow["StartProgramWorkDir"].Equals(connectionInfo.RDPStartProgramWorkDir); - - isFieldNotChange = isFieldNotChange && - dataRow["Connected"].Equals(false) && // TODO: this column can eventually be removed. we now save this property locally - dataRow["OpeningCommand"].Equals(connectionInfo.OpeningCommand) && - dataRow["PreExtApp"].Equals(connectionInfo.PreExtApp) && - dataRow["PostExtApp"].Equals(connectionInfo.PostExtApp) && - dataRow["MacAddress"].Equals(connectionInfo.MacAddress) && - dataRow["UserField"].Equals(connectionInfo.UserField) && - dataRow["ExtApp"].Equals(connectionInfo.ExtApp) && - dataRow["VNCCompression"].Equals(connectionInfo.VNCCompression.ToString()) && - dataRow["VNCEncoding"].Equals(connectionInfo.VNCEncoding.ToString()) && - dataRow["VNCAuthMode"].Equals(connectionInfo.VNCAuthMode.ToString()) && - dataRow["VNCProxyType"].Equals(connectionInfo.VNCProxyType.ToString()) && - dataRow["VNCProxyIP"].Equals(connectionInfo.VNCProxyIP) && - dataRow["VNCProxyPort"].Equals(connectionInfo.VNCProxyPort) && - dataRow["VNCProxyUsername"].Equals(connectionInfo.VNCProxyUsername) && - dataRow["VNCColors"].Equals(connectionInfo.VNCColors.ToString()) && - dataRow["VNCSmartSizeMode"].Equals(connectionInfo.VNCSmartSizeMode.ToString()) && - dataRow["VNCViewOnly"].Equals(connectionInfo.VNCViewOnly) && - dataRow["RDGatewayUsageMethod"].Equals(connectionInfo.RDGatewayUsageMethod.ToString()) && - dataRow["RDGatewayHostname"].Equals(connectionInfo.RDGatewayHostname) && - dataRow["RDGatewayUseConnectionCredentials"].Equals(connectionInfo.RDGatewayUseConnectionCredentials.ToString()) && - dataRow["RDGatewayUsername"].Equals(connectionInfo.RDGatewayUsername) && - dataRow["RDGatewayDomain"].Equals(connectionInfo.RDGatewayDomain) && - dataRow["RdpVersion"].Equals(connectionInfo.RdpVersion.ToString()); - - var isInheritanceFieldNotChange = false; - if (_saveFilter.SaveInheritance) - { - isInheritanceFieldNotChange = (dataRow["InheritCacheBitmaps"].Equals(connectionInfo.Inheritance.CacheBitmaps) && - dataRow["InheritColors"].Equals(connectionInfo.Inheritance.Colors) && - dataRow["InheritDescription"].Equals(connectionInfo.Inheritance.Description) && - dataRow["InheritDisplayThemes"].Equals(connectionInfo.Inheritance.DisplayThemes) && - dataRow["InheritDisplayWallpaper"].Equals(connectionInfo.Inheritance.DisplayWallpaper) && - dataRow["InheritEnableFontSmoothing"].Equals(connectionInfo.Inheritance.EnableFontSmoothing) && - dataRow["InheritEnableDesktopComposition"].Equals(connectionInfo.Inheritance.EnableDesktopComposition) && - dataRow["InheritDisableFullWindowDrag"].Equals(connectionInfo.Inheritance.DisableFullWindowDrag) && - dataRow["InheritDisableMenuAnimations"].Equals(connectionInfo.Inheritance.DisableMenuAnimations) && - dataRow["InheritDisableCursorShadow"].Equals(connectionInfo.Inheritance.DisableCursorShadow) && - dataRow["InheritDisableCursorBlinking"].Equals(connectionInfo.Inheritance.DisableCursorBlinking) && - dataRow["InheritDomain"].Equals(connectionInfo.Inheritance.Domain) && - dataRow["InheritIcon"].Equals(connectionInfo.Inheritance.Icon) && - dataRow["InheritPanel"].Equals(connectionInfo.Inheritance.Panel) && - dataRow["InheritPassword"].Equals(connectionInfo.Inheritance.Password) && - dataRow["InheritPort"].Equals(connectionInfo.Inheritance.Port) && - dataRow["InheritProtocol"].Equals(connectionInfo.Inheritance.Protocol) && - dataRow["InheritPuttySession"].Equals(connectionInfo.Inheritance.PuttySession) && - dataRow["InheritRedirectDiskDrives"].Equals(connectionInfo.Inheritance.RedirectDiskDrives) && - dataRow["InheritRedirectKeys"].Equals(connectionInfo.Inheritance.RedirectKeys) && - dataRow["InheritRedirectPorts"].Equals(connectionInfo.Inheritance.RedirectPorts) && - dataRow["InheritRedirectPrinters"].Equals(connectionInfo.Inheritance.RedirectPrinters) && - dataRow["InheritRedirectClipboard"].Equals(connectionInfo.Inheritance.RedirectClipboard) && - dataRow["InheritRedirectSmartCards"].Equals(connectionInfo.Inheritance.RedirectSmartCards) && - dataRow["InheritRedirectSound"].Equals(connectionInfo.Inheritance.RedirectSound) && - dataRow["InheritSoundQuality"].Equals(connectionInfo.Inheritance.SoundQuality) && - dataRow["InheritRedirectAudioCapture"].Equals(connectionInfo.Inheritance.RedirectAudioCapture) && - dataRow["InheritResolution"].Equals(connectionInfo.Inheritance.Resolution) && - dataRow["InheritAutomaticResize"].Equals(connectionInfo.Inheritance.AutomaticResize) && - dataRow["InheritUseConsoleSession"].Equals(connectionInfo.Inheritance.UseConsoleSession) && - dataRow["InheritUseCredSsp"].Equals(connectionInfo.Inheritance.UseCredSsp) && - dataRow["InheritRenderingEngine"].Equals(connectionInfo.Inheritance.RenderingEngine) && - dataRow["InheritUsername"].Equals(connectionInfo.Inheritance.Username) && - dataRow["InheritVmId"].Equals(connectionInfo.Inheritance.VmId) && - dataRow["InheritUseVmId"].Equals(connectionInfo.Inheritance.UseVmId) && - dataRow["InheritUseEnhancedMode"].Equals(connectionInfo.Inheritance.UseEnhancedMode) && - dataRow["InheritRDPAuthenticationLevel"].Equals(connectionInfo.Inheritance.RDPAuthenticationLevel) && - dataRow["InheritRDPMinutesToIdleTimeout"].Equals(connectionInfo.Inheritance.RDPMinutesToIdleTimeout) && - dataRow["InheritRDPAlertIdleTimeout"].Equals(connectionInfo.Inheritance.RDPAlertIdleTimeout) && - dataRow["InheritLoadBalanceInfo"].Equals(connectionInfo.Inheritance.LoadBalanceInfo) && - dataRow["InheritOpeningCommand"].Equals(connectionInfo.Inheritance.OpeningCommand) && - dataRow["InheritPreExtApp"].Equals(connectionInfo.Inheritance.PreExtApp) && - dataRow["InheritPostExtApp"].Equals(connectionInfo.Inheritance.PostExtApp) && - dataRow["InheritMacAddress"].Equals(connectionInfo.Inheritance.MacAddress) && - dataRow["InheritUserField"].Equals(connectionInfo.Inheritance.UserField) && - dataRow["InheritExtApp"].Equals(connectionInfo.Inheritance.ExtApp) && - dataRow["InheritVNCCompression"].Equals(connectionInfo.Inheritance.VNCCompression) && - dataRow["InheritVNCEncoding"].Equals(connectionInfo.Inheritance.VNCEncoding) && - dataRow["InheritVNCAuthMode"].Equals(connectionInfo.Inheritance.VNCAuthMode) && - dataRow["InheritVNCProxyType"].Equals(connectionInfo.Inheritance.VNCProxyType) && - dataRow["InheritVNCProxyIP"].Equals(connectionInfo.Inheritance.VNCProxyIP) && - dataRow["InheritVNCProxyPort"].Equals(connectionInfo.Inheritance.VNCProxyPort) && - dataRow["InheritVNCProxyUsername"].Equals(connectionInfo.Inheritance.VNCProxyUsername) && - dataRow["InheritVNCProxyPassword"].Equals(connectionInfo.Inheritance.VNCProxyPassword) && - dataRow["InheritVNCColors"].Equals(connectionInfo.Inheritance.VNCColors) && - dataRow["InheritVNCSmartSizeMode"].Equals(connectionInfo.Inheritance.VNCSmartSizeMode) && - dataRow["InheritVNCViewOnly"].Equals(connectionInfo.Inheritance.VNCViewOnly) && - dataRow["InheritRDGatewayUsageMethod"].Equals(connectionInfo.Inheritance.RDGatewayUsageMethod) && - dataRow["InheritRDGatewayHostname"].Equals(connectionInfo.Inheritance.RDGatewayHostname) && - dataRow["InheritRDGatewayUseConnectionCredentials"].Equals(connectionInfo.Inheritance.RDGatewayUseConnectionCredentials) && - dataRow["InheritRDGatewayUsername"].Equals(connectionInfo.Inheritance.RDGatewayUsername) && - dataRow["InheritRDGatewayPassword"].Equals(connectionInfo.Inheritance.RDGatewayPassword) && - dataRow["InheritRDGatewayDomain"].Equals(connectionInfo.Inheritance.RDGatewayDomain) && - dataRow["InheritRdpVersion"].Equals(connectionInfo.Inheritance.RdpVersion)); - } - else - { - isInheritanceFieldNotChange = (dataRow["InheritCacheBitmaps"].Equals(false) && - dataRow["InheritColors"].Equals(false) && - dataRow["InheritDescription"].Equals(false) && - dataRow["InheritDisplayThemes"].Equals(false) && - dataRow["InheritDisplayWallpaper"].Equals(false) && - dataRow["InheritEnableFontSmoothing"].Equals(false) && - dataRow["InheritEnableDesktopComposition"].Equals(false) && - dataRow["InheritDisableFullWindowDrag"].Equals(false) && - dataRow["InheritDisableMenuAnimations"].Equals(false) && - dataRow["InheritDisableCursorShadow"].Equals(false) && - dataRow["InheritDisableCursorBlinking"].Equals(false) && - dataRow["InheritDomain"].Equals(false) && - dataRow["InheritIcon"].Equals(false) && - dataRow["InheritPanel"].Equals(false) && - dataRow["InheritPassword"].Equals(false) && - dataRow["InheritPort"].Equals(false) && - dataRow["InheritProtocol"].Equals(false) && - dataRow["InheritPuttySession"].Equals(false) && - dataRow["InheritRedirectDiskDrives"].Equals(false) && - dataRow["InheritRedirectKeys"].Equals(false) && - dataRow["InheritRedirectPorts"].Equals(false) && - dataRow["InheritRedirectPrinters"].Equals(false) && - dataRow["InheritRedirectClipboard"].Equals(false) && - dataRow["InheritRedirectSmartCards"].Equals(false) && - dataRow["InheritRedirectSound"].Equals(false) && - dataRow["InheritSoundQuality"].Equals(false) && - dataRow["InheritRedirectAudioCapture"].Equals(false) && - dataRow["InheritResolution"].Equals(false) && - dataRow["InheritAutomaticResize"].Equals(false) && - dataRow["InheritUseConsoleSession"].Equals(false) && - dataRow["InheritUseCredSsp"].Equals(false) && - dataRow["InheritRenderingEngine"].Equals(false) && - dataRow["InheritUsername"].Equals(false) && - dataRow["InheritRDPAuthenticationLevel"].Equals(false) && - dataRow["InheritRDPMinutesToIdleTimeout"].Equals(false) && - dataRow["InheritRDPAlertIdleTimeout"].Equals(false) && - dataRow["InheritLoadBalanceInfo"].Equals(false) && - dataRow["InheritOpeningCommand"].Equals(false) && - dataRow["InheritPreExtApp"].Equals(false) && - dataRow["InheritPostExtApp"].Equals(false) && - dataRow["InheritMacAddress"].Equals(false) && - dataRow["InheritUserField"].Equals(false) && - dataRow["InheritExtApp"].Equals(false) && - dataRow["InheritVNCCompression"].Equals(false) && - dataRow["InheritVNCEncoding"].Equals(false) && - dataRow["InheritVNCAuthMode"].Equals(false) && - dataRow["InheritVNCProxyType"].Equals(false) && - dataRow["InheritVNCProxyIP"].Equals(false) && - dataRow["InheritVNCProxyPort"].Equals(false) && - dataRow["InheritVNCProxyUsername"].Equals(false) && - dataRow["InheritVNCProxyPassword"].Equals(false) && - dataRow["InheritVNCColors"].Equals(false) && - dataRow["InheritVNCSmartSizeMode"].Equals(false) && - dataRow["InheritVNCViewOnly"].Equals(false) && - dataRow["InheritRDGatewayUsageMethod"].Equals(false) && - dataRow["InheritRDGatewayHostname"].Equals(false) && - dataRow["InheritRDGatewayUseConnectionCredentials"].Equals(false) && - dataRow["InheritRDGatewayUsername"].Equals(false) && - dataRow["InheritRDGatewayPassword"].Equals(false) && - dataRow["InheritRDGatewayDomain"].Equals(false) && - dataRow["InheritRdpVersion"].Equals(false)); - } - - var pwd = dataRow["Password"].Equals(_saveFilter.SavePassword ? _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey) : "") && - dataRow["VNCProxyPassword"].Equals(_cryptographyProvider.Encrypt(connectionInfo.VNCProxyPassword, _encryptionKey)) && - dataRow["RDGatewayPassword"].Equals(_cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey)); - return !(pwd && isFieldNotChange && isInheritanceFieldNotChange); - } - - private void SerializeConnectionInfo(ConnectionInfo connectionInfo) - { - _currentNodeIndex++; - var isNewRow = false; - DataRow dataRow = _dataTable.Rows.Find(connectionInfo.ConstantID); - if (dataRow == null) - { - dataRow = _dataTable.NewRow(); - dataRow["ConstantID"] = connectionInfo.ConstantID; - isNewRow = true; - } - else - { - sourcePrimaryKeyDict.Remove(connectionInfo.ConstantID); - } - var tmp = isRowUpdated(connectionInfo, dataRow); - if (!tmp){ - return; - } - dataRow["Name"] = connectionInfo.Name; - dataRow["Type"] = connectionInfo.GetTreeNodeType().ToString(); - dataRow["ParentID"] = connectionInfo.Parent?.ConstantID ?? ""; - dataRow["PositionID"] = _currentNodeIndex; - dataRow["LastChange"] = MiscTools.DBTimeStampNow(); - dataRow["Expanded"] = - false; // TODO: this column can eventually be removed. we now save this property locally - dataRow["Description"] = connectionInfo.Description; - dataRow["Icon"] = connectionInfo.Icon; - dataRow["Panel"] = connectionInfo.Panel; - dataRow["Username"] = _saveFilter.SaveUsername ? connectionInfo.Username : ""; - dataRow["Domain"] = _saveFilter.SaveDomain ? connectionInfo.Domain : ""; - dataRow["Password"] = _saveFilter.SavePassword - ? _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey) - : ""; - dataRow["Hostname"] = connectionInfo.Hostname; - dataRow["VmId"] = connectionInfo.VmId; - dataRow["Protocol"] = connectionInfo.Protocol; - dataRow["SSHTunnelConnectionName"] = connectionInfo.SSHTunnelConnectionName; - dataRow["OpeningCommand"] = connectionInfo.OpeningCommand; - dataRow["SSHOptions"] = connectionInfo.SSHOptions; - dataRow["PuttySession"] = connectionInfo.PuttySession; - dataRow["Port"] = connectionInfo.Port; - dataRow["ConnectToConsole"] = connectionInfo.UseConsoleSession; - dataRow["UseCredSsp"] = connectionInfo.UseCredSsp; - dataRow["UseVmId"] = connectionInfo.UseVmId; - dataRow["UseEnhancedMode"] = connectionInfo.UseEnhancedMode; - dataRow["RenderingEngine"] = connectionInfo.RenderingEngine; - dataRow["RDPAuthenticationLevel"] = connectionInfo.RDPAuthenticationLevel; - dataRow["RDPMinutesToIdleTimeout"] = connectionInfo.RDPMinutesToIdleTimeout; - dataRow["RDPAlertIdleTimeout"] = connectionInfo.RDPAlertIdleTimeout; - dataRow["LoadBalanceInfo"] = connectionInfo.LoadBalanceInfo; - dataRow["Colors"] = connectionInfo.Colors; - dataRow["Resolution"] = connectionInfo.Resolution; - dataRow["AutomaticResize"] = connectionInfo.AutomaticResize; - dataRow["DisplayWallpaper"] = connectionInfo.DisplayWallpaper; - dataRow["DisplayThemes"] = connectionInfo.DisplayThemes; - dataRow["EnableFontSmoothing"] = connectionInfo.EnableFontSmoothing; - dataRow["EnableDesktopComposition"] = connectionInfo.EnableDesktopComposition; - dataRow["DisableFullWindowDrag"] = connectionInfo.DisableFullWindowDrag; - dataRow["DisableMenuAnimations"] = connectionInfo.DisableMenuAnimations; - dataRow["DisableCursorShadow"] = connectionInfo.DisableCursorShadow; - dataRow["DisableCursorBlinking"] = connectionInfo.DisableCursorBlinking; - dataRow["CacheBitmaps"] = connectionInfo.CacheBitmaps; - dataRow["RedirectDiskDrives"] = connectionInfo.RedirectDiskDrives; - dataRow["RedirectPorts"] = connectionInfo.RedirectPorts; - dataRow["RedirectPrinters"] = connectionInfo.RedirectPrinters; - dataRow["RedirectClipboard"] = connectionInfo.RedirectClipboard; - dataRow["RedirectSmartCards"] = connectionInfo.RedirectSmartCards; - dataRow["RedirectSound"] = connectionInfo.RedirectSound; - dataRow["SoundQuality"] = connectionInfo.SoundQuality; - dataRow["RedirectAudioCapture"] = connectionInfo.RedirectAudioCapture; - dataRow["RedirectKeys"] = connectionInfo.RedirectKeys; - dataRow["Connected"] = false; // TODO: this column can eventually be removed. we now save this property locally - dataRow["OpeningCommand"] = connectionInfo.OpeningCommand; - dataRow["PreExtApp"] = connectionInfo.PreExtApp; - dataRow["PostExtApp"] = connectionInfo.PostExtApp; - dataRow["MacAddress"] = connectionInfo.MacAddress; - dataRow["UserField"] = connectionInfo.UserField; - dataRow["ExtApp"] = connectionInfo.ExtApp; - dataRow["VNCCompression"] = connectionInfo.VNCCompression; - dataRow["VNCEncoding"] = connectionInfo.VNCEncoding; - dataRow["VNCAuthMode"] = connectionInfo.VNCAuthMode; - dataRow["VNCProxyType"] = connectionInfo.VNCProxyType; - dataRow["VNCProxyIP"] = connectionInfo.VNCProxyIP; - dataRow["VNCProxyPort"] = connectionInfo.VNCProxyPort; - dataRow["VNCProxyUsername"] = connectionInfo.VNCProxyUsername; - dataRow["VNCProxyPassword"] = - _cryptographyProvider.Encrypt(connectionInfo.VNCProxyPassword, _encryptionKey); - dataRow["VNCColors"] = connectionInfo.VNCColors; - dataRow["VNCSmartSizeMode"] = connectionInfo.VNCSmartSizeMode; - dataRow["VNCViewOnly"] = connectionInfo.VNCViewOnly; - dataRow["RDGatewayUsageMethod"] = connectionInfo.RDGatewayUsageMethod; - dataRow["RDGatewayHostname"] = connectionInfo.RDGatewayHostname; - dataRow["RDGatewayUseConnectionCredentials"] = connectionInfo.RDGatewayUseConnectionCredentials; - dataRow["RDGatewayUsername"] = connectionInfo.RDGatewayUsername; - dataRow["RDGatewayPassword"] = _cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey); - dataRow["RDGatewayDomain"] = connectionInfo.RDGatewayDomain; - dataRow["RdpVersion"] = connectionInfo.RdpVersion; - dataRow["Favorite"] = connectionInfo.Favorite; - dataRow["ICAEncryptionStrength"] = string.Empty; - dataRow["StartProgram"] = connectionInfo.RDPStartProgram; - dataRow["StartProgramWorkDir"] = connectionInfo.RDPStartProgramWorkDir; - - if (_saveFilter.SaveInheritance) - { - dataRow["InheritCacheBitmaps"] = connectionInfo.Inheritance.CacheBitmaps; - dataRow["InheritColors"] = connectionInfo.Inheritance.Colors; - dataRow["InheritDescription"] = connectionInfo.Inheritance.Description; - dataRow["InheritDisplayThemes"] = connectionInfo.Inheritance.DisplayThemes; - dataRow["InheritDisplayWallpaper"] = connectionInfo.Inheritance.DisplayWallpaper; - dataRow["InheritEnableFontSmoothing"] = connectionInfo.Inheritance.EnableFontSmoothing; - dataRow["InheritEnableDesktopComposition"] = connectionInfo.Inheritance.EnableDesktopComposition; - dataRow["InheritDisableFullWindowDrag"] = connectionInfo.Inheritance.DisableFullWindowDrag; - dataRow["InheritDisableMenuAnimations"] = connectionInfo.Inheritance.DisableMenuAnimations; - dataRow["InheritDisableCursorShadow"] = connectionInfo.Inheritance.DisableCursorShadow; - dataRow["InheritDisableCursorBlinking"] = connectionInfo.Inheritance.DisableCursorBlinking; - dataRow["InheritDomain"] = connectionInfo.Inheritance.Domain; - dataRow["InheritIcon"] = connectionInfo.Inheritance.Icon; - dataRow["InheritPanel"] = connectionInfo.Inheritance.Panel; - dataRow["InheritPassword"] = connectionInfo.Inheritance.Password; - dataRow["InheritPort"] = connectionInfo.Inheritance.Port; - dataRow["InheritProtocol"] = connectionInfo.Inheritance.Protocol; - dataRow["InheritSSHTunnelConnectionName"] = connectionInfo.Inheritance.SSHTunnelConnectionName; - dataRow["InheritOpeningCommand"] = connectionInfo.Inheritance.OpeningCommand; - dataRow["InheritSSHOptions"] = connectionInfo.Inheritance.SSHOptions; - dataRow["InheritPuttySession"] = connectionInfo.Inheritance.PuttySession; - dataRow["InheritRedirectDiskDrives"] = connectionInfo.Inheritance.RedirectDiskDrives; - dataRow["InheritRedirectKeys"] = connectionInfo.Inheritance.RedirectKeys; - dataRow["InheritRedirectPorts"] = connectionInfo.Inheritance.RedirectPorts; - dataRow["InheritRedirectPrinters"] = connectionInfo.Inheritance.RedirectPrinters; - dataRow["InheritRedirectClipboard"] = connectionInfo.Inheritance.RedirectClipboard; - dataRow["InheritRedirectSmartCards"] = connectionInfo.Inheritance.RedirectSmartCards; - dataRow["InheritRedirectSound"] = connectionInfo.Inheritance.RedirectSound; - dataRow["InheritSoundQuality"] = connectionInfo.Inheritance.SoundQuality; - dataRow["InheritRedirectAudioCapture"] = connectionInfo.Inheritance.RedirectAudioCapture; - dataRow["InheritResolution"] = connectionInfo.Inheritance.Resolution; - dataRow["InheritAutomaticResize"] = connectionInfo.Inheritance.AutomaticResize; - dataRow["InheritUseConsoleSession"] = connectionInfo.Inheritance.UseConsoleSession; - dataRow["InheritUseCredSsp"] = connectionInfo.Inheritance.UseCredSsp; - dataRow["InheritRenderingEngine"] = connectionInfo.Inheritance.RenderingEngine; - dataRow["InheritUsername"] = connectionInfo.Inheritance.Username; - dataRow["InheritVmId"] = connectionInfo.Inheritance.VmId; - dataRow["InheritUseVmId"] = connectionInfo.Inheritance.UseVmId; - dataRow["InheritUseEnhancedMode"] = connectionInfo.Inheritance.UseEnhancedMode; - dataRow["InheritRDPAuthenticationLevel"] = connectionInfo.Inheritance.RDPAuthenticationLevel; - dataRow["InheritRDPMinutesToIdleTimeout"] = connectionInfo.Inheritance.RDPMinutesToIdleTimeout; - dataRow["InheritRDPAlertIdleTimeout"] = connectionInfo.Inheritance.RDPAlertIdleTimeout; - dataRow["InheritLoadBalanceInfo"] = connectionInfo.Inheritance.LoadBalanceInfo; - dataRow["InheritOpeningCommand"] = connectionInfo.Inheritance.OpeningCommand; - dataRow["InheritPreExtApp"] = connectionInfo.Inheritance.PreExtApp; - dataRow["InheritPostExtApp"] = connectionInfo.Inheritance.PostExtApp; - dataRow["InheritMacAddress"] = connectionInfo.Inheritance.MacAddress; - dataRow["InheritUserField"] = connectionInfo.Inheritance.UserField; - dataRow["InheritExtApp"] = connectionInfo.Inheritance.ExtApp; - dataRow["InheritVNCCompression"] = connectionInfo.Inheritance.VNCCompression; - dataRow["InheritVNCEncoding"] = connectionInfo.Inheritance.VNCEncoding; - dataRow["InheritVNCAuthMode"] = connectionInfo.Inheritance.VNCAuthMode; - dataRow["InheritVNCProxyType"] = connectionInfo.Inheritance.VNCProxyType; - dataRow["InheritVNCProxyIP"] = connectionInfo.Inheritance.VNCProxyIP; - dataRow["InheritVNCProxyPort"] = connectionInfo.Inheritance.VNCProxyPort; - dataRow["InheritVNCProxyUsername"] = connectionInfo.Inheritance.VNCProxyUsername; - dataRow["InheritVNCProxyPassword"] = connectionInfo.Inheritance.VNCProxyPassword; - dataRow["InheritVNCColors"] = connectionInfo.Inheritance.VNCColors; - dataRow["InheritVNCSmartSizeMode"] = connectionInfo.Inheritance.VNCSmartSizeMode; - dataRow["InheritVNCViewOnly"] = connectionInfo.Inheritance.VNCViewOnly; - dataRow["InheritRDGatewayUsageMethod"] = connectionInfo.Inheritance.RDGatewayUsageMethod; - dataRow["InheritRDGatewayHostname"] = connectionInfo.Inheritance.RDGatewayHostname; - dataRow["InheritRDGatewayUseConnectionCredentials"] = connectionInfo.Inheritance.RDGatewayUseConnectionCredentials; - dataRow["InheritRDGatewayUsername"] = connectionInfo.Inheritance.RDGatewayUsername; - dataRow["InheritRDGatewayPassword"] = connectionInfo.Inheritance.RDGatewayPassword; - dataRow["InheritRDGatewayDomain"] = connectionInfo.Inheritance.RDGatewayDomain; - dataRow["InheritRdpVersion"] = connectionInfo.Inheritance.RdpVersion; - dataRow["InheritFavorite"] = connectionInfo.Inheritance.Favorite; - dataRow["InheritICAEncryptionStrength"] = false; - } - else - { - dataRow["InheritCacheBitmaps"] = false; - dataRow["InheritColors"] = false; - dataRow["InheritDescription"] = false; - dataRow["InheritDisplayThemes"] = false; - dataRow["InheritDisplayWallpaper"] = false; - dataRow["InheritEnableFontSmoothing"] = false; - dataRow["InheritEnableDesktopComposition"] = false; - dataRow["InheritDisableFullWindowDrag"] = false; - dataRow["InheritDisableMenuAnimations"] = false; - dataRow["InheritDisableCursorShadow"] = false; - dataRow["InheritDisableCursorBlinking"] = false; - dataRow["InheritDomain"] = false; - dataRow["InheritIcon"] = false; - dataRow["InheritPanel"] = false; - dataRow["InheritPassword"] = false; - dataRow["InheritPort"] = false; - dataRow["InheritProtocol"] = false; - dataRow["InheritSSHTunnelConnectionName"] = false; - dataRow["InheritSSHOptions"] = false; - dataRow["InheritPuttySession"] = false; - dataRow["InheritRedirectDiskDrives"] = false; - dataRow["InheritRedirectKeys"] = false; - dataRow["InheritRedirectPorts"] = false; - dataRow["InheritRedirectPrinters"] = false; - dataRow["InheritRedirectClipboard"] = false; - dataRow["InheritRedirectSmartCards"] = false; - dataRow["InheritRedirectSound"] = false; - dataRow["InheritSoundQuality"] = false; - dataRow["InheritRedirectAudioCapture"] = false; - dataRow["InheritResolution"] = false; - dataRow["InheritAutomaticResize"] = false; - dataRow["InheritUseConsoleSession"] = false; - dataRow["InheritUseCredSsp"] = false; - dataRow["InheritRenderingEngine"] = false; - dataRow["InheritUsername"] = false; - dataRow["InheritRDPAuthenticationLevel"] = false; - dataRow["InheritRDPMinutesToIdleTimeout"] = false; - dataRow["InheritRDPAlertIdleTimeout"] = false; - dataRow["InheritLoadBalanceInfo"] = false; - dataRow["InheritOpeningCommand"] = false; - dataRow["InheritPreExtApp"] = false; - dataRow["InheritPostExtApp"] = false; - dataRow["InheritMacAddress"] = false; - dataRow["InheritUserField"] = false; - dataRow["InheritExtApp"] = false; - dataRow["InheritVNCCompression"] = false; - dataRow["InheritVNCEncoding"] = false; - dataRow["InheritVNCAuthMode"] = false; - dataRow["InheritVNCProxyType"] = false; - dataRow["InheritVNCProxyIP"] = false; - dataRow["InheritVNCProxyPort"] = false; - dataRow["InheritVNCProxyUsername"] = false; - dataRow["InheritVNCProxyPassword"] = false; - dataRow["InheritVNCColors"] = false; - dataRow["InheritVNCSmartSizeMode"] = false; - dataRow["InheritVNCViewOnly"] = false; - dataRow["InheritRDGatewayUsageMethod"] = false; - dataRow["InheritRDGatewayHostname"] = false; - dataRow["InheritRDGatewayUseConnectionCredentials"] = false; - dataRow["InheritRDGatewayUsername"] = false; - dataRow["InheritRDGatewayPassword"] = false; - dataRow["InheritRDGatewayDomain"] = false; - dataRow["InheritRdpVersion"] = false; - dataRow["InheritFavorite"] = false; - dataRow["InheritICAEncryptionStrength"] = false; - } - if (isNewRow)_dataTable.Rows.Add(dataRow); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/LocalConnectionPropertiesModel.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/LocalConnectionPropertiesModel.cs deleted file mode 100644 index 1df5fa906..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/LocalConnectionPropertiesModel.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql -{ - public class LocalConnectionPropertiesModel - { - /// - /// The unique Id of this tree node - /// - public string ConnectionId { get; set; } - - /// - /// Indicates whether this connection is connected - /// - public bool Connected { get; set; } - - /// - /// Indicates whether this container is expanded in the tree - /// - public bool Expanded { get; set; } - - /// - /// Indicates whether this connection is a favorite - /// - public bool Favorite { get; set; } - } -} diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/LocalConnectionPropertiesXmlSerializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/LocalConnectionPropertiesXmlSerializer.cs deleted file mode 100644 index c644b73b5..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/LocalConnectionPropertiesXmlSerializer.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Xml; -using System.Xml.Linq; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql -{ - public class LocalConnectionPropertiesXmlSerializer : - ISerializer, string>, - IDeserializer> - { - public Version Version { get; } = new Version(1, 0); - - public string Serialize(IEnumerable models) - { - var localConnections = models - .Select(m => new XElement("Node", - new XAttribute("ConnectionId", m.ConnectionId), - new XAttribute("Connected", m.Connected), - new XAttribute("Expanded", m.Expanded), - new XAttribute("Favorite", m.Favorite))); - - var root = new XElement("LocalConnections", localConnections); - var xdoc = new XDocument(new XDeclaration("1.0", "utf-8", null), root); - return WriteXmlToString(xdoc); - } - - public IEnumerable Deserialize(string serializedData) - { - if (string.IsNullOrWhiteSpace(serializedData)) - return Enumerable.Empty(); - - var xdoc = XDocument.Parse(serializedData); - return xdoc - .Descendants("Node") - .Where(e => e.Attribute("ConnectionId") != null) - .Select(e => new LocalConnectionPropertiesModel - { - ConnectionId = e.Attribute("ConnectionId")?.Value, - Connected = bool.Parse(e.Attribute("Connected")?.Value ?? "False"), - Expanded = bool.Parse(e.Attribute("Expanded")?.Value ?? "False"), - Favorite = bool.Parse(e.Attribute("Favorite")?.Value ?? "False") - }); - } - - private static string WriteXmlToString(XNode xmlDocument) - { - string xmlString; - var xmlWriterSettings = new XmlWriterSettings - {Indent = true, IndentChars = " ", Encoding = Encoding.UTF8}; - var memoryStream = new MemoryStream(); - using (var xmlTextWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)) - { - xmlDocument.WriteTo(xmlTextWriter); - xmlTextWriter.Flush(); - var streamReader = new StreamReader(memoryStream, Encoding.UTF8, true); - memoryStream.Seek(0, SeekOrigin.Begin); - xmlString = streamReader.ReadToEnd(); - } - - return xmlString; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/SqlConnectionListMetaData.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/SqlConnectionListMetaData.cs deleted file mode 100644 index 525c811c5..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/SqlConnectionListMetaData.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql -{ - public class SqlConnectionListMetaData - { - public string Name { get; set; } - public string Protected { get; set; } - public bool Export { get; set; } - public Version ConfVersion { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/SqlDatabaseMetaDataRetriever.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/SqlDatabaseMetaDataRetriever.cs deleted file mode 100644 index 1252fb280..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/MsSql/SqlDatabaseMetaDataRetriever.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Data.Common; -using System.Globalization; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql -{ - public class SqlDatabaseMetaDataRetriever - { - public SqlConnectionListMetaData GetDatabaseMetaData(IDatabaseConnector databaseConnector) - { - SqlConnectionListMetaData metaData; - DbDataReader dbDataReader = null; - - try - { - var dbCommand = databaseConnector.DbCommand("SELECT * FROM tblRoot"); - if (!databaseConnector.IsConnected) - databaseConnector.Connect(); - dbDataReader = dbCommand.ExecuteReader(); - if (!dbDataReader.HasRows) - return null; // assume new empty database - else - dbDataReader.Read(); - - metaData = new SqlConnectionListMetaData - { - Name = dbDataReader["Name"] as string ?? "", - Protected = dbDataReader["Protected"] as string ?? "", - Export = (bool)dbDataReader["Export"], - ConfVersion = - new Version(Convert.ToString(dbDataReader["confVersion"], CultureInfo.InvariantCulture)) - }; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, $"Retrieving database version failed. {ex}"); - throw; - } - finally - { - if (dbDataReader != null && !dbDataReader.IsClosed) - dbDataReader.Close(); - } - - return metaData; - } - - public void WriteDatabaseMetaData(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector) - { - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - string strProtected; - if (rootTreeNode != null) - { - if (rootTreeNode.Password) - { - var password = rootTreeNode.PasswordString.ConvertToSecureString(); - strProtected = cryptographyProvider.Encrypt("ThisIsProtected", password); - } - else - { - strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey); - } - } - else - { - strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey); - } - - var cmd = databaseConnector.DbCommand("DELETE FROM tblRoot"); - cmd.ExecuteNonQuery(); - - if (rootTreeNode != null) - { - cmd = databaseConnector.DbCommand( - "INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES('" + - MiscTools.PrepareValueForDB(rootTreeNode.Name) + "', 0, '" + strProtected + "','" + - ConnectionsFileInfo.ConnectionFileVersion.ToString() + "')"); - cmd.ExecuteNonQuery(); - } - else - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, $"UpdateRootNodeTable: rootTreeNode was null. Could not insert!"); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer26.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer26.cs deleted file mode 100644 index 74935780e..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer26.cs +++ /dev/null @@ -1,259 +0,0 @@ -using System; -using System.Security; -using System.Xml.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - // ReSharper disable once InconsistentNaming - public class XmlConnectionNodeSerializer26 : ISerializer - { - private readonly ICryptographyProvider _cryptographyProvider; - private readonly SecureString _encryptionKey; - private readonly SaveFilter _saveFilter; - - public Version Version { get; } = new Version(2, 6); - - public XmlConnectionNodeSerializer26(ICryptographyProvider cryptographyProvider, SecureString encryptionKey, SaveFilter saveFilter) - { - if (cryptographyProvider == null) - throw new ArgumentNullException(nameof(cryptographyProvider)); - if (encryptionKey == null) - throw new ArgumentNullException(nameof(encryptionKey)); - if (saveFilter == null) - throw new ArgumentNullException(nameof(saveFilter)); - - _cryptographyProvider = cryptographyProvider; - _encryptionKey = encryptionKey; - _saveFilter = saveFilter; - } - - public XElement Serialize(ConnectionInfo connectionInfo) - { - var element = new XElement(XName.Get("Node", "")); - SetElementAttributes(element, connectionInfo); - SetInheritanceAttributes(element, connectionInfo); - return element; - } - - private void SetElementAttributes(XContainer element, ConnectionInfo connectionInfo) - { - var nodeAsContainer = connectionInfo as ContainerInfo; - element.Add(new XAttribute("Name", connectionInfo.Name)); - element.Add(new XAttribute("Type", connectionInfo.GetTreeNodeType().ToString())); - if (nodeAsContainer != null) - element.Add(new XAttribute("Expanded", nodeAsContainer.IsExpanded.ToString().ToLowerInvariant())); - element.Add(new XAttribute("Descr", connectionInfo.Description)); - element.Add(new XAttribute("Icon", connectionInfo.Icon)); - element.Add(new XAttribute("Panel", connectionInfo.Panel)); - element.Add(new XAttribute("Id", connectionInfo.ConstantID)); - - element.Add(_saveFilter.SaveUsername - ? new XAttribute("Username", connectionInfo.Username) - : new XAttribute("Username", "")); - - element.Add(_saveFilter.SaveDomain - ? new XAttribute("Domain", connectionInfo.Domain) - : new XAttribute("Domain", "")); - - if (_saveFilter.SavePassword && !connectionInfo.Inheritance.Password) - element.Add(new XAttribute("Password", _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey))); - else - element.Add(new XAttribute("Password", "")); - - element.Add(new XAttribute("Hostname", connectionInfo.Hostname)); - element.Add(new XAttribute("Protocol", connectionInfo.Protocol)); - element.Add(new XAttribute("SSHTunnelConnectionName", connectionInfo.SSHTunnelConnectionName)); - element.Add(new XAttribute("OpeningCommand", connectionInfo.OpeningCommand)); - element.Add(new XAttribute("SSHOptions", connectionInfo.SSHOptions)); - element.Add(new XAttribute("PuttySession", connectionInfo.PuttySession)); - element.Add(new XAttribute("Port", connectionInfo.Port)); - element.Add(new XAttribute("ConnectToConsole", connectionInfo.UseConsoleSession.ToString().ToLowerInvariant())); - element.Add(new XAttribute("UseCredSsp", connectionInfo.UseCredSsp.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RenderingEngine", connectionInfo.RenderingEngine)); - element.Add(new XAttribute("RDPAuthenticationLevel", connectionInfo.RDPAuthenticationLevel)); - element.Add(new XAttribute("RDPMinutesToIdleTimeout", connectionInfo.RDPMinutesToIdleTimeout)); - element.Add(new XAttribute("RDPAlertIdleTimeout", connectionInfo.RDPAlertIdleTimeout.ToString().ToLowerInvariant())); - element.Add(new XAttribute("LoadBalanceInfo", connectionInfo.LoadBalanceInfo)); - element.Add(new XAttribute("Colors", connectionInfo.Colors)); - element.Add(new XAttribute("Resolution", connectionInfo.Resolution)); - element.Add(new XAttribute("AutomaticResize", connectionInfo.AutomaticResize.ToString().ToLowerInvariant())); - element.Add(new XAttribute("DisplayWallpaper", connectionInfo.DisplayWallpaper.ToString().ToLowerInvariant())); - element.Add(new XAttribute("DisplayThemes", connectionInfo.DisplayThemes.ToString().ToLowerInvariant())); - element.Add(new XAttribute("EnableFontSmoothing", connectionInfo.EnableFontSmoothing.ToString().ToLowerInvariant())); - element.Add(new XAttribute("EnableDesktopComposition", connectionInfo.EnableDesktopComposition.ToString().ToLowerInvariant())); - element.Add(new XAttribute("CacheBitmaps", connectionInfo.CacheBitmaps.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectDiskDrives", connectionInfo.RedirectDiskDrives.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectPorts", connectionInfo.RedirectPorts.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectPrinters", connectionInfo.RedirectPrinters.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectClipboard", connectionInfo.RedirectClipboard.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectSmartCards", connectionInfo.RedirectSmartCards.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectSound", connectionInfo.RedirectSound.ToString())); - element.Add(new XAttribute("SoundQuality", connectionInfo.SoundQuality.ToString())); - element.Add(new XAttribute("RedirectKeys", connectionInfo.RedirectKeys.ToString().ToLowerInvariant())); - element.Add(new XAttribute("Connected", (connectionInfo.OpenConnections.Count > 0).ToString().ToLowerInvariant())); - element.Add(new XAttribute("PreExtApp", connectionInfo.PreExtApp)); - element.Add(new XAttribute("PostExtApp", connectionInfo.PostExtApp)); - element.Add(new XAttribute("MacAddress", connectionInfo.MacAddress)); - element.Add(new XAttribute("UserField", connectionInfo.UserField)); - element.Add(new XAttribute("ExtApp", connectionInfo.ExtApp)); - element.Add(new XAttribute("StartProgram", connectionInfo.RDPStartProgram)); - element.Add(new XAttribute("VNCCompression", connectionInfo.VNCCompression)); - element.Add(new XAttribute("VNCEncoding", connectionInfo.VNCEncoding)); - element.Add(new XAttribute("VNCAuthMode", connectionInfo.VNCAuthMode)); - element.Add(new XAttribute("VNCProxyType", connectionInfo.VNCProxyType)); - element.Add(new XAttribute("VNCProxyIP", connectionInfo.VNCProxyIP)); - element.Add(new XAttribute("VNCProxyPort", connectionInfo.VNCProxyPort)); - - element.Add(_saveFilter.SaveUsername - ? new XAttribute("VNCProxyUsername", connectionInfo.VNCProxyUsername) - : new XAttribute("VNCProxyUsername", "")); - - element.Add(_saveFilter.SavePassword - ? new XAttribute("VNCProxyPassword", _cryptographyProvider.Encrypt(connectionInfo.VNCProxyPassword, _encryptionKey)) - : new XAttribute("VNCProxyPassword", "")); - - element.Add(new XAttribute("VNCColors", connectionInfo.VNCColors)); - element.Add(new XAttribute("VNCSmartSizeMode", connectionInfo.VNCSmartSizeMode)); - element.Add(new XAttribute("VNCViewOnly", connectionInfo.VNCViewOnly.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RDGatewayUsageMethod", connectionInfo.RDGatewayUsageMethod)); - element.Add(new XAttribute("RDGatewayHostname", connectionInfo.RDGatewayHostname)); - element.Add(new XAttribute("RDGatewayUseConnectionCredentials", connectionInfo.RDGatewayUseConnectionCredentials)); - - element.Add(_saveFilter.SaveUsername - ? new XAttribute("RDGatewayUsername", connectionInfo.RDGatewayUsername) - : new XAttribute("RDGatewayUsername", "")); - - element.Add(_saveFilter.SavePassword - ? new XAttribute("RDGatewayPassword", _cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey)) - : new XAttribute("RDGatewayPassword", "")); - - element.Add(_saveFilter.SaveDomain - ? new XAttribute("RDGatewayDomain", connectionInfo.RDGatewayDomain) - : new XAttribute("RDGatewayDomain", "")); - } - - private void SetInheritanceAttributes(XContainer element, IInheritable connectionInfo) - { - if (_saveFilter.SaveInheritance) - { - var inheritance = connectionInfo.Inheritance; - - if (inheritance.CacheBitmaps) - element.Add(new XAttribute("InheritCacheBitmaps", inheritance.CacheBitmaps.ToString().ToLowerInvariant())); - if (inheritance.Colors) - element.Add(new XAttribute("InheritColors", inheritance.Colors.ToString().ToLowerInvariant())); - if (inheritance.Description) - element.Add(new XAttribute("InheritDescription", inheritance.Description.ToString().ToLowerInvariant())); - if (inheritance.DisplayThemes) - element.Add(new XAttribute("InheritDisplayThemes", inheritance.DisplayThemes.ToString().ToLowerInvariant())); - if (inheritance.DisplayWallpaper) - element.Add(new XAttribute("InheritDisplayWallpaper", inheritance.DisplayWallpaper.ToString().ToLowerInvariant())); - if (inheritance.EnableFontSmoothing) - element.Add(new XAttribute("InheritEnableFontSmoothing", inheritance.EnableFontSmoothing.ToString().ToLowerInvariant())); - if (inheritance.EnableDesktopComposition) - element.Add(new XAttribute("InheritEnableDesktopComposition", inheritance.EnableDesktopComposition.ToString().ToLowerInvariant())); - if (inheritance.Domain) - element.Add(new XAttribute("InheritDomain", inheritance.Domain.ToString().ToLowerInvariant())); - if (inheritance.Icon) - element.Add(new XAttribute("InheritIcon", inheritance.Icon.ToString().ToLowerInvariant())); - if (inheritance.Panel) - element.Add(new XAttribute("InheritPanel", inheritance.Panel.ToString().ToLowerInvariant())); - if (inheritance.Password) - element.Add(new XAttribute("InheritPassword", inheritance.Password.ToString().ToLowerInvariant())); - if (inheritance.Port) - element.Add(new XAttribute("InheritPort", inheritance.Port.ToString().ToLowerInvariant())); - if (inheritance.Protocol) - element.Add(new XAttribute("InheritProtocol", inheritance.Protocol.ToString().ToLowerInvariant())); - if (inheritance.SSHTunnelConnectionName) - element.Add(new XAttribute("InheritSSHTunnelConnectionName", inheritance.SSHTunnelConnectionName.ToString().ToLowerInvariant())); - if (inheritance.OpeningCommand) - element.Add(new XAttribute("InheritOpeningCommand", inheritance.OpeningCommand.ToString().ToLowerInvariant())); - if (inheritance.SSHOptions) - element.Add(new XAttribute("InheritSSHOptions", inheritance.SSHOptions.ToString().ToLowerInvariant())); - if (inheritance.PuttySession) - element.Add(new XAttribute("InheritPuttySession", inheritance.PuttySession.ToString().ToLowerInvariant())); - if (inheritance.RedirectDiskDrives) - element.Add(new XAttribute("InheritRedirectDiskDrives", inheritance.RedirectDiskDrives.ToString().ToLowerInvariant())); - if (inheritance.RedirectKeys) - element.Add(new XAttribute("InheritRedirectKeys", inheritance.RedirectKeys.ToString().ToLowerInvariant())); - if (inheritance.RedirectPorts) - element.Add(new XAttribute("InheritRedirectPorts", inheritance.RedirectPorts.ToString().ToLowerInvariant())); - if (inheritance.RedirectPrinters) - element.Add(new XAttribute("InheritRedirectPrinters", inheritance.RedirectPrinters.ToString().ToLowerInvariant())); - if (inheritance.RedirectSmartCards) - element.Add(new XAttribute("InheritRedirectSmartCards", inheritance.RedirectSmartCards.ToString().ToLowerInvariant())); - if (inheritance.RedirectSound) - element.Add(new XAttribute("InheritRedirectSound", inheritance.RedirectSound.ToString().ToLowerInvariant())); - if (inheritance.SoundQuality) - element.Add(new XAttribute("InheritSoundQuality", inheritance.SoundQuality.ToString().ToLowerInvariant())); - if (inheritance.Resolution) - element.Add(new XAttribute("InheritResolution", inheritance.Resolution.ToString().ToLowerInvariant())); - if (inheritance.AutomaticResize) - element.Add(new XAttribute("InheritAutomaticResize", inheritance.AutomaticResize.ToString().ToLowerInvariant())); - if (inheritance.UseConsoleSession) - element.Add(new XAttribute("InheritUseConsoleSession", inheritance.UseConsoleSession.ToString().ToLowerInvariant())); - if (inheritance.UseCredSsp) - element.Add(new XAttribute("InheritUseCredSsp", inheritance.UseCredSsp.ToString().ToLowerInvariant())); - if (inheritance.RenderingEngine) - element.Add(new XAttribute("InheritRenderingEngine", inheritance.RenderingEngine.ToString().ToLowerInvariant())); - if (inheritance.Username) - element.Add(new XAttribute("InheritUsername", inheritance.Username.ToString().ToLowerInvariant())); - if (inheritance.RDPAuthenticationLevel) - element.Add(new XAttribute("InheritRDPAuthenticationLevel", inheritance.RDPAuthenticationLevel.ToString().ToLowerInvariant())); - if (inheritance.RDPMinutesToIdleTimeout) - element.Add(new XAttribute("InheritRDPMinutesToIdleTimeout", inheritance.RDPMinutesToIdleTimeout.ToString().ToLowerInvariant())); - if (inheritance.RDPAlertIdleTimeout) - element.Add(new XAttribute("InheritRDPAlertIdleTimeout", inheritance.RDPAlertIdleTimeout.ToString().ToLowerInvariant())); - if (inheritance.LoadBalanceInfo) - element.Add(new XAttribute("InheritLoadBalanceInfo", inheritance.LoadBalanceInfo.ToString().ToLowerInvariant())); - if (inheritance.PreExtApp) - element.Add(new XAttribute("InheritPreExtApp", inheritance.PreExtApp.ToString().ToLowerInvariant())); - if (inheritance.PostExtApp) - element.Add(new XAttribute("InheritPostExtApp", inheritance.PostExtApp.ToString().ToLowerInvariant())); - if (inheritance.MacAddress) - element.Add(new XAttribute("InheritMacAddress", inheritance.MacAddress.ToString().ToLowerInvariant())); - if (inheritance.UserField) - element.Add(new XAttribute("InheritUserField", inheritance.UserField.ToString().ToLowerInvariant())); - if (inheritance.ExtApp) - element.Add(new XAttribute("InheritExtApp", inheritance.ExtApp.ToString().ToLowerInvariant())); - if (inheritance.VNCCompression) - element.Add(new XAttribute("InheritVNCCompression", inheritance.VNCCompression.ToString().ToLowerInvariant())); - if (inheritance.VNCEncoding) - element.Add(new XAttribute("InheritVNCEncoding", inheritance.VNCEncoding.ToString().ToLowerInvariant())); - if (inheritance.VNCAuthMode) - element.Add(new XAttribute("InheritVNCAuthMode", inheritance.VNCAuthMode.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyType) - element.Add(new XAttribute("InheritVNCProxyType", inheritance.VNCProxyType.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyIP) - element.Add(new XAttribute("InheritVNCProxyIP", inheritance.VNCProxyIP.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyPort) - element.Add(new XAttribute("InheritVNCProxyPort", inheritance.VNCProxyPort.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyUsername) - element.Add(new XAttribute("InheritVNCProxyUsername", inheritance.VNCProxyUsername.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyPassword) - element.Add(new XAttribute("InheritVNCProxyPassword", inheritance.VNCProxyPassword.ToString().ToLowerInvariant())); - if (inheritance.VNCColors) - element.Add(new XAttribute("InheritVNCColors", inheritance.VNCColors.ToString().ToLowerInvariant())); - if (inheritance.VNCSmartSizeMode) - element.Add(new XAttribute("InheritVNCSmartSizeMode", inheritance.VNCSmartSizeMode.ToString().ToLowerInvariant())); - if (inheritance.VNCViewOnly) - element.Add(new XAttribute("InheritVNCViewOnly", inheritance.VNCViewOnly.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayUsageMethod) - element.Add(new XAttribute("InheritRDGatewayUsageMethod", inheritance.RDGatewayUsageMethod.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayHostname) - element.Add(new XAttribute("InheritRDGatewayHostname", inheritance.RDGatewayHostname.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayUseConnectionCredentials) - element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", inheritance.RDGatewayUseConnectionCredentials.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayUsername) - element.Add(new XAttribute("InheritRDGatewayUsername", inheritance.RDGatewayUsername.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayPassword) - element.Add(new XAttribute("InheritRDGatewayPassword", inheritance.RDGatewayPassword.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayDomain) - element.Add(new XAttribute("InheritRDGatewayDomain", inheritance.RDGatewayDomain.ToString().ToLowerInvariant())); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs deleted file mode 100644 index f0e01ed29..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionNodeSerializer27.cs +++ /dev/null @@ -1,304 +0,0 @@ -using System; -using System.Security; -using System.Xml.Linq; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - // ReSharper disable once InconsistentNaming - public class XmlConnectionNodeSerializer27 : ISerializer - { - private readonly ICryptographyProvider _cryptographyProvider; - private readonly SecureString _encryptionKey; - private readonly SaveFilter _saveFilter; - - public Version Version { get; } = new Version(2, 7); - - public XmlConnectionNodeSerializer27(ICryptographyProvider cryptographyProvider, - SecureString encryptionKey, - SaveFilter saveFilter) - { - if (cryptographyProvider == null) - throw new ArgumentNullException(nameof(cryptographyProvider)); - if (encryptionKey == null) - throw new ArgumentNullException(nameof(encryptionKey)); - if (saveFilter == null) - throw new ArgumentNullException(nameof(saveFilter)); - - _cryptographyProvider = cryptographyProvider; - _encryptionKey = encryptionKey; - _saveFilter = saveFilter; - } - - public XElement Serialize(ConnectionInfo connectionInfo) - { - var element = new XElement(XName.Get("Node", "")); - SetElementAttributes(element, connectionInfo); - SetInheritanceAttributes(element, connectionInfo); - return element; - } - - private void SetElementAttributes(XContainer element, ConnectionInfo connectionInfo) - { - var nodeAsContainer = connectionInfo as ContainerInfo; - element.Add(new XAttribute("Name", connectionInfo.Name)); - element.Add(new XAttribute("VmId", connectionInfo.VmId)); - element.Add(new XAttribute("UseVmId", connectionInfo.UseVmId)); - element.Add(new XAttribute("UseEnhancedMode", connectionInfo.UseVmId)); - element.Add(new XAttribute("Type", connectionInfo.GetTreeNodeType().ToString())); - if (nodeAsContainer != null) - element.Add(new XAttribute("Expanded", nodeAsContainer.IsExpanded.ToString().ToLowerInvariant())); - element.Add(new XAttribute("Descr", connectionInfo.Description)); - element.Add(new XAttribute("Icon", connectionInfo.Icon)); - element.Add(new XAttribute("Panel", connectionInfo.Panel)); - element.Add(new XAttribute("Id", connectionInfo.ConstantID)); - - if (!Runtime.UseCredentialManager) - { - element.Add(_saveFilter.SaveUsername - ? new XAttribute("Username", connectionInfo.Username) - : new XAttribute("Username", "")); - - element.Add(_saveFilter.SaveDomain - ? new XAttribute("Domain", connectionInfo.Domain) - : new XAttribute("Domain", "")); - - if (_saveFilter.SavePassword && !connectionInfo.Inheritance.Password) - element.Add(new XAttribute("Password", _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey))); - else - element.Add(new XAttribute("Password", "")); - } - - element.Add(new XAttribute("Hostname", connectionInfo.Hostname)); - element.Add(new XAttribute("Protocol", connectionInfo.Protocol)); - element.Add(new XAttribute("RdpVersion", connectionInfo.RdpVersion.ToString().ToLowerInvariant())); - element.Add(new XAttribute("SSHTunnelConnectionName", connectionInfo.SSHTunnelConnectionName)); - element.Add(new XAttribute("OpeningCommand", connectionInfo.OpeningCommand)); - element.Add(new XAttribute("SSHOptions", connectionInfo.SSHOptions)); - element.Add(new XAttribute("PuttySession", connectionInfo.PuttySession)); - element.Add(new XAttribute("Port", connectionInfo.Port)); - element.Add(new XAttribute("ConnectToConsole", connectionInfo.UseConsoleSession.ToString().ToLowerInvariant())); - element.Add(new XAttribute("UseCredSsp", connectionInfo.UseCredSsp.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RenderingEngine", connectionInfo.RenderingEngine)); - element.Add(new XAttribute("RDPAuthenticationLevel", connectionInfo.RDPAuthenticationLevel)); - element.Add(new XAttribute("RDPMinutesToIdleTimeout", connectionInfo.RDPMinutesToIdleTimeout)); - element.Add(new XAttribute("RDPAlertIdleTimeout", connectionInfo.RDPAlertIdleTimeout.ToString().ToLowerInvariant())); - element.Add(new XAttribute("LoadBalanceInfo", connectionInfo.LoadBalanceInfo)); - element.Add(new XAttribute("Colors", connectionInfo.Colors)); - element.Add(new XAttribute("Resolution", connectionInfo.Resolution)); - element.Add(new XAttribute("AutomaticResize", connectionInfo.AutomaticResize.ToString().ToLowerInvariant())); - element.Add(new XAttribute("DisplayWallpaper", connectionInfo.DisplayWallpaper.ToString().ToLowerInvariant())); - element.Add(new XAttribute("DisplayThemes", connectionInfo.DisplayThemes.ToString().ToLowerInvariant())); - element.Add(new XAttribute("EnableFontSmoothing", connectionInfo.EnableFontSmoothing.ToString().ToLowerInvariant())); - element.Add(new XAttribute("EnableDesktopComposition", connectionInfo.EnableDesktopComposition.ToString().ToLowerInvariant())); - element.Add(new XAttribute("DisableFullWindowDrag", connectionInfo.DisableFullWindowDrag.ToString().ToLowerInvariant())); - element.Add(new XAttribute("DisableMenuAnimations", connectionInfo.DisableMenuAnimations.ToString().ToLowerInvariant())); - element.Add(new XAttribute("DisableCursorShadow", connectionInfo.DisableCursorShadow.ToString().ToLowerInvariant())); - element.Add(new XAttribute("DisableCursorBlinking", connectionInfo.DisableCursorBlinking.ToString().ToLowerInvariant())); - element.Add(new XAttribute("CacheBitmaps", connectionInfo.CacheBitmaps.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectDiskDrives", connectionInfo.RedirectDiskDrives.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectPorts", connectionInfo.RedirectPorts.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectPrinters", connectionInfo.RedirectPrinters.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectClipboard", connectionInfo.RedirectClipboard.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectSmartCards", connectionInfo.RedirectSmartCards.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectSound", connectionInfo.RedirectSound.ToString())); - element.Add(new XAttribute("SoundQuality", connectionInfo.SoundQuality.ToString())); - element.Add(new XAttribute("RedirectAudioCapture", connectionInfo.RedirectAudioCapture.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RedirectKeys", connectionInfo.RedirectKeys.ToString().ToLowerInvariant())); - element.Add(new XAttribute("Connected", (connectionInfo.OpenConnections.Count > 0).ToString().ToLowerInvariant())); - element.Add(new XAttribute("PreExtApp", connectionInfo.PreExtApp)); - element.Add(new XAttribute("PostExtApp", connectionInfo.PostExtApp)); - element.Add(new XAttribute("MacAddress", connectionInfo.MacAddress)); - element.Add(new XAttribute("UserField", connectionInfo.UserField)); - element.Add(new XAttribute("Favorite", connectionInfo.Favorite)); - element.Add(new XAttribute("ExtApp", connectionInfo.ExtApp)); - element.Add(new XAttribute("StartProgram", connectionInfo.RDPStartProgram)); - element.Add(new XAttribute("StartProgramWorkDir", connectionInfo.RDPStartProgramWorkDir)); - element.Add(new XAttribute("VNCCompression", connectionInfo.VNCCompression)); - element.Add(new XAttribute("VNCEncoding", connectionInfo.VNCEncoding)); - element.Add(new XAttribute("VNCAuthMode", connectionInfo.VNCAuthMode)); - element.Add(new XAttribute("VNCProxyType", connectionInfo.VNCProxyType)); - element.Add(new XAttribute("VNCProxyIP", connectionInfo.VNCProxyIP)); - element.Add(new XAttribute("VNCProxyPort", connectionInfo.VNCProxyPort)); - - element.Add(_saveFilter.SaveUsername - ? new XAttribute("VNCProxyUsername", connectionInfo.VNCProxyUsername) - : new XAttribute("VNCProxyUsername", "")); - - element.Add(_saveFilter.SavePassword - ? new XAttribute("VNCProxyPassword", _cryptographyProvider.Encrypt(connectionInfo.VNCProxyPassword, _encryptionKey)) - : new XAttribute("VNCProxyPassword", "")); - - element.Add(new XAttribute("VNCColors", connectionInfo.VNCColors)); - element.Add(new XAttribute("VNCSmartSizeMode", connectionInfo.VNCSmartSizeMode)); - element.Add(new XAttribute("VNCViewOnly", connectionInfo.VNCViewOnly.ToString().ToLowerInvariant())); - element.Add(new XAttribute("RDGatewayUsageMethod", connectionInfo.RDGatewayUsageMethod)); - element.Add(new XAttribute("RDGatewayHostname", connectionInfo.RDGatewayHostname)); - element.Add(new XAttribute("RDGatewayUseConnectionCredentials", connectionInfo.RDGatewayUseConnectionCredentials)); - - element.Add(_saveFilter.SaveUsername - ? new XAttribute("RDGatewayUsername", connectionInfo.RDGatewayUsername) - : new XAttribute("RDGatewayUsername", "")); - - element.Add(_saveFilter.SavePassword - ? new XAttribute("RDGatewayPassword", _cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey)) - : new XAttribute("RDGatewayPassword", "")); - - element.Add(_saveFilter.SaveDomain - ? new XAttribute("RDGatewayDomain", connectionInfo.RDGatewayDomain) - : new XAttribute("RDGatewayDomain", "")); - - element.Add(new XAttribute("UserViaAPI", connectionInfo.UserViaAPI)); - element.Add(new XAttribute("EC2InstanceId", connectionInfo.EC2InstanceId)); - element.Add(new XAttribute("EC2Region", connectionInfo.EC2Region)); - } - - private void SetInheritanceAttributes(XContainer element, IInheritable connectionInfo) - { - if (_saveFilter.SaveInheritance) - { - var inheritance = connectionInfo.Inheritance; - - if (inheritance.CacheBitmaps) - element.Add(new XAttribute("InheritCacheBitmaps", inheritance.CacheBitmaps.ToString().ToLowerInvariant())); - if (inheritance.Colors) - element.Add(new XAttribute("InheritColors", inheritance.Colors.ToString().ToLowerInvariant())); - if (inheritance.Description) - element.Add(new XAttribute("InheritDescription", inheritance.Description.ToString().ToLowerInvariant())); - if (inheritance.DisplayThemes) - element.Add(new XAttribute("InheritDisplayThemes", inheritance.DisplayThemes.ToString().ToLowerInvariant())); - if (inheritance.DisplayWallpaper) - element.Add(new XAttribute("InheritDisplayWallpaper", inheritance.DisplayWallpaper.ToString().ToLowerInvariant())); - if (inheritance.EnableFontSmoothing) - element.Add(new XAttribute("InheritEnableFontSmoothing", inheritance.EnableFontSmoothing.ToString().ToLowerInvariant())); - if (inheritance.EnableDesktopComposition) - element.Add(new XAttribute("InheritEnableDesktopComposition", inheritance.EnableDesktopComposition.ToString().ToLowerInvariant())); - if (inheritance.DisableFullWindowDrag) - element.Add(new XAttribute("InheritDisableFullWindowDrag", inheritance.DisableFullWindowDrag.ToString().ToLowerInvariant())); - if (inheritance.DisableMenuAnimations) - element.Add(new XAttribute("InheritDisableMenuAnimations", inheritance.DisableMenuAnimations.ToString().ToLowerInvariant())); - if (inheritance.DisableCursorShadow) - element.Add(new XAttribute("InheritDisableCursorShadow", inheritance.DisableCursorShadow.ToString().ToLowerInvariant())); - if (inheritance.DisableCursorBlinking) - element.Add(new XAttribute("InheritDisableCursorBlinking", inheritance.DisableCursorBlinking.ToString().ToLowerInvariant())); - if (inheritance.Domain) - element.Add(new XAttribute("InheritDomain", inheritance.Domain.ToString().ToLowerInvariant())); - if (inheritance.Icon) - element.Add(new XAttribute("InheritIcon", inheritance.Icon.ToString().ToLowerInvariant())); - if (inheritance.Panel) - element.Add(new XAttribute("InheritPanel", inheritance.Panel.ToString().ToLowerInvariant())); - if (inheritance.Password) - element.Add(new XAttribute("InheritPassword", inheritance.Password.ToString().ToLowerInvariant())); - if (inheritance.Port) - element.Add(new XAttribute("InheritPort", inheritance.Port.ToString().ToLowerInvariant())); - if (inheritance.Protocol) - element.Add(new XAttribute("InheritProtocol", inheritance.Protocol.ToString().ToLowerInvariant())); - if (inheritance.RdpVersion) - element.Add(new XAttribute("InheritRdpVersion", inheritance.RdpVersion.ToString().ToLowerInvariant())); - if (inheritance.SSHTunnelConnectionName) - element.Add(new XAttribute("InheritSSHTunnelConnectionName", inheritance.SSHTunnelConnectionName.ToString().ToLowerInvariant())); - if (inheritance.OpeningCommand) - element.Add(new XAttribute("InheritOpeningCommand", inheritance.OpeningCommand.ToString().ToLowerInvariant())); - if (inheritance.SSHOptions) - element.Add(new XAttribute("InheritSSHOptions", inheritance.SSHOptions.ToString().ToLowerInvariant())); - if (inheritance.PuttySession) - element.Add(new XAttribute("InheritPuttySession", inheritance.PuttySession.ToString().ToLowerInvariant())); - if (inheritance.RedirectDiskDrives) - element.Add(new XAttribute("InheritRedirectDiskDrives", inheritance.RedirectDiskDrives.ToString().ToLowerInvariant())); - if (inheritance.RedirectKeys) - element.Add(new XAttribute("InheritRedirectKeys", inheritance.RedirectKeys.ToString().ToLowerInvariant())); - if (inheritance.RedirectPorts) - element.Add(new XAttribute("InheritRedirectPorts", inheritance.RedirectPorts.ToString().ToLowerInvariant())); - if (inheritance.RedirectPrinters) - element.Add(new XAttribute("InheritRedirectPrinters", inheritance.RedirectPrinters.ToString().ToLowerInvariant())); - if (inheritance.RedirectClipboard) - element.Add(new XAttribute("InheritRedirectClipboard", inheritance.RedirectClipboard.ToString().ToLowerInvariant())); - if (inheritance.RedirectSmartCards) - element.Add(new XAttribute("InheritRedirectSmartCards", inheritance.RedirectSmartCards.ToString().ToLowerInvariant())); - if (inheritance.RedirectSound) - element.Add(new XAttribute("InheritRedirectSound", inheritance.RedirectSound.ToString().ToLowerInvariant())); - if (inheritance.SoundQuality) - element.Add(new XAttribute("InheritSoundQuality", inheritance.SoundQuality.ToString().ToLowerInvariant())); - if (inheritance.RedirectAudioCapture) - element.Add(new XAttribute("InheritRedirectAudioCapture", inheritance.RedirectAudioCapture.ToString().ToLowerInvariant())); - if (inheritance.Resolution) - element.Add(new XAttribute("InheritResolution", inheritance.Resolution.ToString().ToLowerInvariant())); - if (inheritance.AutomaticResize) - element.Add(new XAttribute("InheritAutomaticResize", inheritance.AutomaticResize.ToString().ToLowerInvariant())); - if (inheritance.UseConsoleSession) - element.Add(new XAttribute("InheritUseConsoleSession", inheritance.UseConsoleSession.ToString().ToLowerInvariant())); - if (inheritance.UseCredSsp) - element.Add(new XAttribute("InheritUseCredSsp", inheritance.UseCredSsp.ToString().ToLowerInvariant())); - if (inheritance.RenderingEngine) - element.Add(new XAttribute("InheritRenderingEngine", inheritance.RenderingEngine.ToString().ToLowerInvariant())); - if (inheritance.Username) - element.Add(new XAttribute("InheritUsername", inheritance.Username.ToString().ToLowerInvariant())); - if (inheritance.RDPAuthenticationLevel) - element.Add(new XAttribute("InheritRDPAuthenticationLevel", inheritance.RDPAuthenticationLevel.ToString().ToLowerInvariant())); - if (inheritance.RDPMinutesToIdleTimeout) - element.Add(new XAttribute("InheritRDPMinutesToIdleTimeout", inheritance.RDPMinutesToIdleTimeout.ToString().ToLowerInvariant())); - if (inheritance.RDPAlertIdleTimeout) - element.Add(new XAttribute("InheritRDPAlertIdleTimeout", inheritance.RDPAlertIdleTimeout.ToString().ToLowerInvariant())); - if (inheritance.LoadBalanceInfo) - element.Add(new XAttribute("InheritLoadBalanceInfo", inheritance.LoadBalanceInfo.ToString().ToLowerInvariant())); - if (inheritance.PreExtApp) - element.Add(new XAttribute("InheritPreExtApp", inheritance.PreExtApp.ToString().ToLowerInvariant())); - if (inheritance.PostExtApp) - element.Add(new XAttribute("InheritPostExtApp", inheritance.PostExtApp.ToString().ToLowerInvariant())); - if (inheritance.MacAddress) - element.Add(new XAttribute("InheritMacAddress", inheritance.MacAddress.ToString().ToLowerInvariant())); - if (inheritance.UserField) - element.Add(new XAttribute("InheritUserField", inheritance.UserField.ToString().ToLowerInvariant())); - if (inheritance.Favorite) - element.Add(new XAttribute("InheritFavorite", inheritance.Favorite.ToString().ToLowerInvariant())); - if (inheritance.ExtApp) - element.Add(new XAttribute("InheritExtApp", inheritance.ExtApp.ToString().ToLowerInvariant())); - if (inheritance.VNCCompression) - element.Add(new XAttribute("InheritVNCCompression", inheritance.VNCCompression.ToString().ToLowerInvariant())); - if (inheritance.VNCEncoding) - element.Add(new XAttribute("InheritVNCEncoding", inheritance.VNCEncoding.ToString().ToLowerInvariant())); - if (inheritance.VNCAuthMode) - element.Add(new XAttribute("InheritVNCAuthMode", inheritance.VNCAuthMode.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyType) - element.Add(new XAttribute("InheritVNCProxyType", inheritance.VNCProxyType.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyIP) - element.Add(new XAttribute("InheritVNCProxyIP", inheritance.VNCProxyIP.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyPort) - element.Add(new XAttribute("InheritVNCProxyPort", inheritance.VNCProxyPort.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyUsername) - element.Add(new XAttribute("InheritVNCProxyUsername", inheritance.VNCProxyUsername.ToString().ToLowerInvariant())); - if (inheritance.VNCProxyPassword) - element.Add(new XAttribute("InheritVNCProxyPassword", inheritance.VNCProxyPassword.ToString().ToLowerInvariant())); - if (inheritance.VNCColors) - element.Add(new XAttribute("InheritVNCColors", inheritance.VNCColors.ToString().ToLowerInvariant())); - if (inheritance.VNCSmartSizeMode) - element.Add(new XAttribute("InheritVNCSmartSizeMode", inheritance.VNCSmartSizeMode.ToString().ToLowerInvariant())); - if (inheritance.VNCViewOnly) - element.Add(new XAttribute("InheritVNCViewOnly", inheritance.VNCViewOnly.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayUsageMethod) - element.Add(new XAttribute("InheritRDGatewayUsageMethod", inheritance.RDGatewayUsageMethod.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayHostname) - element.Add(new XAttribute("InheritRDGatewayHostname", inheritance.RDGatewayHostname.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayUseConnectionCredentials) - element.Add(new XAttribute("InheritRDGatewayUseConnectionCredentials", inheritance.RDGatewayUseConnectionCredentials.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayUsername) - element.Add(new XAttribute("InheritRDGatewayUsername", inheritance.RDGatewayUsername.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayPassword) - element.Add(new XAttribute("InheritRDGatewayPassword", inheritance.RDGatewayPassword.ToString().ToLowerInvariant())); - if (inheritance.RDGatewayDomain) - element.Add(new XAttribute("InheritRDGatewayDomain", inheritance.RDGatewayDomain.ToString().ToLowerInvariant())); - if (inheritance.VmId) - element.Add(new XAttribute("InheritVmId", inheritance.VmId.ToString().ToLowerInvariant())); - if (inheritance.UseVmId) - element.Add(new XAttribute("InheritUseVmId", inheritance.UseVmId.ToString().ToLowerInvariant())); - if (inheritance.UseEnhancedMode) - element.Add(new XAttribute("InheritUseEnhancedMode", inheritance.UseEnhancedMode.ToString().ToLowerInvariant())); - if (inheritance.UserViaAPI) - element.Add(new XAttribute("InheritUserViaAPI", inheritance.UserViaAPI.ToString().ToLowerInvariant())); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionSerializerFactory.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionSerializerFactory.cs deleted file mode 100644 index 6fe7f4857..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionSerializerFactory.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Security; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionSerializerFactory - { - public ISerializer Build( - ICryptographyProvider cryptographyProvider, - ConnectionTreeModel connectionTreeModel, - SaveFilter saveFilter = null, - bool useFullEncryption = false) - { - var encryptionKey = connectionTreeModel - .RootNodes.OfType() - .First().PasswordString - .ConvertToSecureString(); - - var connectionNodeSerializer = new XmlConnectionNodeSerializer27( - cryptographyProvider, - encryptionKey, - saveFilter ?? new SaveFilter()); - - return new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer) - { - UseFullEncryption = useFullEncryption - }; - } - } -} diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs deleted file mode 100644 index 58760b9bf..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs +++ /dev/null @@ -1,584 +0,0 @@ -using System; -using System.Globalization; -using System.Security; -using System.Windows.Forms; -using System.Xml; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Container; -using mRemoteNG.Messages; -using mRemoteNG.Security; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.TaskDialog; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionsDeserializer : IDeserializer - { - private XmlDocument _xmlDocument; - private double _confVersion; - private XmlConnectionsDecryptor _decryptor; - private string ConnectionFileName = ""; - private const double MaxSupportedConfVersion = 2.8; - private readonly RootNodeInfo _rootNodeInfo = new RootNodeInfo(RootNodeType.Connection); - - public Func> AuthenticationRequestor { get; set; } - - public XmlConnectionsDeserializer(Func> authenticationRequestor = null) - { - AuthenticationRequestor = authenticationRequestor; - } - - public ConnectionTreeModel Deserialize(string xml) - { - return Deserialize(xml, false); - } - - public ConnectionTreeModel Deserialize(string xml, bool import) - { - if (string.IsNullOrEmpty(xml)) return null; - try - { - LoadXmlConnectionData(xml); - ValidateConnectionFileVersion(); - - var rootXmlElement = _xmlDocument.DocumentElement; - InitializeRootNode(rootXmlElement); - CreateDecryptor(_rootNodeInfo, rootXmlElement); - var connectionTreeModel = new ConnectionTreeModel(); - connectionTreeModel.AddRootNode(_rootNodeInfo); - - - if (_confVersion > 1.3) - { - var protectedString = _xmlDocument.DocumentElement?.Attributes["Protected"].Value; - if (!_decryptor.ConnectionsFileIsAuthentic(protectedString, - _rootNodeInfo.PasswordString.ConvertToSecureString())) - { - return null; - } - } - - if (_confVersion >= 2.6) - { - var fullFileEncryptionValue = rootXmlElement.GetAttributeAsBool("FullFileEncryption"); - if (fullFileEncryptionValue) - { - var decryptedContent = _decryptor.Decrypt(rootXmlElement.InnerText); - rootXmlElement.InnerXml = decryptedContent; - } - } - - AddNodesFromXmlRecursive(_xmlDocument.DocumentElement, _rootNodeInfo); - - if (!import) - Runtime.ConnectionsService.IsConnectionsFileLoaded = true; - - return connectionTreeModel; - } - catch (Exception ex) - { - Runtime.ConnectionsService.IsConnectionsFileLoaded = false; - Runtime.MessageCollector.AddExceptionStackTrace(Language.LoadFromXmlFailed, ex); - throw; - } - } - - private void LoadXmlConnectionData(string connections) - { - CreateDecryptor(new RootNodeInfo(RootNodeType.Connection)); - connections = _decryptor.LegacyFullFileDecrypt(connections); - if (connections != "") - { - _xmlDocument = new XmlDocument(); - _xmlDocument.LoadXml(connections); - } - } - - private void ValidateConnectionFileVersion() - { - if (_xmlDocument.DocumentElement != null && _xmlDocument.DocumentElement.HasAttribute("ConfVersion")) - _confVersion = - Convert.ToDouble(_xmlDocument.DocumentElement.Attributes["ConfVersion"].Value.Replace(",", "."), - CultureInfo.InvariantCulture); - else - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, Language.OldConffile); - - if (!(_confVersion > MaxSupportedConfVersion)) return; - ShowIncompatibleVersionDialogBox(); - throw new Exception($"Incompatible connection file format (file format version {_confVersion})."); - } - - private void ShowIncompatibleVersionDialogBox() - { - CTaskDialog.ShowTaskDialogBox( - FrmMain.Default, - Application.ProductName, - "Incompatible connection file format", - $"The format of this connection file is not supported. Please upgrade to a newer version of {Application.ProductName}.", - string - .Format("{1}{0}File Format Version: {2}{0}Highest Supported Version: {3}", - Environment.NewLine, - ConnectionFileName, _confVersion, MaxSupportedConfVersion), - "", - "", - "", - "", - ETaskDialogButtons.Ok, - ESysIcons.Error, - ESysIcons.Error - ); - } - - private void InitializeRootNode(XmlElement connectionsRootElement) - { - var rootNodeName = connectionsRootElement?.Attributes["Name"].Value.Trim(); - _rootNodeInfo.Name = rootNodeName; - } - - private void CreateDecryptor(RootNodeInfo rootNodeInfo, XmlElement connectionsRootElement = null) - { - if (_confVersion >= 2.6) - { - var engine = connectionsRootElement.GetAttributeAsEnum("EncryptionEngine"); - var mode = connectionsRootElement.GetAttributeAsEnum("BlockCipherMode"); - var keyDerivationIterations = connectionsRootElement.GetAttributeAsInt("KdfIterations"); - - _decryptor = new XmlConnectionsDecryptor(engine, mode, rootNodeInfo) - { - AuthenticationRequestor = AuthenticationRequestor, - KeyDerivationIterations = keyDerivationIterations - }; - } - else - { - _decryptor = new XmlConnectionsDecryptor(_rootNodeInfo) - {AuthenticationRequestor = AuthenticationRequestor}; - } - } - - private void AddNodesFromXmlRecursive(XmlNode parentXmlNode, ContainerInfo parentContainer) - { - try - { - if (!parentXmlNode.HasChildNodes) return; - foreach (XmlNode xmlNode in parentXmlNode.ChildNodes) - { - var nodeType = xmlNode.GetAttributeAsEnum("Type", TreeNodeType.Connection); - - // ReSharper disable once SwitchStatementMissingSomeCases - switch (nodeType) - { - case TreeNodeType.Connection: - var connectionInfo = GetConnectionInfoFromXml(xmlNode); - parentContainer.AddChild(connectionInfo); - break; - case TreeNodeType.Container: - var containerInfo = new ContainerInfo(); - - if (_confVersion >= 0.9) - containerInfo.CopyFrom(GetConnectionInfoFromXml(xmlNode)); - if (_confVersion >= 0.8) - { - containerInfo.IsExpanded = xmlNode.GetAttributeAsBool("Expanded"); - } - - parentContainer.AddChild(containerInfo); - AddNodesFromXmlRecursive(xmlNode, containerInfo); - break; - } - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.AddNodeFromXmlFailed, ex); - throw; - } - } - - private ConnectionInfo GetConnectionInfoFromXml(XmlNode xmlnode) - { - if (xmlnode?.Attributes == null) - return null; - - var connectionId = xmlnode.GetAttributeAsString("Id"); - if (string.IsNullOrWhiteSpace(connectionId)) - connectionId = Guid.NewGuid().ToString(); - var connectionInfo = new ConnectionInfo(connectionId); - - try - { - if (_confVersion >= 0.2) - { - connectionInfo.Name = xmlnode.GetAttributeAsString("Name"); - connectionInfo.Description = xmlnode.GetAttributeAsString("Descr"); - connectionInfo.Hostname = xmlnode.GetAttributeAsString("Hostname"); - connectionInfo.DisplayWallpaper = xmlnode.GetAttributeAsBool("DisplayWallpaper"); - connectionInfo.DisplayThemes = xmlnode.GetAttributeAsBool("DisplayThemes"); - connectionInfo.CacheBitmaps = xmlnode.GetAttributeAsBool("CacheBitmaps"); - - if (_confVersion < 1.1) //1.0 - 0.1 - { - connectionInfo.Resolution = xmlnode.GetAttributeAsBool("Fullscreen") - ? RDPResolutions.Fullscreen - : RDPResolutions.FitToWindow; - } - - if (!Runtime.UseCredentialManager || _confVersion <= 2.6) // 0.2 - 2.6 - { -#pragma warning disable 618 - connectionInfo.Username = xmlnode.GetAttributeAsString("Username"); - connectionInfo.Password = _decryptor.Decrypt(xmlnode.GetAttributeAsString("Password")); - connectionInfo.Domain = xmlnode.GetAttributeAsString("Domain"); -#pragma warning restore 618 - } - } - - if (_confVersion >= 0.3) - { - if (_confVersion < 0.7) - { - if (xmlnode.GetAttributeAsBool("UseVNC")) - { - connectionInfo.Protocol = ProtocolType.VNC; - connectionInfo.Port = xmlnode.GetAttributeAsInt("VNCPort"); - } - else - { - connectionInfo.Protocol = ProtocolType.RDP; - } - } - } - else - { - connectionInfo.Port = (int)RdpProtocol6.Defaults.Port; - connectionInfo.Protocol = ProtocolType.RDP; - } - - if (_confVersion >= 0.4) - { - if (_confVersion < 0.7) - { - connectionInfo.Port = xmlnode.GetAttributeAsBool("UseVNC") - ? xmlnode.GetAttributeAsInt("VNCPort") - : xmlnode.GetAttributeAsInt("RDPPort"); - } - - connectionInfo.UseConsoleSession = xmlnode.GetAttributeAsBool("ConnectToConsole"); - } - else - { - if (_confVersion < 0.7) - { - if (xmlnode.GetAttributeAsBool("UseVNC")) - connectionInfo.Port = (int)ProtocolVNC.Defaults.Port; - else - connectionInfo.Port = (int)RdpProtocol6.Defaults.Port; - } - - connectionInfo.UseConsoleSession = false; - } - - if (_confVersion >= 0.5) - { - connectionInfo.RedirectDiskDrives = xmlnode.GetAttributeAsBool("RedirectDiskDrives"); - connectionInfo.RedirectPrinters = xmlnode.GetAttributeAsBool("RedirectPrinters"); - connectionInfo.RedirectPorts = xmlnode.GetAttributeAsBool("RedirectPorts"); - connectionInfo.RedirectSmartCards = xmlnode.GetAttributeAsBool("RedirectSmartCards"); - } - else - { - connectionInfo.RedirectDiskDrives = false; - connectionInfo.RedirectPrinters = false; - connectionInfo.RedirectPorts = false; - connectionInfo.RedirectSmartCards = false; - } - - if (_confVersion >= 0.7) - { - connectionInfo.Protocol = xmlnode.GetAttributeAsEnum("Protocol"); - connectionInfo.Port = xmlnode.GetAttributeAsInt("Port"); - } - - if (_confVersion >= 1.0) - { - connectionInfo.RedirectKeys = xmlnode.GetAttributeAsBool("RedirectKeys"); - } - - if (_confVersion >= 1.2) - { - connectionInfo.PuttySession = xmlnode.GetAttributeAsString("PuttySession"); - } - - if (_confVersion >= 1.3) - { - connectionInfo.Colors = xmlnode.GetAttributeAsEnum("Colors"); - connectionInfo.Resolution = xmlnode.GetAttributeAsEnum("Resolution"); - connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum("RedirectSound"); - connectionInfo.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture"); - } - else - { - switch (xmlnode.GetAttributeAsInt("Colors")) - { - case 0: - connectionInfo.Colors = RDPColors.Colors256; - break; - case 1: - connectionInfo.Colors = RDPColors.Colors16Bit; - break; - case 2: - connectionInfo.Colors = RDPColors.Colors24Bit; - break; - case 3: - connectionInfo.Colors = RDPColors.Colors32Bit; - break; - // ReSharper disable once RedundantCaseLabel - case 4: - default: - connectionInfo.Colors = RDPColors.Colors15Bit; - break; - } - - connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum("RedirectSound"); - connectionInfo.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture"); - } - - if (_confVersion >= 1.3) - { - connectionInfo.Inheritance.CacheBitmaps = xmlnode.GetAttributeAsBool("InheritCacheBitmaps"); - connectionInfo.Inheritance.Colors = xmlnode.GetAttributeAsBool("InheritColors"); - connectionInfo.Inheritance.Description = xmlnode.GetAttributeAsBool("InheritDescription"); - connectionInfo.Inheritance.DisplayThemes = xmlnode.GetAttributeAsBool("InheritDisplayThemes"); - connectionInfo.Inheritance.DisplayWallpaper = xmlnode.GetAttributeAsBool("InheritDisplayWallpaper"); - connectionInfo.Inheritance.Icon = xmlnode.GetAttributeAsBool("InheritIcon"); - connectionInfo.Inheritance.Panel = xmlnode.GetAttributeAsBool("InheritPanel"); - connectionInfo.Inheritance.Port = xmlnode.GetAttributeAsBool("InheritPort"); - connectionInfo.Inheritance.Protocol = xmlnode.GetAttributeAsBool("InheritProtocol"); - connectionInfo.Inheritance.PuttySession = xmlnode.GetAttributeAsBool("InheritPuttySession"); - connectionInfo.Inheritance.RedirectDiskDrives = - xmlnode.GetAttributeAsBool("InheritRedirectDiskDrives"); - connectionInfo.Inheritance.RedirectKeys = xmlnode.GetAttributeAsBool("InheritRedirectKeys"); - connectionInfo.Inheritance.RedirectPorts = xmlnode.GetAttributeAsBool("InheritRedirectPorts"); - connectionInfo.Inheritance.RedirectPrinters = xmlnode.GetAttributeAsBool("InheritRedirectPrinters"); - connectionInfo.Inheritance.RedirectSmartCards = - xmlnode.GetAttributeAsBool("InheritRedirectSmartCards"); - connectionInfo.Inheritance.RedirectSound = xmlnode.GetAttributeAsBool("InheritRedirectSound"); - connectionInfo.Inheritance.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture"); - connectionInfo.Inheritance.Resolution = xmlnode.GetAttributeAsBool("InheritResolution"); - connectionInfo.Inheritance.UseConsoleSession = - xmlnode.GetAttributeAsBool("InheritUseConsoleSession"); - - if (!Runtime.UseCredentialManager || _confVersion <= 2.6) // 1.3 - 2.6 - { - connectionInfo.Inheritance.Domain = xmlnode.GetAttributeAsBool("InheritDomain"); - connectionInfo.Inheritance.Password = xmlnode.GetAttributeAsBool("InheritPassword"); - connectionInfo.Inheritance.Username = xmlnode.GetAttributeAsBool("InheritUsername"); - } - - connectionInfo.Icon = xmlnode.GetAttributeAsString("Icon"); - connectionInfo.Panel = xmlnode.GetAttributeAsString("Panel"); - } - else - { - if (xmlnode.GetAttributeAsBool("Inherit")) - connectionInfo.Inheritance.TurnOnInheritanceCompletely(); - connectionInfo.Icon = xmlnode.GetAttributeAsString("Icon").Replace(".ico", ""); - connectionInfo.Panel = Language.General; - } - - if (_confVersion >= 1.5) - { - connectionInfo.PleaseConnect = xmlnode.GetAttributeAsBool("Connected"); - } - - if (_confVersion >= 1.6) - { - connectionInfo.PreExtApp = xmlnode.GetAttributeAsString("PreExtApp"); - connectionInfo.PostExtApp = xmlnode.GetAttributeAsString("PostExtApp"); - connectionInfo.Inheritance.PreExtApp = xmlnode.GetAttributeAsBool("InheritPreExtApp"); - connectionInfo.Inheritance.PostExtApp = xmlnode.GetAttributeAsBool("InheritPostExtApp"); - } - - if (_confVersion >= 1.7) - { - connectionInfo.VNCCompression = - xmlnode.GetAttributeAsEnum("VNCCompression"); - connectionInfo.VNCEncoding = xmlnode.GetAttributeAsEnum("VNCEncoding"); - connectionInfo.VNCAuthMode = xmlnode.GetAttributeAsEnum("VNCAuthMode"); - connectionInfo.VNCProxyType = xmlnode.GetAttributeAsEnum("VNCProxyType"); - connectionInfo.VNCProxyIP = xmlnode.GetAttributeAsString("VNCProxyIP"); - connectionInfo.VNCProxyPort = xmlnode.GetAttributeAsInt("VNCProxyPort"); - connectionInfo.VNCProxyUsername = xmlnode.GetAttributeAsString("VNCProxyUsername"); - connectionInfo.VNCProxyPassword = - _decryptor.Decrypt(xmlnode.GetAttributeAsString("VNCProxyPassword")); - connectionInfo.VNCColors = xmlnode.GetAttributeAsEnum("VNCColors"); - connectionInfo.VNCSmartSizeMode = - xmlnode.GetAttributeAsEnum("VNCSmartSizeMode"); - connectionInfo.VNCViewOnly = xmlnode.GetAttributeAsBool("VNCViewOnly"); - connectionInfo.Inheritance.VNCCompression = xmlnode.GetAttributeAsBool("InheritVNCCompression"); - connectionInfo.Inheritance.VNCEncoding = xmlnode.GetAttributeAsBool("InheritVNCEncoding"); - connectionInfo.Inheritance.VNCAuthMode = xmlnode.GetAttributeAsBool("InheritVNCAuthMode"); - connectionInfo.Inheritance.VNCProxyType = xmlnode.GetAttributeAsBool("InheritVNCProxyType"); - connectionInfo.Inheritance.VNCProxyIP = xmlnode.GetAttributeAsBool("InheritVNCProxyIP"); - connectionInfo.Inheritance.VNCProxyPort = xmlnode.GetAttributeAsBool("InheritVNCProxyPort"); - connectionInfo.Inheritance.VNCProxyUsername = xmlnode.GetAttributeAsBool("InheritVNCProxyUsername"); - connectionInfo.Inheritance.VNCProxyPassword = xmlnode.GetAttributeAsBool("InheritVNCProxyPassword"); - connectionInfo.Inheritance.VNCColors = xmlnode.GetAttributeAsBool("InheritVNCColors"); - connectionInfo.Inheritance.VNCSmartSizeMode = xmlnode.GetAttributeAsBool("InheritVNCSmartSizeMode"); - connectionInfo.Inheritance.VNCViewOnly = xmlnode.GetAttributeAsBool("InheritVNCViewOnly"); - } - - if (_confVersion >= 1.8) - { - connectionInfo.RDPAuthenticationLevel = - xmlnode.GetAttributeAsEnum("RDPAuthenticationLevel"); - connectionInfo.Inheritance.RDPAuthenticationLevel = - xmlnode.GetAttributeAsBool("InheritRDPAuthenticationLevel"); - } - - if (_confVersion >= 1.9) - { - connectionInfo.RenderingEngine = - xmlnode.GetAttributeAsEnum("RenderingEngine"); - connectionInfo.MacAddress = xmlnode.GetAttributeAsString("MacAddress"); - connectionInfo.Inheritance.RenderingEngine = xmlnode.GetAttributeAsBool("InheritRenderingEngine"); - connectionInfo.Inheritance.MacAddress = xmlnode.GetAttributeAsBool("InheritMacAddress"); - } - - if (_confVersion >= 2.0) - { - connectionInfo.UserField = xmlnode.GetAttributeAsString("UserField"); - connectionInfo.Inheritance.UserField = xmlnode.GetAttributeAsBool("InheritUserField"); - } - - if (_confVersion >= 2.1) - { - connectionInfo.ExtApp = xmlnode.GetAttributeAsString("ExtApp"); - connectionInfo.Inheritance.ExtApp = xmlnode.GetAttributeAsBool("InheritExtApp"); - } - - if (_confVersion >= 2.2) - { - // Get settings - connectionInfo.RDGatewayUsageMethod = - xmlnode.GetAttributeAsEnum("RDGatewayUsageMethod"); - connectionInfo.RDGatewayHostname = xmlnode.GetAttributeAsString("RDGatewayHostname"); - connectionInfo.RDGatewayUseConnectionCredentials = - xmlnode.GetAttributeAsEnum( - "RDGatewayUseConnectionCredentials"); - connectionInfo.RDGatewayUsername = xmlnode.GetAttributeAsString("RDGatewayUsername"); - connectionInfo.RDGatewayPassword = - _decryptor.Decrypt(xmlnode.GetAttributeAsString("RDGatewayPassword")); - connectionInfo.RDGatewayDomain = xmlnode.GetAttributeAsString("RDGatewayDomain"); - - // Get inheritance settings - connectionInfo.Inheritance.RDGatewayUsageMethod = - xmlnode.GetAttributeAsBool("InheritRDGatewayUsageMethod"); - connectionInfo.Inheritance.RDGatewayHostname = - xmlnode.GetAttributeAsBool("InheritRDGatewayHostname"); - connectionInfo.Inheritance.RDGatewayUseConnectionCredentials = - xmlnode.GetAttributeAsBool("InheritRDGatewayUseConnectionCredentials"); - connectionInfo.Inheritance.RDGatewayUsername = - xmlnode.GetAttributeAsBool("InheritRDGatewayUsername"); - connectionInfo.Inheritance.RDGatewayPassword = - xmlnode.GetAttributeAsBool("InheritRDGatewayPassword"); - connectionInfo.Inheritance.RDGatewayDomain = xmlnode.GetAttributeAsBool("InheritRDGatewayDomain"); - } - - if (_confVersion >= 2.3) - { - // Get settings - connectionInfo.EnableFontSmoothing = xmlnode.GetAttributeAsBool("EnableFontSmoothing"); - connectionInfo.EnableDesktopComposition = xmlnode.GetAttributeAsBool("EnableDesktopComposition"); - - // Get inheritance settings - connectionInfo.Inheritance.EnableFontSmoothing = - xmlnode.GetAttributeAsBool("InheritEnableFontSmoothing"); - connectionInfo.Inheritance.EnableDesktopComposition = - xmlnode.GetAttributeAsBool("InheritEnableDesktopComposition"); - } - - if (_confVersion >= 2.4) - { - connectionInfo.UseCredSsp = xmlnode.GetAttributeAsBool("UseCredSsp"); - connectionInfo.Inheritance.UseCredSsp = xmlnode.GetAttributeAsBool("InheritUseCredSsp"); - } - - if (_confVersion >= 2.5) - { - connectionInfo.LoadBalanceInfo = xmlnode.GetAttributeAsString("LoadBalanceInfo"); - connectionInfo.AutomaticResize = xmlnode.GetAttributeAsBool("AutomaticResize"); - connectionInfo.Inheritance.LoadBalanceInfo = xmlnode.GetAttributeAsBool("InheritLoadBalanceInfo"); - connectionInfo.Inheritance.AutomaticResize = xmlnode.GetAttributeAsBool("InheritAutomaticResize"); - } - - if (_confVersion >= 2.6) - { - connectionInfo.SoundQuality = - xmlnode.GetAttributeAsEnum("SoundQuality"); - connectionInfo.Inheritance.SoundQuality = xmlnode.GetAttributeAsBool("InheritSoundQuality"); - connectionInfo.RDPMinutesToIdleTimeout = xmlnode.GetAttributeAsInt("RDPMinutesToIdleTimeout"); - connectionInfo.Inheritance.RDPMinutesToIdleTimeout = - xmlnode.GetAttributeAsBool("InheritRDPMinutesToIdleTimeout"); - connectionInfo.RDPAlertIdleTimeout = xmlnode.GetAttributeAsBool("RDPAlertIdleTimeout"); - connectionInfo.Inheritance.RDPAlertIdleTimeout = - xmlnode.GetAttributeAsBool("InheritRDPAlertIdleTimeout"); } - - if (_confVersion >= 2.7) - { - connectionInfo.RedirectClipboard = xmlnode.GetAttributeAsBool("RedirectClipboard"); - connectionInfo.Favorite = xmlnode.GetAttributeAsBool("Favorite"); - connectionInfo.UseVmId = xmlnode.GetAttributeAsBool("UseVmId"); - connectionInfo.VmId = xmlnode.GetAttributeAsString("VmId"); - connectionInfo.UseEnhancedMode = xmlnode.GetAttributeAsBool("UseEnhancedMode"); - connectionInfo.RdpVersion = xmlnode.GetAttributeAsEnum("RdpVersion", RdpVersion.Highest); - connectionInfo.SSHTunnelConnectionName = xmlnode.GetAttributeAsString("SSHTunnelConnectionName"); - connectionInfo.OpeningCommand = xmlnode.GetAttributeAsString("OpeningCommand"); - connectionInfo.SSHOptions = xmlnode.GetAttributeAsString("SSHOptions"); - connectionInfo.RDPStartProgram = xmlnode.GetAttributeAsString("StartProgram"); - connectionInfo.RDPStartProgramWorkDir = xmlnode.GetAttributeAsString("StartProgramWorkDir"); - connectionInfo.DisableFullWindowDrag = xmlnode.GetAttributeAsBool("DisableFullWindowDrag"); - connectionInfo.DisableMenuAnimations = xmlnode.GetAttributeAsBool("DisableMenuAnimations"); - connectionInfo.DisableCursorShadow = xmlnode.GetAttributeAsBool("DisableCursorShadow"); - connectionInfo.DisableCursorBlinking = xmlnode.GetAttributeAsBool("DisableCursorBlinking"); - connectionInfo.RDPStartProgram = xmlnode.GetAttributeAsString("StartProgram"); - connectionInfo.RDPStartProgramWorkDir = xmlnode.GetAttributeAsString("StartProgramWorkDir"); - connectionInfo.Inheritance.RedirectClipboard = xmlnode.GetAttributeAsBool("InheritRedirectClipboard"); - connectionInfo.Inheritance.Favorite = xmlnode.GetAttributeAsBool("InheritFavorite"); - connectionInfo.Inheritance.RdpVersion = xmlnode.GetAttributeAsBool("InheritRdpVersion"); - connectionInfo.Inheritance.UseVmId = xmlnode.GetAttributeAsBool("InheritUseVmId"); - connectionInfo.Inheritance.VmId = xmlnode.GetAttributeAsBool("InheritVmId"); - connectionInfo.Inheritance.UseEnhancedMode = xmlnode.GetAttributeAsBool("InheritUseEnhancedMode"); - connectionInfo.Inheritance.SSHTunnelConnectionName = xmlnode.GetAttributeAsBool("InheritSSHTunnelConnectionName"); - connectionInfo.Inheritance.OpeningCommand = xmlnode.GetAttributeAsBool("InheritOpeningCommand"); - connectionInfo.Inheritance.SSHOptions = xmlnode.GetAttributeAsBool("InheritSSHOptions"); - connectionInfo.Inheritance.DisableFullWindowDrag = xmlnode.GetAttributeAsBool("InheritDisableFullWindowDrag"); - connectionInfo.Inheritance.DisableMenuAnimations = xmlnode.GetAttributeAsBool("InheritDisableMenuAnimations"); - connectionInfo.Inheritance.DisableCursorShadow = xmlnode.GetAttributeAsBool("InheritDisableCursorShadow"); - connectionInfo.Inheritance.DisableCursorBlinking = xmlnode.GetAttributeAsBool("InheritDisableCursorBlinking"); - connectionInfo.UserViaAPI = xmlnode.GetAttributeAsString("UserViaAPI"); - connectionInfo.Inheritance.UserViaAPI = xmlnode.GetAttributeAsBool("InheritUserViaAPI"); - connectionInfo.EC2InstanceId = xmlnode.GetAttributeAsString("EC2InstanceId"); - connectionInfo.EC2Region = xmlnode.GetAttributeAsString("EC2Region"); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - string.Format(Language.GetConnectionInfoFromXmlFailed, - connectionInfo.Name, ConnectionFileName, ex.Message)); - } - - return connectionInfo; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentCompiler.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentCompiler.cs deleted file mode 100644 index 00233a9e9..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentCompiler.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Linq; -using System.Security; -using System.Xml.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionsDocumentCompiler - { - private readonly ICryptographyProvider _cryptographyProvider; - private SecureString _encryptionKey; - private readonly ISerializer _connectionNodeSerializer; - - public XmlConnectionsDocumentCompiler(ICryptographyProvider cryptographyProvider, - ISerializer connectionNodeSerializer) - { - if (cryptographyProvider == null) - throw new ArgumentNullException(nameof(cryptographyProvider)); - if (connectionNodeSerializer == null) - throw new ArgumentNullException(nameof(connectionNodeSerializer)); - - _cryptographyProvider = cryptographyProvider; - _connectionNodeSerializer = connectionNodeSerializer; - } - - public XDocument CompileDocument(ConnectionTreeModel connectionTreeModel, bool fullFileEncryption) - { - var rootNodeInfo = GetRootNodeFromConnectionTreeModel(connectionTreeModel); - return CompileDocument(rootNodeInfo, fullFileEncryption); - } - - public XDocument CompileDocument(ConnectionInfo serializationTarget, bool fullFileEncryption) - { - var rootNodeInfo = GetRootNodeFromConnectionInfo(serializationTarget); - _encryptionKey = rootNodeInfo.PasswordString.ConvertToSecureString(); - var rootElement = CompileRootNode(rootNodeInfo, fullFileEncryption); - - CompileRecursive(serializationTarget, rootElement); - var xmlDeclaration = new XDeclaration("1.0", "utf-8", null); - var xmlDocument = new XDocument(xmlDeclaration, rootElement); - if (fullFileEncryption) - xmlDocument = - new XmlConnectionsDocumentEncryptor(_cryptographyProvider).EncryptDocument(xmlDocument, - _encryptionKey); - return xmlDocument; - } - - private void CompileRecursive(ConnectionInfo serializationTarget, XContainer parentElement) - { - var newElement = parentElement; - if (!(serializationTarget is RootNodeInfo)) - { - newElement = CompileConnectionInfoNode(serializationTarget); - parentElement.Add(newElement); - } - - var serializationTargetAsContainer = serializationTarget as ContainerInfo; - if (serializationTargetAsContainer == null) return; - foreach (var child in serializationTargetAsContainer.Children.ToArray()) - CompileRecursive(child, newElement); - } - - private RootNodeInfo GetRootNodeFromConnectionTreeModel(ConnectionTreeModel connectionTreeModel) - { - return (RootNodeInfo)connectionTreeModel.RootNodes.First(node => node is RootNodeInfo); - } - - private RootNodeInfo GetRootNodeFromConnectionInfo(ConnectionInfo connectionInfo) - { - while (true) - { - var connectionInfoAsRootNode = connectionInfo as RootNodeInfo; - if (connectionInfoAsRootNode != null) return connectionInfoAsRootNode; - connectionInfo = connectionInfo?.Parent ?? new RootNodeInfo(RootNodeType.Connection); - } - } - - private XElement CompileRootNode(RootNodeInfo rootNodeInfo, bool fullFileEncryption) - { - var rootNodeSerializer = new XmlRootNodeSerializer(); - return rootNodeSerializer.SerializeRootNodeInfo(rootNodeInfo, _cryptographyProvider, - _connectionNodeSerializer.Version, fullFileEncryption); - } - - private XElement CompileConnectionInfoNode(ConnectionInfo connectionInfo) - { - return _connectionNodeSerializer.Serialize(connectionInfo); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentEncryptor.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentEncryptor.cs deleted file mode 100644 index c254a6744..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentEncryptor.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Security; -using System.Xml.Linq; -using mRemoteNG.Security; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionsDocumentEncryptor - { - private readonly ICryptographyProvider _cryptographyProvider; - - public XmlConnectionsDocumentEncryptor(ICryptographyProvider cryptographyProvider) - { - _cryptographyProvider = cryptographyProvider; - } - - public XDocument EncryptDocument(XDocument documentToEncrypt, SecureString encryptionKey) - { - var contentToEncrypt = GetContentToEncrypt(documentToEncrypt.Root); - var encryptedContent = _cryptographyProvider.Encrypt(contentToEncrypt, encryptionKey); - var encryptedDocument = ReplaceInnerXml(documentToEncrypt, encryptedContent); - return encryptedDocument; - } - - private string GetContentToEncrypt(XNode element) - { - var reader = element.CreateReader(); - reader.MoveToContent(); - return reader.ReadInnerXml(); - } - - private XDocument ReplaceInnerXml(XDocument originalDocument, string newContent) - { - var newRootElement = ShallowCloneRootNode(originalDocument.Root); - newRootElement.SetValue(newContent); - return new XDocument(newRootElement); - } - - private XElement ShallowCloneRootNode(XElement originalElement) - { - var newElement = new XElement(originalElement.Name); - foreach (var attribute in originalElement.Attributes()) - newElement.Add(new XAttribute(attribute)); - return newElement; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsSerializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsSerializer.cs deleted file mode 100644 index ca3fb421f..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsSerializer.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Text; -using System.Xml; -using System.Xml.Linq; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Security; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionsSerializer : ISerializer, - ISerializer - { - private readonly ICryptographyProvider _cryptographyProvider; - private readonly ISerializer _connectionNodeSerializer; - - public Version Version => _connectionNodeSerializer.Version; - public bool UseFullEncryption { get; set; } - - public XmlConnectionsSerializer(ICryptographyProvider cryptographyProvider, - ISerializer connectionNodeSerializer) - { - _cryptographyProvider = cryptographyProvider; - _connectionNodeSerializer = connectionNodeSerializer; - } - - public string Serialize(ConnectionTreeModel connectionTreeModel) - { - var rootNode = (RootNodeInfo)connectionTreeModel.RootNodes.First(node => node is RootNodeInfo); - return SerializeConnectionsData(rootNode); - } - - public string Serialize(ConnectionInfo serializationTarget) - { - return SerializeConnectionsData(serializationTarget); - } - - private string SerializeConnectionsData(ConnectionInfo serializationTarget) - { - var xml = ""; - try - { - var documentCompiler = - new XmlConnectionsDocumentCompiler(_cryptographyProvider, _connectionNodeSerializer); - var xmlDocument = documentCompiler.CompileDocument(serializationTarget, UseFullEncryption); - xml = WriteXmlToString(xmlDocument); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("SaveToXml failed", ex); - } - - return xml; - } - - private static string WriteXmlToString(XNode xmlDocument) - { - string xmlString; - var xmlWriterSettings = new XmlWriterSettings - {Indent = true, IndentChars = " ", Encoding = Encoding.UTF8}; - var memoryStream = new MemoryStream(); - using (var xmlTextWriter = XmlWriter.Create(memoryStream, xmlWriterSettings)) - { - xmlDocument.WriteTo(xmlTextWriter); - xmlTextWriter.Flush(); - var streamReader = new StreamReader(memoryStream, Encoding.UTF8, true); - memoryStream.Seek(0, SeekOrigin.Begin); - xmlString = streamReader.ReadToEnd(); - } - - return xmlString; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlExtensions.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlExtensions.cs deleted file mode 100644 index 06520b1cd..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlExtensions.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Xml; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - public static class XmlExtensions - { - public static string GetAttributeAsString(this XmlNode xmlNode, string attribute, string defaultValue = "") - { - var value = xmlNode?.Attributes?[attribute]?.Value; - return value ?? defaultValue; - } - - public static bool GetAttributeAsBool(this XmlNode xmlNode, string attribute, bool defaultValue = false) - { - var value = xmlNode?.Attributes?[attribute]?.Value; - if (string.IsNullOrWhiteSpace(value)) - return defaultValue; - - return bool.TryParse(value, out var valueAsBool) - ? valueAsBool - : defaultValue; - } - - public static int GetAttributeAsInt(this XmlNode xmlNode, string attribute, int defaultValue = 0) - { - var value = xmlNode?.Attributes?[attribute]?.Value; - if (string.IsNullOrWhiteSpace(value)) - return defaultValue; - - return int.TryParse(value, out var valueAsBool) - ? valueAsBool - : defaultValue; - } - - public static T GetAttributeAsEnum(this XmlNode xmlNode, string attribute, T defaultValue = default(T)) - where T : struct - { - var value = xmlNode?.Attributes?[attribute]?.Value; - if (string.IsNullOrWhiteSpace(value)) - return defaultValue; - - return Enum.TryParse(value, true, out var valueAsEnum) - ? valueAsEnum - : defaultValue; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlRootNodeSerializer.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlRootNodeSerializer.cs deleted file mode 100644 index bc56f4259..000000000 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Xml/XmlRootNodeSerializer.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Xml.Linq; -using mRemoteNG.Security; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlRootNodeSerializer - { - public XElement SerializeRootNodeInfo(RootNodeInfo rootNodeInfo, - ICryptographyProvider cryptographyProvider, - Version version, - bool fullFileEncryption = false) - { - XNamespace xmlNamespace = "http://mremoteng.org"; - var element = new XElement(xmlNamespace + "Connections"); - element.Add(new XAttribute(XNamespace.Xmlns + "mrng", xmlNamespace)); - element.Add(new XAttribute(XName.Get("Name"), rootNodeInfo.Name)); - element.Add(new XAttribute(XName.Get("Export"), "false")); - element.Add(new XAttribute(XName.Get("EncryptionEngine"), cryptographyProvider.CipherEngine)); - element.Add(new XAttribute(XName.Get("BlockCipherMode"), cryptographyProvider.CipherMode)); - element.Add(new XAttribute(XName.Get("KdfIterations"), cryptographyProvider.KeyDerivationIterations)); - element.Add(new XAttribute(XName.Get("FullFileEncryption"), - fullFileEncryption.ToString().ToLowerInvariant())); - element.Add(CreateProtectedAttribute(rootNodeInfo, cryptographyProvider)); - element.Add(new XAttribute(XName.Get("ConfVersion"), version.ToString(2))); - return element; - } - - private XAttribute CreateProtectedAttribute(RootNodeInfo rootNodeInfo, - ICryptographyProvider cryptographyProvider) - { - var attribute = new XAttribute(XName.Get("Protected"), ""); - var plainText = rootNodeInfo.Password ? "ThisIsProtected" : "ThisIsNotProtected"; - var encryptionPassword = rootNodeInfo.PasswordString.ConvertToSecureString(); - attribute.Value = cryptographyProvider.Encrypt(plainText, encryptionPassword); - return attribute; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/CredentialProviderSerializer/CredentialRepositoryListDeserializer.cs b/mRemoteNG/Config/Serializers/CredentialProviderSerializer/CredentialRepositoryListDeserializer.cs deleted file mode 100644 index 6795d695a..000000000 --- a/mRemoteNG/Config/Serializers/CredentialProviderSerializer/CredentialRepositoryListDeserializer.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; -using mRemoteNG.Credential; -using mRemoteNG.Credential.Repositories; - -namespace mRemoteNG.Config.Serializers.CredentialProviderSerializer -{ - public class CredentialRepositoryListDeserializer - { - private readonly ISecureSerializer, string> _serializer; - private readonly ISecureDeserializer> _deserializer; - - public CredentialRepositoryListDeserializer( - ISecureSerializer, string> serializer, - ISecureDeserializer> deserializer) - { - if (serializer == null) - throw new ArgumentNullException(nameof(serializer)); - if (deserializer == null) - throw new ArgumentNullException(nameof(deserializer)); - - _serializer = serializer; - _deserializer = deserializer; - } - - public IEnumerable Deserialize(string xml) - { - if (string.IsNullOrEmpty(xml)) return new ICredentialRepository[0]; - var xdoc = XDocument.Parse(xml); - var repoEntries = xdoc.Descendants("CredentialRepository"); - var xmlRepoFactory = new XmlCredentialRepositoryFactory(_serializer, _deserializer); - return repoEntries.Select(xmlRepoFactory.Build); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/CredentialProviderSerializer/CredentialRepositoryListSerializer.cs b/mRemoteNG/Config/Serializers/CredentialProviderSerializer/CredentialRepositoryListSerializer.cs deleted file mode 100644 index ea755999c..000000000 --- a/mRemoteNG/Config/Serializers/CredentialProviderSerializer/CredentialRepositoryListSerializer.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; -using mRemoteNG.Credential; - - -namespace mRemoteNG.Config.Serializers.CredentialProviderSerializer -{ - public class CredentialRepositoryListSerializer - { - public string Serialize(IEnumerable credentialProviderCatalog) - { - var xmlDocument = new XDocument(new XDeclaration("1.0", "utf-8", null)); - var rootElement = new XElement("CredentialRepositories", - from provider in credentialProviderCatalog - select new XElement("CredentialRepository", - new XAttribute("Id", provider.Config.Id), - new XAttribute("TypeName", provider.Config.TypeName), - new XAttribute("Title", provider.Config.Title), - new XAttribute("Source", provider.Config.Source) - ) - ); - xmlDocument.Add(rootElement); - var declaration = xmlDocument.Declaration.ToString(); - var documentBody = xmlDocument.ToString(); - return string.Concat(declaration, Environment.NewLine, documentBody); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialPasswordDecryptorDecorator.cs b/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialPasswordDecryptorDecorator.cs deleted file mode 100644 index a89ea7556..000000000 --- a/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialPasswordDecryptorDecorator.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security; -using System.Xml.Linq; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; - -namespace mRemoteNG.Config.Serializers.CredentialSerializer -{ - public class XmlCredentialPasswordDecryptorDecorator : ISecureDeserializer> - { - private readonly IDeserializer> _baseDeserializer; - - public XmlCredentialPasswordDecryptorDecorator( - IDeserializer> baseDeserializer) - { - if (baseDeserializer == null) - throw new ArgumentNullException(nameof(baseDeserializer)); - - _baseDeserializer = baseDeserializer; - } - - public IEnumerable Deserialize(string xml, SecureString key) - { - var decryptedXml = DecryptPasswords(xml, key); - return _baseDeserializer.Deserialize(decryptedXml); - } - - private string DecryptPasswords(string xml, SecureString key) - { - if (string.IsNullOrEmpty(xml)) return xml; - var xdoc = XDocument.Parse(xml); - var cryptoProvider = new CryptoProviderFactoryFromXml(xdoc.Root).Build(); - DecryptAuthHeader(xdoc.Root, cryptoProvider, key); - foreach (var credentialElement in xdoc.Descendants()) - { - var passwordAttribute = credentialElement.Attribute("Password"); - if (passwordAttribute == null) continue; - var decryptedPassword = cryptoProvider.Decrypt(passwordAttribute.Value, key); - passwordAttribute.SetValue(decryptedPassword); - } - - return xdoc.ToString(); - } - - private void DecryptAuthHeader(XElement rootElement, - ICryptographyProvider cryptographyProvider, - SecureString key) - { - var authAttribute = rootElement.Attribute("Auth"); - if (authAttribute == null) - throw new EncryptionException("Could not find Auth header in the XML repository root element."); - cryptographyProvider.Decrypt(authAttribute.Value, key); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialPasswordEncryptorDecorator.cs b/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialPasswordEncryptorDecorator.cs deleted file mode 100644 index 6b3db03ce..000000000 --- a/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialPasswordEncryptorDecorator.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security; -using System.Xml.Linq; -using mRemoteNG.Credential; -using mRemoteNG.Security; - -namespace mRemoteNG.Config.Serializers.CredentialSerializer -{ - public class XmlCredentialPasswordEncryptorDecorator : ISecureSerializer, string> - { - private readonly ISerializer, string> _baseSerializer; - private readonly ICryptographyProvider _cryptographyProvider; - - public XmlCredentialPasswordEncryptorDecorator(ICryptographyProvider cryptographyProvider, - ISerializer, string> - baseSerializer) - { - if (baseSerializer == null) - throw new ArgumentNullException(nameof(baseSerializer)); - if (cryptographyProvider == null) - throw new ArgumentNullException(nameof(cryptographyProvider)); - - _baseSerializer = baseSerializer; - _cryptographyProvider = cryptographyProvider; - } - - - public string Serialize(IEnumerable credentialRecords, SecureString key) - { - if (credentialRecords == null) - throw new ArgumentNullException(nameof(credentialRecords)); - - var baseReturn = _baseSerializer.Serialize(credentialRecords); - var encryptedReturn = EncryptPasswordAttributes(baseReturn, key); - return encryptedReturn; - } - - private string EncryptPasswordAttributes(string xml, SecureString encryptionKey) - { - var xdoc = XDocument.Parse(xml); - SetEncryptionAttributes(xdoc, encryptionKey); - foreach (var element in xdoc.Descendants()) - { - var passwordAttribute = element.Attribute("Password"); - if (passwordAttribute == null) continue; - var encryptedPassword = _cryptographyProvider.Encrypt(passwordAttribute.Value, encryptionKey); - passwordAttribute.Value = encryptedPassword; - } - - return xdoc.Declaration + Environment.NewLine + xdoc; - } - - private void SetEncryptionAttributes(XDocument xdoc, SecureString encryptionKey) - { - xdoc.Root?.SetAttributeValue("EncryptionEngine", _cryptographyProvider.CipherEngine); - xdoc.Root?.SetAttributeValue("BlockCipherMode", _cryptographyProvider.CipherMode); - xdoc.Root?.SetAttributeValue("KdfIterations", _cryptographyProvider.KeyDerivationIterations); - xdoc.Root?.SetAttributeValue("Auth", - _cryptographyProvider.Encrypt(RandomGenerator.RandomString(20), - encryptionKey)); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialRecordDeserializer.cs b/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialRecordDeserializer.cs deleted file mode 100644 index 3f071a9db..000000000 --- a/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialRecordDeserializer.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; -using mRemoteNG.Credential; -using mRemoteNG.Security; - -namespace mRemoteNG.Config.Serializers.CredentialSerializer -{ - public class XmlCredentialRecordDeserializer : IDeserializer> - { - public string SchemaVersion { get; } = "1.0"; - - public IEnumerable Deserialize(string xml) - { - if (string.IsNullOrEmpty(xml)) return new ICredentialRecord[0]; - var xdoc = XDocument.Parse(xml); - var rootElement = xdoc.Root; - ValidateSchemaVersion(rootElement); - - var credentials = from element in xdoc.Descendants("Credential") - select new CredentialRecord(Guid.Parse(element.Attribute("Id")?.Value ?? - Guid.NewGuid().ToString())) - { - Title = element.Attribute("Title")?.Value ?? "", - Username = element.Attribute("Username")?.Value ?? "", - Password = element.Attribute("Password")?.Value.ConvertToSecureString(), - Domain = element.Attribute("Domain")?.Value ?? "" - }; - return credentials.ToArray(); - } - - private void ValidateSchemaVersion(XElement rootElement) - { - var docSchemaVersion = rootElement?.Attribute("SchemaVersion")?.Value; - if (docSchemaVersion != SchemaVersion) - throw new Exception( - $"The schema version of this document is not supported by this class. Document Version: {docSchemaVersion} Supported Version: {SchemaVersion}"); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialRecordSerializer.cs b/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialRecordSerializer.cs deleted file mode 100644 index eb421b273..000000000 --- a/mRemoteNG/Config/Serializers/CredentialSerializer/XmlCredentialRecordSerializer.cs +++ /dev/null @@ -1,37 +0,0 @@ -using mRemoteNG.Credential; -using mRemoteNG.Security; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml.Linq; - -namespace mRemoteNG.Config.Serializers.CredentialSerializer -{ - public class XmlCredentialRecordSerializer : ISerializer, string> - { - public Version Version { get; } = new Version(1, 0); - - public string Serialize(IEnumerable credentialRecords) - { - var xdoc = new XDocument( - new XElement("Credentials", - new XAttribute("SchemaVersion", Version.ToString(2)), - from r in credentialRecords - select new XElement("Credential", - new XAttribute("Id", r.Id), - new XAttribute("Title", r.Title), - new XAttribute("Username", r.Username), - new XAttribute("Domain", r.Domain), - new XAttribute("Password", - r.Password - .ConvertToUnsecureString()) - ) - ) - ) - { - Declaration = new XDeclaration("1.0", "utf-8", null) - }; - return xdoc.Declaration + Environment.NewLine + xdoc; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/IDeserializer.cs b/mRemoteNG/Config/Serializers/IDeserializer.cs deleted file mode 100644 index b7f5cb81e..000000000 --- a/mRemoteNG/Config/Serializers/IDeserializer.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Config.Serializers -{ - public interface IDeserializer - { - TOut Deserialize(TIn serializedData); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ISecureDeserializer.cs b/mRemoteNG/Config/Serializers/ISecureDeserializer.cs deleted file mode 100644 index 5a812f0c9..000000000 --- a/mRemoteNG/Config/Serializers/ISecureDeserializer.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Security; - -namespace mRemoteNG.Config.Serializers -{ - public interface ISecureDeserializer - { - TOut Deserialize(TIn serializedData, SecureString key); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ISecureSerializer.cs b/mRemoteNG/Config/Serializers/ISecureSerializer.cs deleted file mode 100644 index 1cbbaea5d..000000000 --- a/mRemoteNG/Config/Serializers/ISecureSerializer.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Security; - -namespace mRemoteNG.Config.Serializers -{ - public interface ISecureSerializer - { - TOut Serialize(TIn model, SecureString key); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/ISerializer.cs b/mRemoteNG/Config/Serializers/ISerializer.cs deleted file mode 100644 index 82e008e2e..000000000 --- a/mRemoteNG/Config/Serializers/ISerializer.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace mRemoteNG.Config.Serializers -{ - public interface ISerializer - { - TOut Serialize(TIn model); - Version Version { get; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/MiscSerializers/ActiveDirectoryDeserializer.cs b/mRemoteNG/Config/Serializers/MiscSerializers/ActiveDirectoryDeserializer.cs deleted file mode 100644 index 15ca955c6..000000000 --- a/mRemoteNG/Config/Serializers/MiscSerializers/ActiveDirectoryDeserializer.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.DirectoryServices; -using System.Text.RegularExpressions; -using mRemoteNG.App; -using mRemoteNG.Config.Import; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Config.Serializers.MiscSerializers -{ - public class ActiveDirectoryDeserializer - { - private readonly string _ldapPath; - private readonly bool _importSubOu; - - public ActiveDirectoryDeserializer(string ldapPath, bool importSubOu) - { - _ldapPath = ldapPath.ThrowIfNullOrEmpty(nameof(ldapPath)); - _importSubOu = importSubOu; - } - - public ConnectionTreeModel Deserialize() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - connectionTreeModel.AddRootNode(root); - - ImportContainers(_ldapPath, root); - - return connectionTreeModel; - } - - private void ImportContainers(string ldapPath, ContainerInfo parentContainer) - { - var match = Regex.Match(ldapPath, "ou=([^,]*)", RegexOptions.IgnoreCase); - var name = match.Success ? match.Groups[1].Captures[0].Value : Language.ActiveDirectory; - - var newContainer = new ContainerInfo {Name = name}; - parentContainer.AddChild(newContainer); - - ImportComputers(ldapPath, newContainer); - } - - private void ImportComputers(string ldapPath, ContainerInfo parentContainer) - { - try - { - const string ldapFilter = "(|(objectClass=computer)(objectClass=organizationalUnit))"; - using (var ldapSearcher = new DirectorySearcher()) - { - ldapSearcher.SearchRoot = new DirectoryEntry(ldapPath); - ldapSearcher.Filter = ldapFilter; - ldapSearcher.SearchScope = SearchScope.OneLevel; - ldapSearcher.PropertiesToLoad.AddRange(new[] {"securityEquals", "cn", "objectClass"}); - - var ldapResults = ldapSearcher.FindAll(); - foreach (SearchResult ldapResult in ldapResults) - { - using (var directoryEntry = ldapResult.GetDirectoryEntry()) - { - if (directoryEntry.Properties["objectClass"].Contains("organizationalUnit")) - { - // check/continue here so we don't create empty connection objects - if (!_importSubOu) continue; - - // TODO - this is a circular call. A deserializer should not call an importer - ActiveDirectoryImporter.Import(ldapResult.Path, parentContainer, _importSubOu); - continue; - } - - DeserializeConnection(directoryEntry, parentContainer); - } - } - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.ImportComputers() failed.", - ex); - } - } - - private void DeserializeConnection(DirectoryEntry directoryEntry, ContainerInfo parentContainer) - { - var displayName = Convert.ToString(directoryEntry.Properties["cn"].Value); - var description = Convert.ToString(directoryEntry.Properties["Description"].Value); - var hostName = Convert.ToString(directoryEntry.Properties["dNSHostName"].Value); - - var newConnectionInfo = new ConnectionInfo - { - Name = displayName, - Hostname = hostName, - Description = description, - Protocol = ProtocolType.RDP - }; - newConnectionInfo.Inheritance.TurnOnInheritanceCompletely(); - newConnectionInfo.Inheritance.Description = false; - - parentContainer.AddChild(newConnectionInfo); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/MiscSerializers/PortScanDeserializer.cs b/mRemoteNG/Config/Serializers/MiscSerializers/PortScanDeserializer.cs deleted file mode 100644 index 3d6e96fee..000000000 --- a/mRemoteNG/Config/Serializers/MiscSerializers/PortScanDeserializer.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System.Collections.Generic; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.MiscSerializers -{ - public class PortScanDeserializer : IDeserializer, ConnectionTreeModel> - { - private readonly ProtocolType _targetProtocolType; - - public PortScanDeserializer(ProtocolType targetProtocolType) - { - _targetProtocolType = targetProtocolType; - } - - public ConnectionTreeModel Deserialize(IEnumerable scannedHosts) - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - connectionTreeModel.AddRootNode(root); - - foreach (var host in scannedHosts) - ImportScannedHost(host, root); - - return connectionTreeModel; - } - - private void ImportScannedHost(ScanHost host, ContainerInfo parentContainer) - { - var finalProtocol = default(ProtocolType); - var protocolValid = true; - - switch (_targetProtocolType) - { - case ProtocolType.SSH2: - if (host.Ssh) - finalProtocol = ProtocolType.SSH2; - break; - case ProtocolType.Telnet: - if (host.Telnet) - finalProtocol = ProtocolType.Telnet; - break; - case ProtocolType.HTTP: - if (host.Http) - finalProtocol = ProtocolType.HTTP; - break; - case ProtocolType.HTTPS: - if (host.Https) - finalProtocol = ProtocolType.HTTPS; - break; - case ProtocolType.Rlogin: - if (host.Rlogin) - finalProtocol = ProtocolType.Rlogin; - break; - case ProtocolType.RDP: - if (host.Rdp) - finalProtocol = ProtocolType.RDP; - break; - case ProtocolType.VNC: - if (host.Vnc) - finalProtocol = ProtocolType.VNC; - break; - default: - protocolValid = false; - break; - } - - if (!protocolValid) return; - var newConnectionInfo = new ConnectionInfo - { - Name = host.HostNameWithoutDomain, - Hostname = host.HostName, - Protocol = finalProtocol - }; - newConnectionInfo.SetDefaultPort(); - - parentContainer.AddChild(newConnectionInfo); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/MiscSerializers/PuttyConnectionManagerDeserializer.cs b/mRemoteNG/Config/Serializers/MiscSerializers/PuttyConnectionManagerDeserializer.cs deleted file mode 100644 index 5c0ce124d..000000000 --- a/mRemoteNG/Config/Serializers/MiscSerializers/PuttyConnectionManagerDeserializer.cs +++ /dev/null @@ -1,155 +0,0 @@ -using System; -using System.IO; -using System.Xml; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.MiscSerializers -{ - public class PuttyConnectionManagerDeserializer : IDeserializer - { - public ConnectionTreeModel Deserialize(string puttycmConnectionsXml) - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - connectionTreeModel.AddRootNode(root); - - var xmlDocument = new XmlDocument(); - xmlDocument.LoadXml(puttycmConnectionsXml); - - var configurationNode = xmlDocument.SelectSingleNode("/configuration"); - - var rootNodes = configurationNode?.SelectNodes("./root"); - if (rootNodes == null) return connectionTreeModel; - foreach (XmlNode rootNode in rootNodes) - { - ImportRootOrContainer(rootNode, root); - } - - return connectionTreeModel; - } - - private void ImportRootOrContainer(XmlNode xmlNode, ContainerInfo parentContainer) - { - VerifyNodeType(xmlNode); - - var newContainer = ImportContainer(xmlNode, parentContainer); - - var childNodes = xmlNode.SelectNodes("./*"); - if (childNodes == null) return; - foreach (XmlNode childNode in childNodes) - { - switch (childNode.Name) - { - case "container": - ImportRootOrContainer(childNode, newContainer); - break; - case "connection": - ImportConnection(childNode, newContainer); - break; - default: - throw (new FileFormatException($"Unrecognized child node ({childNode.Name}).")); - } - } - } - - private void VerifyNodeType(XmlNode xmlNode) - { - var xmlNodeType = xmlNode?.Attributes?["type"].Value; - switch (xmlNode?.Name) - { - case "root": - if (string.Compare(xmlNodeType, "database", StringComparison.OrdinalIgnoreCase) != 0) - { - throw (new FileFormatException($"Unrecognized root node type ({xmlNodeType}).")); - } - - break; - case "container": - if (string.Compare(xmlNodeType, "folder", StringComparison.OrdinalIgnoreCase) != 0) - { - throw (new FileFormatException($"Unrecognized root node type ({xmlNodeType}).")); - } - - break; - default: - // ReSharper disable once LocalizableElement - throw (new ArgumentException("Argument must be either a root or a container node.", - nameof(xmlNode))); - } - } - - private ContainerInfo ImportContainer(XmlNode containerNode, ContainerInfo parentContainer) - { - var containerInfo = new ContainerInfo - { - Name = containerNode.Attributes?["name"].Value, - IsExpanded = bool.Parse(containerNode.Attributes?["expanded"].InnerText ?? "false") - }; - parentContainer.AddChild(containerInfo); - return containerInfo; - } - - private void ImportConnection(XmlNode connectionNode, ContainerInfo parentContainer) - { - var connectionNodeType = connectionNode.Attributes?["type"].Value; - if (string.Compare(connectionNodeType, "PuTTY", StringComparison.OrdinalIgnoreCase) != 0) - throw (new FileFormatException($"Unrecognized connection node type ({connectionNodeType}).")); - - var connectionInfo = ConnectionInfoFromXml(connectionNode); - parentContainer.AddChild(connectionInfo); - } - - private ConnectionInfo ConnectionInfoFromXml(XmlNode xmlNode) - { - var connectionInfoNode = xmlNode.SelectSingleNode("./connection_info"); - - var name = connectionInfoNode?.SelectSingleNode("./name")?.InnerText; - var connectionInfo = new ConnectionInfo {Name = name}; - - var protocol = connectionInfoNode?.SelectSingleNode("./protocol")?.InnerText; - switch (protocol?.ToLowerInvariant()) - { - case "telnet": - connectionInfo.Protocol = ProtocolType.Telnet; - break; - case "ssh": - connectionInfo.Protocol = ProtocolType.SSH2; - break; - default: - throw new FileFormatException($"Unrecognized protocol ({protocol})."); - } - - connectionInfo.Hostname = connectionInfoNode.SelectSingleNode("./host")?.InnerText; - connectionInfo.Port = Convert.ToInt32(connectionInfoNode.SelectSingleNode("./port")?.InnerText); - connectionInfo.PuttySession = connectionInfoNode.SelectSingleNode("./session")?.InnerText; - // ./commandline - connectionInfo.Description = connectionInfoNode.SelectSingleNode("./description")?.InnerText; - - var loginNode = xmlNode.SelectSingleNode("./login"); - connectionInfo.Username = loginNode?.SelectSingleNode("login")?.InnerText; - connectionInfo.Password = loginNode?.SelectSingleNode("password")?.InnerText; - // ./prompt - - // ./timeout/connectiontimeout - // ./timeout/logintimeout - // ./timeout/passwordtimeout - // ./timeout/commandtimeout - - // ./command/command1 - // ./command/command2 - // ./command/command3 - // ./command/command4 - // ./command/command5 - - // ./options/loginmacro - // ./options/postcommands - // ./options/endlinechar - - return connectionInfo; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs b/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs deleted file mode 100644 index db2332998..000000000 --- a/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers.MiscSerializers -{ - public class RemoteDesktopConnectionDeserializer : IDeserializer - { - // .rdp file schema: https://technet.microsoft.com/en-us/library/ff393699(v=ws.10).aspx - - public ConnectionTreeModel Deserialize(string rdcFileContent) - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - connectionTreeModel.AddRootNode(root); - var connectionInfo = new ConnectionInfo(); - foreach (var line in rdcFileContent.Split(Environment.NewLine.ToCharArray())) - { - var parts = line.Split(new[] { ':' }, 3); - if (parts.Length < 3) - { - continue; - } - - var key = parts[0].Trim(); - var value = parts[2].Trim(); - - SetConnectionInfoParameter(connectionInfo, key, value); - } - - root.AddChild(connectionInfo); - - return connectionTreeModel; - } - - - private void SetConnectionInfoParameter(ConnectionInfo connectionInfo, string key, string value) - { - switch (key.ToLower()) - { - case "full address": - var uri = new Uri("dummyscheme" + Uri.SchemeDelimiter + value); - if (!string.IsNullOrEmpty(uri.Host)) - connectionInfo.Hostname = uri.Host; - if (uri.Port != -1) - connectionInfo.Port = uri.Port; - break; - case "server port": - connectionInfo.Port = Convert.ToInt32(value); - break; - case "username": - connectionInfo.Username = value; - break; - case "domain": - connectionInfo.Domain = value; - break; - case "session bpp": - switch (value) - { - case "8": - connectionInfo.Colors = RDPColors.Colors256; - break; - case "15": - connectionInfo.Colors = RDPColors.Colors15Bit; - break; - case "16": - connectionInfo.Colors = RDPColors.Colors16Bit; - break; - case "24": - connectionInfo.Colors = RDPColors.Colors24Bit; - break; - case "32": - connectionInfo.Colors = RDPColors.Colors32Bit; - break; - } - break; - case "bitmapcachepersistenable": - connectionInfo.CacheBitmaps = value == "1"; - break; - case "screen mode id": - connectionInfo.Resolution = value == "2" - ? RDPResolutions.Fullscreen - : RDPResolutions.FitToWindow; - break; - case "connect to console": - connectionInfo.UseConsoleSession = value == "1"; - break; - case "disable wallpaper": - connectionInfo.DisplayWallpaper = value == "1"; - break; - case "disable themes": - connectionInfo.DisplayThemes = value == "1"; - break; - case "allow font smoothing": - connectionInfo.EnableFontSmoothing = value == "1"; - break; - case "allow desktop composition": - connectionInfo.EnableDesktopComposition = value == "1"; - break; - case "redirectsmartcards": - connectionInfo.RedirectSmartCards = value == "1"; - break; - case "redirectdrives": - connectionInfo.RedirectDiskDrives = value == "1"; - break; - case "redirectcomports": - connectionInfo.RedirectPorts = value == "1"; - break; - case "redirectprinters": - connectionInfo.RedirectPrinters = value == "1"; - break; - case "redirectclipboard": - connectionInfo.RedirectClipboard = value == "1"; - break; - case "audiomode": - switch (value) - { - case "0": - connectionInfo.RedirectSound = RDPSounds.BringToThisComputer; - break; - case "1": - connectionInfo.RedirectSound = RDPSounds.LeaveAtRemoteComputer; - break; - case "2": - connectionInfo.RedirectSound = RDPSounds.DoNotPlay; - break; - } - break; - case "redirectaudiocapture": - connectionInfo.RedirectAudioCapture = value == "1"; - break; - case "loadbalanceinfo": - connectionInfo.LoadBalanceInfo = value; - break; - case "gatewayusagemethod": - switch (value) - { - case "0": - connectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Never; - break; - case "1": - connectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Always; - break; - case "2": - connectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Detect; - break; - } - break; - case "gatewayhostname": - connectionInfo.RDGatewayHostname = value; - break; - case "alternate shell": - connectionInfo.RDPStartProgram = value; - break; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs b/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs deleted file mode 100644 index 63b672229..000000000 --- a/mRemoteNG/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs +++ /dev/null @@ -1,371 +0,0 @@ -using System; -using System.IO; -using System.Security.Cryptography; -using System.Text; -using System.Xml; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Config.Serializers.MiscSerializers -{ - public class RemoteDesktopConnectionManagerDeserializer : IDeserializer - { - private static int _schemaVersion; /* 1 = RDCMan v2.2 - 3 = RDCMan v2.7 */ - - public ConnectionTreeModel Deserialize(string rdcmConnectionsXml) - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - - var xmlDocument = new XmlDocument(); - xmlDocument.LoadXml(rdcmConnectionsXml); - - - var rdcManNode = xmlDocument.SelectSingleNode("/RDCMan"); - VerifySchemaVersion(rdcManNode); - VerifyFileVersion(rdcManNode); - - var fileNode = rdcManNode?.SelectSingleNode("./file"); - ImportFileOrGroup(fileNode, root); - - connectionTreeModel.AddRootNode(root); - return connectionTreeModel; - } - - private static void VerifySchemaVersion(XmlNode rdcManNode) - { - if (!int.TryParse(rdcManNode?.Attributes?["schemaVersion"]?.Value, out var version)) - throw new FileFormatException("Could not find schema version attribute."); - - if (version != 1 && version != 3) - { - throw new FileFormatException($"Unsupported schema version ({version})."); - } - - _schemaVersion = version; - } - - private static void VerifyFileVersion(XmlNode rdcManNode) - { - var versionAttribute = rdcManNode?.Attributes?["programVersion"]?.Value; - if (versionAttribute != null) - { - var version = new Version(versionAttribute); - if (!(version == new Version(2, 7))) - { - throw new FileFormatException($"Unsupported file version ({version})."); - } - } - else - { - var versionNode = rdcManNode?.SelectSingleNode("./version")?.InnerText; - if (versionNode != null) - { - var version = new Version(versionNode); - if (!(version == new Version(2, 2))) - { - throw new FileFormatException($"Unsupported file version ({version})."); - } - } - else - { - throw new FileFormatException("Unknown file version"); - } - } - } - - private static void ImportFileOrGroup(XmlNode xmlNode, ContainerInfo parentContainer) - { - var newContainer = ImportContainer(xmlNode, parentContainer); - - var childNodes = xmlNode.SelectNodes("./group|./server"); - if (childNodes == null) return; - foreach (XmlNode childNode in childNodes) - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (childNode.Name) - { - case "group": - ImportFileOrGroup(childNode, newContainer); - break; - case "server": - ImportServer(childNode, newContainer); - break; - } - } - } - - private static ContainerInfo ImportContainer(XmlNode containerPropertiesNode, ContainerInfo parentContainer) - { - if (_schemaVersion == 1) - { - // Program Version 2.2 wraps all setting inside the Properties tags - containerPropertiesNode = containerPropertiesNode.SelectSingleNode("./properties"); - } - - var newContainer = new ContainerInfo(); - var connectionInfo = ConnectionInfoFromXml(containerPropertiesNode); - newContainer.CopyFrom(connectionInfo); - - if (_schemaVersion == 3) - { - // Program Version 2.7 wraps these properties - containerPropertiesNode = containerPropertiesNode.SelectSingleNode("./properties"); - } - newContainer.Name = containerPropertiesNode?.SelectSingleNode("./name")?.InnerText ?? Language.NewFolder; - if (bool.TryParse(containerPropertiesNode?.SelectSingleNode("./expanded")?.InnerText, out var expanded)) - newContainer.IsExpanded = expanded; - parentContainer.AddChild(newContainer); - return newContainer; - } - - private static void ImportServer(XmlNode serverNode, ContainerInfo parentContainer) - { - var newConnectionInfo = ConnectionInfoFromXml(serverNode); - parentContainer.AddChild(newConnectionInfo); - } - - private static ConnectionInfo ConnectionInfoFromXml(XmlNode xmlNode) - { - var connectionInfo = new ConnectionInfo {Protocol = ProtocolType.RDP}; - - var propertiesNode = xmlNode.SelectSingleNode("./properties"); - if (_schemaVersion == 1) - propertiesNode = xmlNode; // Version 2.2 defines the container name at the root instead - - connectionInfo.VmId = propertiesNode?.SelectSingleNode("./vmid")?.InnerText ?? ""; - - connectionInfo.Hostname = propertiesNode?.SelectSingleNode("./name")?.InnerText ?? ""; - - var connectionDisplayName = propertiesNode?.SelectSingleNode("./displayName")?.InnerText; - connectionInfo.Name = !string.IsNullOrWhiteSpace(connectionDisplayName) - ? connectionDisplayName - : string.IsNullOrWhiteSpace(connectionInfo.Hostname) - ? connectionInfo.Name - : connectionInfo.Hostname; - - connectionInfo.Description = propertiesNode?.SelectSingleNode("./comment")?.InnerText ?? string.Empty; - - var logonCredentialsNode = xmlNode.SelectSingleNode("./logonCredentials"); - if (logonCredentialsNode?.Attributes?["inherit"]?.Value == "None") - { - connectionInfo.Username = logonCredentialsNode.SelectSingleNode("userName")?.InnerText ?? string.Empty; - - var passwordNode = logonCredentialsNode.SelectSingleNode("./password"); - if (_schemaVersion == 1) // Version 2.2 allows clear text passwords - { - connectionInfo.Password = passwordNode?.Attributes?["storeAsClearText"]?.Value == "True" - ? passwordNode.InnerText - : DecryptRdcManPassword(passwordNode?.InnerText); - } - else - { - connectionInfo.Password = DecryptRdcManPassword(passwordNode?.InnerText); - } - - connectionInfo.Domain = logonCredentialsNode.SelectSingleNode("./domain")?.InnerText ?? string.Empty; - } - else - { - connectionInfo.Inheritance.Username = true; - connectionInfo.Inheritance.Password = true; - connectionInfo.Inheritance.Domain = true; - } - - var connectionSettingsNode = xmlNode.SelectSingleNode("./connectionSettings"); - if (connectionSettingsNode?.Attributes?["inherit"]?.Value == "None") - { - if (bool.TryParse(connectionSettingsNode.SelectSingleNode("./connectToConsole")?.InnerText, out var useConsole)) - connectionInfo.UseConsoleSession = useConsole; - connectionInfo.RDPStartProgram = connectionSettingsNode.SelectSingleNode("./startProgram")?.InnerText; - connectionInfo.RDPStartProgramWorkDir = connectionSettingsNode.SelectSingleNode("./startProgramWorkDir")?.InnerText; - if (int.TryParse(connectionSettingsNode.SelectSingleNode("./port")?.InnerText, out var port)) - connectionInfo.Port = port; - } - else - { - connectionInfo.Inheritance.UseConsoleSession = true; - connectionInfo.Inheritance.Port = true; - } - - var gatewaySettingsNode = xmlNode.SelectSingleNode("./gatewaySettings"); - if (gatewaySettingsNode?.Attributes?["inherit"]?.Value == "None") - { - connectionInfo.RDGatewayUsageMethod = - gatewaySettingsNode.SelectSingleNode("./enabled")?.InnerText == "True" - ? RDGatewayUsageMethod.Always - : RDGatewayUsageMethod.Never; - connectionInfo.RDGatewayHostname = gatewaySettingsNode.SelectSingleNode("./hostName")?.InnerText ?? string.Empty; - connectionInfo.RDGatewayUsername = gatewaySettingsNode.SelectSingleNode("./userName")?.InnerText ?? string.Empty; - - var passwordNode = gatewaySettingsNode.SelectSingleNode("./password"); - connectionInfo.RDGatewayPassword = passwordNode?.Attributes?["storeAsClearText"]?.Value == "True" - ? passwordNode.InnerText - : DecryptRdcManPassword(passwordNode?.InnerText); - - connectionInfo.RDGatewayDomain = gatewaySettingsNode.SelectSingleNode("./domain")?.InnerText ?? string.Empty; - // ./logonMethod - // ./localBypass - // ./credSharing - } - else - { - connectionInfo.Inheritance.RDGatewayUsageMethod = true; - connectionInfo.Inheritance.RDGatewayHostname = true; - connectionInfo.Inheritance.RDGatewayUsername = true; - connectionInfo.Inheritance.RDGatewayPassword = true; - connectionInfo.Inheritance.RDGatewayDomain = true; - } - - var remoteDesktopNode = xmlNode.SelectSingleNode("./remoteDesktop"); - if (remoteDesktopNode?.Attributes?["inherit"]?.Value == "None") - { - connectionInfo.Resolution = - Enum.TryParse(remoteDesktopNode.SelectSingleNode("./size")?.InnerText.Replace(" ", ""), true, out var rdpResolution) - ? rdpResolution - : RDPResolutions.FitToWindow; - - if (remoteDesktopNode.SelectSingleNode("./sameSizeAsClientArea")?.InnerText == "True") - { - connectionInfo.Resolution = RDPResolutions.FitToWindow; - } - - if (remoteDesktopNode.SelectSingleNode("./fullScreen")?.InnerText == "True") - { - connectionInfo.Resolution = RDPResolutions.Fullscreen; - } - - if (Enum.TryParse(remoteDesktopNode.SelectSingleNode("./colorDepth")?.InnerText, true, out var rdpColors)) - connectionInfo.Colors = rdpColors; - } - else - { - connectionInfo.Inheritance.Resolution = true; - connectionInfo.Inheritance.Colors = true; - } - - var localResourcesNode = xmlNode.SelectSingleNode("./localResources"); - if (localResourcesNode?.Attributes?["inherit"]?.Value == "None") - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (localResourcesNode.SelectSingleNode("./audioRedirection")?.InnerText) - { - case "0": // Bring to this computer - case "Client": - connectionInfo.RedirectSound = RDPSounds.BringToThisComputer; - break; - case "1": // Leave at remote computer - case "Remote": - connectionInfo.RedirectSound = RDPSounds.LeaveAtRemoteComputer; - break; - case "2": // Do not play - case "NoSound": - connectionInfo.RedirectSound = RDPSounds.DoNotPlay; - break; - } - - // ./audioRedirectionQuality - // ./audioCaptureRedirection - - // ReSharper disable once SwitchStatementMissingSomeCases - switch (localResourcesNode.SelectSingleNode("./keyboardHook")?.InnerText) - { - case "0": // On the local computer - case "Client": - connectionInfo.RedirectKeys = false; - break; - case "1": // On the remote computer - case "Remote": - connectionInfo.RedirectKeys = true; - break; - case "2": // In full screen mode only - case "FullScreenClient": - connectionInfo.RedirectKeys = false; - break; - } - - // ./redirectClipboard - if (bool.TryParse(localResourcesNode?.SelectSingleNode("./redirectDrives")?.InnerText, out var redirectDisks)) - connectionInfo.RedirectDiskDrives = redirectDisks; - - if (bool.TryParse(localResourcesNode?.SelectSingleNode("./redirectPorts")?.InnerText, out var redirectPorts)) - connectionInfo.RedirectPorts = redirectPorts; - - if (bool.TryParse(localResourcesNode?.SelectSingleNode("./redirectPrinters")?.InnerText, out var redirectPrinters)) - connectionInfo.RedirectPrinters = redirectPrinters; - - if (bool.TryParse(localResourcesNode?.SelectSingleNode("./redirectSmartCards")?.InnerText, out var redirectSmartCards)) - connectionInfo.RedirectSmartCards = redirectSmartCards; - - if (bool.TryParse(localResourcesNode?.SelectSingleNode("./redirectClipboard")?.InnerText, out var redirectClipboard)) - connectionInfo.RedirectClipboard = redirectClipboard; - } - else - { - connectionInfo.Inheritance.RedirectSound = true; - connectionInfo.Inheritance.RedirectKeys = true; - connectionInfo.Inheritance.RedirectDiskDrives = true; - connectionInfo.Inheritance.RedirectPorts = true; - connectionInfo.Inheritance.RedirectPrinters = true; - connectionInfo.Inheritance.RedirectSmartCards = true; - connectionInfo.Inheritance.RedirectClipboard = true; - } - - var securitySettingsNode = xmlNode.SelectSingleNode("./securitySettings"); - if (securitySettingsNode?.Attributes?["inherit"]?.Value == "None") - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (securitySettingsNode.SelectSingleNode("./authentication")?.InnerText) - { - case "0": // No authentication - case "None": - connectionInfo.RDPAuthenticationLevel = AuthenticationLevel.NoAuth; - break; - case "1": // Do not connect if authentication fails - case "Required": - connectionInfo.RDPAuthenticationLevel = AuthenticationLevel.AuthRequired; - break; - case "2": // Warn if authentication fails - case "Warn": - connectionInfo.RDPAuthenticationLevel = AuthenticationLevel.WarnOnFailedAuth; - break; - } - } - else - { - connectionInfo.Inheritance.RDPAuthenticationLevel = true; - } - - // ./displaySettings/thumbnailScale - // ./displaySettings/liveThumbnailUpdates - // ./displaySettings/showDisconnectedThumbnails - - return connectionInfo; - } - - private static string DecryptRdcManPassword(string ciphertext) - { - if (string.IsNullOrEmpty(ciphertext)) - return string.Empty; - - try - { - var plaintextData = ProtectedData.Unprotect(Convert.FromBase64String(ciphertext), new byte[] { }, - DataProtectionScope.LocalMachine); - var charArray = Encoding.Unicode.GetChars(plaintextData); - return new string(charArray); - } - catch (Exception /*ex*/) - { - //Runtime.MessageCollector.AddExceptionMessage("RemoteDesktopConnectionManager.DecryptPassword() failed.", ex, logOnly: true); - return string.Empty; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/IVersionUpgrader.cs b/mRemoteNG/Config/Serializers/Versioning/IVersionUpgrader.cs deleted file mode 100644 index f4344f562..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/IVersionUpgrader.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public interface IVersionUpgrader - { - bool CanUpgrade(Version currentVersion); - Version Upgrade(); - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/SqlDatabaseVersionVerifier.cs b/mRemoteNG/Config/Serializers/Versioning/SqlDatabaseVersionVerifier.cs deleted file mode 100644 index 84081be0a..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/SqlDatabaseVersionVerifier.cs +++ /dev/null @@ -1,75 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using mRemoteNG.Resources.Language; -using System; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public class SqlDatabaseVersionVerifier - { - protected readonly Version currentSupportedVersion = new Version(2, 9); - - private readonly IDatabaseConnector _databaseConnector; - - public SqlDatabaseVersionVerifier(IDatabaseConnector DatabaseConnector) - { - if (DatabaseConnector == null) - throw new ArgumentNullException(nameof(DatabaseConnector)); - - _databaseConnector = DatabaseConnector; - } - - public bool VerifyDatabaseVersion(Version dbVersion) - { - var isVerified = false; - try - { - var databaseVersion = dbVersion; - - if (databaseVersion.Equals(new Version())) - { - return true; - } - - var dbUpgraders = new IVersionUpgrader[] - { - new SqlVersion22To23Upgrader(_databaseConnector), - new SqlVersion23To24Upgrader(_databaseConnector), - new SqlVersion24To25Upgrader(_databaseConnector), - new SqlVersion25To26Upgrader(_databaseConnector), - new SqlVersion26To27Upgrader(_databaseConnector), - new SqlVersion27To28Upgrader(_databaseConnector), - new SqlVersion28To29Upgrader(_databaseConnector), - }; - - foreach (var upgrader in dbUpgraders) - { - if (upgrader.CanUpgrade(databaseVersion)) - { - databaseVersion = upgrader.Upgrade(); - } - } - - // DB is at the highest current supported version - if (databaseVersion.CompareTo(currentSupportedVersion) == 0) - isVerified = true; - - if (isVerified == false) - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - string.Format(Language.ErrorBadDatabaseVersion, - databaseVersion, - GeneralAppInfo.ProductName)); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - string.Format(Language.ErrorVerifyDatabaseVersionFailed, - ex.Message)); - } - - return isVerified; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/SqlVersion22To23Upgrader.cs b/mRemoteNG/Config/Serializers/Versioning/SqlVersion22To23Upgrader.cs deleted file mode 100644 index 6a5daa3f8..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/SqlVersion22To23Upgrader.cs +++ /dev/null @@ -1,41 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using System; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public class SqlVersion22To23Upgrader : IVersionUpgrader - { - private readonly IDatabaseConnector _databaseConnector; - - public SqlVersion22To23Upgrader(IDatabaseConnector databaseConnector) - { - if (databaseConnector == null) - throw new ArgumentNullException(nameof(databaseConnector)); - - _databaseConnector = databaseConnector; - } - - public bool CanUpgrade(Version currentVersion) - { - return currentVersion.CompareTo(new Version(2, 2)) == 0; - } - - public Version Upgrade() - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Upgrading database from version 2.2 to version 2.3."); - const string sqlText = @" -ALTER TABLE tblCons -ADD EnableFontSmoothing bit NOT NULL DEFAULT 0, - EnableDesktopComposition bit NOT NULL DEFAULT 0, - InheritEnableFontSmoothing bit NOT NULL DEFAULT 0, - InheritEnableDesktopComposition bit NOT NULL DEFAULT 0;"; - var dbCommand = _databaseConnector.DbCommand(sqlText); - dbCommand.ExecuteNonQuery(); - - return new Version(2, 3); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/SqlVersion23To24Upgrader.cs b/mRemoteNG/Config/Serializers/Versioning/SqlVersion23To24Upgrader.cs deleted file mode 100644 index 85e8a0990..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/SqlVersion23To24Upgrader.cs +++ /dev/null @@ -1,39 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using System; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public class SqlVersion23To24Upgrader : IVersionUpgrader - { - private readonly IDatabaseConnector _databaseConnector; - - public SqlVersion23To24Upgrader(IDatabaseConnector databaseConnector) - { - if (databaseConnector == null) - throw new ArgumentNullException(nameof(databaseConnector)); - - _databaseConnector = databaseConnector; - } - - public bool CanUpgrade(Version currentVersion) - { - return currentVersion.CompareTo(new Version(2, 3)) == 0; - } - - public Version Upgrade() - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Upgrading database from version 2.3 to version 2.4."); - const string sqlText = @" -ALTER TABLE tblCons -ADD UseCredSsp bit NOT NULL DEFAULT 1, - InheritUseCredSsp bit NOT NULL DEFAULT 0;"; - var dbCommand = _databaseConnector.DbCommand(sqlText); - dbCommand.ExecuteNonQuery(); - - return new Version(2, 4); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/SqlVersion24To25Upgrader.cs b/mRemoteNG/Config/Serializers/Versioning/SqlVersion24To25Upgrader.cs deleted file mode 100644 index ecb2fd18a..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/SqlVersion24To25Upgrader.cs +++ /dev/null @@ -1,41 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using System; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public class SqlVersion24To25Upgrader : IVersionUpgrader - { - private readonly IDatabaseConnector _databaseConnector; - - public SqlVersion24To25Upgrader(IDatabaseConnector databaseConnector) - { - if (databaseConnector == null) - throw new ArgumentNullException(nameof(databaseConnector)); - - _databaseConnector = databaseConnector; - } - - public bool CanUpgrade(Version currentVersion) - { - return currentVersion.CompareTo(new Version(2, 4)) == 0; - } - - public Version Upgrade() - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Upgrading database from version 2.4 to version 2.5."); - const string sqlText = @" -ALTER TABLE tblCons -ADD LoadBalanceInfo varchar (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, - AutomaticResize bit NOT NULL DEFAULT 1, - InheritLoadBalanceInfo bit NOT NULL DEFAULT 0, - InheritAutomaticResize bit NOT NULL DEFAULT 0;"; - var dbCommand = _databaseConnector.DbCommand(sqlText); - dbCommand.ExecuteNonQuery(); - - return new Version(2, 5); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/SqlVersion25To26Upgrader.cs b/mRemoteNG/Config/Serializers/Versioning/SqlVersion25To26Upgrader.cs deleted file mode 100644 index 56da5a58c..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/SqlVersion25To26Upgrader.cs +++ /dev/null @@ -1,45 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using System; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public class SqlVersion25To26Upgrader : IVersionUpgrader - { - private readonly IDatabaseConnector _databaseConnector; - - public SqlVersion25To26Upgrader(IDatabaseConnector databaseConnector) - { - if (databaseConnector == null) - throw new ArgumentNullException(nameof(databaseConnector)); - - _databaseConnector = databaseConnector; - } - - public bool CanUpgrade(Version currentVersion) - { - return currentVersion.CompareTo(new Version(2, 5)) == 0; - } - - public Version Upgrade() - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Upgrading database from version 2.5 to version 2.6."); - const string sqlText = @" -ALTER TABLE tblCons -ADD RDPMinutesToIdleTimeout int NOT NULL DEFAULT 0, - RDPAlertIdleTimeout bit NOT NULL DEFAULT 0, - SoundQuality varchar (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL DEFAULT 'Dynamic', - InheritRDPMinutesToIdleTimeout bit NOT NULL DEFAULT 0, - InheritRDPAlertIdleTimeout bit NOT NULL DEFAULT 0, - InheritSoundQuality bit NOT NULL DEFAULT 0; -UPDATE tblRoot - SET ConfVersion='2.6'"; - var dbCommand = _databaseConnector.DbCommand(sqlText); - dbCommand.ExecuteNonQuery(); - - return new Version(2, 6); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/SqlVersion26To27Upgrader.cs b/mRemoteNG/Config/Serializers/Versioning/SqlVersion26To27Upgrader.cs deleted file mode 100644 index 9d078b939..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/SqlVersion26To27Upgrader.cs +++ /dev/null @@ -1,48 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using System; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public class SqlVersion26To27Upgrader : IVersionUpgrader - { - private readonly IDatabaseConnector _databaseConnector; - - public SqlVersion26To27Upgrader(IDatabaseConnector databaseConnector) - { - _databaseConnector = databaseConnector ?? throw new ArgumentNullException(nameof(databaseConnector)); - } - - public bool CanUpgrade(Version currentVersion) - { - return currentVersion.CompareTo(new Version(2, 6)) == 0; - } - - public Version Upgrade() - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Upgrading database from version 2.6 to version 2.7."); - const string sqlText = @" -ALTER TABLE tblCons -ADD RedirectClipboard bit NOT NULL DEFAULT 0, - InheritRedirectClipboard bit NOT NULL DEFAULT 0, - VmId varchar NOT NULL DEFAULT '', - UseVmId bit NOT NULL DEFAULT 0, - UseEnhancedMode bit NOT NULL DEFAULT 0, - InheritVmId bit NOT NULL DEFAULT 0, - InheritUseVmId bit NOT NULL DEFAULT 0, - SSHTunnelConnectionName varchar NOT NULL DEFAULT '', - InheritSSHTunnelConnectionName bit NOT NULL DEFAULT 0, - SSHOptions varchar NOT NULL DEFAULT '', - InheritSSHOptions bit NOT NULL DEFAULT 0, - InheritUseEnhancedMode bit NOT NULL DEFAULT 0; -UPDATE tblRoot - SET ConfVersion='2.7'"; - var dbCommand = _databaseConnector.DbCommand(sqlText); - dbCommand.ExecuteNonQuery(); - - return new Version(2, 7); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/SqlVersion27To28Upgrader.cs b/mRemoteNG/Config/Serializers/Versioning/SqlVersion27To28Upgrader.cs deleted file mode 100644 index 7f850bd87..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/SqlVersion27To28Upgrader.cs +++ /dev/null @@ -1,64 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using System; -using System.Data.Common; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public class SqlVersion27To28Upgrader : IVersionUpgrader - { - private readonly IDatabaseConnector _databaseConnector; - - public SqlVersion27To28Upgrader(IDatabaseConnector databaseConnector) - { - _databaseConnector = databaseConnector ?? throw new ArgumentNullException(nameof(databaseConnector)); - } - - public bool CanUpgrade(Version currentVersion) - { - return currentVersion.CompareTo(new Version(2, 7)) == 0; - } - - public Version Upgrade() - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Upgrading database from version 2.7 to version 2.8."); - - const string mySqlText = @" -ALTER TABLE tblCons MODIFY COLUMN ID INT; -ALTER TABLE tblCons DROP PRIMARY KEY, ADD PRIMARY KEY (ConstantID); -ALTER TABLE tblCons ADD INDEX `id` (ID), MODIFY ID int auto_increment; -ALTER TABLE tblCons MODIFY COLUMN ID INT AUTO_INCREMENT, ADD UNIQUE(ID); -UPDATE tblRoot SET ConfVersion='2.8'"; - const string msSqlText1 = @" -ALTER TABLE tblCons ADD DEFAULT 0 FOR UseEnhancedMode; -ALTER TABLE tblCons ADD DEFAULT 0 FOR InheritUseEnhancedMode; -UPDATE tblCons SET UseEnhancedMode = 0 WHERE UseEnhancedMode IS NULL; -UPDATE tblCons SET InheritUseEnhancedMode = 0 WHERE InheritUseEnhancedMode IS NULL; -ALTER TABLE tblCons ALTER COLUMN ConstantID varchar(128) NOT NULL;"; - const string msSqlText2 = @" -ALTER TABLE tblCons ADD CONSTRAINT PK_tblCons PRIMARY KEY (ConstantID); -UPDATE tblRoot SET ConfVersion='2.8';"; - DbCommand dbCommand; - - if (_databaseConnector.GetType() == typeof(MSSqlDatabaseConnector)) - { - dbCommand = _databaseConnector.DbCommand(msSqlText1); - dbCommand.ExecuteNonQuery(); - dbCommand = _databaseConnector.DbCommand(msSqlText2); - } else if (_databaseConnector.GetType() == typeof(MySqlDatabaseConnector)) - { - dbCommand = _databaseConnector.DbCommand(mySqlText); - } else - { - throw new Exception("Unknow database backend"); - } - - - - dbCommand.ExecuteNonQuery(); - return new Version(2, 8); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/Versioning/SqlVersion28To29Upgrader.cs b/mRemoteNG/Config/Serializers/Versioning/SqlVersion28To29Upgrader.cs deleted file mode 100644 index ff84b9121..000000000 --- a/mRemoteNG/Config/Serializers/Versioning/SqlVersion28To29Upgrader.cs +++ /dev/null @@ -1,80 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Messages; -using System; -using System.Data.Common; - -namespace mRemoteNG.Config.Serializers.Versioning -{ - public class SqlVersion28To29Upgrader : IVersionUpgrader - { - private readonly Version version = new Version(2, 9); - private readonly IDatabaseConnector _databaseConnector; - - public SqlVersion28To29Upgrader(IDatabaseConnector databaseConnector) - { - _databaseConnector = databaseConnector ?? throw new ArgumentNullException(nameof(databaseConnector)); - } - - public bool CanUpgrade(Version currentVersion) - { - return currentVersion == new Version(2, 8) || - // Support upgrading during dev revisions, 2.9.1, 2.9.2, etc... - (currentVersion <= new Version(2, 9) && - currentVersion < version); - } - - public Version Upgrade() - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - string.Format("Upgrading database to version {0}.", version)); - - const string mySqlAlter = @" -ALTER TABLE tblCons ADD COLUMN StartProgram varchar(512) DEFAULT NULL; -ALTER TABLE tblCons ADD COLUMN StartProgramWorkDir varchar(512) DEFAULT NULL; -ALTER TABLE tblRoot CHANGE COLUMN ConfVersion ConfVersion VARCHAR(15) NOT NULL;"; - const string mySqlUpdate = @"UPDATE tblRoot SET ConfVersion=?;"; - const string msSqlAlter = @" -IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[dbo].[tblCons]') AND name = 'StartProgram') -BEGIN - ALTER TABLE tblCons ADD StartProgram varchar(512), StartProgramWorkDir varchar(512); -END;GO; -ALTER TABLE tblRoot MODIFY COLUMN ConfVersion varchar(15);GO;"; - const string msSqlUpdate = @"UPDATE tblRoot SET ConfVersion=@confVersion;"; - using (var sqlTran = _databaseConnector.DbConnection().BeginTransaction(System.Data.IsolationLevel.Serializable)) - { - DbCommand dbCommand; - if (_databaseConnector.GetType() == typeof(MSSqlDatabaseConnector)) - { - dbCommand = _databaseConnector.DbCommand(msSqlAlter); - dbCommand.Transaction = sqlTran; - dbCommand.ExecuteNonQuery(); - dbCommand = _databaseConnector.DbCommand(msSqlUpdate); - dbCommand.Transaction = sqlTran; - } - else if (_databaseConnector.GetType() == typeof(MySqlDatabaseConnector)) - { - dbCommand = _databaseConnector.DbCommand(mySqlAlter); - dbCommand.Transaction = sqlTran; - dbCommand.ExecuteNonQuery(); - dbCommand = _databaseConnector.DbCommand(mySqlUpdate); - dbCommand.Transaction = sqlTran; - } - else - { - throw new Exception("Unknown database back-end"); - } - var pConfVersion = dbCommand.CreateParameter(); - pConfVersion.ParameterName = "confVersion"; - pConfVersion.Value = version.ToString(); - pConfVersion.DbType = System.Data.DbType.String; - pConfVersion.Direction = System.Data.ParameterDirection.Input; - dbCommand.Parameters.Add(pConfVersion); - - dbCommand.ExecuteNonQuery(); - sqlTran.Commit(); - } - return version; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Serializers/XmlConnectionsDecryptor.cs b/mRemoteNG/Config/Serializers/XmlConnectionsDecryptor.cs deleted file mode 100644 index 80332729d..000000000 --- a/mRemoteNG/Config/Serializers/XmlConnectionsDecryptor.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using System.Security; -using mRemoteNG.Security; -using mRemoteNG.Security.Authentication; -using mRemoteNG.Security.Factories; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.Config.Serializers -{ - public class XmlConnectionsDecryptor - { - private readonly ICryptographyProvider _cryptographyProvider; - private readonly RootNodeInfo _rootNodeInfo; - - public Func> AuthenticationRequestor { get; set; } - - public int KeyDerivationIterations - { - get { return _cryptographyProvider.KeyDerivationIterations; } - set { _cryptographyProvider.KeyDerivationIterations = value; } - } - - - public XmlConnectionsDecryptor(RootNodeInfo rootNodeInfo) - { - _cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - _rootNodeInfo = rootNodeInfo; - } - - public XmlConnectionsDecryptor(BlockCipherEngines blockCipherEngine, - BlockCipherModes blockCipherMode, - RootNodeInfo rootNodeInfo) - { - _cryptographyProvider = new CryptoProviderFactory(blockCipherEngine, blockCipherMode).Build(); - _rootNodeInfo = rootNodeInfo; - } - - public string Decrypt(string plainText) - { - return plainText == "" - ? "" - : _cryptographyProvider.Decrypt(plainText, _rootNodeInfo.PasswordString.ConvertToSecureString()); - } - - public string LegacyFullFileDecrypt(string xml) - { - if (string.IsNullOrEmpty(xml)) return ""; - if (xml.Contains("")) return xml; - - var decryptedContent = ""; - bool notDecr; - - try - { - decryptedContent = - _cryptographyProvider.Decrypt(xml, _rootNodeInfo.PasswordString.ConvertToSecureString()); - notDecr = decryptedContent == xml; - } - catch (Exception) - { - notDecr = true; - } - - if (notDecr) - { - if (Authenticate(xml, _rootNodeInfo.PasswordString.ConvertToSecureString())) - { - decryptedContent = - _cryptographyProvider.Decrypt(xml, _rootNodeInfo.PasswordString.ConvertToSecureString()); - notDecr = false; - } - - if (notDecr == false) - return decryptedContent; - } - else - { - return decryptedContent; - } - - return ""; - } - - public bool ConnectionsFileIsAuthentic(string protectedString, SecureString password) - { - var connectionsFileIsNotEncrypted = false; - try - { - connectionsFileIsNotEncrypted = - _cryptographyProvider.Decrypt(protectedString, - _rootNodeInfo.PasswordString.ConvertToSecureString()) == - "ThisIsNotProtected"; - } - catch (EncryptionException) - { - } - - return connectionsFileIsNotEncrypted || - Authenticate(protectedString, _rootNodeInfo.PasswordString.ConvertToSecureString()); - } - - private bool Authenticate(string cipherText, SecureString password) - { - var authenticator = new PasswordAuthenticator(_cryptographyProvider, cipherText, AuthenticationRequestor); - var authenticated = authenticator.Authenticate(password); - - if (!authenticated) - return false; - - _rootNodeInfo.PasswordString = authenticator.LastAuthenticatedPassword.ConvertToUnsecureString(); - return true; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/DockPanelLayoutLoader.cs b/mRemoteNG/Config/Settings/DockPanelLayoutLoader.cs deleted file mode 100644 index 511161106..000000000 --- a/mRemoteNG/Config/Settings/DockPanelLayoutLoader.cs +++ /dev/null @@ -1,89 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Window; -using System; -using System.IO; -using mRemoteNG.Messages; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.Config.Settings -{ - public class DockPanelLayoutLoader - { - private readonly FrmMain _mainForm; - private readonly MessageCollector _messageCollector; - - public DockPanelLayoutLoader(FrmMain mainForm, MessageCollector messageCollector) - { - if (mainForm == null) - throw new ArgumentNullException(nameof(mainForm)); - if (messageCollector == null) - throw new ArgumentNullException(nameof(messageCollector)); - - _mainForm = mainForm; - _messageCollector = messageCollector; - } - - public void LoadPanelsFromXml() - { - try - { - while (_mainForm.pnlDock.Contents.Count > 0) - { - var dc = (DockContent)_mainForm.pnlDock.Contents[0]; - dc.Close(); - } - -#if !PORTABLE - var oldPath = - Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" + GeneralAppInfo.ProductName + "\\" + SettingsFileInfo.LayoutFileName; -#endif - var newPath = SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.LayoutFileName; - if (File.Exists(newPath)) - { - _mainForm.pnlDock.LoadFromXml(newPath, GetContentFromPersistString); -#if !PORTABLE - } - else if (File.Exists(oldPath)) - { - _mainForm.pnlDock.LoadFromXml(oldPath, GetContentFromPersistString); -#endif - } - else - { - _mainForm.SetDefaultLayout(); - } - } - catch (Exception ex) - { - _messageCollector.AddExceptionMessage("LoadPanelsFromXML failed", ex); - } - } - - private IDockContent GetContentFromPersistString(string persistString) - { - // pnlLayout.xml persistence XML fix for refactoring to mRemoteNG - if (persistString.StartsWith("mRemote.")) - persistString = persistString.Replace("mRemote.", "mRemoteNG."); - - try - { - if (persistString == typeof(ConfigWindow).ToString()) - return Windows.ConfigForm; - - if (persistString == typeof(ConnectionTreeWindow).ToString()) - return Windows.TreeForm; - - if (persistString == typeof(ErrorAndInfoWindow).ToString()) - return Windows.ErrorsForm; - } - catch (Exception ex) - { - _messageCollector.AddExceptionMessage("GetContentFromPersistString failed", ex); - } - - return null; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/DockPanelLayoutSaver.cs b/mRemoteNG/Config/Settings/DockPanelLayoutSaver.cs deleted file mode 100644 index f5e2aae01..000000000 --- a/mRemoteNG/Config/Settings/DockPanelLayoutSaver.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.IO; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers; -using mRemoteNG.UI.Forms; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.Config.Settings -{ - public class DockPanelLayoutSaver - { - private readonly ISerializer _dockPanelSerializer; - private readonly IDataProvider _dataProvider; - - public DockPanelLayoutSaver(ISerializer dockPanelSerializer, - IDataProvider dataProvider) - { - if (dockPanelSerializer == null) - throw new ArgumentNullException(nameof(dockPanelSerializer)); - if (dataProvider == null) - throw new ArgumentNullException(nameof(dataProvider)); - - _dockPanelSerializer = dockPanelSerializer; - _dataProvider = dataProvider; - } - - public void Save() - { - try - { - if (Directory.Exists(SettingsFileInfo.SettingsPath) == false) - { - Directory.CreateDirectory(SettingsFileInfo.SettingsPath); - } - - var serializedLayout = _dockPanelSerializer.Serialize(FrmMain.Default.pnlDock); - _dataProvider.Save(serializedLayout); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("SavePanelsToXML failed", ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/DockPanelLayoutSerializer.cs b/mRemoteNG/Config/Settings/DockPanelLayoutSerializer.cs deleted file mode 100644 index e8e4be847..000000000 --- a/mRemoteNG/Config/Settings/DockPanelLayoutSerializer.cs +++ /dev/null @@ -1,30 +0,0 @@ -using mRemoteNG.Config.Serializers; -using System; -using System.IO; -using System.Text; -using System.Xml.Linq; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.Config.Settings -{ - public class DockPanelLayoutSerializer : ISerializer - { - public Version Version { get; } = new Version(1, 0); - - public string Serialize(DockPanel dockPanel) - { - if (dockPanel == null) - throw new ArgumentNullException(nameof(dockPanel)); - - XDocument xdoc; - using (var memoryStream = new MemoryStream()) - { - dockPanel.SaveAsXml(memoryStream, Encoding.UTF8); - memoryStream.Position = 0; - xdoc = XDocument.Load(memoryStream, LoadOptions.SetBaseUri); - } - - return $"{xdoc.Declaration}{Environment.NewLine}{xdoc}"; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/ExternalAppsLoader.cs b/mRemoteNG/Config/Settings/ExternalAppsLoader.cs deleted file mode 100644 index 3bb1a1839..000000000 --- a/mRemoteNG/Config/Settings/ExternalAppsLoader.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.UI.Forms; -using System.IO; -using System.Xml; -using mRemoteNG.Messages; -using mRemoteNG.Tools; -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.Config.Settings -{ - public class ExternalAppsLoader - { - private readonly FrmMain _mainForm; - private readonly MessageCollector _messageCollector; - private readonly ExternalToolsToolStrip _externalToolsToolStrip; - - public ExternalAppsLoader(FrmMain mainForm, - MessageCollector messageCollector, - ExternalToolsToolStrip externalToolsToolStrip) - { - if (mainForm == null) - throw new ArgumentNullException(nameof(mainForm)); - if (messageCollector == null) - throw new ArgumentNullException(nameof(messageCollector)); - if (externalToolsToolStrip == null) - throw new ArgumentNullException(nameof(externalToolsToolStrip)); - - _mainForm = mainForm; - _messageCollector = messageCollector; - _externalToolsToolStrip = externalToolsToolStrip; - } - - - public void LoadExternalAppsFromXML() - { -#if !PORTABLE - var oldPath = - Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), GeneralAppInfo.ProductName, SettingsFileInfo.ExtAppsFilesName); -#endif - var newPath = Path.Combine(SettingsFileInfo.SettingsPath, SettingsFileInfo.ExtAppsFilesName); - var xDom = new XmlDocument(); - if (File.Exists(newPath)) - { - _messageCollector.AddMessage(MessageClass.InformationMsg, $"Loading External Apps from: {newPath}", - true); - xDom.Load(newPath); - } -#if !PORTABLE - else if (File.Exists(oldPath)) - { - _messageCollector.AddMessage(MessageClass.InformationMsg, $"Loading External Apps from: {oldPath}", true); - xDom.Load(oldPath); - - } -#endif - else - { - _messageCollector.AddMessage(MessageClass.WarningMsg, - "Loading External Apps failed: Could not FIND file!"); - return; - } - - if (xDom.DocumentElement == null) - { - _messageCollector.AddMessage(MessageClass.WarningMsg, - "Loading External Apps failed: Could not LOAD file!"); - return; - } - - foreach (XmlElement xEl in xDom.DocumentElement.ChildNodes) - { - var extA = new ExternalTool - { - DisplayName = xEl.Attributes["DisplayName"].Value, - FileName = xEl.Attributes["FileName"].Value, - Arguments = xEl.Attributes["Arguments"].Value - }; - - // check before, since old save files won't have this set - if (xEl.HasAttribute("WorkingDir")) - extA.WorkingDir = xEl.Attributes["WorkingDir"].Value; - if (xEl.HasAttribute("RunElevated")) - extA.RunElevated = bool.Parse(xEl.Attributes["RunElevated"].Value); - - if (xEl.HasAttribute("WaitForExit")) - { - extA.WaitForExit = bool.Parse(xEl.Attributes["WaitForExit"].Value); - } - - if (xEl.HasAttribute("TryToIntegrate")) - { - extA.TryIntegrate = bool.Parse(xEl.Attributes["TryToIntegrate"].Value); - } - - if (xEl.HasAttribute("ShowOnToolbar")) - { - extA.ShowOnToolbar = bool.Parse(xEl.Attributes["ShowOnToolbar"].Value); - } - - _messageCollector.AddMessage(MessageClass.InformationMsg, - $"Adding External App: {extA.DisplayName} {extA.FileName} {extA.Arguments}", - true); - Runtime.ExternalToolsService.ExternalTools.Add(extA); - } - - _externalToolsToolStrip.SwitchToolBarText(Properties.Settings.Default.ExtAppsTBShowText); - _externalToolsToolStrip.AddExternalToolsToToolBar(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/ExternalAppsSaver.cs b/mRemoteNG/Config/Settings/ExternalAppsSaver.cs deleted file mode 100644 index 000cc4c2a..000000000 --- a/mRemoteNG/Config/Settings/ExternalAppsSaver.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Xml; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Tools; - -namespace mRemoteNG.Config.Settings -{ - public class ExternalAppsSaver - { - public void Save(IEnumerable externalTools) - { - try - { - if (Directory.Exists(SettingsFileInfo.SettingsPath) == false) - { - Directory.CreateDirectory(SettingsFileInfo.SettingsPath); - } - - var xmlTextWriter = - new XmlTextWriter(SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.ExtAppsFilesName, - Encoding.UTF8) - { - Formatting = Formatting.Indented, - Indentation = 4 - }; - - xmlTextWriter.WriteStartDocument(); - xmlTextWriter.WriteStartElement("Apps"); - - foreach (var extA in externalTools) - { - xmlTextWriter.WriteStartElement("App"); - xmlTextWriter.WriteAttributeString("DisplayName", "", extA.DisplayName); - xmlTextWriter.WriteAttributeString("FileName", "", extA.FileName); - xmlTextWriter.WriteAttributeString("Arguments", "", extA.Arguments); - xmlTextWriter.WriteAttributeString("WorkingDir", "", extA.WorkingDir); - xmlTextWriter.WriteAttributeString("WaitForExit", "", Convert.ToString(extA.WaitForExit)); - xmlTextWriter.WriteAttributeString("TryToIntegrate", "", Convert.ToString(extA.TryIntegrate)); - xmlTextWriter.WriteAttributeString("RunElevated", "", Convert.ToString(extA.RunElevated)); - xmlTextWriter.WriteAttributeString("ShowOnToolbar", "", Convert.ToString(extA.ShowOnToolbar)); - xmlTextWriter.WriteEndElement(); - } - - xmlTextWriter.WriteEndElement(); - xmlTextWriter.WriteEndDocument(); - - xmlTextWriter.Close(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("SaveExternalAppsToXML failed", ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/Providers/ChooseProvider.cs b/mRemoteNG/Config/Settings/Providers/ChooseProvider.cs deleted file mode 100644 index 8a58cf8d6..000000000 --- a/mRemoteNG/Config/Settings/Providers/ChooseProvider.cs +++ /dev/null @@ -1,14 +0,0 @@ -#if !PORTABLE -using System.Configuration; -#endif - -namespace mRemoteNG.Config.Settings.Providers -{ -#if PORTABLE - public class ChooseProvider : PortableSettingsProvider -#else - public class ChooseProvider : LocalFileSettingsProvider -#endif - { - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/Providers/PortableSettingsProvider.cs b/mRemoteNG/Config/Settings/Providers/PortableSettingsProvider.cs deleted file mode 100644 index fa79921fa..000000000 --- a/mRemoteNG/Config/Settings/Providers/PortableSettingsProvider.cs +++ /dev/null @@ -1,213 +0,0 @@ -// The MIT License (MIT) -// -// Copyright(c) crdx -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// -// https://github.com/crdx/PortableSettingsProvider -// - -using System; -using System.Collections; -using System.Configuration; -using System.Windows.Forms; -using System.Collections.Specialized; -using System.Xml; -using System.IO; - -//using mRemoteNG.App; - -namespace mRemoteNG.Config.Settings.Providers -{ - public class PortableSettingsProvider : SettingsProvider, IApplicationSettingsProvider - { - private const string _rootNodeName = "settings"; - private const string _localSettingsNodeName = "localSettings"; - private const string _globalSettingsNodeName = "globalSettings"; - private const string _className = "PortableSettingsProvider"; - private XmlDocument _xmlDocument; - - private string _filePath => - Path.Combine(Path.GetDirectoryName(Application.ExecutablePath) ?? throw new InvalidOperationException(), - $"{ApplicationName}.settings"); - - private XmlNode _localSettingsNode => GetSettingsNode(_localSettingsNodeName); - - private XmlNode _globalSettingsNode => GetSettingsNode(_globalSettingsNodeName); - - private XmlNode _rootNode => _rootDocument.SelectSingleNode(_rootNodeName); - - private XmlDocument _rootDocument - { - get - { - if (_xmlDocument != null) return _xmlDocument; - try - { - _xmlDocument = new XmlDocument(); - _xmlDocument.Load(_filePath); - } - catch (Exception /*ex*/) - { - // This causes hundreds of unit tests to fail for some reason... - //Runtime.MessageCollector.AddExceptionStackTrace("PortableSettingsProvider: Error getting XML", ex); - } - - if (_xmlDocument?.SelectSingleNode(_rootNodeName) != null) - return _xmlDocument; - - _xmlDocument = GetBlankXmlDocument(); - - return _xmlDocument; - } - } - - public override string ApplicationName - { - get => Path.GetFileNameWithoutExtension(Application.ExecutablePath); - set { } - } - - public override string Name => _className; - - public override void Initialize(string name, NameValueCollection config) - { - base.Initialize(Name, config); - } - - public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection) - { - foreach (SettingsPropertyValue propertyValue in collection) - SetValue(propertyValue); - - try - { - _rootDocument.Save(_filePath); - } - catch (Exception) - { - /* - * If this is a portable application and the device has been - * removed then this will fail, so don't do anything. It's - * probably better for the application to stop saving settings - * rather than just crashing outright. Probably. - */ - } - } - - public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, - SettingsPropertyCollection collection) - { - var values = new SettingsPropertyValueCollection(); - - foreach (SettingsProperty property in collection) - { - values.Add(new SettingsPropertyValue(property) - { - SerializedValue = GetValue(property) - }); - } - - return values; - } - - private void SetValue(SettingsPropertyValue propertyValue) - { - var targetNode = IsGlobal(propertyValue.Property) ? _globalSettingsNode : _localSettingsNode; - - var settingNode = targetNode.SelectSingleNode($"setting[@name='{propertyValue.Name}']"); - - if (settingNode != null) - settingNode.InnerText = propertyValue.SerializedValue.ToString(); - else - { - settingNode = _rootDocument.CreateElement("setting"); - - var nameAttribute = _rootDocument.CreateAttribute("name"); - nameAttribute.Value = propertyValue.Name; - - settingNode.Attributes?.Append(nameAttribute); - settingNode.InnerText = propertyValue.SerializedValue.ToString(); - - targetNode.AppendChild(settingNode); - } - } - - private string GetValue(SettingsProperty property) - { - var targetNode = IsGlobal(property) ? _globalSettingsNode : _localSettingsNode; - var settingNode = targetNode.SelectSingleNode($"setting[@name='{property.Name}']"); - - if (settingNode == null) - return property.DefaultValue != null ? property.DefaultValue.ToString() : string.Empty; - - return settingNode.InnerText; - } - - private static bool IsGlobal(SettingsProperty property) - { - foreach (DictionaryEntry attribute in property.Attributes) - { - if ((Attribute)attribute.Value is SettingsManageabilityAttribute) - return true; - } - - return false; - } - - private XmlNode GetSettingsNode(string name) - { - var settingsNode = _rootNode.SelectSingleNode(name); - - if (settingsNode != null) return settingsNode; - settingsNode = _rootDocument.CreateElement(name); - _rootNode.AppendChild(settingsNode); - - return settingsNode; - } - - private static XmlDocument GetBlankXmlDocument() - { - var blankXmlDocument = new XmlDocument(); - blankXmlDocument.AppendChild(blankXmlDocument.CreateXmlDeclaration("1.0", "utf-8", string.Empty)); - blankXmlDocument.AppendChild(blankXmlDocument.CreateElement(_rootNodeName)); - - return blankXmlDocument; - } - - public void Reset(SettingsContext context) - { - _localSettingsNode.RemoveAll(); - _globalSettingsNode.RemoveAll(); - - _xmlDocument.Save(_filePath); - } - - public SettingsPropertyValue GetPreviousVersion(SettingsContext context, SettingsProperty property) - { - // do nothing - return new SettingsPropertyValue(property); - } - - public void Upgrade(SettingsContext context, SettingsPropertyCollection properties) - { - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/Settings.cs b/mRemoteNG/Config/Settings/Settings.cs deleted file mode 100644 index 97f9b1f4d..000000000 --- a/mRemoteNG/Config/Settings/Settings.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace mRemoteNG.Config.Settings -{ - // This class allows you to handle specific events on the settings class: - // The SettingChanging event is raised before a setting's value is changed. - // The PropertyChanged event is raised after a setting's value is changed. - // The SettingsLoaded event is raised after the setting values are loaded. - // The SettingsSaving event is raised before the setting values are saved. - [global::System.Configuration.SettingsProviderAttribute(typeof(mRemoteNG.Config.Settings.Providers.ChooseProvider))] - internal sealed partial class Settings - { - public Settings() - { - // // To add event handlers for saving and changing settings, uncomment the lines below: - // - // this.SettingChanging += this.SettingChangingEventHandler; - // - // this.SettingsSaving += this.SettingsSavingEventHandler; - // - } - - private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) - { - // Add code to handle the SettingChangingEvent event here. - } - - private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) - { - // Add code to handle the SettingsSaving event here. - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/SettingsLoader.cs b/mRemoteNG/Config/Settings/SettingsLoader.cs deleted file mode 100644 index 180e99481..000000000 --- a/mRemoteNG/Config/Settings/SettingsLoader.cs +++ /dev/null @@ -1,291 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.App; -using System.Threading; -using System.Globalization; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.App.Info; -using mRemoteNG.Messages; -using mRemoteNG.Tools; -using mRemoteNG.UI.Controls; -using mRemoteNG.UI.Forms; - - -namespace mRemoteNG.Config.Settings -{ - public class SettingsLoader - { - private readonly ExternalAppsLoader _externalAppsLoader; - private readonly MessageCollector _messageCollector; - private readonly MenuStrip _mainMenu; - private readonly QuickConnectToolStrip _quickConnectToolStrip; - private readonly ExternalToolsToolStrip _externalToolsToolStrip; - private readonly MultiSshToolStrip _multiSshToolStrip; - - private FrmMain MainForm { get; } - - - public SettingsLoader(FrmMain mainForm, - MessageCollector messageCollector, - QuickConnectToolStrip quickConnectToolStrip, - ExternalToolsToolStrip externalToolsToolStrip, - MultiSshToolStrip multiSshToolStrip, - MenuStrip mainMenu) - { - if (mainForm == null) - throw new ArgumentNullException(nameof(mainForm)); - if (messageCollector == null) - throw new ArgumentNullException(nameof(messageCollector)); - if (quickConnectToolStrip == null) - throw new ArgumentNullException(nameof(quickConnectToolStrip)); - if (externalToolsToolStrip == null) - throw new ArgumentNullException(nameof(externalToolsToolStrip)); - if (multiSshToolStrip == null) - throw new ArgumentNullException(nameof(multiSshToolStrip)); - if (mainMenu == null) - throw new ArgumentNullException(nameof(mainMenu)); - - MainForm = mainForm; - _messageCollector = messageCollector; - _quickConnectToolStrip = quickConnectToolStrip; - _externalToolsToolStrip = externalToolsToolStrip; - _multiSshToolStrip = multiSshToolStrip; - _mainMenu = mainMenu; - _externalAppsLoader = new ExternalAppsLoader(MainForm, messageCollector, _externalToolsToolStrip); - } - - #region Public Methods - - public void LoadSettings() - { - try - { - EnsureSettingsAreSavedInNewestVersion(); - - SetSupportedCulture(); - SetApplicationWindowPositionAndSize(); - SetKioskMode(); - - SetPuttyPath(); - SetShowSystemTrayIcon(); - SetAutoSave(); - LoadExternalAppsFromXml(); - SetAlwaysShowPanelTabs(); - - if (Properties.Settings.Default.ResetToolbars) - SetToolbarsDefault(); - else - LoadToolbarsFromSettings(); - } - catch (Exception ex) - { - _messageCollector.AddExceptionMessage("Loading settings failed", ex); - } - } - - private static void SetAlwaysShowPanelTabs() - { - if (Properties.Settings.Default.AlwaysShowPanelTabs) - FrmMain.Default.pnlDock.DocumentStyle = DocumentStyle.DockingWindow; - } - - - private void SetSupportedCulture() - { - if (Properties.Settings.Default.OverrideUICulture == "" || - !SupportedCultures.IsNameSupported(Properties.Settings.Default.OverrideUICulture)) return; - Thread.CurrentThread.CurrentUICulture = new CultureInfo(Properties.Settings.Default.OverrideUICulture); - _messageCollector.AddMessage(MessageClass.InformationMsg, - $"Override Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}", - true); - } - - private void SetApplicationWindowPositionAndSize() - { - MainForm.WindowState = FormWindowState.Normal; - if (Properties.Settings.Default.MainFormState == FormWindowState.Normal) - { - if (!Properties.Settings.Default.MainFormLocation.IsEmpty) - MainForm.Location = Properties.Settings.Default.MainFormLocation; - if (!Properties.Settings.Default.MainFormSize.IsEmpty) - MainForm.Size = Properties.Settings.Default.MainFormSize; - } - else - { - if (!Properties.Settings.Default.MainFormRestoreLocation.IsEmpty) - MainForm.Location = Properties.Settings.Default.MainFormRestoreLocation; - if (!Properties.Settings.Default.MainFormRestoreSize.IsEmpty) - MainForm.Size = Properties.Settings.Default.MainFormRestoreSize; - } - - if (Properties.Settings.Default.MainFormState == FormWindowState.Maximized) - { - MainForm.WindowState = FormWindowState.Maximized; - } - - // Make sure the form is visible on the screen - const int minHorizontal = 300; - const int minVertical = 150; - var screenBounds = Screen.FromHandle(MainForm.Handle).Bounds; - var newBounds = MainForm.Bounds; - - if (newBounds.Right < screenBounds.Left + minHorizontal) - newBounds.X = screenBounds.Left + minHorizontal - newBounds.Width; - if (newBounds.Left > screenBounds.Right - minHorizontal) - newBounds.X = screenBounds.Right - minHorizontal; - if (newBounds.Bottom < screenBounds.Top + minVertical) - newBounds.Y = screenBounds.Top + minVertical - newBounds.Height; - if (newBounds.Top > screenBounds.Bottom - minVertical) - newBounds.Y = screenBounds.Bottom - minVertical; - - MainForm.Location = newBounds.Location; - } - - private void SetAutoSave() - { - if (Properties.Settings.Default.AutoSaveEveryMinutes <= 0) return; - MainForm.tmrAutoSave.Interval = Properties.Settings.Default.AutoSaveEveryMinutes * 60000; - MainForm.tmrAutoSave.Enabled = true; - } - - private void SetKioskMode() - { - if (!Properties.Settings.Default.MainFormKiosk) return; - MainForm.Fullscreen.Value = true; - } - - private static void SetShowSystemTrayIcon() - { - if (Properties.Settings.Default.ShowSystemTrayIcon) - Runtime.NotificationAreaIcon = new NotificationAreaIcon(); - } - - private static void SetPuttyPath() - { - PuttyBase.PuttyPath = Properties.Settings.Default.UseCustomPuttyPath - ? Properties.Settings.Default.CustomPuttyPath - : GeneralAppInfo.PuttyPath; - } - - private void EnsureSettingsAreSavedInNewestVersion() - { - if (Properties.Settings.Default.DoUpgrade) - UpgradeSettingsVersion(); - } - - private void UpgradeSettingsVersion() - { - try - { - Properties.Settings.Default.Save(); - Properties.Settings.Default.Upgrade(); - } - catch (Exception ex) - { - _messageCollector.AddExceptionMessage("Settings.Upgrade() failed", ex); - } - - Properties.Settings.Default.DoUpgrade = false; - - // Clear pending update flag - // This is used for automatic updates, not for settings migration, but it - // needs to be cleared here because we know that we just updated. - Properties.Settings.Default.UpdatePending = false; - } - - private void SetToolbarsDefault() - { - ToolStripPanelFromString("top").Join(_quickConnectToolStrip, new Point(300, 0)); - _quickConnectToolStrip.Visible = true; - ToolStripPanelFromString("bottom").Join(_externalToolsToolStrip, new Point(3, 0)); - _externalToolsToolStrip.Visible = false; - } - - private void LoadToolbarsFromSettings() - { - ResetAllToolbarLocations(); - AddMainMenuPanel(); - AddExternalAppsPanel(); - AddQuickConnectPanel(); - AddMultiSshPanel(); - } - - /// - /// This prevents odd positioning issues due to toolbar load order. - /// Since all toolbars start in this temp panel, no toolbar load - /// can be blocked by pre-existing toolbars. - /// - private void ResetAllToolbarLocations() - { - var tempToolStrip = new ToolStripPanel(); - tempToolStrip.Join(_mainMenu); - tempToolStrip.Join(_quickConnectToolStrip); - tempToolStrip.Join(_externalToolsToolStrip); - tempToolStrip.Join(_multiSshToolStrip); - } - - private void AddMainMenuPanel() - { - SetToolstripGripStyle(_mainMenu); - var toolStripPanel = ToolStripPanelFromString("top"); - toolStripPanel.Join(_mainMenu, new Point(3, 0)); - } - - private void AddQuickConnectPanel() - { - SetToolstripGripStyle(_quickConnectToolStrip); - _quickConnectToolStrip.Visible = Properties.Settings.Default.QuickyTBVisible; - var toolStripPanel = ToolStripPanelFromString(Properties.Settings.Default.QuickyTBParentDock); - toolStripPanel.Join(_quickConnectToolStrip, Properties.Settings.Default.QuickyTBLocation); - } - - private void AddExternalAppsPanel() - { - SetToolstripGripStyle(_externalToolsToolStrip); - _externalToolsToolStrip.Visible = Properties.Settings.Default.ExtAppsTBVisible; - var toolStripPanel = ToolStripPanelFromString(Properties.Settings.Default.ExtAppsTBParentDock); - toolStripPanel.Join(_externalToolsToolStrip, Properties.Settings.Default.ExtAppsTBLocation); - } - - private void AddMultiSshPanel() - { - SetToolstripGripStyle(_multiSshToolStrip); - _multiSshToolStrip.Visible = Properties.Settings.Default.MultiSshToolbarVisible; - var toolStripPanel = ToolStripPanelFromString(Properties.Settings.Default.MultiSshToolbarParentDock); - toolStripPanel.Join(_multiSshToolStrip, Properties.Settings.Default.MultiSshToolbarLocation); - } - - private void SetToolstripGripStyle(ToolStrip toolbar) - { - toolbar.GripStyle = Properties.Settings.Default.LockToolbars - ? ToolStripGripStyle.Hidden - : ToolStripGripStyle.Visible; - } - - private ToolStripPanel ToolStripPanelFromString(string panel) - { - switch (panel.ToLower()) - { - case "top": - return MainForm.tsContainer.TopToolStripPanel; - case "bottom": - return MainForm.tsContainer.BottomToolStripPanel; - case "left": - return MainForm.tsContainer.LeftToolStripPanel; - case "right": - return MainForm.tsContainer.RightToolStripPanel; - default: - return MainForm.tsContainer.TopToolStripPanel; - } - } - - private void LoadExternalAppsFromXml() - { - _externalAppsLoader.LoadExternalAppsFromXML(); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Config/Settings/SettingsSaver.cs b/mRemoteNG/Config/Settings/SettingsSaver.cs deleted file mode 100644 index 7c35e5b81..000000000 --- a/mRemoteNG/Config/Settings/SettingsSaver.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Tools; -using mRemoteNG.UI.Controls; -using mRemoteNG.UI.Forms; - -namespace mRemoteNG.Config.Settings -{ - public static class SettingsSaver - { - public static void SaveSettings(Control quickConnectToolStrip, - ExternalToolsToolStrip externalToolsToolStrip, - MultiSshToolStrip multiSshToolStrip, - FrmMain frmMain) - { - try - { - var windowPlacement = new WindowPlacement(FrmMain.Default); - if (frmMain.WindowState == FormWindowState.Minimized & windowPlacement.RestoreToMaximized) - { - frmMain.Opacity = 0; - frmMain.WindowState = FormWindowState.Maximized; - } - - Properties.Settings.Default.MainFormLocation = frmMain.Location; - Properties.Settings.Default.MainFormSize = frmMain.Size; - - if (frmMain.WindowState != FormWindowState.Normal) - { - Properties.Settings.Default.MainFormRestoreLocation = frmMain.RestoreBounds.Location; - Properties.Settings.Default.MainFormRestoreSize = frmMain.RestoreBounds.Size; - } - - Properties.Settings.Default.MainFormState = frmMain.WindowState; - - if (frmMain.Fullscreen != null) - { - Properties.Settings.Default.MainFormKiosk = frmMain.Fullscreen.Value; - } - - Properties.Settings.Default.FirstStart = false; - Properties.Settings.Default.ResetPanels = false; - Properties.Settings.Default.ResetToolbars = false; - Properties.Settings.Default.NoReconnect = false; - - SaveExternalAppsToolbarLocation(externalToolsToolStrip); - SaveQuickConnectToolbarLocation(quickConnectToolStrip); - SaveMultiSshToolbarLocation(multiSshToolStrip); - - Properties.Settings.Default.Save(); - - SaveDockPanelLayout(); - SaveExternalApps(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Saving settings failed", ex); - } - } - - private static void SaveExternalAppsToolbarLocation(ExternalToolsToolStrip externalToolsToolStrip) - { - Properties.Settings.Default.ExtAppsTBLocation = externalToolsToolStrip.Location; - Properties.Settings.Default.ExtAppsTBVisible = externalToolsToolStrip.Visible; - Properties.Settings.Default.ExtAppsTBShowText = externalToolsToolStrip.CMenToolbarShowText.Checked; - - if (externalToolsToolStrip.Parent != null) - { - Properties.Settings.Default.ExtAppsTBParentDock = externalToolsToolStrip.Parent.Dock.ToString(); - } - } - - private static void SaveQuickConnectToolbarLocation(Control quickConnectToolStrip) - { - Properties.Settings.Default.QuickyTBLocation = quickConnectToolStrip.Location; - Properties.Settings.Default.QuickyTBVisible = quickConnectToolStrip.Visible; - - if (quickConnectToolStrip.Parent != null) - { - Properties.Settings.Default.QuickyTBParentDock = quickConnectToolStrip.Parent.Dock.ToString(); - } - } - - private static void SaveMultiSshToolbarLocation(MultiSshToolStrip multiSshToolStrip) - { - Properties.Settings.Default.MultiSshToolbarLocation = multiSshToolStrip.Location; - Properties.Settings.Default.MultiSshToolbarVisible = multiSshToolStrip.Visible; - - if (multiSshToolStrip.Parent != null) - { - Properties.Settings.Default.MultiSshToolbarParentDock = multiSshToolStrip.Parent.Dock.ToString(); - } - } - - private static void SaveDockPanelLayout() - { - var panelLayoutXmlFilePath = SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.LayoutFileName; - var panelLayoutSaver = new DockPanelLayoutSaver( - new DockPanelLayoutSerializer(), - new FileDataProvider(panelLayoutXmlFilePath) - ); - panelLayoutSaver.Save(); - } - - private static void SaveExternalApps() - { - var externalAppsSaver = new ExternalAppsSaver(); - externalAppsSaver.Save(Runtime.ExternalToolsService.ExternalTools); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/AbstractConnectionRecord.cs b/mRemoteNG/Connection/AbstractConnectionRecord.cs deleted file mode 100644 index 3e16664ca..000000000 --- a/mRemoteNG/Connection/AbstractConnectionRecord.cs +++ /dev/null @@ -1,958 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Properties; -using mRemoteNG.Tools; -using mRemoteNG.Tools.Attributes; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Connection -{ - public abstract class AbstractConnectionRecord : INotifyPropertyChanged - { - #region Fields - - private string _name; - private string _description; - private string _icon; - private string _panel; - - private string _hostname; - private string _ec2InstanceId = ""; - private string _ec2Region = ""; - private string _userViaAPI = ""; - private string _username = ""; - private string _password = ""; - private string _domain = ""; - private string _vmId = ""; - private bool _useEnhancedMode; - - private string _sshTunnelConnectionName = ""; - private ProtocolType _protocol; - private RdpVersion _rdpProtocolVersion; - private string _extApp; - private int _port; - private string _sshOptions = ""; - private string _puttySession; - private bool _useConsoleSession; - private AuthenticationLevel _rdpAuthenticationLevel; - private int _rdpMinutesToIdleTimeout; - private bool _rdpAlertIdleTimeout; - private string _loadBalanceInfo; - private HTTPBase.RenderingEngine _renderingEngine; - private bool _useCredSsp; - private bool _useVmId; - - private RDGatewayUsageMethod _rdGatewayUsageMethod; - private string _rdGatewayHostname; - private RDGatewayUseConnectionCredentials _rdGatewayUseConnectionCredentials; - private string _rdGatewayUsername; - private string _rdGatewayPassword; - private string _rdGatewayDomain; - - private RDPResolutions _resolution; - private bool _automaticResize; - private RDPColors _colors; - private bool _cacheBitmaps; - private bool _displayWallpaper; - private bool _displayThemes; - private bool _enableFontSmoothing; - private bool _enableDesktopComposition; - private bool _disableFullWindowDrag; - private bool _disableMenuAnimations; - private bool _disableCursorShadow; - private bool _disableCursorBlinking; - - private bool _redirectKeys; - private bool _redirectDiskDrives; - private bool _redirectPrinters; - private bool _redirectClipboard; - private bool _redirectPorts; - private bool _redirectSmartCards; - private RDPSounds _redirectSound; - private RDPSoundQuality _soundQuality; - private bool _redirectAudioCapture; - - private string _preExtApp; - private string _postExtApp; - private string _macAddress; - private string _openingCommand; - private string _userField; - private string _RDPStartProgram; - private string _RDPStartProgramWorkDir; - private bool _favorite; - - private ProtocolVNC.Compression _vncCompression; - private ProtocolVNC.Encoding _vncEncoding; - private ProtocolVNC.AuthMode _vncAuthMode; - private ProtocolVNC.ProxyType _vncProxyType; - private string _vncProxyIp; - private int _vncProxyPort; - private string _vncProxyUsername; - private string _vncProxyPassword; - private ProtocolVNC.Colors _vncColors; - private ProtocolVNC.SmartSizeMode _vncSmartSizeMode; - private bool _vncViewOnly; - - #endregion - - #region Properties - - #region Display - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Display)), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Name)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionName))] - public virtual string Name - { - get => _name; - set => SetField(ref _name, value, "Name"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Display)), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Description)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDescription))] - public virtual string Description - { - get => GetPropertyValue("Description", _description); - set => SetField(ref _description, value, "Description"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Display)), - TypeConverter(typeof(ConnectionIcon)), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Icon)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionIcon))] - public virtual string Icon - { - get => GetPropertyValue("Icon", _icon); - set => SetField(ref _icon, value, "Icon"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Display)), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Panel)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionPanel))] - public virtual string Panel - { - get => GetPropertyValue("Panel", _panel); - set => SetField(ref _panel, value, "Panel"); - } - - #endregion - - #region Connection - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.HostnameIp)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionHostnameIp)), - AttributeUsedInAllProtocolsExcept()] - public virtual string Hostname - { - get => _hostname.Trim(); - set => SetField(ref _hostname, value?.Trim(), "Hostname"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Port)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionPort)), - AttributeUsedInAllProtocolsExcept()] - public virtual int Port - { - get => GetPropertyValue("Port", _port); - set => SetField(ref _port, value, "Port"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.UserViaAPI)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUserViaAPI)), - AttributeUsedInAllProtocolsExcept(ProtocolType.VNC, ProtocolType.Telnet, ProtocolType.Rlogin, ProtocolType.RAW)] - public virtual string UserViaAPI - { - get => GetPropertyValue("UserViaAPI", _userViaAPI); - set => SetField(ref _userViaAPI, value, "UserViaAPI"); - } - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Username)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUsername)), - AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH1, ProtocolType.SSH2)] - public virtual string Username - { - get => GetPropertyValue("Username", _username); - set => SetField(ref _username, Settings.Default.DoNotTrimUsername ? value : value?.Trim(), "Username"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Password)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionPassword)), - PasswordPropertyText(true), - AttributeUsedInAllProtocolsExcept(ProtocolType.Telnet, ProtocolType.Rlogin, ProtocolType.RAW)] - public virtual string Password - { - get => GetPropertyValue("Password", _password); - set => SetField(ref _password, value, "Password"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Domain)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDomain)), - AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.IntApp, ProtocolType.PowerShell)] - public string Domain - { - get => GetPropertyValue("Domain", _domain).Trim(); - set => SetField(ref _domain, value?.Trim(), "Domain"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.EC2InstanceId)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionEC2InstanceId)), - AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH2)] - public string EC2InstanceId - { - get => GetPropertyValue("EC2InstanceId", _ec2InstanceId).Trim(); - set => SetField(ref _ec2InstanceId, value?.Trim(), "EC2InstanceId"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.EC2Region)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionEC2Region)), - AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH2)] - public string EC2Region - { - get => GetPropertyValue("EC2Region", _ec2Region).Trim(); - set => SetField(ref _ec2Region, value?.Trim(), "EC2Region"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.VmId)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionVmId)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public string VmId - { - get => GetPropertyValue("VmId", _vmId).Trim(); - set => SetField(ref _vmId, value?.Trim(), "VmId"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.SshTunnel)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionSshTunnel)), - TypeConverter(typeof(SshTunnelTypeConverter)), - AttributeUsedInAllProtocolsExcept()] - public string SSHTunnelConnectionName - { - get => GetPropertyValue("SSHTunnelConnectionName", _sshTunnelConnectionName).Trim(); - set => SetField(ref _sshTunnelConnectionName, value?.Trim(), "SSHTunnelConnectionName"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.OpeningCommand)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionOpeningCommand)), - AttributeUsedInProtocol(ProtocolType.SSH1, ProtocolType.SSH2)] - public virtual string OpeningCommand - { - get => GetPropertyValue("OpeningCommand", _openingCommand); - set => SetField(ref _openingCommand, value, "OpeningCommand"); - } - #endregion - - #region Protocol - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Protocol)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionProtocol)), - TypeConverter(typeof(MiscTools.EnumTypeConverter))] - public virtual ProtocolType Protocol - { - get => GetPropertyValue("Protocol", _protocol); - set => SetField(ref _protocol, value, "Protocol"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpVersion)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRdpVersion)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public virtual RdpVersion RdpVersion - { - get => GetPropertyValue("RdpVersion", _rdpProtocolVersion); - set => SetField(ref _rdpProtocolVersion, value, nameof(RdpVersion)); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalTool)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalTool)), - TypeConverter(typeof(ExternalToolsTypeConverter)), - AttributeUsedInProtocol(ProtocolType.IntApp)] - public string ExtApp - { - get => GetPropertyValue("ExtApp", _extApp); - set => SetField(ref _extApp, value, "ExtApp"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.PuttySession)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionPuttySession)), - TypeConverter(typeof(Config.Putty.PuttySessionsManager.SessionList)), - AttributeUsedInProtocol(ProtocolType.SSH1, ProtocolType.SSH2, ProtocolType.Telnet, - ProtocolType.RAW, ProtocolType.Rlogin)] - public virtual string PuttySession - { - get => GetPropertyValue("PuttySession", _puttySession); - set => SetField(ref _puttySession, value, "PuttySession"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.SshOptions)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionSshOptions)), - AttributeUsedInProtocol(ProtocolType.SSH1, ProtocolType.SSH2)] - public virtual string SSHOptions - { - get => GetPropertyValue("SSHOptions", _sshOptions); - set => SetField(ref _sshOptions, value, "SSHOptions"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.UseConsoleSession)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUseConsoleSession)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool UseConsoleSession - { - get => GetPropertyValue("UseConsoleSession", _useConsoleSession); - set => SetField(ref _useConsoleSession, value, "UseConsoleSession"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.AuthenticationLevel)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionAuthenticationLevel)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public AuthenticationLevel RDPAuthenticationLevel - { - get => GetPropertyValue("RDPAuthenticationLevel", _rdpAuthenticationLevel); - set => SetField(ref _rdpAuthenticationLevel, value, "RDPAuthenticationLevel"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.MinutesToIdleTimeout)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDPMinutesToIdleTimeout)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public virtual int RDPMinutesToIdleTimeout - { - get => GetPropertyValue("RDPMinutesToIdleTimeout", _rdpMinutesToIdleTimeout); - set - { - if (value < 0) - value = 0; - else if (value > 240) - value = 240; - SetField(ref _rdpMinutesToIdleTimeout, value, "RDPMinutesToIdleTimeout"); - } - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.MinutesToIdleTimeout)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDPAlertIdleTimeout)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool RDPAlertIdleTimeout - { - get => GetPropertyValue("RDPAlertIdleTimeout", _rdpAlertIdleTimeout); - set => SetField(ref _rdpAlertIdleTimeout, value, "RDPAlertIdleTimeout"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.LoadBalanceInfo)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionLoadBalanceInfo)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public string LoadBalanceInfo - { - get => GetPropertyValue("LoadBalanceInfo", _loadBalanceInfo).Trim(); - set => SetField(ref _loadBalanceInfo, value?.Trim(), "LoadBalanceInfo"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RenderingEngine)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRenderingEngine)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.HTTP, ProtocolType.HTTPS)] - public HTTPBase.RenderingEngine RenderingEngine - { - get => GetPropertyValue("RenderingEngine", _renderingEngine); - set => SetField(ref _renderingEngine, value, "RenderingEngine"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.UseCredSsp)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUseCredSsp)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool UseCredSsp - { - get => GetPropertyValue("UseCredSsp", _useCredSsp); - set => SetField(ref _useCredSsp, value, "UseCredSsp"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.UseVmId)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUseVmId)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool UseVmId - { - get => GetPropertyValue("UseVmId", _useVmId); - set => SetField(ref _useVmId, value, "UseVmId"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.UseEnhancedMode)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUseEnhancedMode)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool UseEnhancedMode - { - get => GetPropertyValue("UseEnhancedMode", _useEnhancedMode); - set => SetField(ref _useEnhancedMode, value, "UseEnhancedMode"); - } - #endregion - - #region RD Gateway - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUsageMethod)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRdpGatewayUsageMethod)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public RDGatewayUsageMethod RDGatewayUsageMethod - { - get => GetPropertyValue("RDGatewayUsageMethod", _rdGatewayUsageMethod); - set => SetField(ref _rdGatewayUsageMethod, value, "RDGatewayUsageMethod"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayHostname)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayHostname)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public string RDGatewayHostname - { - get => GetPropertyValue("RDGatewayHostname", _rdGatewayHostname).Trim(); - set => SetField(ref _rdGatewayHostname, value?.Trim(), "RDGatewayHostname"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUseConnectionCredentials)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayUseConnectionCredentials)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public RDGatewayUseConnectionCredentials RDGatewayUseConnectionCredentials - { - get => GetPropertyValue("RDGatewayUseConnectionCredentials", _rdGatewayUseConnectionCredentials); - set => SetField(ref _rdGatewayUseConnectionCredentials, value, "RDGatewayUseConnectionCredentials"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUsername)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayUsername)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public string RDGatewayUsername - { - get => GetPropertyValue("RDGatewayUsername", _rdGatewayUsername).Trim(); - set => SetField(ref _rdGatewayUsername, value?.Trim(), "RDGatewayUsername"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayPassword)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRdpGatewayPassword)), - PasswordPropertyText(true), - AttributeUsedInProtocol(ProtocolType.RDP)] - public string RDGatewayPassword - { - get => GetPropertyValue("RDGatewayPassword", _rdGatewayPassword); - set => SetField(ref _rdGatewayPassword, value, "RDGatewayPassword"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayDomain)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayDomain)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public string RDGatewayDomain - { - get => GetPropertyValue("RDGatewayDomain", _rdGatewayDomain).Trim(); - set => SetField(ref _rdGatewayDomain, value?.Trim(), "RDGatewayDomain"); - } - - #endregion - - #region Appearance - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Resolution)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionResolution)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public RDPResolutions Resolution - { - get => GetPropertyValue("Resolution", _resolution); - set => SetField(ref _resolution, value, "Resolution"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.AutomaticResize)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionAutomaticResize)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool AutomaticResize - { - get => GetPropertyValue("AutomaticResize", _automaticResize); - set => SetField(ref _automaticResize, value, "AutomaticResize"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Colors)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionColors)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public RDPColors Colors - { - get => GetPropertyValue("Colors", _colors); - set => SetField(ref _colors, value, "Colors"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.CacheBitmaps)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionCacheBitmaps)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool CacheBitmaps - { - get => GetPropertyValue("CacheBitmaps", _cacheBitmaps); - set => SetField(ref _cacheBitmaps, value, "CacheBitmaps"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.DisplayWallpaper)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDisplayWallpaper)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool DisplayWallpaper - { - get => GetPropertyValue("DisplayWallpaper", _displayWallpaper); - set => SetField(ref _displayWallpaper, value, "DisplayWallpaper"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.DisplayThemes)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDisplayThemes)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool DisplayThemes - { - get => GetPropertyValue("DisplayThemes", _displayThemes); - set => SetField(ref _displayThemes, value, "DisplayThemes"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.FontSmoothing)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionEnableFontSmoothing)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool EnableFontSmoothing - { - get => GetPropertyValue("EnableFontSmoothing", _enableFontSmoothing); - set => SetField(ref _enableFontSmoothing, value, "EnableFontSmoothing"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.EnableDesktopComposition)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionEnableDesktopComposition)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool EnableDesktopComposition - { - get => GetPropertyValue("EnableDesktopComposition", _enableDesktopComposition); - set => SetField(ref _enableDesktopComposition, value, "EnableDesktopComposition"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.DisableFullWindowDrag)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDisableFullWindowDrag)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool DisableFullWindowDrag - { - get => GetPropertyValue("DisableFullWindowDrag", _disableFullWindowDrag); - set => SetField(ref _disableFullWindowDrag, value, "DisableFullWindowDrag"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.DisableMenuAnimations)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDisableMenuAnimations)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool DisableMenuAnimations - { - get => GetPropertyValue("DisableMenuAnimations", _disableMenuAnimations); - set => SetField(ref _disableMenuAnimations, value, "DisableMenuAnimations"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.DisableCursorShadow)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDisableCursorShadow)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool DisableCursorShadow - { - get => GetPropertyValue("DisableCursorShadow", _disableCursorShadow); - set => SetField(ref _disableCursorShadow, value, "DisableCursorShadow"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.DisableCursorShadow)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionDisableCursorShadow)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool DisableCursorBlinking - { - get => GetPropertyValue("DisableCursorBlinking", _disableCursorBlinking); - set => SetField(ref _disableCursorBlinking, value, "DisableCursorBlinking"); - } - #endregion - - #region Redirect - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RedirectKeys)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectKeys)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool RedirectKeys - { - get => GetPropertyValue("RedirectKeys", _redirectKeys); - set => SetField(ref _redirectKeys, value, "RedirectKeys"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.DiskDrives)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectDrives)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool RedirectDiskDrives - { - get => GetPropertyValue("RedirectDiskDrives", _redirectDiskDrives); - set => SetField(ref _redirectDiskDrives, value, "RedirectDiskDrives"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Printers)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectPrinters)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool RedirectPrinters - { - get => GetPropertyValue("RedirectPrinters", _redirectPrinters); - set => SetField(ref _redirectPrinters, value, "RedirectPrinters"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Clipboard)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectClipboard)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool RedirectClipboard - { - get => GetPropertyValue("RedirectClipboard", _redirectClipboard); - set => SetField(ref _redirectClipboard, value, "RedirectClipboard"); - } - - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Ports)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectPorts)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool RedirectPorts - { - get => GetPropertyValue("RedirectPorts", _redirectPorts); - set => SetField(ref _redirectPorts, value, "RedirectPorts"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.SmartCard)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectSmartCards)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool RedirectSmartCards - { - get => GetPropertyValue("RedirectSmartCards", _redirectSmartCards); - set => SetField(ref _redirectSmartCards, value, "RedirectSmartCards"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Sounds)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectSounds)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public RDPSounds RedirectSound - { - get => GetPropertyValue("RedirectSound", _redirectSound); - set => SetField(ref _redirectSound, value, "RedirectSound"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.SoundQuality)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionSoundQuality)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public RDPSoundQuality SoundQuality - { - get => GetPropertyValue("SoundQuality", _soundQuality); - set => SetField(ref _soundQuality, value, "SoundQuality"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 6), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.AudioCapture)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRedirectAudioCapture)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public bool RedirectAudioCapture - { - get => GetPropertyValue("RedirectAudioCapture", _redirectAudioCapture); - set => SetField(ref _redirectAudioCapture, value, nameof(RedirectAudioCapture)); - } - - #endregion - - #region Misc - - [Browsable(false)] public string ConstantID { get; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalToolBefore)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalToolBefore)), - TypeConverter(typeof(ExternalToolsTypeConverter))] - public virtual string PreExtApp - { - get => GetPropertyValue("PreExtApp", _preExtApp); - set => SetField(ref _preExtApp, value, "PreExtApp"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalToolAfter)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalToolAfter)), - TypeConverter(typeof(ExternalToolsTypeConverter))] - public virtual string PostExtApp - { - get => GetPropertyValue("PostExtApp", _postExtApp); - set => SetField(ref _postExtApp, value, "PostExtApp"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.MacAddress)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionMACAddress))] - public virtual string MacAddress - { - get => GetPropertyValue("MacAddress", _macAddress); - set => SetField(ref _macAddress, value, "MacAddress"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.UserField)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUser1))] - public virtual string UserField - { - get => GetPropertyValue("UserField", _userField); - set => SetField(ref _userField, value, "UserField"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Favorite)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionFavorite)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public virtual bool Favorite - { - get => GetPropertyValue("Favorite", _favorite); - set => SetField(ref _favorite, value, "Favorite"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RDPStartProgram)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDPStartProgram)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public virtual string RDPStartProgram - { - get => GetPropertyValue("RDPStartProgram", _RDPStartProgram); - set => SetField(ref _RDPStartProgram, value, "RDPStartProgram"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.RDPStartProgramWorkDir)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDPStartProgramWorkDir)), - AttributeUsedInProtocol(ProtocolType.RDP)] - public virtual string RDPStartProgramWorkDir - { - get => GetPropertyValue("RDPStartProgramWorkDir", _RDPStartProgramWorkDir); - set => SetField(ref _RDPStartProgramWorkDir, value, "RDPStartProgramWorkDir"); - } - - #endregion - - #region VNC - // TODO: it seems all these VNC properties were added and serialized but - // never hooked up to the VNC protocol or shown to the user - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Compression)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionCompression)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public ProtocolVNC.Compression VNCCompression - { - get => GetPropertyValue("VNCCompression", _vncCompression); - set => SetField(ref _vncCompression, value, "VNCCompression"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Encoding)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionEncoding)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public ProtocolVNC.Encoding VNCEncoding - { - get => GetPropertyValue("VNCEncoding", _vncEncoding); - set => SetField(ref _vncEncoding, value, "VNCEncoding"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.AuthenticationMode)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionAuthenticationMode)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public ProtocolVNC.AuthMode VNCAuthMode - { - get => GetPropertyValue("VNCAuthMode", _vncAuthMode); - set => SetField(ref _vncAuthMode, value, "VNCAuthMode"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ProxyType)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionVNCProxyType)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public ProtocolVNC.ProxyType VNCProxyType - { - get => GetPropertyValue("VNCProxyType", _vncProxyType); - set => SetField(ref _vncProxyType, value, "VNCProxyType"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ProxyAddress)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionVNCProxyAddress)), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public string VNCProxyIP - { - get => GetPropertyValue("VNCProxyIP", _vncProxyIp); - set => SetField(ref _vncProxyIp, value, "VNCProxyIP"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ProxyPort)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionVNCProxyPort)), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public int VNCProxyPort - { - get => GetPropertyValue("VNCProxyPort", _vncProxyPort); - set => SetField(ref _vncProxyPort, value, "VNCProxyPort"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ProxyUsername)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionVNCProxyUsername)), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public string VNCProxyUsername - { - get => GetPropertyValue("VNCProxyUsername", _vncProxyUsername); - set => SetField(ref _vncProxyUsername, value, "VNCProxyUsername"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 7), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ProxyPassword)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionVNCProxyPassword)), - PasswordPropertyText(true), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public string VNCProxyPassword - { - get => GetPropertyValue("VNCProxyPassword", _vncProxyPassword); - set => SetField(ref _vncProxyPassword, value, "VNCProxyPassword"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Colors)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionColors)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.VNC), - Browsable(false)] - public ProtocolVNC.Colors VNCColors - { - get => GetPropertyValue("VNCColors", _vncColors); - set => SetField(ref _vncColors, value, "VNCColors"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.SmartSizeMode)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionSmartSizeMode)), - TypeConverter(typeof(MiscTools.EnumTypeConverter)), - AttributeUsedInProtocol(ProtocolType.VNC)] - public ProtocolVNC.SmartSizeMode VNCSmartSizeMode - { - get => GetPropertyValue("VNCSmartSizeMode", _vncSmartSizeMode); - set => SetField(ref _vncSmartSizeMode, value, "VNCSmartSizeMode"); - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 5), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.ViewOnly)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionViewOnly)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter)), - AttributeUsedInProtocol(ProtocolType.VNC)] - public bool VNCViewOnly - { - get => GetPropertyValue("VNCViewOnly", _vncViewOnly); - set => SetField(ref _vncViewOnly, value, "VNCViewOnly"); - } - - #endregion - - #endregion - - protected AbstractConnectionRecord(string uniqueId) - { - ConstantID = uniqueId.ThrowIfNullOrEmpty(nameof(uniqueId)); - } - - protected virtual TPropertyType GetPropertyValue(string propertyName, TPropertyType value) - { - return (TPropertyType)GetType().GetProperty(propertyName)?.GetValue(this, null); - } - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChangedEvent(object sender, PropertyChangedEventArgs args) - { - PropertyChanged?.Invoke(sender, new PropertyChangedEventArgs(args.PropertyName)); - } - - protected void SetField(ref T field, T value, string propertyName = null) - { - if (EqualityComparer.Default.Equals(field, value)) return; - field = value; - RaisePropertyChangedEvent(this, new PropertyChangedEventArgs(propertyName)); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/ConnectionIcon.cs b/mRemoteNG/Connection/ConnectionIcon.cs deleted file mode 100644 index 60bae3c18..000000000 --- a/mRemoteNG/Connection/ConnectionIcon.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.ComponentModel; -using mRemoteNG.App; -using mRemoteNG.App.Info; - - -namespace mRemoteNG.Connection -{ - public class ConnectionIcon : StringConverter - { - public static string[] Icons = { }; - - public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) - { - return new StandardValuesCollection(Icons); - } - - public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) - { - return true; - } - - public override bool GetStandardValuesSupported(ITypeDescriptorContext context) - { - return true; - } - - public static System.Drawing.Icon FromString(string iconName) - { - try - { - var iconPath = $"{GeneralAppInfo.HomePath}\\Icons\\{iconName}.ico"; - - if (System.IO.File.Exists(iconPath)) - { - var nI = new System.Drawing.Icon(iconPath); - return nI; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - $"Couldn\'t get Icon from String" + Environment.NewLine + - ex.Message); - } - - return null; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/ConnectionInfo.cs b/mRemoteNG/Connection/ConnectionInfo.cs deleted file mode 100644 index 0fee759db..000000000 --- a/mRemoteNG/Connection/ConnectionInfo.cs +++ /dev/null @@ -1,405 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Reflection; -using mRemoteNG.App; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.PowerShell; -using mRemoteNG.Connection.Protocol.RAW; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.Rlogin; -using mRemoteNG.Connection.Protocol.SSH; -using mRemoteNG.Connection.Protocol.Telnet; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Container; -using mRemoteNG.Properties; -using mRemoteNG.Tree; -using mRemoteNG.Resources.Language; -using mRemoteNG.Tree.Root; - - -namespace mRemoteNG.Connection -{ - [DefaultProperty("Name")] - public class ConnectionInfo : AbstractConnectionRecord, IHasParent, IInheritable - { - private ConnectionInfoInheritance _inheritance; - - #region Public Properties - - [Browsable(false)] - public ConnectionInfoInheritance Inheritance - { - get => _inheritance; - set => _inheritance = _inheritance.Parent != this - ? _inheritance.Clone(this) - : value; - } - - [Browsable(false)] public ProtocolList OpenConnections { get; protected set; } - - [Browsable(false)] public virtual bool IsContainer { get; set; } - - [Browsable(false)] public bool IsDefault { get; set; } - - [Browsable(false)] public ContainerInfo Parent { get; internal set; } - - [Browsable(false)] - public bool IsQuickConnect { get; set; } - - [Browsable(false)] - public bool PleaseConnect { get; set; } - - #endregion - - #region Constructors - - public ConnectionInfo() - : this(Guid.NewGuid().ToString()) - { - } - - public ConnectionInfo(string uniqueId) - : base(uniqueId) - { - SetTreeDisplayDefaults(); - SetConnectionDefaults(); - SetProtocolDefaults(); - SetRemoteDesktopServicesDefaults(); - SetRdGatewayDefaults(); - SetAppearanceDefaults(); - SetRedirectDefaults(); - SetMiscDefaults(); - SetVncDefaults(); - SetNonBrowsablePropertiesDefaults(); - SetDefaults(); - } - - #endregion - - #region Public Methods - - public virtual ConnectionInfo Clone() - { - var newConnectionInfo = new ConnectionInfo(); - newConnectionInfo.CopyFrom(this); - return newConnectionInfo; - } - - /// - /// Copies all connection and inheritance values - /// from the given . - /// - /// - public void CopyFrom(ConnectionInfo sourceConnectionInfo) - { - var properties = GetType().BaseType?.GetProperties().Where(prop => prop.CanRead && prop.CanWrite); - if (properties == null) return; - foreach (var property in properties) - { - if (property.Name == nameof(Parent)) continue; - var remotePropertyValue = property.GetValue(sourceConnectionInfo, null); - property.SetValue(this, remotePropertyValue, null); - } - - var clonedInheritance = sourceConnectionInfo.Inheritance.Clone(this); - Inheritance = clonedInheritance; - } - - public virtual TreeNodeType GetTreeNodeType() - { - return TreeNodeType.Connection; - } - - private void SetDefaults() - { - if (Port == 0) - { - SetDefaultPort(); - } - } - - public int GetDefaultPort() - { - return GetDefaultPort(Protocol); - } - - public void SetDefaultPort() - { - Port = GetDefaultPort(); - } - - protected virtual IEnumerable GetProperties(string[] excludedPropertyNames) - { - var properties = typeof(ConnectionInfo).GetProperties(); - var filteredProperties = properties.Where((prop) => !excludedPropertyNames.Contains(prop.Name)); - return filteredProperties; - } - - public virtual IEnumerable GetSerializableProperties() - { - var excludedProperties = new[] - { - "Parent", "Name", "Hostname", "Port", "Inheritance", "OpenConnections", - "IsContainer", "IsDefault", "PositionID", "ConstantID", "TreeNode", "IsQuickConnect", "PleaseConnect" - }; - - return GetProperties(excludedProperties); - } - - public virtual void SetParent(ContainerInfo newParent) - { - RemoveParent(); - newParent?.AddChild(this); - } - - public void RemoveParent() - { - Parent?.RemoveChild(this); - } - - public ConnectionInfo GetRootParent() - { - return Parent != null ? Parent.GetRootParent() : this; - } - - #endregion - - #region Public Enumerations - - [Flags()] - public enum Force - { - None = 0, - UseConsoleSession = 1, - Fullscreen = 2, - DoNotJump = 4, - OverridePanel = 8, - DontUseConsoleSession = 16, - NoCredentials = 32, - ViewOnly = 64 - } - - #endregion - - #region Private Methods - - protected override TPropertyType GetPropertyValue(string propertyName, TPropertyType value) - { - if (!ShouldThisPropertyBeInherited(propertyName)) - return value; - - var couldGetInheritedValue = - TryGetInheritedPropertyValue(propertyName, out var inheritedValue); - - return couldGetInheritedValue - ? inheritedValue - : value; - } - - private bool ShouldThisPropertyBeInherited(string propertyName) - { - return - Inheritance.InheritanceActive && - ParentIsValidInheritanceTarget() && - IsInheritanceTurnedOnForThisProperty(propertyName); - } - - private bool ParentIsValidInheritanceTarget() - { - return Parent != null; - } - - private bool IsInheritanceTurnedOnForThisProperty(string propertyName) - { - var inheritType = Inheritance.GetType(); - var inheritPropertyInfo = inheritType.GetProperty(propertyName); - var inheritPropertyValue = inheritPropertyInfo != null && - Convert.ToBoolean(inheritPropertyInfo.GetValue(Inheritance, null)); - return inheritPropertyValue; - } - - private bool TryGetInheritedPropertyValue(string propertyName, out TPropertyType inheritedValue) - { - try - { - var connectionInfoType = Parent.GetType(); - var parentPropertyInfo = connectionInfoType.GetProperty(propertyName); - if (parentPropertyInfo == null) - throw new NullReferenceException( - $"Could not retrieve property data for property '{propertyName}' on parent node '{Parent?.Name}'" - ); - - inheritedValue = (TPropertyType)parentPropertyInfo.GetValue(Parent, null); - return true; - } - catch (Exception e) - { - Runtime.MessageCollector.AddExceptionStackTrace( - $"Error retrieving inherited property '{propertyName}'", e - ); - inheritedValue = default(TPropertyType); - return false; - } - } - - private static int GetDefaultPort(ProtocolType protocol) - { - try - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (protocol) - { - case ProtocolType.RDP: - return (int)RdpProtocol6.Defaults.Port; - case ProtocolType.VNC: - return (int)ProtocolVNC.Defaults.Port; - case ProtocolType.SSH1: - return (int)ProtocolSSH1.Defaults.Port; - case ProtocolType.SSH2: - return (int)ProtocolSSH2.Defaults.Port; - case ProtocolType.Telnet: - return (int)ProtocolTelnet.Defaults.Port; - case ProtocolType.Rlogin: - return (int)ProtocolRlogin.Defaults.Port; - case ProtocolType.RAW: - return (int)RawProtocol.Defaults.Port; - case ProtocolType.HTTP: - return (int)ProtocolHTTP.Defaults.Port; - case ProtocolType.HTTPS: - return (int)ProtocolHTTPS.Defaults.Port; - case ProtocolType.PowerShell: - return (int)ProtocolPowerShell.Defaults.Port; - case ProtocolType.IntApp: - return (int)IntegratedProgram.Defaults.Port; - } - - return 0; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.ConnectionSetDefaultPortFailed, ex); - return 0; - } - } - - private void SetTreeDisplayDefaults() - { - Name = Language.NewConnection; - Description = Settings.Default.ConDefaultDescription; - Icon = Settings.Default.ConDefaultIcon; - Panel = Language.General; - } - - private void SetConnectionDefaults() - { - Hostname = string.Empty; - EC2Region = Settings.Default.ConDefaultEC2Region; - } - - private void SetProtocolDefaults() - { - Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), Settings.Default.ConDefaultProtocol); - ExtApp = Settings.Default.ConDefaultExtApp; - Port = 0; - PuttySession = Settings.Default.ConDefaultPuttySession; - UseConsoleSession = Settings.Default.ConDefaultUseConsoleSession; - RDPAuthenticationLevel = (AuthenticationLevel)Enum.Parse(typeof(AuthenticationLevel), Settings.Default.ConDefaultRDPAuthenticationLevel); - RDPMinutesToIdleTimeout = Settings.Default.ConDefaultRDPMinutesToIdleTimeout; - RDPAlertIdleTimeout = Settings.Default.ConDefaultRDPAlertIdleTimeout; - LoadBalanceInfo = Settings.Default.ConDefaultLoadBalanceInfo; - RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine), Settings.Default.ConDefaultRenderingEngine); - UseCredSsp = Settings.Default.ConDefaultUseCredSsp; - UseVmId = Settings.Default.ConDefaultUseVmId; - UseEnhancedMode = Settings.Default.ConDefaultUseEnhancedMode; - } - - private void SetRemoteDesktopServicesDefaults() - { - RDPStartProgram = string.Empty; - RDPStartProgramWorkDir = string.Empty; - } - - private void SetRdGatewayDefaults() - { - RDGatewayUsageMethod = (RDGatewayUsageMethod)Enum.Parse(typeof(RDGatewayUsageMethod), Settings.Default.ConDefaultRDGatewayUsageMethod); - RDGatewayHostname = Settings.Default.ConDefaultRDGatewayHostname; - RDGatewayUseConnectionCredentials = (RDGatewayUseConnectionCredentials)Enum.Parse(typeof(RDGatewayUseConnectionCredentials), Settings.Default.ConDefaultRDGatewayUseConnectionCredentials); - RDGatewayUsername = Settings.Default.ConDefaultRDGatewayUsername; - RDGatewayPassword = Settings.Default.ConDefaultRDGatewayPassword; - RDGatewayDomain = Settings.Default.ConDefaultRDGatewayDomain; - } - - private void SetAppearanceDefaults() - { - Resolution = (RDPResolutions)Enum.Parse(typeof(RDPResolutions), Settings.Default.ConDefaultResolution); - AutomaticResize = Settings.Default.ConDefaultAutomaticResize; - Colors = (RDPColors)Enum.Parse(typeof(RDPColors), Settings.Default.ConDefaultColors); - CacheBitmaps = Settings.Default.ConDefaultCacheBitmaps; - DisplayWallpaper = Settings.Default.ConDefaultDisplayWallpaper; - DisplayThemes = Settings.Default.ConDefaultDisplayThemes; - EnableFontSmoothing = Settings.Default.ConDefaultEnableFontSmoothing; - EnableDesktopComposition = Settings.Default.ConDefaultEnableDesktopComposition; - DisableFullWindowDrag = Settings.Default.ConDefaultDisableFullWindowDrag; - DisableMenuAnimations = Settings.Default.ConDefaultDisableMenuAnimations; - DisableCursorShadow = Settings.Default.ConDefaultDisableCursorShadow; - DisableCursorBlinking = Settings.Default.ConDefaultDisableCursorBlinking; - } - - private void SetRedirectDefaults() - { - RedirectKeys = Settings.Default.ConDefaultRedirectKeys; - RedirectDiskDrives = Settings.Default.ConDefaultRedirectDiskDrives; - RedirectPrinters = Settings.Default.ConDefaultRedirectPrinters; - RedirectClipboard = Settings.Default.ConDefaultRedirectClipboard; - RedirectPorts = Settings.Default.ConDefaultRedirectPorts; - RedirectSmartCards = Settings.Default.ConDefaultRedirectSmartCards; - RedirectAudioCapture = Settings.Default.ConDefaultRedirectAudioCapture; - RedirectSound = (RDPSounds)Enum.Parse(typeof(RDPSounds), Settings.Default.ConDefaultRedirectSound); - SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality), Settings.Default.ConDefaultSoundQuality); - } - - private void SetMiscDefaults() - { - PreExtApp = Settings.Default.ConDefaultPreExtApp; - PostExtApp = Settings.Default.ConDefaultPostExtApp; - MacAddress = Settings.Default.ConDefaultMacAddress; - UserField = Settings.Default.ConDefaultUserField; - Favorite = Settings.Default.ConDefaultFavorite; - RDPStartProgram = Settings.Default.ConDefaultRDPStartProgram; - RDPStartProgramWorkDir = Settings.Default.ConDefaultRDPStartProgramWorkDir; - OpeningCommand = Settings.Default.OpeningCommand; - } - - private void SetVncDefaults() - { - VNCCompression = (ProtocolVNC.Compression)Enum.Parse(typeof(ProtocolVNC.Compression), Settings.Default.ConDefaultVNCCompression); - VNCEncoding = (ProtocolVNC.Encoding)Enum.Parse(typeof(ProtocolVNC.Encoding), Settings.Default.ConDefaultVNCEncoding); - VNCAuthMode = (ProtocolVNC.AuthMode)Enum.Parse(typeof(ProtocolVNC.AuthMode), Settings.Default.ConDefaultVNCAuthMode); - VNCProxyType = (ProtocolVNC.ProxyType)Enum.Parse(typeof(ProtocolVNC.ProxyType), Settings.Default.ConDefaultVNCProxyType); - VNCProxyIP = Settings.Default.ConDefaultVNCProxyIP; - VNCProxyPort = Settings.Default.ConDefaultVNCProxyPort; - VNCProxyUsername = Settings.Default.ConDefaultVNCProxyUsername; - VNCProxyPassword = Settings.Default.ConDefaultVNCProxyPassword; - VNCColors = (ProtocolVNC.Colors)Enum.Parse(typeof(ProtocolVNC.Colors), Settings.Default.ConDefaultVNCColors); - VNCSmartSizeMode = (ProtocolVNC.SmartSizeMode)Enum.Parse(typeof(ProtocolVNC.SmartSizeMode), Settings.Default.ConDefaultVNCSmartSizeMode); - VNCViewOnly = Settings.Default.ConDefaultVNCViewOnly; - } - - private void SetNonBrowsablePropertiesDefaults() - { - _inheritance = new ConnectionInfoInheritance(this); - SetNewOpenConnectionList(); - } - - private void SetNewOpenConnectionList() - { - OpenConnections = new ProtocolList(); - OpenConnections.CollectionChanged += (sender, args) => RaisePropertyChangedEvent(this, new PropertyChangedEventArgs("OpenConnections")); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/ConnectionInfoComparer.cs b/mRemoteNG/Connection/ConnectionInfoComparer.cs deleted file mode 100644 index 0783c2b1a..000000000 --- a/mRemoteNG/Connection/ConnectionInfoComparer.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; - - -namespace mRemoteNG.Connection -{ - public class ConnectionInfoComparer : IComparer where TProperty : IComparable - { - private readonly Func _sortExpression; - public ListSortDirection SortDirection { get; set; } = ListSortDirection.Ascending; - - public ConnectionInfoComparer(Func sortExpression) - { - _sortExpression = sortExpression; - } - - public int Compare(ConnectionInfo x, ConnectionInfo y) - { - return SortDirection == ListSortDirection.Ascending ? CompareAscending(x, y) : CompareDescending(x, y); - } - - private int CompareAscending(ConnectionInfo x, ConnectionInfo y) - { - return _sortExpression(x).CompareTo(_sortExpression(y)); - } - - private int CompareDescending(ConnectionInfo x, ConnectionInfo y) - { - return _sortExpression(y).CompareTo(_sortExpression(x)); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/ConnectionInfoInheritance.cs b/mRemoteNG/Connection/ConnectionInfoInheritance.cs deleted file mode 100644 index 05ccdd989..000000000 --- a/mRemoteNG/Connection/ConnectionInfoInheritance.cs +++ /dev/null @@ -1,588 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Reflection; -using mRemoteNG.Tools; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection -{ - public class ConnectionInfoInheritance - { - private ConnectionInfoInheritance _tempInheritanceStorage; - - #region Public Properties - - #region General - - [LocalizedAttributes.LocalizedCategory(nameof(Language.General)), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.All)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionAll)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool EverythingInherited - { - get => EverythingIsInherited(); - set => SetAllValues(value); - } - - #endregion - - #region Display - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Display), 2), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Description)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionDescription)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool Description { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Display), 2), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Icon)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionIcon)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool Icon { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Display), 2), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Panel)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionPanel)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool Panel { get; set; } - - #endregion - - #region Connection - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UserViaAPI)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUserViaAPI)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - [Browsable(true)] - public bool UserViaAPI { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Username)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUsername)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - [Browsable(true)] - public bool Username { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.VmId)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionVmId)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - [Browsable(true)] - public bool VmId { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Password)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionPassword)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - [Browsable(true)] - public bool Password { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Domain)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionDomain)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - [Browsable(true)] - public bool Domain { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Port)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionPort)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool Port { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3), - LocalizedAttributes.LocalizedDisplayNameInheritAttribute(nameof(Language.SshTunnel)), - LocalizedAttributes.LocalizedDescriptionInheritAttribute(nameof(Language.PropertyDescriptionSshTunnel)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - [Browsable(true)] - public bool SSHTunnelConnectionName { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3), - LocalizedAttributes.LocalizedDisplayNameInheritAttribute(nameof(Language.OpeningCommand)), - LocalizedAttributes.LocalizedDescriptionInheritAttribute(nameof(Language.PropertyDescriptionOpeningCommand)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - [Browsable(true)] - public bool OpeningCommand { get; set; } - - - - #endregion - - #region Protocol - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Protocol)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionProtocol)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool Protocol { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpVersion)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRdpVersion)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RdpVersion { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ExternalTool)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionExternalTool)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool ExtApp { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.PuttySession)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionPuttySession)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool PuttySession { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.SshOptions)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionSshOptions)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool SSHOptions { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.AuthenticationLevel)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionAuthenticationLevel)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDPAuthenticationLevel { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.MinutesToIdleTimeout)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDPMinutesToIdleTimeout)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDPMinutesToIdleTimeout { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.MinutesToIdleTimeout)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDPAlertIdleTimeout)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDPAlertIdleTimeout { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.LoadBalanceInfo)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionLoadBalanceInfo)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool LoadBalanceInfo { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RenderingEngine)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRenderingEngine)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RenderingEngine { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UseConsoleSession)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUseConsoleSession)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool UseConsoleSession { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UseCredSsp)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUseCredSsp)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool UseCredSsp { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UseVmId)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUseVmId)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool UseVmId { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UseEnhancedMode)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUseEnhancedMode)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool UseEnhancedMode { get; set; } - - #endregion - - #region RD Gateway - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUsageMethod)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRdpGatewayUsageMethod)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDGatewayUsageMethod { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayHostname)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayHostname)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDGatewayHostname { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUseConnectionCredentials)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayUseConnectionCredentials)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDGatewayUseConnectionCredentials { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUsername)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayUsername)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDGatewayUsername { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayPassword)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRdpGatewayPassword)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDGatewayPassword { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayDomain)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayDomain)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RDGatewayDomain { get; set; } - - #endregion - - #region Appearance - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Resolution)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionResolution)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool Resolution { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.AutomaticResize)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionAutomaticResize)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool AutomaticResize { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Colors)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionColors)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool Colors { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.CacheBitmaps)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionCacheBitmaps)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool CacheBitmaps { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.DisplayWallpaper)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionDisplayWallpaper)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool DisplayWallpaper { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.DisplayThemes)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionDisplayThemes)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool DisplayThemes { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.FontSmoothing)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionEnableFontSmoothing)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool EnableFontSmoothing { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.EnableDesktopComposition)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionEnableDesktopComposition)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool EnableDesktopComposition { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.DisableFullWindowDrag)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionDisableFullWindowDrag)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool DisableFullWindowDrag { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.DisableMenuAnimations)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionDisableMenuAnimations)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool DisableMenuAnimations { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.DisableCursorShadow)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionDisableCursorShadow)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool DisableCursorShadow { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 6), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.DisableCursorBlinking)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionDisableCursorBlinking)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool DisableCursorBlinking { get; set; } - - #endregion - - #region Redirect - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RedirectKeys)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRedirectKeys)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RedirectKeys { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.DiskDrives)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRedirectDrives)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RedirectDiskDrives { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Printers)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRedirectPrinters)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RedirectPrinters { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Clipboard)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRedirectClipboard)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RedirectClipboard { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Redirect)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRedirectPorts)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RedirectPorts { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Redirect)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRedirectSmartCards)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RedirectSmartCards { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Sounds)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRedirectSounds)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RedirectSound { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.SoundQuality)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionSoundQuality)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool SoundQuality { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Redirect), 7), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.AudioCapture)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRedirectAudioCapture)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool RedirectAudioCapture { get; set; } - - #endregion - - #region Misc - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 8), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ExternalToolBefore)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionExternalToolBefore)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool PreExtApp { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 8), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ExternalToolAfter)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionExternalToolAfter)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool PostExtApp { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 8), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.MacAddress)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionMACAddress)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool MacAddress { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 8), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UserField)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUser1)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool UserField { get; set; } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous), 8), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Favorite)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionFavorite)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public bool Favorite { get; set; } - #endregion - - #region VNC - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Compression)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionCompression)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCCompression {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Encoding)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionEncoding)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCEncoding {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.AuthenticationMode)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionAuthenticationMode)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCAuthMode {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ProxyType)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionVNCProxyType)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyType {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ProxyAddress)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionVNCProxyAddress)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyIP {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ProxyPort)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionVNCProxyPort)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyPort {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ProxyUsername)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionVNCProxyUsername)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyUsername {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Proxy), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ProxyPassword)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionVNCProxyPassword)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyPassword {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.Colors)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionColors)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCColors {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.SmartSizeMode)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionSmartSizeMode)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCSmartSizeMode {get; set;} - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Appearance), 9), - LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ViewOnly)), - LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionViewOnly)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCViewOnly {get; set;} - #endregion - - [Browsable(false)] - public ConnectionInfo Parent { get; private set; } - - /// - /// Indicates whether this inheritance object is enabled. - /// When false, users of this object should not respect inheritance - /// settings for individual properties. - /// - [Browsable(false)] - public bool InheritanceActive => !(Parent is RootNodeInfo || Parent?.Parent is RootNodeInfo); - - #endregion - - - public ConnectionInfoInheritance(ConnectionInfo parent, bool ignoreDefaultInheritance = false) - { - Parent = parent; - if (!ignoreDefaultInheritance) - SetAllValues(DefaultConnectionInheritance.Instance); - } - - - public ConnectionInfoInheritance Clone(ConnectionInfo parent) - { - var newInheritance = (ConnectionInfoInheritance)MemberwiseClone(); - newInheritance.Parent = parent; - return newInheritance; - } - - public void EnableInheritance() - { - if (_tempInheritanceStorage != null) - UnstashInheritanceData(); - } - - private void UnstashInheritanceData() - { - SetAllValues(_tempInheritanceStorage); - _tempInheritanceStorage = null; - } - - public void DisableInheritance() - { - StashInheritanceData(); - TurnOffInheritanceCompletely(); - } - - private void StashInheritanceData() - { - _tempInheritanceStorage = Clone(Parent); - } - - public void TurnOnInheritanceCompletely() - { - SetAllValues(true); - } - - public void TurnOffInheritanceCompletely() - { - SetAllValues(false); - } - - private bool EverythingIsInherited() - { - var inheritanceProperties = GetProperties(); - var everythingInherited = inheritanceProperties.All((p) => (bool)p.GetValue(this, null)); - return everythingInherited; - } - - public IEnumerable GetProperties() - { - var properties = typeof(ConnectionInfoInheritance).GetProperties(); - var filteredProperties = properties.Where(FilterProperty); - return filteredProperties; - } - - /// - /// Gets the name of all properties where inheritance is turned on - /// (set to True). - /// - /// - public IEnumerable GetEnabledInheritanceProperties() - { - return InheritanceActive - ? GetProperties() - .Where(property => (bool)property.GetValue(this)) - .Select(property => property.Name) - .ToList() - : Enumerable.Empty(); - } - - private bool FilterProperty(PropertyInfo propertyInfo) - { - var exclusions = new[] - { - nameof(EverythingInherited), - nameof(Parent), - nameof(InheritanceActive) - }; - var valueShouldNotBeFiltered = !exclusions.Contains(propertyInfo.Name); - return valueShouldNotBeFiltered; - } - - private void SetAllValues(bool value) - { - var properties = GetProperties(); - foreach (var property in properties) - { - if (property.PropertyType.Name == typeof(bool).Name) - property.SetValue(this, value, null); - } - } - - private void SetAllValues(ConnectionInfoInheritance otherInheritanceObject) - { - var properties = GetProperties(); - foreach (var property in properties) - { - var newPropertyValue = property.GetValue(otherInheritanceObject, null); - property.SetValue(this, newPropertyValue, null); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/ConnectionInitiator.cs b/mRemoteNG/Connection/ConnectionInitiator.cs deleted file mode 100644 index da0b81452..000000000 --- a/mRemoteNG/Connection/ConnectionInitiator.cs +++ /dev/null @@ -1,467 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Panels; -using mRemoteNG.UI.Tabs; -using mRemoteNG.UI.Window; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Connection -{ - public class ConnectionInitiator : IConnectionInitiator - { - private readonly PanelAdder _panelAdder = new PanelAdder(); - private readonly List _activeConnections = new List(); - - public IEnumerable ActiveConnections => _activeConnections; - - public bool SwitchToOpenConnection(ConnectionInfo connectionInfo) - { - var interfaceControl = FindConnectionContainer(connectionInfo); - if (interfaceControl == null) return false; - var connT = (ConnectionTab)interfaceControl.FindForm(); - connT?.Focus(); - var findForm = (ConnectionTab)interfaceControl.FindForm(); - findForm?.Show(findForm.DockPanel); - return true; - } - - public void OpenConnection( - ContainerInfo containerInfo, - ConnectionInfo.Force force = ConnectionInfo.Force.None, - ConnectionWindow conForm = null) - { - if (containerInfo == null || containerInfo.Children.Count == 0) - return; - - foreach (var child in containerInfo.Children) - { - if (child is ContainerInfo childAsContainer) - OpenConnection(childAsContainer, force, conForm); - else - OpenConnection(child, force, conForm); - } - } - - // async is necessary so UI can update while OpenConnection waits for tunnel connection to get ready in case of connection through SSH tunnel - public async void OpenConnection( - ConnectionInfo connectionInfo, - ConnectionInfo.Force force = ConnectionInfo.Force.None, - ConnectionWindow conForm = null) - { - if (connectionInfo == null) - return; - - try - { - if (!string.IsNullOrEmpty(connectionInfo.EC2InstanceId)) - { - try - { - string host = await ExternalConnectors.AWS.EC2FetchDataService.GetEC2InstanceDataAsync("AWSAPI:" + connectionInfo.EC2InstanceId, connectionInfo.EC2Region); - if (!string.IsNullOrEmpty(host)) - connectionInfo.Hostname = host; - } - catch - { - } - } - - if (connectionInfo.Hostname == "" && connectionInfo.Protocol != ProtocolType.IntApp) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - Language.ConnectionOpenFailedNoHostname); - return; - } - - StartPreConnectionExternalApp(connectionInfo); - - if (!force.HasFlag(ConnectionInfo.Force.DoNotJump)) - { - if (SwitchToOpenConnection(connectionInfo)) - return; - } - - var protocolFactory = new ProtocolFactory(); - var connectionPanel = SetConnectionPanel(connectionInfo, force); - if (string.IsNullOrEmpty(connectionPanel)) return; - var connectionForm = SetConnectionForm(conForm, connectionPanel); - Control connectionContainer = null; - - // Handle connection through SSH tunnel: - // in case of connection through SSH tunnel, connectionInfo gets cloned, so that modification of its name, hostname and port do not modify the original connection info - // connectionInfoOriginal points to the original connection info in either case, for where its needed later on. - var connectionInfoOriginal = connectionInfo; - ConnectionInfo connectionInfoSshTunnel = null; // SSH tunnel connection info will be set if SSH tunnel connection is configured, can be found and connected. - if (!string.IsNullOrEmpty(connectionInfoOriginal.SSHTunnelConnectionName)) - { - // Find the connection info specified as SSH tunnel in the connections tree - connectionInfoSshTunnel = getSSHConnectionInfoByName(Runtime.ConnectionsService.ConnectionTreeModel.RootNodes, connectionInfoOriginal.SSHTunnelConnectionName); - if (connectionInfoSshTunnel == null) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - string.Format(Language.SshTunnelConfigProblem, connectionInfoOriginal.Name, connectionInfoOriginal.SSHTunnelConnectionName)); - return; - } - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - $"SSH Tunnel connection '{connectionInfoOriginal.SSHTunnelConnectionName}' configured for '{connectionInfoOriginal.Name}' found. Finding free local port for use as local tunnel port ..."); - // determine a free local port to use as local tunnel port - var l = new System.Net.Sockets.TcpListener(System.Net.IPAddress.Loopback, 0); - l.Start(); - var localSshTunnelPort = ((System.Net.IPEndPoint)l.LocalEndpoint).Port; - l.Stop(); - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - $"{localSshTunnelPort} will be used as local tunnel port. Establishing SSH connection to '{connectionInfoSshTunnel.Hostname}' with additional tunnel options for target connection ..."); - - // clone SSH tunnel connection as tunnel options will be added to it, and those changes shall not be saved to the configuration - connectionInfoSshTunnel = connectionInfoSshTunnel.Clone(); - connectionInfoSshTunnel.SSHOptions += " -L " + localSshTunnelPort + ":" + connectionInfoOriginal.Hostname + ":" + connectionInfoOriginal.Port; - - // clone target connection info as its hostname will be changed to localhost and port to local tunnel port to establish connection through tunnel, and those changes shall not be saved to the configuration - connectionInfo = connectionInfoOriginal.Clone(); - connectionInfo.Name += " via " + connectionInfoSshTunnel.Name; - connectionInfo.Hostname = "localhost"; - connectionInfo.Port = localSshTunnelPort; - - // connect the SSH connection to setup the tunnel - var protocolSshTunnel = protocolFactory.CreateProtocol(connectionInfoSshTunnel); - if (!(protocolSshTunnel is PuttyBase puttyBaseSshTunnel)) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - string.Format(Language.SshTunnelIsNotPutty, connectionInfoOriginal.Name, connectionInfoSshTunnel.Name)); - return; - } - - SetConnectionFormEventHandlers(protocolSshTunnel, connectionForm); - SetConnectionEventHandlers(protocolSshTunnel); - connectionContainer = SetConnectionContainer(connectionInfo, connectionForm); - BuildConnectionInterfaceController(connectionInfoSshTunnel, protocolSshTunnel, connectionContainer); - protocolSshTunnel.InterfaceControl.OriginalInfo = connectionInfoSshTunnel; - - if (protocolSshTunnel.Initialize() == false) - { - protocolSshTunnel.Close(); - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - string.Format(Language.SshTunnelNotInitialized, connectionInfoOriginal.Name, connectionInfoSshTunnel.Name)); - return; - } - - if (protocolSshTunnel.Connect() == false) - { - protocolSshTunnel.Close(); - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - string.Format(Language.SshTunnelNotConnected, connectionInfoOriginal.Name, connectionInfoSshTunnel.Name)); - return; - } - - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - "Putty started for SSH connection for tunnel. Waiting for local tunnel port to become available ..."); - - // wait until SSH tunnel connection is ready, by checking if local port can be connected to, but max 60 sec. - var testsock = new System.Net.Sockets.Socket(System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp); - var stopwatch = System.Diagnostics.Stopwatch.StartNew(); - while (stopwatch.ElapsedMilliseconds < 60000) - { - // confirm that SSH connection is still active - // works only if putty is connfigured to always close window on exit - // else, if connection attempt fails, window remains open and putty process remains running, and we cannot know that connection is already doomed - // in this case the timeout will expire and the log message below will be created - // awkward for user as he has already acknowledged the putty popup some seconds again when the below notification comes.... - if (!puttyBaseSshTunnel.isRunning()) - { - protocolSshTunnel.Close(); - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - string.Format(Language.SshTunnelFailed, connectionInfoOriginal.Name, connectionInfoSshTunnel.Name)); - return; - } - - try - { - testsock.Connect(System.Net.IPAddress.Loopback, localSshTunnelPort); - testsock.Close(); - break; - } - catch - { - await System.Threading.Tasks.Task.Delay(1000); - } - } - - if (stopwatch.ElapsedMilliseconds >= 60000) - { - protocolSshTunnel.Close(); - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - string.Format(Language.SshTunnelPortNotReadyInTime, connectionInfoOriginal.Name, connectionInfoSshTunnel.Name)); - return; - } - - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - "Local tunnel port is now available. Hiding putty display and setting up target connection via local tunnel port ..."); - - // hide the display of the SSH tunnel connection which has been shown until this time, such that password can be entered if required or errors be seen - // it stays invisible in the container however which will be reused for the actual connection and such that if the container is closed the SSH tunnel connection is closed as well - protocolSshTunnel.InterfaceControl.Hide(); - } - - var newProtocol = protocolFactory.CreateProtocol(connectionInfo); - SetConnectionFormEventHandlers(newProtocol, connectionForm); - SetConnectionEventHandlers(newProtocol); - // in case of connection through SSH tunnel the container is already defined and must be use, else it needs to be created here - if (connectionContainer == null) connectionContainer = SetConnectionContainer(connectionInfo, connectionForm); - BuildConnectionInterfaceController(connectionInfo, newProtocol, connectionContainer); - // in case of connection through SSH tunnel the connectionInfo was modified but connectionInfoOriginal in all cases retains the original info - // and is stored in interface control for further use - newProtocol.InterfaceControl.OriginalInfo = connectionInfoOriginal; - // SSH tunnel connection is stored in Interface Control to be used in log messages etc - newProtocol.InterfaceControl.SSHTunnelInfo = connectionInfoSshTunnel; - - newProtocol.Force = force; - - if (newProtocol.Initialize() == false) - { - newProtocol.Close(); - return; - } - - if (newProtocol.Connect() == false) - { - newProtocol.Close(); - return; - } - - connectionInfoOriginal.OpenConnections.Add(newProtocol); - _activeConnections.Add(connectionInfo.ConstantID); - FrmMain.Default.SelectedConnection = connectionInfo; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.ConnectionOpenFailed, ex); - } - } - - // recursively traverse the tree to find ConnectionInfo of a specific name - private ConnectionInfo getSSHConnectionInfoByName(IEnumerable rootnodes, string SSHTunnelConnectionName) - { - ConnectionInfo result = null; - foreach (var node in rootnodes) - { - if (node is ContainerInfo container) - { - result = getSSHConnectionInfoByName(container.Children, SSHTunnelConnectionName); - } - else - { - if (node.Name == SSHTunnelConnectionName && (node.Protocol == ProtocolType.SSH1 || node.Protocol == ProtocolType.SSH2)) result = node; - } - if (result != null) break; - } - return result; - } - - #region Private - private static void StartPreConnectionExternalApp(ConnectionInfo connectionInfo) - { - if (connectionInfo.PreExtApp == "") return; - var extA = Runtime.ExternalToolsService.GetExtAppByName(connectionInfo.PreExtApp); - extA?.Start(connectionInfo); - } - - private static InterfaceControl FindConnectionContainer(ConnectionInfo connectionInfo) - { - if (connectionInfo.OpenConnections.Count <= 0) return null; - for (var i = 0; i <= Runtime.WindowList.Count - 1; i++) - { - // the new structure is ConnectionWindow.Controls[0].ActiveDocument.Controls[0] - // DockPanel InterfaceControl - if (!(Runtime.WindowList[i] is ConnectionWindow connectionWindow)) continue; - if (connectionWindow.Controls.Count < 1) continue; - if (!(connectionWindow.Controls[0] is DockPanel cwDp)) continue; - foreach (var dockContent in cwDp.Documents) - { - var tab = (ConnectionTab)dockContent; - var ic = InterfaceControl.FindInterfaceControl(tab); - if (ic == null) continue; - if (ic.Info == connectionInfo || ic.OriginalInfo == connectionInfo) - return ic; - } - } - - return null; - } - - private static string SetConnectionPanel(ConnectionInfo connectionInfo, ConnectionInfo.Force force) - { - if (connectionInfo.Panel != "" && - !force.HasFlag(ConnectionInfo.Force.OverridePanel) && - !Settings.Default.AlwaysShowPanelSelectionDlg) - return connectionInfo.Panel; - - var frmPnl = new FrmChoosePanel(); - return frmPnl.ShowDialog() == DialogResult.OK - ? frmPnl.Panel - : null; - } - - private ConnectionWindow SetConnectionForm(ConnectionWindow conForm, string connectionPanel) - { - var connectionForm = conForm ?? Runtime.WindowList.FromString(connectionPanel) as ConnectionWindow; - - if (connectionForm == null) - connectionForm = _panelAdder.AddPanel(connectionPanel); - else - connectionForm.Show(FrmMain.Default.pnlDock); - - connectionForm.Focus(); - return connectionForm; - } - - private static Control SetConnectionContainer(ConnectionInfo connectionInfo, ConnectionWindow connectionForm) - { - Control connectionContainer = connectionForm.AddConnectionTab(connectionInfo); - - if (connectionInfo.Protocol != ProtocolType.IntApp) return connectionContainer; - - var extT = Runtime.ExternalToolsService.GetExtAppByName(connectionInfo.ExtApp); - - if (extT == null) return connectionContainer; - - if (extT.Icon != null) - ((ConnectionTab)connectionContainer).Icon = extT.Icon; - - return connectionContainer; - } - - private static void SetConnectionFormEventHandlers(ProtocolBase newProtocol, Form connectionForm) - { - newProtocol.Closed += ((ConnectionWindow)connectionForm).Prot_Event_Closed; - } - - private void SetConnectionEventHandlers(ProtocolBase newProtocol) - { - newProtocol.Disconnected += Prot_Event_Disconnected; - newProtocol.Connected += Prot_Event_Connected; - newProtocol.Closed += Prot_Event_Closed; - newProtocol.ErrorOccured += Prot_Event_ErrorOccured; - } - - private static void BuildConnectionInterfaceController(ConnectionInfo connectionInfo, - ProtocolBase newProtocol, - Control connectionContainer) - { - newProtocol.InterfaceControl = new InterfaceControl(connectionContainer, newProtocol, connectionInfo); - } - - #endregion - - #region Event handlers - - private static void Prot_Event_Disconnected(object sender, string disconnectedMessage, int? reasonCode) - { - try - { - var prot = (ProtocolBase)sender; - var msgClass = MessageClass.InformationMsg; - - if (prot.InterfaceControl.Info.Protocol == ProtocolType.RDP) - { - if (reasonCode > 3) - { - msgClass = MessageClass.WarningMsg; - } - } - - var strHostname = prot.InterfaceControl.OriginalInfo.Hostname; - if (prot.InterfaceControl.SSHTunnelInfo != null) - { - strHostname += " via SSH Tunnel " + prot.InterfaceControl.SSHTunnelInfo.Name; - } - Runtime.MessageCollector.AddMessage(msgClass, - string.Format( - Language.ProtocolEventDisconnected, - disconnectedMessage, - strHostname, - prot.InterfaceControl.Info.Protocol.ToString())); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.ProtocolEventDisconnectFailed, ex); - } - } - - private void Prot_Event_Closed(object sender) - { - try - { - var prot = (ProtocolBase)sender; - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.ConnenctionCloseEvent, - true); - string connDetail; - if (prot.InterfaceControl.OriginalInfo.Hostname == "" && - prot.InterfaceControl.Info.Protocol == ProtocolType.IntApp) - connDetail = prot.InterfaceControl.Info.ExtApp; - else if (prot.InterfaceControl.OriginalInfo.Hostname != "") - connDetail = prot.InterfaceControl.OriginalInfo.Hostname; - else - connDetail = "UNKNOWN"; - - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - string.Format(Language.ConnenctionClosedByUser, connDetail, - prot.InterfaceControl.Info.Protocol, - Environment.UserName)); - prot.InterfaceControl.OriginalInfo.OpenConnections.Remove(prot); - if (_activeConnections.Contains(prot.InterfaceControl.Info.ConstantID)) - _activeConnections.Remove(prot.InterfaceControl.Info.ConstantID); - - if (prot.InterfaceControl.Info.PostExtApp == "") return; - var extA = Runtime.ExternalToolsService.GetExtAppByName(prot.InterfaceControl.Info.PostExtApp); - extA?.Start(prot.InterfaceControl.OriginalInfo); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.ConnenctionCloseEventFailed, ex); - } - } - - private static void Prot_Event_Connected(object sender) - { - var prot = (ProtocolBase)sender; - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.ConnectionEventConnected, - true); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - string.Format(Language.ConnectionEventConnectedDetail, - prot.InterfaceControl.OriginalInfo.Hostname, - prot.InterfaceControl.Info.Protocol, Environment.UserName, - prot.InterfaceControl.Info.Description, - prot.InterfaceControl.Info.UserField)); - } - - private static void Prot_Event_ErrorOccured(object sender, string errorMessage, int? errorCode) - { - try - { - var prot = (ProtocolBase)sender; - - var msg = string.Format( - Language.ConnectionEventErrorOccured, - errorMessage, - prot.InterfaceControl.OriginalInfo.Hostname, - errorCode?.ToString() ?? "-"); - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, msg); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.ConnectionFailed, ex); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/ConnectionsService.cs b/mRemoteNG/Connection/ConnectionsService.cs deleted file mode 100644 index 95a19429e..000000000 --- a/mRemoteNG/Connection/ConnectionsService.cs +++ /dev/null @@ -1,395 +0,0 @@ -using System; -using System.IO; -using System.Threading; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config; -using mRemoteNG.Config.Connections; -using mRemoteNG.Config.Connections.Multiuser; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Putty; -using mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.Security; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection -{ - public class ConnectionsService - { - private static readonly object SaveLock = new object(); - private readonly PuttySessionsManager _puttySessionsManager; - private readonly IDataProvider _localConnectionPropertiesDataProvider; - private readonly LocalConnectionPropertiesXmlSerializer _localConnectionPropertiesSerializer; - private bool _batchingSaves = false; - private bool _saveRequested = false; - private bool _saveAsyncRequested = false; - - public bool IsConnectionsFileLoaded { get; set; } - public bool UsingDatabase { get; private set; } - public string ConnectionFileName { get; private set; } - public RemoteConnectionsSyncronizer RemoteConnectionsSyncronizer { get; set; } - public DateTime LastSqlUpdate { get; set; } - public DateTime LastFileUpdate { get; set; } - - public ConnectionTreeModel ConnectionTreeModel { get; private set; } - - public ConnectionsService(PuttySessionsManager puttySessionsManager) - { - if (puttySessionsManager == null) - throw new ArgumentNullException(nameof(puttySessionsManager)); - - _puttySessionsManager = puttySessionsManager; - var path = SettingsFileInfo.SettingsPath; - _localConnectionPropertiesDataProvider = - new FileDataProvider(Path.Combine(path, "LocalConnectionProperties.xml")); - _localConnectionPropertiesSerializer = new LocalConnectionPropertiesXmlSerializer(); - } - - public void NewConnectionsFile(string filename) - { - try - { - filename.ThrowIfNullOrEmpty(nameof(filename)); - var newConnectionsModel = new ConnectionTreeModel(); - newConnectionsModel.AddRootNode(new RootNodeInfo(RootNodeType.Connection)); - SaveConnections(newConnectionsModel, false, new SaveFilter(), filename, true); - LoadConnections(false, false, filename); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.CouldNotCreateNewConnectionsFile, ex); - } - } - - public ConnectionInfo CreateQuickConnect(string connectionString, ProtocolType protocol) - { - try - { - var uriBuilder = new UriBuilder(); - uriBuilder.Scheme = "dummyscheme"; - - if (connectionString.Contains("@")) - { - var x = connectionString.Split('@'); - uriBuilder.UserName = x[0]; - connectionString = x[1]; - } - if (connectionString.Contains(":")) - { - var x = connectionString.Split(':'); - connectionString = x[0]; - uriBuilder.Port = Convert.ToInt32(x[1]); - } - - uriBuilder.Host = connectionString; - - var newConnectionInfo = new ConnectionInfo(); - newConnectionInfo.CopyFrom(DefaultConnectionInfo.Instance); - - newConnectionInfo.Name = Settings.Default.IdentifyQuickConnectTabs - ? string.Format(Language.Quick, uriBuilder.Host) - : uriBuilder.Host; - - newConnectionInfo.Protocol = protocol; - newConnectionInfo.Hostname = uriBuilder.Host; - newConnectionInfo.Username = uriBuilder.UserName; - - if (uriBuilder.Port == -1) - { - newConnectionInfo.SetDefaultPort(); - } - else - { - newConnectionInfo.Port = uriBuilder.Port; - } - - if (string.IsNullOrEmpty(newConnectionInfo.Panel)) - newConnectionInfo.Panel = Language.General; - - newConnectionInfo.IsQuickConnect = true; - - return newConnectionInfo; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.QuickConnectFailed, ex); - return null; - } - } - - /// - /// Load connections from a source. is ignored if - /// is true. - /// - /// - /// - /// - public void LoadConnections(bool useDatabase, bool import, string connectionFileName) - { - var oldConnectionTreeModel = ConnectionTreeModel; - var oldIsUsingDatabaseValue = UsingDatabase; - - var connectionLoader = useDatabase - ? (IConnectionsLoader)new SqlConnectionsLoader(_localConnectionPropertiesSerializer, - _localConnectionPropertiesDataProvider) - : new XmlConnectionsLoader(connectionFileName); - - var newConnectionTreeModel = connectionLoader.Load(); - - if (useDatabase) - LastSqlUpdate = DateTime.Now; - - if (newConnectionTreeModel == null) - { - DialogFactory.ShowLoadConnectionsFailedDialog(connectionFileName, "Decrypting connection file failed", - IsConnectionsFileLoaded); - return; - } - - IsConnectionsFileLoaded = true; - ConnectionFileName = connectionFileName; - UsingDatabase = useDatabase; - - if (!import) - { - _puttySessionsManager.AddSessions(); - newConnectionTreeModel.RootNodes.AddRange(_puttySessionsManager.RootPuttySessionsNodes); - } - - ConnectionTreeModel = newConnectionTreeModel; - UpdateCustomConsPathSetting(connectionFileName); - RaiseConnectionsLoadedEvent(oldConnectionTreeModel, newConnectionTreeModel, oldIsUsingDatabaseValue, - useDatabase, connectionFileName); - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - $"Connections loaded using {connectionLoader.GetType().Name}"); - } - - /// - /// When turned on, calls to or - /// will not immediately execute. - /// Instead, they will be deferred until - /// is called. - /// - public void BeginBatchingSaves() - { - _batchingSaves = true; - } - - /// - /// Immediately executes a single or - /// if one has been requested - /// since calling . - /// - public void EndBatchingSaves() - { - _batchingSaves = false; - - if (_saveAsyncRequested) - SaveConnectionsAsync(); - else if (_saveRequested) - SaveConnections(); - } - - /// - /// All calls to or - /// will be deferred until the returned is disposed. - /// Once disposed, this will immediately executes a single - /// or if one has been requested. - /// Place this call in a 'using' block to represent a batched saving context. - /// - /// - public DisposableAction BatchedSavingContext() - { - return new DisposableAction(BeginBatchingSaves, EndBatchingSaves); - } - - /// - /// Saves the currently loaded with - /// no . - /// - public void SaveConnections() - { - SaveConnections(ConnectionTreeModel, UsingDatabase, new SaveFilter(), ConnectionFileName); - } - - /// - /// Saves the given . - /// If is true, is ignored - /// - /// - /// - /// - /// - /// Bypasses safety checks that prevent saving if a connection file isn't loaded. - /// - /// Optional. The name of the property that triggered - /// this save. - /// - public void SaveConnections(ConnectionTreeModel connectionTreeModel, - bool useDatabase, - SaveFilter saveFilter, - string connectionFileName, - bool forceSave = false, - string propertyNameTrigger = "") - { - if (connectionTreeModel == null) - return; - - if (!forceSave && !IsConnectionsFileLoaded) - return; - - if (_batchingSaves) - { - _saveRequested = true; - return; - } - - try - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Saving connections..."); - RemoteConnectionsSyncronizer?.Disable(); - - var previouslyUsingDatabase = UsingDatabase; - - var saver = useDatabase - ? (ISaver)new SqlConnectionsSaver(saveFilter, - _localConnectionPropertiesSerializer, - _localConnectionPropertiesDataProvider) - : new XmlConnectionsSaver(connectionFileName, saveFilter); - - saver.Save(connectionTreeModel, propertyNameTrigger); - - if (UsingDatabase) - LastSqlUpdate = DateTime.Now; - - UsingDatabase = useDatabase; - ConnectionFileName = connectionFileName; - RaiseConnectionsSavedEvent(connectionTreeModel, previouslyUsingDatabase, UsingDatabase, - connectionFileName); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Successfully saved connections"); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionMessage( - string.Format(Language.ConnectionsFileCouldNotSaveAs, - connectionFileName), ex, logOnly: false); - } - finally - { - RemoteConnectionsSyncronizer?.Enable(); - } - } - - /// - /// Save the currently loaded connections asynchronously - /// - /// - /// Optional. The name of the property that triggered - /// this save. - /// - public void SaveConnectionsAsync(string propertyNameTrigger = "") - { - if (_batchingSaves) - { - _saveAsyncRequested = true; - return; - } - - var t = new Thread(() => - { - lock (SaveLock) - { - SaveConnections( - ConnectionTreeModel, - UsingDatabase, - new SaveFilter(), - ConnectionFileName, - propertyNameTrigger: propertyNameTrigger); - } - }); - t.SetApartmentState(ApartmentState.STA); - t.Start(); - } - - public string GetStartupConnectionFileName() - { - return Settings.Default.LoadConsFromCustomLocation == false - ? GetDefaultStartupConnectionFileName() - : Settings.Default.CustomConsPath; - } - - public string GetDefaultStartupConnectionFileName() - { - return Runtime.IsPortableEdition - ? GetDefaultStartupConnectionFileNamePortableEdition() - : GetDefaultStartupConnectionFileNameNormalEdition(); - } - - private void UpdateCustomConsPathSetting(string filename) - { - if (filename == GetDefaultStartupConnectionFileName()) - { - Settings.Default.LoadConsFromCustomLocation = false; - } - else - { - Settings.Default.LoadConsFromCustomLocation = true; - Settings.Default.CustomConsPath = filename; - } - } - - private string GetDefaultStartupConnectionFileNameNormalEdition() - { - var appDataPath = Path.Combine( - Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - Application.ProductName, - ConnectionsFileInfo.DefaultConnectionsFile); - return File.Exists(appDataPath) ? appDataPath : GetDefaultStartupConnectionFileNamePortableEdition(); - } - - private string GetDefaultStartupConnectionFileNamePortableEdition() - { - return Path.Combine(ConnectionsFileInfo.DefaultConnectionsPath, ConnectionsFileInfo.DefaultConnectionsFile); - } - - #region Events - - public event EventHandler ConnectionsLoaded; - public event EventHandler ConnectionsSaved; - - private void RaiseConnectionsLoadedEvent(Optional previousTreeModel, - ConnectionTreeModel newTreeModel, - bool previousSourceWasDatabase, - bool newSourceIsDatabase, - string newSourcePath) - { - ConnectionsLoaded?.Invoke(this, new ConnectionsLoadedEventArgs( - previousTreeModel, - newTreeModel, - previousSourceWasDatabase, - newSourceIsDatabase, - newSourcePath)); - } - - private void RaiseConnectionsSavedEvent(ConnectionTreeModel modelThatWasSaved, - bool previouslyUsingDatabase, - bool usingDatabase, - string connectionFileName) - { - ConnectionsSaved?.Invoke(this, - new ConnectionsSavedEventArgs(modelThatWasSaved, previouslyUsingDatabase, - usingDatabase, - connectionFileName)); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Converter.cs b/mRemoteNG/Connection/Converter.cs deleted file mode 100644 index 3b51f87f5..000000000 --- a/mRemoteNG/Connection/Converter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using mRemoteNG.Connection.Protocol; - -namespace mRemoteNG.Connection -{ - public static class Converter - { - public static string ProtocolToString(ProtocolType protocol) - { - return protocol.ToString(); - } - - public static ProtocolType StringToProtocol(string protocol) - { - try - { - return (ProtocolType)Enum.Parse(typeof(ProtocolType), protocol, true); - } - catch (Exception) - { - return ProtocolType.RDP; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/DefaultConnectionInfo.cs b/mRemoteNG/Connection/DefaultConnectionInfo.cs deleted file mode 100644 index af97783f0..000000000 --- a/mRemoteNG/Connection/DefaultConnectionInfo.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.ComponentModel; -using System.Configuration; -using mRemoteNG.App; - - -namespace mRemoteNG.Connection -{ - public class DefaultConnectionInfo : ConnectionInfo - { - [Browsable(false)] - public static DefaultConnectionInfo Instance { get; } = new DefaultConnectionInfo(); - - private DefaultConnectionInfo() - { - IsDefault = true; - Inheritance = DefaultConnectionInheritance.Instance; - } - - public void LoadFrom(TSource sourceInstance, Func propertyNameMutator = null) - { - if (propertyNameMutator == null) - propertyNameMutator = a => a; - - var connectionProperties = GetSerializableProperties(); - foreach (var property in connectionProperties) - { - try - { - var expectedPropertyName = propertyNameMutator(property.Name); - var propertyFromSource = typeof(TSource).GetProperty(expectedPropertyName); - if (propertyFromSource == null) - throw new SettingsPropertyNotFoundException($"No property with name '{expectedPropertyName}' found."); - - var valueFromSource = propertyFromSource.GetValue(sourceInstance, null); - - if (property.PropertyType.IsEnum) - { - property.SetValue(Instance, Enum.Parse(property.PropertyType, valueFromSource.ToString()), null); - continue; - } - - property.SetValue(Instance, Convert.ChangeType(valueFromSource, property.PropertyType), null); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionStackTrace($"Error loading default connectioninfo property {property.Name}", ex); - } - } - } - - public void SaveTo(TDestination destinationInstance, Func propertyNameMutator = null) - { - if (propertyNameMutator == null) - propertyNameMutator = (a) => a; - - var connectionProperties = GetSerializableProperties(); - - foreach (var property in connectionProperties) - { - try - { - var expectedPropertyName = propertyNameMutator(property.Name); - var propertyFromDestination = typeof(TDestination).GetProperty(expectedPropertyName); - - if (propertyFromDestination == null) - throw new SettingsPropertyNotFoundException($"No property with name '{expectedPropertyName}' found."); - - // ensure value is of correct type - var value = Convert.ChangeType(property.GetValue(Instance, null), - propertyFromDestination.PropertyType); - - propertyFromDestination.SetValue(destinationInstance, value, null); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionStackTrace($"Error saving default connectioninfo property {property.Name}", ex); - } - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/DefaultConnectionInheritance.cs b/mRemoteNG/Connection/DefaultConnectionInheritance.cs deleted file mode 100644 index 82f2b0fd9..000000000 --- a/mRemoteNG/Connection/DefaultConnectionInheritance.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.ComponentModel; -using mRemoteNG.App; - - -namespace mRemoteNG.Connection -{ - public class DefaultConnectionInheritance : ConnectionInfoInheritance - { - [Browsable(false)] - public static DefaultConnectionInheritance Instance { get; } = new DefaultConnectionInheritance(); - - private DefaultConnectionInheritance() : base(null, true) - { - } - - static DefaultConnectionInheritance() - { - } - - - public void LoadFrom(TSource sourceInstance, Func propertyNameMutator = null) - { - if (propertyNameMutator == null) propertyNameMutator = a => a; - var inheritanceProperties = GetProperties(); - foreach (var property in inheritanceProperties) - { - var propertyFromSettings = typeof(TSource).GetProperty(propertyNameMutator(property.Name)); - if (propertyFromSettings == null) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - $"DefaultConInherit-LoadFrom: Could not load {property.Name}", - true); - continue; - } - - var valueFromSettings = propertyFromSettings.GetValue(sourceInstance, null); - property.SetValue(Instance, valueFromSettings, null); - } - } - - public void SaveTo(TDestination destinationInstance, - Func propertyNameMutator = null) - { - if (propertyNameMutator == null) propertyNameMutator = a => a; - var inheritanceProperties = GetProperties(); - foreach (var property in inheritanceProperties) - { - var propertyFromSettings = typeof(TDestination).GetProperty(propertyNameMutator(property.Name)); - var localValue = property.GetValue(Instance, null); - if (propertyFromSettings == null) - { - Runtime.MessageCollector?.AddMessage(Messages.MessageClass.ErrorMsg, - $"DefaultConInherit-SaveTo: Could not load {property.Name}", - true); - continue; - } - - propertyFromSettings.SetValue(destinationInstance, localValue, null); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/IConnectionInitiator.cs b/mRemoteNG/Connection/IConnectionInitiator.cs deleted file mode 100644 index ea3d8d0f5..000000000 --- a/mRemoteNG/Connection/IConnectionInitiator.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections.Generic; -using mRemoteNG.Container; -using mRemoteNG.UI.Window; - -namespace mRemoteNG.Connection -{ - public interface IConnectionInitiator - { - IEnumerable ActiveConnections { get; } - - void OpenConnection( - ContainerInfo containerInfo, - ConnectionInfo.Force force = ConnectionInfo.Force.None, - ConnectionWindow conForm = null); - - void OpenConnection( - ConnectionInfo connectionInfo, - ConnectionInfo.Force force = ConnectionInfo.Force.None, - ConnectionWindow conForm = null); - - bool SwitchToOpenConnection(ConnectionInfo connectionInfo); - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/IHasParent.cs b/mRemoteNG/Connection/IHasParent.cs deleted file mode 100644 index 16275a0e7..000000000 --- a/mRemoteNG/Connection/IHasParent.cs +++ /dev/null @@ -1,13 +0,0 @@ -using mRemoteNG.Container; - -namespace mRemoteNG.Connection -{ - public interface IHasParent - { - ContainerInfo Parent { get; } - - void SetParent(ContainerInfo containerInfo); - - void RemoveParent(); - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/IInheritable.cs b/mRemoteNG/Connection/IInheritable.cs deleted file mode 100644 index 7d619c700..000000000 --- a/mRemoteNG/Connection/IInheritable.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Connection -{ - public interface IInheritable - { - ConnectionInfoInheritance Inheritance { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/InterfaceControl.Designer.cs b/mRemoteNG/Connection/InterfaceControl.Designer.cs deleted file mode 100644 index 440fdce42..000000000 --- a/mRemoteNG/Connection/InterfaceControl.Designer.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace mRemoteNG.Connection -{ - public sealed partial class InterfaceControl : System.Windows.Forms.Panel - { - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()] - protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()] - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - } - } -} diff --git a/mRemoteNG/Connection/InterfaceControl.cs b/mRemoteNG/Connection/InterfaceControl.cs deleted file mode 100644 index 9b610e4a4..000000000 --- a/mRemoteNG/Connection/InterfaceControl.cs +++ /dev/null @@ -1,67 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Connection.Protocol; -using System; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.UI.Tabs; -using WeifenLuo.WinFormsUI.Docking; - - -namespace mRemoteNG.Connection -{ - public sealed partial class InterfaceControl - { - public ProtocolBase Protocol { get; set; } - public ConnectionInfo Info { get; set; } - // in case the connection is through a SSH tunnel the Info is a copy of original info with hostname and port number overwritten with localhost and local tunnel port - // and the original Info is saved in the following variable - public ConnectionInfo OriginalInfo { get; set; } - // in case the connection is through a SSH tunnel the Info of the SSHTunnelConnection is also saved for reference in log messages etc. - public ConnectionInfo SSHTunnelInfo { get; set; } - - - public InterfaceControl(Control parent, ProtocolBase protocol, ConnectionInfo info) - { - try - { - Protocol = protocol; - Info = info; - Parent = parent; - Location = new Point(0, 0); - Size = Parent.Size; - Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; - InitializeComponent(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - "Couldn\'t create new InterfaceControl" + Environment.NewLine + - ex.Message); - } - } - - public static InterfaceControl FindInterfaceControl(DockPanel DockPnl) - { - // instead of repeating the code, call the routine using ConnectionTab if called by DockPanel - if (DockPnl.ActiveDocument is ConnectionTab ct) - return FindInterfaceControl(ct); - return null; - } - - public static InterfaceControl FindInterfaceControl(ConnectionTab tab) - { - if (tab.Controls.Count < 1) return null; - // if the tab has more than one controls and the second is an InterfaceControl than it must be a connection through SSH tunnel - // and the first Control is the SSH tunnel connection and thus the second control must be returned. - if (tab.Controls.Count > 1) - { - if (tab.Controls[1] is InterfaceControl ic1) - return ic1; - } - if (tab.Controls[0] is InterfaceControl ic0) - return ic0; - - return null; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTP.cs b/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTP.cs deleted file mode 100644 index 3ebf3007b..000000000 --- a/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTP.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.Http -{ - public class ProtocolHTTP : HTTPBase - { - public ProtocolHTTP(RenderingEngine RenderingEngine) : base(RenderingEngine) - { - httpOrS = "http"; - defaultPort = (int)Defaults.Port; - } - - public enum Defaults - { - Port = 80 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTPBase.cs b/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTPBase.cs deleted file mode 100644 index 00df0dbed..000000000 --- a/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTPBase.cs +++ /dev/null @@ -1,216 +0,0 @@ -using System; -using System.Windows.Forms; -using Microsoft.Web.WebView2.WinForms; -using mRemoteNG.Tools; -using mRemoteNG.App; -using mRemoteNG.UI.Tabs; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Connection.Protocol.Http -{ - public class HTTPBase : ProtocolBase - { - #region Private Properties - - private Control _wBrowser; - private string _tabTitle; - protected string httpOrS; - protected int defaultPort; - - #endregion - - #region Public Methods - - protected HTTPBase(RenderingEngine renderingEngine) - { - try - { - if (renderingEngine == RenderingEngine.EdgeChromium) - { - Control = new WebView2() - { - Dock = DockStyle.Fill, - }; - } - else - { - Control = new WebBrowser(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.HttpConnectionFailed, ex); - } - } - - public override bool Initialize() - { - base.Initialize(); - - try - { - if (InterfaceControl.Parent is ConnectionTab objConnectionTab) _tabTitle = objConnectionTab.TabText; - } - catch (Exception) - { - _tabTitle = ""; - } - - try - { - _wBrowser = Control; - - if (InterfaceControl.Info.RenderingEngine == RenderingEngine.EdgeChromium) - { - var edge = (WebView2)_wBrowser; - - edge.CoreWebView2InitializationCompleted += Edge_CoreWebView2InitializationCompleted; - } - else - { - var objWebBrowser = (WebBrowser)_wBrowser; - objWebBrowser.ScrollBarsEnabled = true; - - // http://stackoverflow.com/questions/4655662/how-to-ignore-script-errors-in-webbrowser - objWebBrowser.ScriptErrorsSuppressed = true; - - objWebBrowser.Navigated += WBrowser_Navigated; - objWebBrowser.DocumentTitleChanged += WBrowser_DocumentTitleChanged; - } - - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.HttpSetPropsFailed, ex); - return false; - } - } - - public override bool Connect() - { - try - { - if (InterfaceControl.Info.RenderingEngine == RenderingEngine.EdgeChromium) - { - ((WebView2)_wBrowser).Source = new Uri(GetUrl()); - } - else - { - ((WebBrowser)_wBrowser).Navigate(GetUrl()); - } - - base.Connect(); - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.HttpConnectFailed, ex); - return false; - } - } - - #endregion - - #region Private Methods - - private string GetUrl() - { - try - { - var strHost = InterfaceControl.Info.Hostname; - - if (InterfaceControl.Info.Port != defaultPort) - { - if (strHost.EndsWith("/")) - strHost = strHost.Substring(0, strHost.Length - 1); - - if (strHost.Contains(httpOrS + "://") == false) - strHost = httpOrS + "://" + strHost; - - strHost = strHost + ":" + InterfaceControl.Info.Port; - } - else - { - if (strHost.Contains(httpOrS + "://") == false) - strHost = httpOrS + "://" + strHost; - } - - return strHost; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.HttpFailedUrlBuild, ex); - return string.Empty; - } - } - - #endregion - - #region Events - - private void Edge_CoreWebView2InitializationCompleted(object sender, Microsoft.Web.WebView2.Core.CoreWebView2InitializationCompletedEventArgs e) - { - if (!e.IsSuccess) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.HttpFailedUrlBuild, e.InitializationException); - } - } - - private void WBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e) - { - if (!(_wBrowser is WebBrowser objWebBrowser)) return; - - // This can only be set once the WebBrowser control is shown, it will throw a COM exception otherwise. - objWebBrowser.AllowWebBrowserDrop = false; - - objWebBrowser.Navigated -= WBrowser_Navigated; - } - - private void WBrowser_DocumentTitleChanged(object sender, EventArgs e) - { - try - { - if (!(InterfaceControl.Parent is ConnectionTab tabP)) return; - string shortTitle; - if (((WebBrowser)_wBrowser).DocumentTitle.Length >= 15) - { - shortTitle = ((WebBrowser)_wBrowser).DocumentTitle.Substring(0, 10) + "..."; - } - else - { - shortTitle = ((WebBrowser)_wBrowser).DocumentTitle; - } - - if (!string.IsNullOrEmpty(_tabTitle)) - { - tabP.TabText = _tabTitle + @" - " + shortTitle; - } - else - { - tabP.TabText = shortTitle; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.HttpDocumentTileChangeFailed, ex); - } - } - - #endregion - - #region Enums - - public enum RenderingEngine - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.HttpInternetExplorer))] - IE = 1, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.HttpCEF))] - EdgeChromium = 2 - } - - #endregion - } -} diff --git a/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTPS.cs b/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTPS.cs deleted file mode 100644 index 90f35f5a1..000000000 --- a/mRemoteNG/Connection/Protocol/Http/Connection.Protocol.HTTPS.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.Http -{ - public class ProtocolHTTPS : HTTPBase - { - public ProtocolHTTPS(RenderingEngine RenderingEngine) : base(RenderingEngine) - { - httpOrS = "https"; - defaultPort = (int)Defaults.Port; - } - - public enum Defaults - { - Port = 443 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/ISupportsViewOnly.cs b/mRemoteNG/Connection/Protocol/ISupportsViewOnly.cs deleted file mode 100644 index 4bb70be21..000000000 --- a/mRemoteNG/Connection/Protocol/ISupportsViewOnly.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace mRemoteNG.Connection.Protocol -{ - /// - /// Signifies that a protocol supports View Only mode. When in View Only mode, - /// the control will not capture and send input events to the remote host. - /// - public interface ISupportsViewOnly - { - /// - /// Whether this control is in view only mode. - /// - bool ViewOnly { get; set; } - - /// - /// Toggles whether the control will capture and send input events to the remote host. - /// The local host will continue to receive data from the remote host regardless of this setting. - /// - void ToggleViewOnly(); - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/IntegratedProgram.cs b/mRemoteNG/Connection/Protocol/IntegratedProgram.cs deleted file mode 100644 index 42c72d0c2..000000000 --- a/mRemoteNG/Connection/Protocol/IntegratedProgram.cs +++ /dev/null @@ -1,208 +0,0 @@ -using System; -using System.Diagnostics; -using System.Drawing; -using System.Threading; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol -{ - public class IntegratedProgram : ProtocolBase - { - #region Private Fields - - private ExternalTool _externalTool; - private IntPtr _handle; - private Process _process; - - #endregion - - #region Public Methods - - public override bool Initialize() - { - if (InterfaceControl.Info == null) - return base.Initialize(); - - _externalTool = Runtime.ExternalToolsService.GetExtAppByName(InterfaceControl.Info.ExtApp); - - if (_externalTool == null) - { - Runtime.MessageCollector?.AddMessage(MessageClass.ErrorMsg, - string.Format(Language.CouldNotFindExternalTool, - InterfaceControl.Info.ExtApp)); - return false; - } - - _externalTool.ConnectionInfo = InterfaceControl.Info; - - return base.Initialize(); - } - - public override bool Connect() - { - try - { - Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, - $"Attempting to start: {_externalTool.DisplayName}", true); - - if (_externalTool.TryIntegrate == false) - { - _externalTool.Start(InterfaceControl.Info); - /* Don't call close here... There's nothing for the override to do in this case since - * _process is not created in this scenario. When returning false, ProtocolBase.Close() - * will be called - which is just going to call IntegratedProgram.Close() again anyway... - * Close(); - */ - Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, - $"Assuming no other errors/exceptions occurred immediately before this message regarding {_externalTool.DisplayName}, the next \"closed by user\" message can be ignored", - true); - return false; - } - - var argParser = new ExternalToolArgumentParser(_externalTool.ConnectionInfo); - _process = new Process - { - StartInfo = - { - UseShellExecute = true, - FileName = argParser.ParseArguments(_externalTool.FileName), - Arguments = argParser.ParseArguments(_externalTool.Arguments) - }, - EnableRaisingEvents = true - }; - - - _process.Exited += ProcessExited; - - _process.Start(); - _process.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000); - - var startTicks = Environment.TickCount; - while (_handle.ToInt32() == 0 & - Environment.TickCount < startTicks + Settings.Default.MaxPuttyWaitTime * 1000) - { - _process.Refresh(); - if (_process.MainWindowTitle != "Default IME") - { - _handle = _process.MainWindowHandle; - } - - if (_handle.ToInt32() == 0) - { - Thread.Sleep(0); - } - } - - NativeMethods.SetParent(_handle, InterfaceControl.Handle); - Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, Language.IntAppStuff, true); - Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, - string.Format(Language.IntAppHandle, _handle), true); - Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, - string.Format(Language.IntAppTitle, _process.MainWindowTitle), - true); - Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, - string.Format(Language.PanelHandle, - InterfaceControl.Parent.Handle), true); - - Resize(this, new EventArgs()); - base.Connect(); - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionMessage(Language.ConnectionFailed, ex); - return false; - } - } - - public override void Focus() - { - try - { - NativeMethods.SetForegroundWindow(_handle); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.IntAppFocusFailed, ex); - } - } - - public override void Resize(object sender, EventArgs e) - { - try - { - if (InterfaceControl.Size == Size.Empty) return; - NativeMethods.MoveWindow(_handle, -SystemInformation.FrameBorderSize.Width, - -(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height), - InterfaceControl.Width + SystemInformation.FrameBorderSize.Width * 2, - InterfaceControl.Height + SystemInformation.CaptionHeight + - SystemInformation.FrameBorderSize.Height * 2, true); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.IntAppResizeFailed, ex); - } - } - - public override void Close() - { - /* only attempt this if we have a valid process object - * Non-integrated tools will still call base.Close() and don't have a valid process object. - * See Connect() above... This just muddies up the log. - */ - if (_process != null) - { - try - { - if (!_process.HasExited) - { - _process.Kill(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.IntAppKillFailed, ex); - } - - try - { - if (!_process.HasExited) - { - _process.Dispose(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.IntAppDisposeFailed, ex); - } - } - - base.Close(); - } - - #endregion - - #region Private Methods - - private void ProcessExited(object sender, EventArgs e) - { - Event_Closed(this); - } - - #endregion - - #region Enumerations - - public enum Defaults - { - Port = 0 - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/PowerShell/Connection.Protocol.PowerShell.cs b/mRemoteNG/Connection/Protocol/PowerShell/Connection.Protocol.PowerShell.cs deleted file mode 100644 index 4197ad835..000000000 --- a/mRemoteNG/Connection/Protocol/PowerShell/Connection.Protocol.PowerShell.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.PowerShell -{ - public class ProtocolPowerShell : ProtocolBase - { - #region Private Fields - - private IntPtr _handle; - private readonly ConnectionInfo _connectionInfo; - private ConsoleControl.ConsoleControl _consoleControl; - - public ProtocolPowerShell(ConnectionInfo connectionInfo) - { - _connectionInfo = connectionInfo; - } - - #endregion - - #region Public Methods - - public override bool Connect() - { - try - { - Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg, - "Attempting to start remote PowerShell session.", true); - - _consoleControl = new ConsoleControl.ConsoleControl - { - Dock = DockStyle.Fill, - BackColor = ColorTranslator.FromHtml("#012456"), - ForeColor = Color.White, - IsInputEnabled = true, - Padding = new Padding(0, 20, 0, 0) - }; - - _consoleControl.StartProcess(@"C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell.exe", - $@"-NoExit -Command ""$password = ConvertTo-SecureString '{_connectionInfo.Password}' -AsPlainText -Force; $cred = New-Object System.Management.Automation.PSCredential -ArgumentList @('{_connectionInfo.Domain}\{_connectionInfo.Username}', $password); Enter-PSSession -ComputerName {_connectionInfo.Hostname} -Credential $cred"""); - - while (!_consoleControl.IsHandleCreated) break; - _handle = _consoleControl.Handle; - NativeMethods.SetParent(_handle, InterfaceControl.Handle); - - Resize(this, new EventArgs()); - base.Connect(); - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionMessage(Language.ConnectionFailed, ex); - return false; - } - } - - public override void Focus() - { - try - { - NativeMethods.SetForegroundWindow(_handle); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.IntAppFocusFailed, ex); - } - } - - public override void Resize(object sender, EventArgs e) - { - try - { - if (InterfaceControl.Size == Size.Empty) return; - NativeMethods.MoveWindow(_handle, -SystemInformation.FrameBorderSize.Width, - -(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height), - InterfaceControl.Width + SystemInformation.FrameBorderSize.Width * 2, - InterfaceControl.Height + SystemInformation.CaptionHeight + - SystemInformation.FrameBorderSize.Height * 2, true); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.IntAppResizeFailed, ex); - } - } - - #endregion - - #region Enumerations - - public enum Defaults - { - Port = 5985 - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/ProtocolBase.cs b/mRemoteNG/Connection/Protocol/ProtocolBase.cs deleted file mode 100644 index c1ab4fe03..000000000 --- a/mRemoteNG/Connection/Protocol/ProtocolBase.cs +++ /dev/null @@ -1,347 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Tools; -using System; -using System.Threading; -using System.Windows.Forms; -using mRemoteNG.UI.Tabs; - -// ReSharper disable UnusedMember.Local - -namespace mRemoteNG.Connection.Protocol -{ - public abstract class ProtocolBase : IDisposable - { - #region Private Variables - - private ConnectionTab _connectionTab; - private InterfaceControl _interfaceControl; - private ConnectingEventHandler ConnectingEvent; - private ConnectedEventHandler ConnectedEvent; - private DisconnectedEventHandler DisconnectedEvent; - private ErrorOccuredEventHandler ErrorOccuredEvent; - private ClosingEventHandler ClosingEvent; - private ClosedEventHandler ClosedEvent; - - #endregion - - #region Public Properties - - #region Control - - private string Name { get; } - - private ConnectionTab ConnectionTab - { - get => _connectionTab; - set - { - _connectionTab = value; - _connectionTab.ResizeBegin += ResizeBegin; - _connectionTab.Resize += Resize; - _connectionTab.ResizeEnd += ResizeEnd; - } - } - - public InterfaceControl InterfaceControl - { - get => _interfaceControl; - set - { - _interfaceControl = value; - - if (_interfaceControl.Parent is ConnectionTab ct) - ConnectionTab = ct; - } - } - - protected Control Control { get; set; } - - #endregion - - public ConnectionInfo.Force Force { get; set; } - - public readonly System.Timers.Timer tmrReconnect = new System.Timers.Timer(2000); - protected ReconnectGroup ReconnectGroup; - - protected ProtocolBase(string name) - { - Name = name; - } - - protected ProtocolBase() - { - } - - #endregion - - #region Methods - - //public abstract int GetDefaultPort(); - - public virtual void Focus() - { - try - { - Control.Focus(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Couldn't focus Control (Connection.Protocol.Base)", - ex); - } - } - - public virtual void ResizeBegin(object sender, EventArgs e) - { - } - - public virtual void Resize(object sender, EventArgs e) - { - } - - public virtual void ResizeEnd(object sender, EventArgs e) - { - } - - public virtual bool Initialize() - { - try - { - _interfaceControl.Parent.Tag = _interfaceControl; - _interfaceControl.Show(); - - if (Control == null) - return true; - - - Control.Name = Name; - Control.Location = _interfaceControl.Location; - Control.Size = InterfaceControl.Size; - Control.Anchor = _interfaceControl.Anchor; - _interfaceControl.Controls.Add(Control); - - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Couldn't SetProps (Connection.Protocol.Base)", ex); - return false; - } - } - - public virtual bool Connect() - { - if (InterfaceControl.Info.Protocol == ProtocolType.RDP) return false; - if (ConnectedEvent == null) return false; - ConnectedEvent(this); - return true; - } - - public virtual void Disconnect() - { - Close(); - } - - public virtual void Close() - { - var t = new Thread(CloseBG); - t.SetApartmentState(ApartmentState.STA); - t.IsBackground = true; - t.Start(); - } - - private void CloseBG() - { - ClosedEvent?.Invoke(this); - try - { - tmrReconnect.Enabled = false; - - if (Control != null) - { - try - { - DisposeControl(); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionStackTrace( - "Couldn't dispose control, probably form is already closed (Connection.Protocol.Base)", ex); - } - } - - if (_interfaceControl == null) return; - - try - { - if (_interfaceControl.Parent == null) return; - - if (_interfaceControl.Parent.Tag != null) - { - SetTagToNothing(); - } - - DisposeInterface(); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionStackTrace( - "Couldn't set InterfaceControl.Parent.Tag or Dispose Interface, " + - "probably form is already closed (Connection.Protocol.Base)", ex); - } - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionStackTrace( - "Couldn't Close InterfaceControl BG (Connection.Protocol.Base)", ex); - } - } - - private delegate void DisposeInterfaceCB(); - - private void DisposeInterface() - { - if (_interfaceControl.InvokeRequired) - { - var s = new DisposeInterfaceCB(DisposeInterface); - _interfaceControl.Invoke(s); - } - else - { - _interfaceControl.Dispose(); - } - } - - private delegate void SetTagToNothingCB(); - - private void SetTagToNothing() - { - if (_interfaceControl.Parent.InvokeRequired) - { - var s = new SetTagToNothingCB(SetTagToNothing); - _interfaceControl.Parent.Invoke(s); - } - else - { - _interfaceControl.Parent.Tag = null; - } - } - - private delegate void DisposeControlCB(); - - private void DisposeControl() - { - if (Control.InvokeRequired) - { - var s = new DisposeControlCB(DisposeControl); - Control.Invoke(s); - } - else - { - Control.Dispose(); - } - } - - #endregion - - #region Events - - public delegate void ConnectingEventHandler(object sender); - - public event ConnectingEventHandler Connecting - { - add => ConnectingEvent = (ConnectingEventHandler)Delegate.Combine(ConnectingEvent, value); - remove => ConnectingEvent = (ConnectingEventHandler)Delegate.Remove(ConnectingEvent, value); - } - - public delegate void ConnectedEventHandler(object sender); - - public event ConnectedEventHandler Connected - { - add => ConnectedEvent = (ConnectedEventHandler)Delegate.Combine(ConnectedEvent, value); - remove => ConnectedEvent = (ConnectedEventHandler)Delegate.Remove(ConnectedEvent, value); - } - - public delegate void DisconnectedEventHandler(object sender, string disconnectedMessage, int? reasonCode); - - public event DisconnectedEventHandler Disconnected - { - add => DisconnectedEvent = (DisconnectedEventHandler)Delegate.Combine(DisconnectedEvent, value); - remove => DisconnectedEvent = (DisconnectedEventHandler)Delegate.Remove(DisconnectedEvent, value); - } - - public delegate void ErrorOccuredEventHandler(object sender, string errorMessage, int? errorCode); - - public event ErrorOccuredEventHandler ErrorOccured - { - add => ErrorOccuredEvent = (ErrorOccuredEventHandler)Delegate.Combine(ErrorOccuredEvent, value); - remove => ErrorOccuredEvent = (ErrorOccuredEventHandler)Delegate.Remove(ErrorOccuredEvent, value); - } - - public delegate void ClosingEventHandler(object sender); - - public event ClosingEventHandler Closing - { - add => ClosingEvent = (ClosingEventHandler)Delegate.Combine(ClosingEvent, value); - remove => ClosingEvent = (ClosingEventHandler)Delegate.Remove(ClosingEvent, value); - } - - public delegate void ClosedEventHandler(object sender); - - public event ClosedEventHandler Closed - { - add => ClosedEvent = (ClosedEventHandler)Delegate.Combine(ClosedEvent, value); - remove => ClosedEvent = (ClosedEventHandler)Delegate.Remove(ClosedEvent, value); - } - - - public void Event_Closing(object sender) - { - ClosingEvent?.Invoke(sender); - } - - protected void Event_Closed(object sender) - { - ClosedEvent?.Invoke(sender); - } - - protected void Event_Connecting(object sender) - { - ConnectingEvent?.Invoke(sender); - } - - protected void Event_Connected(object sender) - { - ConnectedEvent?.Invoke(sender); - } - - protected void Event_Disconnected(object sender, string disconnectedMessage, int? reasonCode) - { - DisconnectedEvent?.Invoke(sender, disconnectedMessage, reasonCode); - } - - protected void Event_ErrorOccured(object sender, string errorMsg, int? errorCode) - { - ErrorOccuredEvent?.Invoke(sender, errorMsg, errorCode); - } - - protected void Event_ReconnectGroupCloseClicked() - { - Close(); - } - - #endregion - - private void Dispose(bool disposing) - { - if (disposing) return; - tmrReconnect?.Dispose(); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/ProtocolFactory.cs b/mRemoteNG/Connection/Protocol/ProtocolFactory.cs deleted file mode 100644 index 8f20464a5..000000000 --- a/mRemoteNG/Connection/Protocol/ProtocolFactory.cs +++ /dev/null @@ -1,57 +0,0 @@ -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.RAW; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.Rlogin; -using mRemoteNG.Connection.Protocol.SSH; -using mRemoteNG.Connection.Protocol.Telnet; -using mRemoteNG.Connection.Protocol.VNC; -using System; -using mRemoteNG.Connection.Protocol.PowerShell; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol -{ - public class ProtocolFactory - { - private readonly RdpProtocolFactory _rdpProtocolFactory = new RdpProtocolFactory(); - - public ProtocolBase CreateProtocol(ConnectionInfo connectionInfo) - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (connectionInfo.Protocol) - { - case ProtocolType.RDP: - var rdp = _rdpProtocolFactory.Build(connectionInfo.RdpVersion); - rdp.LoadBalanceInfoUseUtf8 = Settings.Default.RdpLoadBalanceInfoUseUtf8; - return rdp; - case ProtocolType.VNC: - return new ProtocolVNC(); - case ProtocolType.SSH1: - return new ProtocolSSH1(); - case ProtocolType.SSH2: - return new ProtocolSSH2(); - case ProtocolType.Telnet: - return new ProtocolTelnet(); - case ProtocolType.Rlogin: - return new ProtocolRlogin(); - case ProtocolType.RAW: - return new RawProtocol(); - case ProtocolType.HTTP: - return new ProtocolHTTP(connectionInfo.RenderingEngine); - case ProtocolType.HTTPS: - return new ProtocolHTTPS(connectionInfo.RenderingEngine); - case ProtocolType.PowerShell: - return new ProtocolPowerShell(connectionInfo); - case ProtocolType.IntApp: - if (connectionInfo.ExtApp == "") - { - throw (new Exception(Language.NoExtAppDefined)); - } - return new IntegratedProgram(); - } - - return default(ProtocolBase); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/ProtocolList.cs b/mRemoteNG/Connection/Protocol/ProtocolList.cs deleted file mode 100644 index 27d8b2148..000000000 --- a/mRemoteNG/Connection/Protocol/ProtocolList.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Specialized; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Connection.Protocol -{ - public class ProtocolList : CollectionBase, INotifyCollectionChanged - { - public ProtocolBase this[object index] - { - get - { - var @base = index as ProtocolBase; - if (@base != null) - return @base; - if (index is int) - return (ProtocolBase)List[Convert.ToInt32(index)]; - return null; - } - } - - public new int Count => List.Count; - - - public void Add(ProtocolBase cProt) - { - List.Add(cProt); - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cProt)); - } - - public void AddRange(ProtocolBase[] cProt) - { - foreach (var cP in cProt) - { - List.Add(cP); - } - - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, cProt)); - } - - public void Remove(ProtocolBase cProt) - { - try - { - if (!List.Contains(cProt)) - return; - - List.Remove(cProt); - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, - cProt)); - } - catch (Exception) - { - } - } - - public new void Clear() - { - if (Count == 0) - return; - - List.Clear(); - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); - } - - public event NotifyCollectionChangedEventHandler CollectionChanged; - - private void RaiseCollectionChangedEvent(object sender, NotifyCollectionChangedEventArgs args) - { - CollectionChanged?.Invoke(sender, args); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/ProtocolType.cs b/mRemoteNG/Connection/Protocol/ProtocolType.cs deleted file mode 100644 index 6f4016fdf..000000000 --- a/mRemoteNG/Connection/Protocol/ProtocolType.cs +++ /dev/null @@ -1,41 +0,0 @@ -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol -{ - public enum ProtocolType - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.Rdp))] - RDP = 0, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Vnc))] - VNC = 1, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.SshV1))] - SSH1 = 2, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.SshV2))] - SSH2 = 3, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Telnet))] - Telnet = 4, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Rlogin))] - Rlogin = 5, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Raw))] - RAW = 6, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Http))] - HTTP = 7, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Https))] - HTTPS = 8, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.PowerShell))] - PowerShell = 10, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.ExternalTool))] - IntApp = 20 - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/PuttyBase.cs b/mRemoteNG/Connection/Protocol/PuttyBase.cs deleted file mode 100644 index a3240f621..000000000 --- a/mRemoteNG/Connection/Protocol/PuttyBase.cs +++ /dev/null @@ -1,337 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools; -using mRemoteNG.Tools.Cmdline; -using mRemoteNG.UI; -using System; -using System.Diagnostics; -using System.Drawing; -using System.Threading; -using System.Windows.Forms; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Connection.Protocol -{ - public class PuttyBase : ProtocolBase - { - private const int IDM_RECONF = 0x50; // PuTTY Settings Menu ID - private bool _isPuttyNg; - private readonly DisplayProperties _display = new DisplayProperties(); - - #region Public Properties - - protected Putty_Protocol PuttyProtocol { private get; set; } - - protected Putty_SSHVersion PuttySSHVersion { private get; set; } - - public IntPtr PuttyHandle { get; set; } - - private Process PuttyProcess { get; set; } - - public static string PuttyPath { get; set; } - - public bool Focused => NativeMethods.GetForegroundWindow() == PuttyHandle; - - #endregion - - #region Private Events & Handlers - - private void ProcessExited(object sender, EventArgs e) - { - Event_Closed(this); - } - - #endregion - - #region Public Methods - - public bool isRunning() - { - return !PuttyProcess.HasExited; - } - - public override bool Connect() - { - try - { - _isPuttyNg = PuttyTypeDetector.GetPuttyType() == PuttyTypeDetector.PuttyType.PuttyNg; - - PuttyProcess = new Process - { - StartInfo = - { - UseShellExecute = false, - FileName = PuttyPath - } - }; - - var arguments = new CommandLineArguments {EscapeForShell = false}; - - arguments.Add("-load", InterfaceControl.Info.PuttySession); - - if (!(InterfaceControl.Info is PuttySessionInfo)) - { - arguments.Add("-" + PuttyProtocol); - - if (PuttyProtocol == Putty_Protocol.ssh) - { - var username = ""; - var password = ""; - - // access secret server api if necessary - if (!string.IsNullOrEmpty(InterfaceControl.Info?.UserViaAPI)) - { - var domain = ""; // dummy - try - { - ExternalConnectors.TSS.SecretServerInterface.FetchSecretFromServer("SSAPI:" + InterfaceControl.Info?.UserViaAPI, out username, out password, out domain); - } - catch (Exception ex) - { - Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0); - } - } - if (!string.IsNullOrEmpty(InterfaceControl.Info?.Username)) - { - username = InterfaceControl.Info.Username; - } - else - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (Settings.Default.EmptyCredentials) - { - case "windows": - username = Environment.UserName; - break; - case "custom": - username = Settings.Default.DefaultUsername; - break; - } - } - - if (!string.IsNullOrEmpty(InterfaceControl.Info?.Password)) - { - password = InterfaceControl.Info.Password; - } - else - { - if (Settings.Default.EmptyCredentials == "custom") - { - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - password = cryptographyProvider.Decrypt(Settings.Default.DefaultPassword, - Runtime.EncryptionKey); - } - } - - arguments.Add("-" + (int)PuttySSHVersion); - - if (!Force.HasFlag(ConnectionInfo.Force.NoCredentials)) - { - if (!string.IsNullOrEmpty(username)) - { - arguments.Add("-l", username); - } - - if (!string.IsNullOrEmpty(password)) - { - arguments.Add("-pw", password); - } - } - } - - arguments.Add("-P", InterfaceControl.Info.Port.ToString()); - arguments.Add(InterfaceControl.Info.Hostname); - } - - if (_isPuttyNg) - { - arguments.Add("-hwndparent", InterfaceControl.Handle.ToString()); - } - - PuttyProcess.StartInfo.Arguments = arguments.ToString(); - // add additional SSH options, f.e. tunnel or noshell parameters that may be specified for the the connnection - if (!string.IsNullOrEmpty(InterfaceControl.Info.SSHOptions)) - { - PuttyProcess.StartInfo.Arguments += " " + InterfaceControl.Info.SSHOptions; - } - - PuttyProcess.EnableRaisingEvents = true; - PuttyProcess.Exited += ProcessExited; - - PuttyProcess.Start(); - PuttyProcess.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000); - - var startTicks = Environment.TickCount; - while (PuttyHandle.ToInt32() == 0 & - Environment.TickCount < startTicks + Settings.Default.MaxPuttyWaitTime * 1000) - { - if (_isPuttyNg) - { - PuttyHandle = NativeMethods.FindWindowEx( - InterfaceControl.Handle, new IntPtr(0), null, null); - } - else - { - PuttyProcess.Refresh(); - PuttyHandle = PuttyProcess.MainWindowHandle; - } - - if (PuttyHandle.ToInt32() == 0) - { - Thread.Sleep(0); - } - } - - if (!_isPuttyNg) - { - NativeMethods.SetParent(PuttyHandle, InterfaceControl.Handle); - } - - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.PuttyStuff, true); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - string.Format(Language.PuttyHandle, PuttyHandle), true); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - string.Format(Language.PuttyTitle, PuttyProcess.MainWindowTitle), - true); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - string.Format(Language.PanelHandle, - InterfaceControl.Parent.Handle), true); - - if (!string.IsNullOrEmpty(InterfaceControl.Info?.OpeningCommand)) - { - NativeMethods.SetForegroundWindow(PuttyHandle); - var finalCommand = InterfaceControl.Info.OpeningCommand.TrimEnd() + "\n"; - SendKeys.SendWait(finalCommand); - } - - Resize(this, new EventArgs()); - base.Connect(); - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ConnectionFailed + Environment.NewLine + - ex.Message); - return false; - } - } - - public override void Focus() - { - try - { - NativeMethods.SetForegroundWindow(PuttyHandle); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.PuttyFocusFailed + Environment.NewLine + ex.Message, - true); - } - } - - public override void Resize(object sender, EventArgs e) - { - try - { - if (InterfaceControl.Size == Size.Empty) - return; - - if (_isPuttyNg) - { - // PuTTYNG 0.70.0.1 and later doesn't have any window borders - NativeMethods.MoveWindow(PuttyHandle, 0, 0, InterfaceControl.Width, InterfaceControl.Height, true); - } - else - { - var scaledFrameBorderHeight = _display.ScaleHeight(SystemInformation.FrameBorderSize.Height); - var scaledFrameBorderWidth = _display.ScaleWidth(SystemInformation.FrameBorderSize.Width); - - NativeMethods.MoveWindow(PuttyHandle, -scaledFrameBorderWidth, - -(SystemInformation.CaptionHeight + scaledFrameBorderHeight), - InterfaceControl.Width + scaledFrameBorderWidth * 2, - InterfaceControl.Height + SystemInformation.CaptionHeight + - scaledFrameBorderHeight * 2, - true); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.PuttyResizeFailed + Environment.NewLine + ex.Message, - true); - } - } - - public override void Close() - { - try - { - if (PuttyProcess.HasExited == false) - { - PuttyProcess.Kill(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.PuttyKillFailed + Environment.NewLine + ex.Message, - true); - } - - try - { - PuttyProcess.Dispose(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.PuttyDisposeFailed + Environment.NewLine + ex.Message, - true); - } - - base.Close(); - } - - public void ShowSettingsDialog() - { - try - { - NativeMethods.PostMessage(PuttyHandle, NativeMethods.WM_SYSCOMMAND, (IntPtr)IDM_RECONF, (IntPtr)0); - NativeMethods.SetForegroundWindow(PuttyHandle); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.PuttyShowSettingsDialogFailed + Environment.NewLine + - ex.Message, true); - } - } - - #endregion - - #region Enums - - protected enum Putty_Protocol - { - ssh = 0, - telnet = 1, - rlogin = 2, - raw = 3, - serial = 4 - } - - protected enum Putty_SSHVersion - { - ssh1 = 1, - ssh2 = 2 - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RAW/RawProtocol.cs b/mRemoteNG/Connection/Protocol/RAW/RawProtocol.cs deleted file mode 100644 index cb7f0a519..000000000 --- a/mRemoteNG/Connection/Protocol/RAW/RawProtocol.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.RAW -{ - public class RawProtocol : PuttyBase - { - public RawProtocol() - { - PuttyProtocol = Putty_Protocol.raw; - } - - public enum Defaults - { - Port = 23 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/AuthenticationLevel.cs b/mRemoteNG/Connection/Protocol/RDP/AuthenticationLevel.cs deleted file mode 100644 index 008e02eb8..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/AuthenticationLevel.cs +++ /dev/null @@ -1,17 +0,0 @@ -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum AuthenticationLevel - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.AlwaysConnectEvenIfAuthFails))] - NoAuth = 0, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.DontConnectWhenAuthFails))] - AuthRequired = 1, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.WarnIfAuthFails))] - WarnOnFailedAuth = 2 - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/AzureLoadBalanceInfoEncoder.cs b/mRemoteNG/Connection/Protocol/RDP/AzureLoadBalanceInfoEncoder.cs deleted file mode 100644 index 1f7a2e38f..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/AzureLoadBalanceInfoEncoder.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Text; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public class AzureLoadBalanceInfoEncoder - { - public string Encode(string loadBalanceInfo) - { - // The ActiveX component requires a UTF-8 encoded string, but .NET uses - // UTF-16 encoded strings by default. The following code converts - // the UTF-16 encoded string so that the byte-representation of the - // LoadBalanceInfo string object will "appear" as UTF-8 to the Active component. - // Furthermore, since the final string still has to be shoehorned into - // a UTF-16 encoded string, I pad an extra space in case the number of - // bytes would be odd, in order to prevent the byte conversion from - // mangling the string at the end. The space is ignored by the RDP - // protocol as long as it is inserted at the end. - // Finally, it is required that the LoadBalanceInfo setting is postfixed - // with \r\n in order to work properly. Note also that \r\n MUST be - // the last two characters, so the space padding has to be inserted first. - // The following code has been tested with Windows Azure connections - // only - I am aware there are other types of RDP connections that - // require the LoadBalanceInfo parameter which I have not tested - // (e.g., Multi-Server Terminal Services Gateway), that may or may not - // work properly. - // - // Sources: - // 1. http://stackoverflow.com/questions/13536267/how-to-connect-to-azure-vm-with-remote-desktop-activex - // 2. http://social.technet.microsoft.com/Forums/windowsserver/en-US/e68d4e9a-1c8a-4e55-83b3-e3b726ff5346/issue-with-using-advancedsettings2loadbalanceinfo - // 3. Manual comparison of raw packets between Windows RDP client and Terminals using WireShark. - // Copied from https://github.com/OliverKohlDSc/Terminals/blob/master/Terminals/Connections/RDPConnection.cs - if (loadBalanceInfo.Length % 2 == 1) - loadBalanceInfo += " "; - - loadBalanceInfo += "\r\n"; - var bytes = Encoding.UTF8.GetBytes(loadBalanceInfo); - return Encoding.Unicode.GetString(bytes); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RDGatewayUsageMethod.cs b/mRemoteNG/Connection/Protocol/RDP/RDGatewayUsageMethod.cs deleted file mode 100644 index cc3eb38c4..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RDGatewayUsageMethod.cs +++ /dev/null @@ -1,17 +0,0 @@ -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum RDGatewayUsageMethod - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.Never))] - Never = 0, // TSC_PROXY_MODE_NONE_DIRECT - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Always))] - Always = 1, // TSC_PROXY_MODE_DIRECT - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Detect))] - Detect = 2 // TSC_PROXY_MODE_DETECT - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RDGatewayUseConnectionCredentials.cs b/mRemoteNG/Connection/Protocol/RDP/RDGatewayUseConnectionCredentials.cs deleted file mode 100644 index 49e7c0844..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RDGatewayUseConnectionCredentials.cs +++ /dev/null @@ -1,17 +0,0 @@ -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum RDGatewayUseConnectionCredentials - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.UseDifferentUsernameAndPassword))] - No = 0, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.UseSameUsernameAndPassword))] - Yes = 1, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.UseSmartCard))] - SmartCard = 2 - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RDPColors.cs b/mRemoteNG/Connection/Protocol/RDP/RDPColors.cs deleted file mode 100644 index ca45ff7a6..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RDPColors.cs +++ /dev/null @@ -1,23 +0,0 @@ -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum RDPColors - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.Rdp256Colors))] - Colors256 = 8, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Rdp32768Colors))] - Colors15Bit = 15, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Rdp65536Colors))] - Colors16Bit = 16, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Rdp16777216Colors))] - Colors24Bit = 24, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Rdp4294967296Colors))] - Colors32Bit = 32 - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RDPPerformanceFlags.cs b/mRemoteNG/Connection/Protocol/RDP/RDPPerformanceFlags.cs deleted file mode 100644 index 6e8eafcd3..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RDPPerformanceFlags.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.ComponentModel; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum RDPPerformanceFlags - { - [Description("strRDPDisableWallpaper")] - DisableWallpaper = 0x1, - - [Description("strRDPDisableFullWindowdrag")] - DisableFullWindowDrag = 0x2, - - [Description("strRDPDisableMenuAnimations")] - DisableMenuAnimations = 0x4, - - [Description("strRDPDisableThemes")] - DisableThemes = 0x8, - - [Description("strRDPDisableCursorShadow")] - DisableCursorShadow = 0x20, - - [Description("strRDPDisableCursorblinking")] - DisableCursorBlinking = 0x40, - - [Description("strRDPEnableFontSmoothing")] - EnableFontSmoothing = 0x80, - - [Description("strRDPEnableDesktopComposition")] - EnableDesktopComposition = 0x100, - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RDPResolutions.cs b/mRemoteNG/Connection/Protocol/RDP/RDPResolutions.cs deleted file mode 100644 index c34f30552..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RDPResolutions.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.ComponentModel; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum RDPResolutions - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.FitToPanel))] - FitToWindow, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Fullscreen))] - Fullscreen, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.SmartSize))] - SmartSize, - [Description("800x600")] Res800x600, - [Description("1024x768")] Res1024x768, - [Description("1152x864")] Res1152x864, - [Description("1280x800")] Res1280x800, - [Description("1280x1024")] Res1280x1024, - [Description("1366x768")] Res1366x768, - [Description("1440x900")] Res1440x900, - [Description("1600x900")] Res1600x900, - [Description("1600x1200")] Res1600x1200, - [Description("1680x1050")] Res1680x1050, - [Description("1920x1080")] Res1920x1080, - [Description("1920x1200")] Res1920x1200, - [Description("2048x1536")] Res2048x1536, - [Description("2560x1440")] Res2560x1440, - [Description("2560x1600")] Res2560x1600, - [Description("2560x2048")] Res2560x2048, - [Description("3840x2160")] Res3840x2160 - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RDPSoundQuality.cs b/mRemoteNG/Connection/Protocol/RDP/RDPSoundQuality.cs deleted file mode 100644 index 2e9f37416..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RDPSoundQuality.cs +++ /dev/null @@ -1,17 +0,0 @@ -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum RDPSoundQuality - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.Dynamic))] - Dynamic = 0, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Medium))] - Medium = 1, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.High))] - High = 2 - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RDPSounds.cs b/mRemoteNG/Connection/Protocol/RDP/RDPSounds.cs deleted file mode 100644 index 45f18beb6..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RDPSounds.cs +++ /dev/null @@ -1,17 +0,0 @@ -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum RDPSounds - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.RdpSoundBringToThisComputer))] - BringToThisComputer = 0, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.RdpSoundLeaveAtRemoteComputer))] - LeaveAtRemoteComputer = 1, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.DoNotPlay))] - DoNotPlay = 2 - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RDPVersions.cs b/mRemoteNG/Connection/Protocol/RDP/RDPVersions.cs deleted file mode 100644 index 2ca65ddde..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RDPVersions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public class RDPVersions - { - public static Version RDC60 = new Version(6, 0, 6000); - public static Version RDC61 = new Version(6, 0, 6001); - public static Version RDC70 = new Version(6, 1, 7600); - public static Version RDC80 = new Version(6, 2, 9200); - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpErrorCodes.cs b/mRemoteNG/Connection/Protocol/RDP/RdpErrorCodes.cs deleted file mode 100644 index a5dbf8c37..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpErrorCodes.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections; -using mRemoteNG.App; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public static class RdpErrorCodes - { - private static Hashtable _description; - - private static void InitDescription() - { - _description = new Hashtable - { - {"0", nameof(Language.RdpErrorUnknown)}, - {"1", nameof(Language.RdpErrorCode1)}, - {"2", nameof(Language.RdpErrorOutOfMemory)}, - {"3", nameof(Language.RdpErrorWindowCreation)}, - {"4", nameof(Language.RdpErrorCode2)}, - {"5", nameof(Language.RdpErrorCode3)}, - {"6", nameof(Language.RdpErrorCode4)}, - {"7", nameof(Language.RdpErrorConnection)}, - {"100", nameof(Language.RdpErrorWinsock)} - }; - } - - public static string GetError(int id) - { - try - { - if (_description == null) - InitDescription(); - - return (string)_description?[id]; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpErrorGetFailure, ex); - return string.Format(Language.RdpErrorUnknown, id); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpExtensions.cs b/mRemoteNG/Connection/Protocol/RDP/RdpExtensions.cs deleted file mode 100644 index 9a3f165ba..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpExtensions.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Drawing; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public static class RdpExtensions - { - public static Rectangle GetResolutionRectangle(this RDPResolutions resolution) - { - string[] resolutionParts = null; - if (resolution != RDPResolutions.FitToWindow & resolution != RDPResolutions.Fullscreen & - resolution != RDPResolutions.SmartSize) - { - resolutionParts = resolution.ToString().Replace("Res", "").Split('x'); - } - - if (resolutionParts == null || resolutionParts.Length != 2) - { - return new Rectangle(0, 0, 0, 0); - } - else - { - return new Rectangle(0, 0, Convert.ToInt32(resolutionParts[0]), Convert.ToInt32(resolutionParts[1])); - } - } - } -} diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpNetworkConnectionType.cs b/mRemoteNG/Connection/Protocol/RDP/RdpNetworkConnectionType.cs deleted file mode 100644 index addc06ddf..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpNetworkConnectionType.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.RDP -{ - /// - /// Indicates the speed of the connection between the - /// client and remote machine. - /// - public enum RdpNetworkConnectionType - { - /// - /// Modem (56 Kbps) - /// - Modem = 1, - - /// - /// Low-speed broadband (256 Kbps to 2 Mbps) - /// - BroadbandLow = 2, - - /// - /// Satellite (2 Mbps to 16 Mbps, with high latency) - /// - Satellite = 3, - - /// - /// High-speed broadband (2 Mbps to 10 Mbps) - /// - BroadbandHigh = 4, - - /// - /// Wide area network (WAN) (10 Mbps or higher, with high latency) - /// - Wan = 5, - - /// - /// Local area network (LAN) (10 Mbps or higher) - /// - Lan = 6, - - /// - /// Automatically detect the connection type. Warning: setting - /// this will prevent the client from setting several performance - /// options such as displaying wallpaper and remote cursors. - /// - AutoDetect = 7 - } -} diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs deleted file mode 100644 index 9daf084d1..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol6.cs +++ /dev/null @@ -1,837 +0,0 @@ -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Threading; -using System.Timers; -using System.Windows.Forms; -using AxMSTSCLib; -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools; -using mRemoteNG.UI; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Tabs; -using MSTSCLib; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public class RdpProtocol6 : ProtocolBase, ISupportsViewOnly - { - /* RDP v8 requires Windows 7 with: - * https://support.microsoft.com/en-us/kb/2592687 - * OR - * https://support.microsoft.com/en-us/kb/2923545 - * - * Windows 8+ support RDP v8 out of the box. - */ - private MsRdpClient6NotSafeForScripting _rdpClient; - protected ConnectionInfo connectionInfo; - protected bool loginComplete; - private Version _rdpVersion; - private bool _redirectKeys; - private bool _alertOnIdleDisconnect; - private readonly DisplayProperties _displayProperties; - private readonly FrmMain _frmMain = FrmMain.Default; - protected virtual RdpVersion RdpProtocolVersion => RdpVersion.Rdc6; - private AxHost AxHost => (AxHost)Control; - - #region Properties - - public virtual bool SmartSize - { - get => _rdpClient.AdvancedSettings2.SmartSizing; - protected set => _rdpClient.AdvancedSettings2.SmartSizing = value; - } - - public virtual bool Fullscreen - { - get => _rdpClient.FullScreen; - protected set => _rdpClient.FullScreen = value; - } - - private bool RedirectKeys - { -/* - get - { - return _redirectKeys; - } -*/ - set - { - _redirectKeys = value; - try - { - if (!_redirectKeys) - { - return; - } - - Debug.Assert(Convert.ToBoolean(_rdpClient.SecuredSettingsEnabled)); - var msRdpClientSecuredSettings = _rdpClient.SecuredSettings2; - msRdpClientSecuredSettings.KeyboardHookMode = 1; // Apply key combinations at the remote server. - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetRedirectKeysFailed, ex); - } - } - } - - public bool LoadBalanceInfoUseUtf8 { get; set; } - - public bool ViewOnly - { - get => !AxHost.Enabled; - set => AxHost.Enabled = !value; - } - - #endregion - - #region Constructors - - public RdpProtocol6() - { - _displayProperties = new DisplayProperties(); - tmrReconnect.Elapsed += tmrReconnect_Elapsed; - } - - #endregion - - #region Public Methods - protected virtual AxHost CreateActiveXRdpClientControl() - { - return new AxMsRdpClient6NotSafeForScripting(); - } - - - public override bool Initialize() - { - connectionInfo = InterfaceControl.Info; - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - $"Requesting RDP version: {connectionInfo.RdpVersion}. Using: {RdpProtocolVersion}"); - Control = CreateActiveXRdpClientControl(); - base.Initialize(); - - try - { - if (!InitializeActiveXControl()) - return false; - - _rdpVersion = new Version(_rdpClient.Version); - SetRdpClientProperties(); - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetPropsFailed, ex); - return false; - } - } - - private bool InitializeActiveXControl() - { - try - { - Control.GotFocus += RdpClient_GotFocus; - Control.CreateControl(); - while (!Control.Created) - { - Thread.Sleep(0); - Application.DoEvents(); - } - Control.Anchor = AnchorStyles.None; - - _rdpClient = (MsRdpClient6NotSafeForScripting)((AxHost)Control).GetOcx(); - return true; - } - catch (COMException ex) - { - if (ex.Message.Contains("CLASS_E_CLASSNOTAVAILABLE")) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - string.Format(Language.RdpProtocolVersionNotSupported, connectionInfo.RdpVersion)); - } - else - { - Runtime.MessageCollector.AddExceptionMessage(Language.RdpControlCreationFailed, ex); - } - Control.Dispose(); - return false; - } - } - - public override bool Connect() - { - loginComplete = false; - SetEventHandlers(); - - try - { - _rdpClient.Connect(); - base.Connect(); - - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.ConnectionOpenFailed, ex); - } - - return false; - } - - public override void Disconnect() - { - try - { - _rdpClient.Disconnect(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpDisconnectFailed, ex); - Close(); - } - } - - public void ToggleFullscreen() - { - try - { - Fullscreen = !Fullscreen; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpToggleFullscreenFailed, ex); - } - } - - public void ToggleSmartSize() - { - try - { - SmartSize = !SmartSize; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpToggleSmartSizeFailed, ex); - } - } - - /// - /// Toggles whether the RDP ActiveX control will capture and send input events to the remote host. - /// The local host will continue to receive data from the remote host regardless of this setting. - /// - public void ToggleViewOnly() - { - try - { - ViewOnly = !ViewOnly; - } - catch - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, $"Could not toggle view only mode for host {connectionInfo.Hostname}"); - } - } - - public override void Focus() - { - try - { - if (Control.ContainsFocus == false) - { - Control.Focus(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpFocusFailed, ex); - } - } - - /// - /// Determines if this version of the RDP client - /// is supported on this machine. - /// - /// - public bool RdpVersionSupported() - { - try - { - using (var control = CreateActiveXRdpClientControl()) - { - control.CreateControl(); - return true; - } - } - catch - { - return false; - } - } - #endregion - - #region Private Methods - - private void SetRdpClientProperties() - { - _rdpClient.Server = connectionInfo.Hostname; - - SetCredentials(); - SetResolution(); - _rdpClient.FullScreenTitle = connectionInfo.Name; - - _alertOnIdleDisconnect = connectionInfo.RDPAlertIdleTimeout; - _rdpClient.AdvancedSettings2.MinutesToIdleTimeout = connectionInfo.RDPMinutesToIdleTimeout; - - #region Remote Desktop Services - _rdpClient.SecuredSettings2.StartProgram = connectionInfo.RDPStartProgram; - _rdpClient.SecuredSettings2.WorkDir = connectionInfo.RDPStartProgramWorkDir; - #endregion - - //not user changeable - _rdpClient.AdvancedSettings2.GrabFocusOnConnect = true; - _rdpClient.AdvancedSettings3.EnableAutoReconnect = true; - _rdpClient.AdvancedSettings3.MaxReconnectAttempts = Settings.Default.RdpReconnectionCount; - _rdpClient.AdvancedSettings2.keepAliveInterval = 60000; //in milliseconds (10,000 = 10 seconds) - _rdpClient.AdvancedSettings5.AuthenticationLevel = 0; - _rdpClient.AdvancedSettings2.EncryptionEnabled = 1; - - _rdpClient.AdvancedSettings2.overallConnectionTimeout = Settings.Default.ConRDPOverallConnectionTimeout; - - _rdpClient.AdvancedSettings2.BitmapPeristence = Convert.ToInt32(connectionInfo.CacheBitmaps); - if (_rdpVersion >= Versions.RDC61) - { - _rdpClient.AdvancedSettings7.EnableCredSspSupport = connectionInfo.UseCredSsp; - } - - SetUseConsoleSession(); - SetPort(); - RedirectKeys = connectionInfo.RedirectKeys; - SetRedirection(); - SetAuthenticationLevel(); - SetLoadBalanceInfo(); - SetRdGateway(); - ViewOnly = Force.HasFlag(ConnectionInfo.Force.ViewOnly); - - _rdpClient.ColorDepth = (int)connectionInfo.Colors; - - SetPerformanceFlags(); - - _rdpClient.ConnectingText = Language.Connecting; - } - - protected object GetExtendedProperty(string property) - { - try - { - // ReSharper disable once UseIndexedProperty - return ((IMsRdpExtendedSettings)_rdpClient).get_Property(property); - } - catch (Exception e) - { - Runtime.MessageCollector.AddExceptionMessage($"Error getting extended RDP property '{property}'", - e, MessageClass.WarningMsg, false); - return null; - } - } - - protected void SetExtendedProperty(string property, object value) - { - try - { - // ReSharper disable once UseIndexedProperty - ((IMsRdpExtendedSettings)_rdpClient).set_Property(property, ref value); - } - catch (Exception e) - { - Runtime.MessageCollector.AddExceptionMessage($"Error setting extended RDP property '{property}'", - e, MessageClass.WarningMsg, false); - } - } - - private void SetRdGateway() - { - try - { - if (_rdpClient.TransportSettings.GatewayIsSupported == 0) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.RdpGatewayNotSupported, - true); - return; - } - - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.RdpGatewayIsSupported, - true); - - if (connectionInfo.RDGatewayUsageMethod != RDGatewayUsageMethod.Never) - { - _rdpClient.TransportSettings.GatewayUsageMethod = (uint)connectionInfo.RDGatewayUsageMethod; - _rdpClient.TransportSettings.GatewayHostname = connectionInfo.RDGatewayHostname; - _rdpClient.TransportSettings.GatewayProfileUsageMethod = 1; // TSC_PROXY_PROFILE_MODE_EXPLICIT - if (connectionInfo.RDGatewayUseConnectionCredentials == - RDGatewayUseConnectionCredentials.SmartCard) - { - _rdpClient.TransportSettings.GatewayCredsSource = 1; // TSC_PROXY_CREDS_MODE_SMARTCARD - } - - if (_rdpVersion >= Versions.RDC61 && !Force.HasFlag(ConnectionInfo.Force.NoCredentials)) - { - if (connectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.Yes) - { - _rdpClient.TransportSettings2.GatewayUsername = connectionInfo.Username; - _rdpClient.TransportSettings2.GatewayPassword = connectionInfo.Password; - _rdpClient.TransportSettings2.GatewayDomain = connectionInfo?.Domain; - } - else if (connectionInfo.RDGatewayUseConnectionCredentials == - RDGatewayUseConnectionCredentials.SmartCard) - { - _rdpClient.TransportSettings2.GatewayCredSharing = 0; - } - else - { - _rdpClient.TransportSettings2.GatewayUsername = connectionInfo.RDGatewayUsername; - _rdpClient.TransportSettings2.GatewayPassword = connectionInfo.RDGatewayPassword; - _rdpClient.TransportSettings2.GatewayDomain = connectionInfo.RDGatewayDomain; - _rdpClient.TransportSettings2.GatewayCredSharing = 0; - } - } - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetGatewayFailed, ex); - } - } - - private void SetUseConsoleSession() - { - try - { - bool value; - - if (Force.HasFlag(ConnectionInfo.Force.UseConsoleSession)) - { - value = true; - } - else if (Force.HasFlag(ConnectionInfo.Force.DontUseConsoleSession)) - { - value = false; - } - else - { - value = connectionInfo.UseConsoleSession; - } - - if (_rdpVersion >= Versions.RDC61) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - string.Format(Language.RdpSetConsoleSwitch, _rdpVersion), - true); - _rdpClient.AdvancedSettings7.ConnectToAdministerServer = value; - } - else - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - string.Format(Language.RdpSetConsoleSwitch, _rdpVersion) + - Environment.NewLine + - "No longer supported in this RDP version. Reference: https://msdn.microsoft.com/en-us/library/aa380863(v=vs.85).aspx", - true); - // ConnectToServerConsole is deprecated - //https://msdn.microsoft.com/en-us/library/aa380863(v=vs.85).aspx - //_rdpClient.AdvancedSettings2.ConnectToServerConsole = value; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetConsoleSessionFailed, ex); - } - } - - private void SetCredentials() - { - try - { - if (Force.HasFlag(ConnectionInfo.Force.NoCredentials)) - { - return; - } - - var userName = connectionInfo?.Username ?? ""; - var password = connectionInfo?.Password ?? ""; - var domain = connectionInfo?.Domain ?? ""; - - // access secret server api if necessary - if (!string.IsNullOrEmpty(connectionInfo?.UserViaAPI)) - { - try - { - ExternalConnectors.TSS.SecretServerInterface.FetchSecretFromServer("SSAPI:" + connectionInfo?.UserViaAPI, out userName, out password, out domain); - } - catch (Exception ex) - { - Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0); - } - - } - - if (string.IsNullOrEmpty(userName)) - { - if (Settings.Default.EmptyCredentials == "windows") - { - _rdpClient.UserName = Environment.UserName; - } - else if (Settings.Default.EmptyCredentials == "custom") - { - _rdpClient.UserName = Settings.Default.DefaultUsername; - } - } - else - { - _rdpClient.UserName = userName; - } - - if (string.IsNullOrEmpty(password)) - { - if (Settings.Default.EmptyCredentials == "custom") - { - if (Settings.Default.DefaultPassword != "") - { - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - _rdpClient.AdvancedSettings2.ClearTextPassword = - cryptographyProvider.Decrypt(Settings.Default.DefaultPassword, Runtime.EncryptionKey); - } - } - } - else - { - _rdpClient.AdvancedSettings2.ClearTextPassword = password; - } - - if (string.IsNullOrEmpty(domain)) - { - if (Settings.Default.EmptyCredentials == "windows") - { - _rdpClient.Domain = Environment.UserDomainName; - } - else if (Settings.Default.EmptyCredentials == "custom") - { - _rdpClient.Domain = Settings.Default.DefaultDomain; - } - } - else - { - _rdpClient.Domain = domain; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetCredentialsFailed, ex); - } - } - - private void SetResolution() - { - try - { - var scaleFactor = (uint)(_displayProperties.ResolutionScalingFactor.Width * 100); - SetExtendedProperty("DesktopScaleFactor", scaleFactor); - SetExtendedProperty("DeviceScaleFactor", (uint)100); - - if (Force.HasFlag(ConnectionInfo.Force.Fullscreen)) - { - _rdpClient.FullScreen = true; - _rdpClient.DesktopWidth = Screen.FromControl(_frmMain).Bounds.Width; - _rdpClient.DesktopHeight = Screen.FromControl(_frmMain).Bounds.Height; - - return; - } - - if (InterfaceControl.Info.Resolution == RDPResolutions.FitToWindow || - InterfaceControl.Info.Resolution == RDPResolutions.SmartSize) - { - _rdpClient.DesktopWidth = InterfaceControl.Size.Width; - _rdpClient.DesktopHeight = InterfaceControl.Size.Height; - - if (InterfaceControl.Info.Resolution == RDPResolutions.SmartSize) - { - _rdpClient.AdvancedSettings2.SmartSizing = true; - } - } - else if (InterfaceControl.Info.Resolution == RDPResolutions.Fullscreen) - { - _rdpClient.FullScreen = true; - _rdpClient.DesktopWidth = Screen.FromControl(_frmMain).Bounds.Width; - _rdpClient.DesktopHeight = Screen.FromControl(_frmMain).Bounds.Height; - } - else - { - var resolution = connectionInfo.Resolution.GetResolutionRectangle(); - _rdpClient.DesktopWidth = resolution.Width; - _rdpClient.DesktopHeight = resolution.Height; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetResolutionFailed, ex); - } - } - - private void SetPort() - { - try - { - if (connectionInfo.Port != (int)Defaults.Port) - { - _rdpClient.AdvancedSettings2.RDPPort = connectionInfo.Port; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetPortFailed, ex); - } - } - - private void SetRedirection() - { - try - { - _rdpClient.AdvancedSettings2.RedirectDrives = connectionInfo.RedirectDiskDrives; - _rdpClient.AdvancedSettings2.RedirectPorts = connectionInfo.RedirectPorts; - _rdpClient.AdvancedSettings2.RedirectPrinters = connectionInfo.RedirectPrinters; - _rdpClient.AdvancedSettings2.RedirectSmartCards = connectionInfo.RedirectSmartCards; - _rdpClient.SecuredSettings2.AudioRedirectionMode = (int)connectionInfo.RedirectSound; - _rdpClient.AdvancedSettings6.RedirectClipboard = connectionInfo.RedirectClipboard; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetRedirectionFailed, ex); - } - } - - private void SetPerformanceFlags() - { - try - { - var pFlags = 0; - if (connectionInfo.DisplayThemes == false) - pFlags += (int)RDPPerformanceFlags.DisableThemes; - - if (connectionInfo.DisplayWallpaper == false) - pFlags += (int)RDPPerformanceFlags.DisableWallpaper; - - if (connectionInfo.EnableFontSmoothing) - pFlags += (int)RDPPerformanceFlags.EnableFontSmoothing; - - if (connectionInfo.EnableDesktopComposition) - pFlags += (int)RDPPerformanceFlags.EnableDesktopComposition; - - if (connectionInfo.DisableFullWindowDrag) - pFlags += (int)RDPPerformanceFlags.DisableFullWindowDrag; - - if (connectionInfo.DisableMenuAnimations) - pFlags += (int)RDPPerformanceFlags.DisableMenuAnimations; - - if (connectionInfo.DisableCursorShadow) - pFlags += (int)RDPPerformanceFlags.DisableCursorShadow; - - if (connectionInfo.DisableCursorBlinking) - pFlags += (int)RDPPerformanceFlags.DisableCursorBlinking; - - _rdpClient.AdvancedSettings2.PerformanceFlags = pFlags; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetPerformanceFlagsFailed, ex); - } - } - - private void SetAuthenticationLevel() - { - try - { - _rdpClient.AdvancedSettings5.AuthenticationLevel = (uint)connectionInfo.RDPAuthenticationLevel; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetAuthenticationLevelFailed, ex); - } - } - - private void SetLoadBalanceInfo() - { - if (string.IsNullOrEmpty(connectionInfo.LoadBalanceInfo)) - { - return; - } - - try - { - _rdpClient.AdvancedSettings2.LoadBalanceInfo = LoadBalanceInfoUseUtf8 - ? new AzureLoadBalanceInfoEncoder().Encode(connectionInfo.LoadBalanceInfo) - : connectionInfo.LoadBalanceInfo; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Unable to set load balance info.", ex); - } - } - - private void SetEventHandlers() - { - try - { - _rdpClient.OnConnecting += RDPEvent_OnConnecting; - _rdpClient.OnConnected += RDPEvent_OnConnected; - _rdpClient.OnLoginComplete += RDPEvent_OnLoginComplete; - _rdpClient.OnFatalError += RDPEvent_OnFatalError; - _rdpClient.OnDisconnected += RDPEvent_OnDisconnected; - _rdpClient.OnLeaveFullScreenMode += RDPEvent_OnLeaveFullscreenMode; - _rdpClient.OnIdleTimeoutNotification += RDPEvent_OnIdleTimeoutNotification; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetEventHandlersFailed, ex); - } - } - - #endregion - - #region Private Events & Handlers - - private void RDPEvent_OnIdleTimeoutNotification() - { - Close(); //Simply close the RDP Session if the idle timeout has been triggered. - - if (!_alertOnIdleDisconnect) return; - MessageBox.Show($"The {connectionInfo.Name} session was disconnected due to inactivity", - "Session Disconnected", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - - - private void RDPEvent_OnFatalError(int errorCode) - { - var errorMsg = RdpErrorCodes.GetError(errorCode); - Event_ErrorOccured(this, errorMsg, errorCode); - } - - private void RDPEvent_OnDisconnected(int discReason) - { - const int UI_ERR_NORMAL_DISCONNECT = 0xB08; - if (discReason != UI_ERR_NORMAL_DISCONNECT) - { - var reason = - _rdpClient.GetErrorDescription((uint)discReason, (uint)_rdpClient.ExtendedDisconnectReason); - Event_Disconnected(this, reason, discReason); - } - - if (Settings.Default.ReconnectOnDisconnect) - { - ReconnectGroup = new ReconnectGroup(); - ReconnectGroup.CloseClicked += Event_ReconnectGroupCloseClicked; - ReconnectGroup.Left = (int)((double)Control.Width / 2 - (double)ReconnectGroup.Width / 2); - ReconnectGroup.Top = (int)((double)Control.Height / 2 - (double)ReconnectGroup.Height / 2); - ReconnectGroup.Parent = Control; - ReconnectGroup.Show(); - tmrReconnect.Enabled = true; - } - else - { - Close(); - } - } - - private void RDPEvent_OnConnecting() - { - Event_Connecting(this); - } - - private void RDPEvent_OnConnected() - { - Event_Connected(this); - } - - private void RDPEvent_OnLoginComplete() - { - loginComplete = true; - } - - private void RDPEvent_OnLeaveFullscreenMode() - { - Fullscreen = false; - _leaveFullscreenEvent?.Invoke(this, new EventArgs()); - } - - private void RdpClient_GotFocus(object sender, EventArgs e) - { - ((ConnectionTab)Control.Parent.Parent).Focus(); - } - #endregion - - #region Public Events & Handlers - - public delegate void LeaveFullscreenEventHandler(object sender, EventArgs e); - - private LeaveFullscreenEventHandler _leaveFullscreenEvent; - - public event LeaveFullscreenEventHandler LeaveFullscreen - { - add => _leaveFullscreenEvent = (LeaveFullscreenEventHandler)Delegate.Combine(_leaveFullscreenEvent, value); - remove => - _leaveFullscreenEvent = (LeaveFullscreenEventHandler)Delegate.Remove(_leaveFullscreenEvent, value); - } - - #endregion - - #region Enums - - public enum Defaults - { - Colors = RDPColors.Colors16Bit, - Sounds = RDPSounds.DoNotPlay, - Resolution = RDPResolutions.FitToWindow, - Port = 3389 - } - - #endregion - - public static class Versions - { - public static readonly Version RDC60 = new Version(6, 0, 6000); - public static readonly Version RDC61 = new Version(6, 0, 6001); - public static readonly Version RDC70 = new Version(6, 1, 7600); - public static readonly Version RDC80 = new Version(6, 2, 9200); - public static readonly Version RDC81 = new Version(6, 3, 9600); - public static readonly Version RDC100 = new Version(10, 0, 0); - } - - #region Reconnect Stuff - - public void tmrReconnect_Elapsed(object sender, ElapsedEventArgs e) - { - try - { - var srvReady = PortScanner.IsPortOpen(connectionInfo.Hostname, Convert.ToString(connectionInfo.Port)); - - ReconnectGroup.ServerReady = srvReady; - - if (!ReconnectGroup.ReconnectWhenReady || !srvReady) return; - tmrReconnect.Enabled = false; - ReconnectGroup.DisposeReconnectGroup(); - //SetProps() - _rdpClient.Connect(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage( - string.Format(Language.AutomaticReconnectError, connectionInfo.Hostname), - ex, MessageClass.WarningMsg, false); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol7.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol7.cs deleted file mode 100644 index 1b6a0419f..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol7.cs +++ /dev/null @@ -1,51 +0,0 @@ -using AxMSTSCLib; -using mRemoteNG.App; -using MSTSCLib; -using System; -using System.Windows.Forms; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public class RdpProtocol7 : RdpProtocol6 - { - protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc7; - - public override bool Initialize() - { - if (!base.Initialize()) - return false; - - try - { - var rdpClient7 = (MsRdpClient7NotSafeForScripting)((AxHost) Control).GetOcx(); - rdpClient7.AdvancedSettings8.AudioQualityMode = (uint)connectionInfo.SoundQuality; - rdpClient7.AdvancedSettings8.AudioCaptureRedirectionMode = connectionInfo.RedirectAudioCapture; - rdpClient7.AdvancedSettings8.NetworkConnectionType = (int)RdpNetworkConnectionType.Modem; - - if (connectionInfo.UseVmId) - { - SetExtendedProperty("DisableCredentialsDelegation", true); - rdpClient7.AdvancedSettings7.AuthenticationServiceClass = "Microsoft Virtual Console Service"; - rdpClient7.AdvancedSettings8.EnableCredSspSupport = true; - rdpClient7.AdvancedSettings8.NegotiateSecurityLayer = false; - rdpClient7.AdvancedSettings7.PCB = $"{connectionInfo.VmId}"; - if (connectionInfo.UseEnhancedMode) - rdpClient7.AdvancedSettings7.PCB += ";EnhancedMode=1"; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.RdpSetPropsFailed, ex); - return false; - } - - return true; - } - - protected override AxHost CreateActiveXRdpClientControl() - { - return new AxMsRdpClient7NotSafeForScripting(); - } - } -} diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs deleted file mode 100644 index c1cb10572..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol8.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using AxMSTSCLib; -using mRemoteNG.App; -using mRemoteNG.Messages; -using MSTSCLib; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - /* RDP v8 requires Windows 7 with: - * https://support.microsoft.com/en-us/kb/2592687 - * OR - * https://support.microsoft.com/en-us/kb/2923545 - * - * Windows 8+ support RDP v8 out of the box. - */ - public class RdpProtocol8 : RdpProtocol7 - { - private MsRdpClient8NotSafeForScripting RdpClient8 => (MsRdpClient8NotSafeForScripting)((AxHost)Control).GetOcx(); - private Size _controlBeginningSize; - - protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc8; - - public override bool SmartSize - { - get => base.SmartSize; - protected set - { - base.SmartSize = value; - ReconnectForResize(); - } - } - - public override bool Fullscreen - { - get => base.Fullscreen; - protected set - { - base.Fullscreen = value; - ReconnectForResize(); - } - } - - public override void ResizeBegin(object sender, EventArgs e) - { - _controlBeginningSize = Control.Size; - } - - public override void Resize(object sender, EventArgs e) - { - if (DoResize() && _controlBeginningSize.IsEmpty) - { - ReconnectForResize(); - } - base.Resize(sender, e); - } - - public override void ResizeEnd(object sender, EventArgs e) - { - DoResize(); - if (!(Control.Size == _controlBeginningSize)) - { - ReconnectForResize(); - } - _controlBeginningSize = Size.Empty; - } - - protected override AxHost CreateActiveXRdpClientControl() - { - return new AxMsRdpClient8NotSafeForScripting(); - } - - private void ReconnectForResize() - { - if (!loginComplete) - return; - - if (!InterfaceControl.Info.AutomaticResize) - return; - - if (!(InterfaceControl.Info.Resolution == RDPResolutions.FitToWindow || - InterfaceControl.Info.Resolution == RDPResolutions.Fullscreen)) - return; - - if (SmartSize) - return; - - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, - $"Resizing RDP connection to host '{connectionInfo.Hostname}'"); - - try - { - var size = Fullscreen - ? Screen.FromControl(Control).Bounds.Size - : Control.Size; - RdpClient8.Reconnect((uint)size.Width, (uint)size.Height); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage( - string.Format(Language.ChangeConnectionResolutionError, - connectionInfo.Hostname), - ex, MessageClass.WarningMsg, false); - } - } - - private bool DoResize() - { - Control.Location = InterfaceControl.Location; - // kmscode - this doesn't look right to me. But I'm not aware of any functionality issues with this currently... - if (!(Control.Size == InterfaceControl.Size) && !(InterfaceControl.Size == Size.Empty)) - { - Control.Size = InterfaceControl.Size; - return true; - } - else - { - return false; - } - } - } -} diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol9.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocol9.cs deleted file mode 100644 index 64923285c..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocol9.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Windows.Forms; -using AxMSTSCLib; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public class RdpProtocol9 : RdpProtocol8 - { - protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc9; - - protected override AxHost CreateActiveXRdpClientControl() - { - return new AxMsRdpClient9NotSafeForScripting(); - } - } -} diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpProtocolFactory.cs b/mRemoteNG/Connection/Protocol/RDP/RdpProtocolFactory.cs deleted file mode 100644 index 64989c8d0..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpProtocolFactory.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public class RdpProtocolFactory - { - public RdpProtocol6 Build(RdpVersion rdpVersion) - { - switch (rdpVersion) - { - case RdpVersion.Highest: - return BuildHighestSupportedVersion(); - case RdpVersion.Rdc6: - return new RdpProtocol6(); - case RdpVersion.Rdc7: - return new RdpProtocol7(); - case RdpVersion.Rdc8: - return new RdpProtocol8(); - case RdpVersion.Rdc9: - return new RdpProtocol9(); - default: - throw new ArgumentOutOfRangeException(nameof(rdpVersion), rdpVersion, null); - } - } - - private RdpProtocol6 BuildHighestSupportedVersion() - { - var versions = Enum.GetValues(typeof(RdpVersion)) - .OfType() - .Except(new[] { RdpVersion.Highest }) - .Reverse(); - - foreach (var version in versions) - { - var rdp = Build(version); - if (rdp.RdpVersionSupported()) - return rdp; - } - - throw new ArgumentOutOfRangeException(); - } - - public List GetSupportedVersions() - { - var versions = Enum.GetValues(typeof(RdpVersion)) - .OfType() - .Except(new[] {RdpVersion.Highest}); - - var supportedVersions = new List(); - foreach (var version in versions) - { - if (Build(version).RdpVersionSupported()) - supportedVersions.Add(version); - } - - return supportedVersions; - } - } -} diff --git a/mRemoteNG/Connection/Protocol/RDP/RdpVersion.cs b/mRemoteNG/Connection/Protocol/RDP/RdpVersion.cs deleted file mode 100644 index d5598f143..000000000 --- a/mRemoteNG/Connection/Protocol/RDP/RdpVersion.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.RDP -{ - public enum RdpVersion - { - Rdc6, - Rdc7, - Rdc8, - Rdc9, - Highest = 1000 - } -} diff --git a/mRemoteNG/Connection/Protocol/Rlogin/Connection.Protocol.Rlogin.cs b/mRemoteNG/Connection/Protocol/Rlogin/Connection.Protocol.Rlogin.cs deleted file mode 100644 index e3fcba198..000000000 --- a/mRemoteNG/Connection/Protocol/Rlogin/Connection.Protocol.Rlogin.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.Rlogin -{ - public class ProtocolRlogin : PuttyBase - { - public ProtocolRlogin() - { - this.PuttyProtocol = Putty_Protocol.rlogin; - } - - public enum Defaults - { - Port = 513 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/SSH/Connection.Protocol.SSH1.cs b/mRemoteNG/Connection/Protocol/SSH/Connection.Protocol.SSH1.cs deleted file mode 100644 index 8472308d0..000000000 --- a/mRemoteNG/Connection/Protocol/SSH/Connection.Protocol.SSH1.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.SSH -{ - public class ProtocolSSH1 : PuttyBase - { - public ProtocolSSH1() - { - PuttyProtocol = Putty_Protocol.ssh; - PuttySSHVersion = Putty_SSHVersion.ssh1; - } - - public enum Defaults - { - Port = 22 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/SSH/Connection.Protocol.SSH2.cs b/mRemoteNG/Connection/Protocol/SSH/Connection.Protocol.SSH2.cs deleted file mode 100644 index d05c40fef..000000000 --- a/mRemoteNG/Connection/Protocol/SSH/Connection.Protocol.SSH2.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.SSH -{ - public class ProtocolSSH2 : PuttyBase - { - public ProtocolSSH2() - { - PuttyProtocol = Putty_Protocol.ssh; - PuttySSHVersion = Putty_SSHVersion.ssh2; - } - - public enum Defaults - { - Port = 22 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/Serial/Connection.Protocol.Serial.cs b/mRemoteNG/Connection/Protocol/Serial/Connection.Protocol.Serial.cs deleted file mode 100644 index 0f4ca94d1..000000000 --- a/mRemoteNG/Connection/Protocol/Serial/Connection.Protocol.Serial.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.Serial -{ - public class ProtocolSerial : PuttyBase - { - public ProtocolSerial() - { - this.PuttyProtocol = Putty_Protocol.serial; - } - - public enum Defaults - { - Port = 9600 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/Telnet/Connection.Protocol.Telnet.cs b/mRemoteNG/Connection/Protocol/Telnet/Connection.Protocol.Telnet.cs deleted file mode 100644 index 6f891c077..000000000 --- a/mRemoteNG/Connection/Protocol/Telnet/Connection.Protocol.Telnet.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace mRemoteNG.Connection.Protocol.Telnet -{ - public class ProtocolTelnet : PuttyBase - { - public ProtocolTelnet() - { - this.PuttyProtocol = Putty_Protocol.telnet; - } - - public enum Defaults - { - Port = 23 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/Protocol/VNC/Connection.Protocol.VNC.cs b/mRemoteNG/Connection/Protocol/VNC/Connection.Protocol.VNC.cs deleted file mode 100644 index e9bd2370a..000000000 --- a/mRemoteNG/Connection/Protocol/VNC/Connection.Protocol.VNC.cs +++ /dev/null @@ -1,317 +0,0 @@ -using System; -using System.Threading; -using System.ComponentModel; -using System.Net.Sockets; -using mRemoteNG.App; -using mRemoteNG.Tools; -using mRemoteNG.UI.Forms; -using mRemoteNG.Resources.Language; - -// ReSharper disable ArrangeAccessorOwnerBody - - -namespace mRemoteNG.Connection.Protocol.VNC -{ - public class ProtocolVNC : ProtocolBase - { - #region Private Declarations - - private VncSharpCore.RemoteDesktop _vnc; - private ConnectionInfo _info; - private static bool _isConnectionSuccessful; - private static Exception _socketexception; - private static readonly ManualResetEvent TimeoutObject = new ManualResetEvent(false); - - #endregion - - #region Public Methods - - public ProtocolVNC() - { - Control = new VncSharpCore.RemoteDesktop(); - } - - public override bool Initialize() - { - base.Initialize(); - - try - { - _vnc = (VncSharpCore.RemoteDesktop)Control; - _info = InterfaceControl.Info; - _vnc.VncPort = _info.Port; - - return true; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - Language.VncSetPropsFailed + Environment.NewLine + ex.Message, - true); - return false; - } - } - - public override bool Connect() - { - SetEventHandlers(); - try - { - if (TestConnect(_info.Hostname, _info.Port, 500)) - _vnc.Connect(_info.Hostname, _info.VNCViewOnly, _info.VNCSmartSizeMode != SmartSizeMode.SmartSNo); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - Language.ConnectionOpenFailed + Environment.NewLine + - ex.Message); - return false; - } - - return true; - } - - public override void Disconnect() - { - try - { - _vnc.Disconnect(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - Language.VncConnectionDisconnectFailed + Environment.NewLine + - ex.Message, true); - } - } - - public void SendSpecialKeys(SpecialKeys Keys) - { - try - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (Keys) - { - case SpecialKeys.CtrlAltDel: - _vnc.SendSpecialKeys(VncSharpCore.SpecialKeys.CtrlAltDel); - break; - case SpecialKeys.CtrlEsc: - _vnc.SendSpecialKeys(VncSharpCore.SpecialKeys.CtrlEsc); - break; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - Language.VncSendSpecialKeysFailed + Environment.NewLine + - ex.Message, true); - } - } - - public void StartChat() - { - throw new NotImplementedException(); - } - - public void StartFileTransfer() - { - throw new NotImplementedException(); - } - - public void RefreshScreen() - { - try - { - _vnc.FullScreenUpdate(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - Language.VncRefreshFailed + Environment.NewLine + ex.Message, - true); - } - } - - #endregion - - #region Private Methods - - private void SetEventHandlers() - { - try - { - _vnc.ConnectComplete += VNCEvent_Connected; - _vnc.ConnectionLost += VNCEvent_Disconnected; - FrmMain.ClipboardChanged += VNCEvent_ClipboardChanged; - if (!Force.HasFlag(ConnectionInfo.Force.NoCredentials) && _info?.Password?.Length > 0) - { - _vnc.GetPassword = VNCEvent_Authenticate; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - Language.VncSetEventHandlersFailed + Environment.NewLine + - ex.Message, true); - } - } - - private static bool TestConnect(string hostName, int port, int timeoutMSec) - { - var tcpclient = new TcpClient(); - - TimeoutObject.Reset(); - tcpclient.BeginConnect(hostName, port, CallBackMethod, tcpclient); - - if (TimeoutObject.WaitOne(timeoutMSec, false)) - { - if (_isConnectionSuccessful) return true; - } - else - { - tcpclient.Close(); - throw new TimeoutException($"Connection timed out to host " + hostName + " on port " + port); - } - - return false; - } - - private static void CallBackMethod(IAsyncResult asyncresult) - { - try - { - _isConnectionSuccessful = false; - var tcpclient = asyncresult.AsyncState as TcpClient; - - if (tcpclient?.Client == null) return; - - tcpclient.EndConnect(asyncresult); - _isConnectionSuccessful = true; - } - catch (Exception ex) - { - _isConnectionSuccessful = false; - _socketexception = ex; - } - finally - { - TimeoutObject.Set(); - } - } - - #endregion - - #region Private Events & Handlers - - private void VNCEvent_Connected(object sender, EventArgs e) - { - Event_Connected(this); - _vnc.AutoScroll = _info.VNCSmartSizeMode == SmartSizeMode.SmartSNo; - } - - private void VNCEvent_Disconnected(object sender, EventArgs e) - { - FrmMain.ClipboardChanged -= VNCEvent_ClipboardChanged; - Event_Disconnected(sender, @"VncSharp Disconnected.", null); - Close(); - } - - private void VNCEvent_ClipboardChanged() - { - _vnc.FillServerClipboard(); - } - - private string VNCEvent_Authenticate() - { - return _info.Password; - } - - #endregion - - #region Enums - - public enum Defaults - { - Port = 5900 - } - - public enum SpecialKeys - { - CtrlAltDel, - CtrlEsc - } - - public enum Compression - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.NoCompression))] - CompNone = 99, - [Description("0")] Comp0 = 0, - [Description("1")] Comp1 = 1, - [Description("2")] Comp2 = 2, - [Description("3")] Comp3 = 3, - [Description("4")] Comp4 = 4, - [Description("5")] Comp5 = 5, - [Description("6")] Comp6 = 6, - [Description("7")] Comp7 = 7, - [Description("8")] Comp8 = 8, - [Description("9")] Comp9 = 9 - } - - public enum Encoding - { - [Description("Raw")] EncRaw, - [Description("RRE")] EncRRE, - [Description("CoRRE")] EncCorre, - [Description("Hextile")] EncHextile, - [Description("Zlib")] EncZlib, - [Description("Tight")] EncTight, - [Description("ZlibHex")] EncZLibHex, - [Description("ZRLE")] EncZRLE - } - - public enum AuthMode - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.Vnc))] - AuthVNC, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Windows))] - AuthWin - } - - public enum ProxyType - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.None))] - ProxyNone, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Http))] - ProxyHTTP, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Socks5))] - ProxySocks5, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.UltraVncRepeater))] - ProxyUltra - } - - public enum Colors - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.Normal))] - ColNormal, - [Description("8-bit")] Col8Bit - } - - public enum SmartSizeMode - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.NoSmartSize))] - SmartSNo, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Free))] - SmartSFree, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Aspect))] - SmartSAspect - } - - #endregion - } -} diff --git a/mRemoteNG/Connection/Protocol/VNC/VNCEnum.cs b/mRemoteNG/Connection/Protocol/VNC/VNCEnum.cs deleted file mode 100644 index 8d632b341..000000000 --- a/mRemoteNG/Connection/Protocol/VNC/VNCEnum.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System.ComponentModel; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection.Protocol.VNC -{ - public enum Defaults - { - Port = 5900 - } - - public enum SpecialKeys - { - CtrlAltDel, - CtrlEsc - } - - public enum Compression - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.NoCompression))] - CompNone = 99, - [Description("0")] Comp0 = 0, - [Description("1")] Comp1 = 1, - [Description("2")] Comp2 = 2, - [Description("3")] Comp3 = 3, - [Description("4")] Comp4 = 4, - [Description("5")] Comp5 = 5, - [Description("6")] Comp6 = 6, - [Description("7")] Comp7 = 7, - [Description("8")] Comp8 = 8, - [Description("9")] Comp9 = 9 - } - - public enum Encoding - { - [Description("Raw")] EncRaw, - [Description("RRE")] EncRRE, - [Description("CoRRE")] EncCorre, - [Description("Hextile")] EncHextile, - [Description("Zlib")] EncZlib, - [Description("Tight")] EncTight, - [Description("ZlibHex")] EncZLibHex, - [Description("ZRLE")] EncZRLE - } - - public enum AuthMode - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.Vnc))] - AuthVNC, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Windows))] - AuthWin - } - - public enum ProxyType - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.None))] - ProxyNone, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Http))] - ProxyHTTP, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Socks5))] - ProxySocks5, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.UltraVncRepeater))] - ProxyUltra - } - - public enum Colors - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.Normal))] - ColNormal, - [Description("8-bit")] Col8Bit - } - - public enum SmartSizeMode - { - [LocalizedAttributes.LocalizedDescription(nameof(Language.NoSmartSize))] - SmartSNo, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Free))] - SmartSFree, - - [LocalizedAttributes.LocalizedDescription(nameof(Language.Aspect))] - SmartSAspect - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/PuttySessionInfo.cs b/mRemoteNG/Connection/PuttySessionInfo.cs deleted file mode 100644 index f609dd6af..000000000 --- a/mRemoteNG/Connection/PuttySessionInfo.cs +++ /dev/null @@ -1,110 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Tools; -using System; -using System.ComponentModel; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Connection -{ - public sealed class PuttySessionInfo : ConnectionInfo, IComponent - { - #region Properties - - [Browsable(false)] public RootPuttySessionsNodeInfo RootRootPuttySessionsInfo { get; set; } - - [ReadOnly(true)] public override string PuttySession { get; set; } - - [ReadOnly(true)] public override string Name { get; set; } - - [ReadOnly(true), Browsable(false)] public override string Description { get; set; } - - [ReadOnly(true), Browsable(false)] - public override string Icon - { - get => "PuTTY"; - set { } - } - - [ReadOnly(true), Browsable(false)] - public override string Panel - { - get => Parent?.Panel; - set { } - } - - [ReadOnly(true)] public override string Hostname { get; set; } - - [ReadOnly(true)] public override string Username { get; set; } - - [ReadOnly(true), Browsable(false)] public override string Password { get; set; } - - [ReadOnly(true)] public override ProtocolType Protocol { get; set; } - - [ReadOnly(true)] public override int Port { get; set; } - - [ReadOnly(true), Browsable(false)] public override string PreExtApp { get; set; } - - [ReadOnly(true), Browsable(false)] public override string PostExtApp { get; set; } - - [ReadOnly(true), Browsable(false)] public override string MacAddress { get; set; } - - [ReadOnly(true), Browsable(false)] public override string UserField { get; set; } - - #endregion - - [Command(), LocalizedAttributes.LocalizedDisplayName("strPuttySessionSettings")] - public void SessionSettings() - { - try - { - var puttyProcess = new PuttyProcessController(); - if (!puttyProcess.Start()) - { - return; - } - - if (puttyProcess.SelectListBoxItem(PuttySession)) - { - puttyProcess.ClickButton("&Load"); - } - - puttyProcess.SetControlText("Button", "&Cancel", "&Close"); - puttyProcess.SetControlVisible("Button", "&Open", false); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ErrorCouldNotLaunchPutty + Environment.NewLine + - ex.Message); - } - } - - public override TreeNodeType GetTreeNodeType() - { - return TreeNodeType.PuttySession; - } - - #region IComponent - - [Browsable(false)] - public ISite Site - { - get => new PropertyGridCommandSite(this); - set => throw (new NotImplementedException()); - } - - public void Dispose() - { - Disposed?.Invoke(this, EventArgs.Empty); - } - - public event EventHandler Disposed; - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Connection/WebHelper.cs b/mRemoteNG/Connection/WebHelper.cs deleted file mode 100644 index e2fe50854..000000000 --- a/mRemoteNG/Connection/WebHelper.cs +++ /dev/null @@ -1,24 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Connection -{ - public class WebHelper - { - public static void GoToUrl(string url) - { - var connectionInfo = new ConnectionInfo(); - connectionInfo.CopyFrom(DefaultConnectionInfo.Instance); - - connectionInfo.Name = ""; - connectionInfo.Hostname = url; - connectionInfo.Protocol = url.StartsWith("https:") ? ProtocolType.HTTPS : ProtocolType.HTTP; - connectionInfo.SetDefaultPort(); - if (string.IsNullOrEmpty(connectionInfo.Panel)) - connectionInfo.Panel = Language.General; - connectionInfo.IsQuickConnect = true; - Runtime.ConnectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Container/ContainerInfo.cs b/mRemoteNG/Container/ContainerInfo.cs deleted file mode 100644 index 597a91e26..000000000 --- a/mRemoteNG/Container/ContainerInfo.cs +++ /dev/null @@ -1,331 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Tree; - -namespace mRemoteNG.Container -{ - [DefaultProperty("Name")] - public class ContainerInfo : ConnectionInfo, INotifyCollectionChanged - { - private bool _isExpanded; - - [Browsable(false)] public List Children { get; } = new List(); - - [Category(""), Browsable(false), ReadOnly(false), Bindable(false), DefaultValue(""), DesignOnly(false)] - public bool IsExpanded - { - get => _isExpanded; - set => SetField(ref _isExpanded, value, "IsExpanded"); - } - - [Browsable(false)] - public override bool IsContainer - { - get => true; - set { } - } - - public ContainerInfo(string uniqueId) - : base(uniqueId) - { - SetDefaults(); - } - - public ContainerInfo() - : this(Guid.NewGuid().ToString()) - { - } - - public override TreeNodeType GetTreeNodeType() - { - return TreeNodeType.Container; - } - - public bool HasChildren() - { - return Children.Count > 0; - } - - public void AddChild(ConnectionInfo newChildItem) - { - AddChildAt(newChildItem, Children.Count); - } - - public void AddChildAbove(ConnectionInfo newChildItem, ConnectionInfo reference) - { - var newChildIndex = Children.IndexOf(reference); - if (newChildIndex < 0) - newChildIndex = Children.Count; - AddChildAt(newChildItem, newChildIndex); - } - - public void AddChildBelow(ConnectionInfo newChildItem, ConnectionInfo reference) - { - var newChildIndex = Children.IndexOf(reference) + 1; - if (newChildIndex > Children.Count || newChildIndex < 1) - newChildIndex = Children.Count; - AddChildAt(newChildItem, newChildIndex); - } - - public virtual void AddChildAt(ConnectionInfo newChildItem, int index) - { - if (Children.Contains(newChildItem)) return; - newChildItem.Parent?.RemoveChild(newChildItem); - newChildItem.Parent = this; - Children.Insert(index, newChildItem); - SubscribeToChildEvents(newChildItem); - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, - newChildItem)); - } - - public void AddChildRange(IEnumerable newChildren) - { - foreach (var child in newChildren) - { - AddChild(child); - } - } - - public virtual void RemoveChild(ConnectionInfo removalTarget) - { - if (!Children.Contains(removalTarget)) return; - removalTarget.Parent = null; - Children.Remove(removalTarget); - UnsubscribeToChildEvents(removalTarget); - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, - removalTarget)); - } - - public void RemoveChildRange(IEnumerable removalTargets) - { - foreach (var child in removalTargets) - { - RemoveChild(child); - } - } - - public void SetChildPosition(ConnectionInfo child, int newIndex) - { - var originalIndex = Children.IndexOf(child); - if (originalIndex < 0 || originalIndex == newIndex || newIndex < 0) return; - Children.Remove(child); - if (newIndex > Children.Count) newIndex = Children.Count; - Children.Insert(newIndex, child); - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, child, - newIndex, - originalIndex)); - } - - public void SetChildAbove(ConnectionInfo childToPromote, ConnectionInfo reference) - { - var newIndex = GetNewChildIndexAboveReference(childToPromote, reference); - SetChildPosition(childToPromote, newIndex); - } - - private int GetNewChildIndexAboveReference(ConnectionInfo childToPromote, ConnectionInfo reference) - { - var originalIndex = Children.IndexOf(childToPromote); - var newIndex = Children.IndexOf(reference); - if (originalIndex < newIndex) - newIndex -= 1; - return newIndex < 0 ? 0 : newIndex; - } - - public void SetChildBelow(ConnectionInfo childToPromote, ConnectionInfo reference) - { - var newIndex = GetNewChildIndexBelowReference(childToPromote, reference); - SetChildPosition(childToPromote, newIndex); - } - - private int GetNewChildIndexBelowReference(ConnectionInfo childToPromote, ConnectionInfo reference) - { - var originalIndex = Children.IndexOf(childToPromote); - var newIndex = Children.IndexOf(reference); - if (originalIndex > newIndex) - newIndex += 1; - return newIndex < 0 ? 0 : newIndex; - } - - public void PromoteChild(ConnectionInfo child) - { - var originalIndex = Children.IndexOf(child); - SetChildPosition(child, originalIndex - 1); - } - - public void DemoteChild(ConnectionInfo child) - { - var originalIndex = Children.IndexOf(child); - SetChildPosition(child, originalIndex + 1); - } - - public void Sort(ListSortDirection sortDirection = ListSortDirection.Ascending) - { - SortOn(connectionInfo => connectionInfo.Name, sortDirection); - } - - public void SortOn(Func propertyToCompare, - ListSortDirection sortDirection = ListSortDirection.Ascending) - where TProperty : IComparable - { - var connectionComparer = new ConnectionInfoComparer(propertyToCompare) - { - SortDirection = sortDirection - }; - Children.Sort(connectionComparer); - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); - } - - public void SortRecursive(ListSortDirection sortDirection = ListSortDirection.Ascending) - { - SortOnRecursive(connectionInfo => connectionInfo.Name, sortDirection); - } - - public void SortOnRecursive(Func propertyToCompare, - ListSortDirection sortDirection = ListSortDirection.Ascending) - where TProperty : IComparable - { - foreach (var child in Children.OfType()) - child.SortOnRecursive(propertyToCompare, sortDirection); - SortOn(propertyToCompare, sortDirection); - } - - // Deep clone, recursive - public override ConnectionInfo Clone() - { - var newContainer = new ContainerInfo(); - newContainer.CopyFrom(this); - newContainer.OpenConnections = new ProtocolList(); - newContainer.Inheritance = Inheritance.Clone(newContainer); - foreach (var child in Children.ToArray()) - { - var newChild = child.Clone(); - newChild.RemoveParent(); - newContainer.AddChild(newChild); - } - - return newContainer; - } - - private void SetDefaults() - { - Name = "New Folder"; - IsExpanded = true; - } - - public IEnumerable GetRecursiveChildList() - { - var childList = new List(); - foreach (var child in Children) - { - childList.Add(child); - var childContainer = child as ContainerInfo; - if (childContainer != null) - childList.AddRange(GetRecursiveChildList(childContainer)); - } - - return childList; - } - - private IEnumerable GetRecursiveChildList(ContainerInfo container) - { - var childList = new List(); - foreach (var child in container.Children) - { - childList.Add(child); - var childContainer = child as ContainerInfo; - if (childContainer != null) - childList.AddRange(GetRecursiveChildList(childContainer)); - } - - return childList; - } - - public IEnumerable GetRecursiveFavoriteChildList() - { - var childList = new List(); - foreach (var child in Children) - { - if (child.Favorite && child.GetTreeNodeType() == TreeNodeType.Connection) - childList.Add(child); - var childContainer = child as ContainerInfo; - if (childContainer != null) - childList.AddRange(GetRecursiveFavoritChildList(childContainer)); - } - return childList; - } - - /// - /// Pushes the connection properties of this container to all - /// children recursively. - /// - public void ApplyConnectionPropertiesToChildren() - { - var children = GetRecursiveChildList(); - - foreach (var child in children) - { - child.CopyFrom(this); - } - } - - /// - /// Pushes the inheritance settings of this container to all - /// children recursively. - /// - public void ApplyInheritancePropertiesToChildren() - { - var children = GetRecursiveChildList(); - - foreach (var child in children) - { - child.Inheritance = Inheritance.Clone(child); - } - } - - private IEnumerable GetRecursiveFavoritChildList(ContainerInfo container) - { - var childList = new List(); - foreach (var child in container.Children) - { - if (child.Favorite && child.GetTreeNodeType() == TreeNodeType.Connection) - childList.Add(child); - var childContainer = child as ContainerInfo; - if (childContainer != null) - childList.AddRange(GetRecursiveFavoritChildList(childContainer)); - } - return childList; - } - - protected virtual void SubscribeToChildEvents(ConnectionInfo child) - { - child.PropertyChanged += RaisePropertyChangedEvent; - var childAsContainer = child as ContainerInfo; - if (childAsContainer == null) return; - childAsContainer.CollectionChanged += RaiseCollectionChangedEvent; - } - - protected virtual void UnsubscribeToChildEvents(ConnectionInfo child) - { - child.PropertyChanged -= RaisePropertyChangedEvent; - var childAsContainer = child as ContainerInfo; - if (childAsContainer == null) return; - childAsContainer.CollectionChanged -= RaiseCollectionChangedEvent; - } - - public event NotifyCollectionChangedEventHandler CollectionChanged; - - private void RaiseCollectionChangedEvent(object sender, NotifyCollectionChangedEventArgs args) - { - CollectionChanged?.Invoke(sender, args); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/CredentialChangedEventArgs.cs b/mRemoteNG/Credential/CredentialChangedEventArgs.cs deleted file mode 100644 index 20661941b..000000000 --- a/mRemoteNG/Credential/CredentialChangedEventArgs.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; - -namespace mRemoteNG.Credential -{ - public class CredentialChangedEventArgs : EventArgs - { - public ICredentialRecord CredentialRecord { get; } - public ICredentialRepository Repository { get; } - - public CredentialChangedEventArgs(ICredentialRecord credentialRecord, ICredentialRepository repository) - { - if (credentialRecord == null) - throw new ArgumentNullException(nameof(credentialRecord)); - if (repository == null) - throw new ArgumentNullException(nameof(repository)); - - CredentialRecord = credentialRecord; - Repository = repository; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/CredentialDeletionMsgBoxConfirmer.cs b/mRemoteNG/Credential/CredentialDeletionMsgBoxConfirmer.cs deleted file mode 100644 index 5afdcb1e1..000000000 --- a/mRemoteNG/Credential/CredentialDeletionMsgBoxConfirmer.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.Tree; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Credential -{ - public class CredentialDeletionMsgBoxConfirmer : IConfirm> - { - private readonly Func _confirmationFunc; - - public CredentialDeletionMsgBoxConfirmer( - Func confirmationFunc) - { - if (confirmationFunc == null) - throw new ArgumentNullException(nameof(confirmationFunc)); - - _confirmationFunc = confirmationFunc; - } - - public bool Confirm(IEnumerable confirmationTargets) - { - var targetsArray = confirmationTargets.ToArray(); - if (targetsArray.Length == 0) return false; - if (targetsArray.Length > 1) - return PromptUser( - string.Format( - "Are you sure you want to delete these {0} selected credentials?", - targetsArray.Length)); - return PromptUser( - string.Format( - Language.ConfirmDeleteCredentialRecord, - targetsArray.First().Title)); - } - - private bool PromptUser(string promptMessage) - { - var msgBoxResponse = _confirmationFunc.Invoke(promptMessage, Application.ProductName, - MessageBoxButtons.YesNo, MessageBoxIcon.Question); - return msgBoxResponse == DialogResult.Yes; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/CredentialDomainUserComparer.cs b/mRemoteNG/Credential/CredentialDomainUserComparer.cs deleted file mode 100644 index f0c21d2f3..000000000 --- a/mRemoteNG/Credential/CredentialDomainUserComparer.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections; -using System.Collections.Generic; - - -namespace mRemoteNG.Credential -{ - public class CredentialDomainUserComparer : IComparer, IEqualityComparer - { - public int Compare(ICredentialRecord x, ICredentialRecord y) - { - var comparer = new CaseInsensitiveComparer(); - return comparer.Compare($"{x.Domain}\\{x.Username}", $"{y.Domain}\\{y.Username}"); - } - - public bool Equals(ICredentialRecord x, ICredentialRecord y) - { - return Compare(x, y) == 0; - } - - public int GetHashCode(ICredentialRecord obj) - { - return obj.Domain.GetHashCode() * 17 + obj.Username.GetHashCode(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/CredentialInfo.cs b/mRemoteNG/Credential/CredentialInfo.cs deleted file mode 100644 index 469a489cf..000000000 --- a/mRemoteNG/Credential/CredentialInfo.cs +++ /dev/null @@ -1,42 +0,0 @@ -using mRemoteNG.Tools; -using System.ComponentModel; - - -namespace mRemoteNG.Credential -{ - public class CredentialInfo - { - #region Public Properties - [LocalizedAttributes.LocalizedCategory("strCategoryDisplay"), - Browsable(true), - LocalizedAttributes.LocalizedDisplayName("strPropertyNameName"), - LocalizedAttributes.LocalizedDescription("strPropertyDescriptionName")] - public string Name { get; set; } - - [LocalizedAttributes.LocalizedCategory("strCategoryDisplay"), - Browsable(true), - LocalizedAttributes.LocalizedDisplayName("strPropertyNameDescription"), - LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDescription")] - public string Description { get; set; } - - [LocalizedAttributes.LocalizedCategory("strCategoryCredentials", 2), - Browsable(true), - LocalizedAttributes.LocalizedDisplayName("strPropertyNameUsername"), - LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUsername")] - public string Username { get; set; } - - [LocalizedAttributes.LocalizedCategory("strCategoryCredentials", 2), - Browsable(true), - LocalizedAttributes.LocalizedDisplayName("strPropertyNamePassword"), - LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPassword"), - PasswordPropertyText(true)]public string Password { get; set; } - - [LocalizedAttributes.LocalizedCategory("strCategoryCredentials", 2), - Browsable(true), - LocalizedAttributes.LocalizedDisplayName("strPropertyNameDomain"), - LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDomain")] - public string Domain { get; set; } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/CredentialRecord.cs b/mRemoteNG/Credential/CredentialRecord.cs deleted file mode 100644 index e0e77edbc..000000000 --- a/mRemoteNG/Credential/CredentialRecord.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.ComponentModel; -using System.Security; - - -namespace mRemoteNG.Credential -{ - public class CredentialRecord : ICredentialRecord - { - private string _title = "New Credential"; - private string _username = ""; - private SecureString _password = new SecureString(); - private string _domain = ""; - - public Guid Id { get; } = Guid.NewGuid(); - - public string Title - { - get => _title; - set - { - _title = value; - RaisePropertyChangedEvent(nameof(Title)); - } - } - - public string Username - { - get => _username; - set - { - _username = value; - RaisePropertyChangedEvent(nameof(Username)); - } - } - - public SecureString Password - { - get => _password; - set - { - _password = value; - RaisePropertyChangedEvent(nameof(Password)); - } - } - - public string Domain - { - get => _domain; - set - { - _domain = value; - RaisePropertyChangedEvent(nameof(Domain)); - } - } - - - public CredentialRecord() - { - } - - public CredentialRecord(ICredentialRecord otherCredential) - { - Username = otherCredential.Username; - Password = otherCredential.Password; - Domain = otherCredential.Domain; - } - - public CredentialRecord(Guid customGuid) - { - Id = customGuid; - } - - public override string ToString() - { - return Title; - } - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChangedEvent(string propertyName) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/CredentialRecordTypeConverter.cs b/mRemoteNG/Credential/CredentialRecordTypeConverter.cs deleted file mode 100644 index 396c030fc..000000000 --- a/mRemoteNG/Credential/CredentialRecordTypeConverter.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.ComponentModel; -using System.Globalization; -using System.Linq; -using mRemoteNG.App; - - -namespace mRemoteNG.Credential -{ - public class CredentialRecordTypeConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - return sourceType == typeof(Guid) || - base.CanConvertFrom(context, sourceType); - } - - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) - { - return destinationType == typeof(Guid) || - destinationType == typeof(ICredentialRecord) || - base.CanConvertTo(context, destinationType); - } - - public override object ConvertTo(ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - if (value is ICredentialRecord && destinationType == typeof(Guid)) - return ((ICredentialRecord)value).Id; - if (value is ICredentialRecord && destinationType == typeof(ICredentialRecord)) - return value; - return base.ConvertTo(context, culture, value, destinationType); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - if (!(value is Guid)) return base.ConvertFrom(context, culture, value); - var matchedCredentials = Runtime.CredentialProviderCatalog.GetCredentialRecords() - .Where(record => record.Id.Equals(value)).ToArray(); - return matchedCredentials.Any() ? matchedCredentials.First() : null; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/CredentialServiceFacade.cs b/mRemoteNG/Credential/CredentialServiceFacade.cs deleted file mode 100644 index 88a96d498..000000000 --- a/mRemoteNG/Credential/CredentialServiceFacade.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Collections.Generic; -using mRemoteNG.Config; -using mRemoteNG.Tools.CustomCollections; - -namespace mRemoteNG.Credential -{ - public class CredentialServiceFacade - { - private readonly ICredentialRepositoryList _repositoryList; - private readonly ILoader> _loader; - private readonly ISaver> _saver; - - public IEnumerable CredentialRepositories => _repositoryList; - - public CredentialServiceFacade(ICredentialRepositoryList repositoryList, - ILoader> loader, - ISaver> saver) - { - if (repositoryList == null) - throw new ArgumentNullException(nameof(repositoryList)); - if (loader == null) - throw new ArgumentNullException(nameof(loader)); - if (saver == null) - throw new ArgumentNullException(nameof(saver)); - - _repositoryList = repositoryList; - _loader = loader; - _saver = saver; - SetupEventHandlers(); - } - - public void SaveRepositoryList() - { - _saver.Save(_repositoryList); - } - - public void LoadRepositoryList() - { - foreach (var repository in _loader.Load()) - { - _repositoryList.AddProvider(repository); - } - } - - public void AddRepository(ICredentialRepository repository) - { - _repositoryList.AddProvider(repository); - } - - public void RemoveRepository(ICredentialRepository repository) - { - _repositoryList.RemoveProvider(repository); - } - - public IEnumerable GetCredentialRecords() - { - return _repositoryList.GetCredentialRecords(); - } - - public ICredentialRecord GetCredentialRecord(Guid id) - { - return _repositoryList.GetCredentialRecord(id); - } - - #region Setup - - private void SetupEventHandlers() - { - _repositoryList.RepositoriesUpdated += HandleRepositoriesUpdatedEvent; - _repositoryList.CredentialsUpdated += HandleCredentialsUpdatedEvent; - } - - private void HandleRepositoriesUpdatedEvent(object sender, - CollectionUpdatedEventArgs - collectionUpdatedEventArgs) - { - SaveRepositoryList(); - } - - private void HandleCredentialsUpdatedEvent(object sender, - CollectionUpdatedEventArgs - collectionUpdatedEventArgs) - { - var repo = sender as ICredentialRepository; - repo?.SaveCredentials(repo.Config.Key); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/CredentialServiceFactory.cs b/mRemoteNG/Credential/CredentialServiceFactory.cs deleted file mode 100644 index d04b97190..000000000 --- a/mRemoteNG/Credential/CredentialServiceFactory.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.IO; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.CredentialProviderSerializer; -using mRemoteNG.Config.Serializers.CredentialSerializer; -using mRemoteNG.Security.Factories; - -namespace mRemoteNG.Credential -{ - public class CredentialServiceFactory - { - // When we get a true CompositionRoot we can move this to that class. We should only require 1 instance of this service at a time - public CredentialServiceFacade Build() - { - var cryptoFromSettings = new CryptoProviderFactoryFromSettings(); - var credRepoSerializer = new XmlCredentialPasswordEncryptorDecorator( - cryptoFromSettings.Build(), - new XmlCredentialRecordSerializer()); - var credRepoDeserializer = - new XmlCredentialPasswordDecryptorDecorator(new XmlCredentialRecordDeserializer()); - - var credentialRepoListPath = Path.Combine(SettingsFileInfo.SettingsPath, "credentialRepositories.xml"); - var repoListDataProvider = new FileDataProvider(credentialRepoListPath); - var repoListLoader = new CredentialRepositoryListLoader( - repoListDataProvider, - new - CredentialRepositoryListDeserializer(credRepoSerializer, - credRepoDeserializer)); - var repoListSaver = new CredentialRepositoryListSaver(repoListDataProvider); - - return new CredentialServiceFacade(Runtime.CredentialProviderCatalog, repoListLoader, repoListSaver); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/ICredentialRecord.cs b/mRemoteNG/Credential/ICredentialRecord.cs deleted file mode 100644 index fa62b6011..000000000 --- a/mRemoteNG/Credential/ICredentialRecord.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.ComponentModel; -using System.Security; - - -namespace mRemoteNG.Credential -{ - [TypeConverter(typeof(CredentialRecordTypeConverter))] - public interface ICredentialRecord : INotifyPropertyChanged - { - Guid Id { get; } - string Title { get; set; } - string Username { get; set; } - SecureString Password { get; set; } - string Domain { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/ICredentialRepository.cs b/mRemoteNG/Credential/ICredentialRepository.cs deleted file mode 100644 index df55f8fbc..000000000 --- a/mRemoteNG/Credential/ICredentialRepository.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security; -using mRemoteNG.Credential.Repositories; -using mRemoteNG.Tools.CustomCollections; - - -namespace mRemoteNG.Credential -{ - public interface ICredentialRepository - { - ICredentialRepositoryConfig Config { get; } - IList CredentialRecords { get; } - bool IsLoaded { get; } - void LoadCredentials(SecureString key); - void SaveCredentials(SecureString key); - void UnloadCredentials(); - event EventHandler RepositoryConfigUpdated; - event EventHandler> CredentialsUpdated; - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/ICredentialRepositoryList.cs b/mRemoteNG/Credential/ICredentialRepositoryList.cs deleted file mode 100644 index 8bfabea51..000000000 --- a/mRemoteNG/Credential/ICredentialRepositoryList.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using mRemoteNG.Tools.CustomCollections; - -namespace mRemoteNG.Credential -{ - public interface ICredentialRepositoryList : IEnumerable - { - IEnumerable CredentialProviders { get; } - - void AddProvider(ICredentialRepository credentialProvider); - - void RemoveProvider(ICredentialRepository credentialProvider); - - bool Contains(Guid repositoryId); - - IEnumerable GetCredentialRecords(); - - ICredentialRecord GetCredentialRecord(Guid id); - - event EventHandler> RepositoriesUpdated; - event EventHandler> CredentialsUpdated; - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/PlaceholderCredentialRecord.cs b/mRemoteNG/Credential/PlaceholderCredentialRecord.cs deleted file mode 100644 index 9916893ba..000000000 --- a/mRemoteNG/Credential/PlaceholderCredentialRecord.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Security; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Credential -{ - public class PlaceholderCredentialRecord : ICredentialRecord - { - public event PropertyChangedEventHandler PropertyChanged; - - public Guid Id { get; } - - [ReadOnly(true)] public string Title { get; set; } = Language.CredentialUnavailable; - - [ReadOnly(true)] public string Username { get; set; } = Language.CredentialUnavailable; - - [ReadOnly(true)] public SecureString Password { get; set; } = new SecureString(); - - [ReadOnly(true)] public string Domain { get; set; } = Language.CredentialUnavailable; - - public PlaceholderCredentialRecord(IEnumerable id) - { - Id = id.FirstOrDefault(); - } - - public override string ToString() => Language.CredentialUnavailable; - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/Repositories/CompositeRepositoryUnlocker.cs b/mRemoteNG/Credential/Repositories/CompositeRepositoryUnlocker.cs deleted file mode 100644 index 79dd9572e..000000000 --- a/mRemoteNG/Credential/Repositories/CompositeRepositoryUnlocker.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security; - -namespace mRemoteNG.Credential.Repositories -{ - public class CompositeRepositoryUnlocker - { - private readonly List _repositories = new List(); - - public IEnumerable Repositories => _repositories; - public ICredentialRepository SelectedRepository { get; set; } - - public CompositeRepositoryUnlocker(IEnumerable repositories) - { - if (repositories == null) - throw new ArgumentNullException(nameof(repositories)); - - _repositories.AddRange(repositories); - SelectNextLockedRepository(); - } - - public void Unlock(SecureString key) - { - SelectedRepository.LoadCredentials(key); - } - - public void SelectNextLockedRepository() - { - SelectedRepository = GetNextLockedRepo(); - } - - private ICredentialRepository GetNextLockedRepo() - { - var newOrder = OrderListForNextLockedRepo(); - return newOrder.Any() ? newOrder.First() : null; - } - - private IList OrderListForNextLockedRepo() - { - if (_repositories.Count == 0) - return new List(); - var reorderedList = new List(); - var itemsAfterCurrent = BuildListOfItemsAfterCurrent(); - var itemsBeforeAndIncludingCurrent = BuildListOfItemsBeforeAndIncludingCurrent(); - reorderedList.AddRange(itemsAfterCurrent.Where(repository => !repository.IsLoaded)); - reorderedList.AddRange(itemsBeforeAndIncludingCurrent.Where(repository => !repository.IsLoaded)); - return reorderedList; - } - - private IList BuildListOfItemsAfterCurrent() - { - var lastListIndex = _repositories.Count - 1; - var newListStartIndex = GetNewListStartIndex(); - - if (newListStartIndex > lastListIndex) newListStartIndex--; - var countToEndOfList = _repositories.Count - newListStartIndex; - return _repositories.GetRange(newListStartIndex, countToEndOfList); - } - - private IList BuildListOfItemsBeforeAndIncludingCurrent() - { - var newListStartIndex = GetNewListStartIndex(); - return _repositories.GetRange(0, newListStartIndex); - } - - private int GetNewListStartIndex() - { - var currentItemIndex = _repositories.IndexOf(SelectedRepository); - return currentItemIndex + 1; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/Repositories/CredentialRepoUnlockerBuilder.cs b/mRemoteNG/Credential/Repositories/CredentialRepoUnlockerBuilder.cs deleted file mode 100644 index 21b829ba0..000000000 --- a/mRemoteNG/Credential/Repositories/CredentialRepoUnlockerBuilder.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; - -namespace mRemoteNG.Credential.Repositories -{ - public class CredentialRepoUnlockerBuilder - { - public CompositeRepositoryUnlocker Build(IEnumerable repos) - { - return new CompositeRepositoryUnlocker(repos); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/Repositories/CredentialRepositoryChangedArgs.cs b/mRemoteNG/Credential/Repositories/CredentialRepositoryChangedArgs.cs deleted file mode 100644 index 93776caba..000000000 --- a/mRemoteNG/Credential/Repositories/CredentialRepositoryChangedArgs.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - -namespace mRemoteNG.Credential.Repositories -{ - public class CredentialRepositoryChangedArgs : EventArgs - { - public ICredentialRepository Repository { get; } - - public CredentialRepositoryChangedArgs(ICredentialRepository repository) - { - if (repository == null) - throw new ArgumentNullException(nameof(repository)); - - Repository = repository; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/Repositories/CredentialRepositoryConfig.cs b/mRemoteNG/Credential/Repositories/CredentialRepositoryConfig.cs deleted file mode 100644 index a2e6703d5..000000000 --- a/mRemoteNG/Credential/Repositories/CredentialRepositoryConfig.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.ComponentModel; -using System.Security; - -namespace mRemoteNG.Credential.Repositories -{ - public class CredentialRepositoryConfig : ICredentialRepositoryConfig - { - private string _title = "New Credential Repository"; - private string _source = ""; - private SecureString _key = new SecureString(); - private string _typeName = ""; - private bool _loaded; - - public Guid Id { get; } - - public string Title - { - get => _title; - set - { - _title = value; - RaisePropertyChangedEvent(nameof(Title)); - } - } - - public string TypeName - { - get => _typeName; - set - { - _typeName = value; - RaisePropertyChangedEvent(nameof(TypeName)); - } - } - - public string Source - { - get => _source; - set - { - _source = value; - RaisePropertyChangedEvent(nameof(Source)); - } - } - - public SecureString Key - { - get => _key; - set - { - _key = value; - RaisePropertyChangedEvent(nameof(Key)); - } - } - - public bool Loaded - { - get => _loaded; - set - { - _loaded = value; - RaisePropertyChangedEvent(nameof(Loaded)); - } - } - - public CredentialRepositoryConfig() : this(Guid.NewGuid()) - { - } - - public CredentialRepositoryConfig(Guid id) - { - Id = id; - } - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChangedEvent(string propertyName) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/Repositories/CredentialRepositoryList.cs b/mRemoteNG/Credential/Repositories/CredentialRepositoryList.cs deleted file mode 100644 index a3305d2e4..000000000 --- a/mRemoteNG/Credential/Repositories/CredentialRepositoryList.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Tools.CustomCollections; - -namespace mRemoteNG.Credential.Repositories -{ - public class CredentialRepositoryList : ICredentialRepositoryList - { - private readonly List _credentialProviders = new List(); - - public IEnumerable CredentialProviders => _credentialProviders; - - - public void AddProvider(ICredentialRepository credentialProvider) - { - if (Contains(credentialProvider.Config.Id)) return; - _credentialProviders.Add(credentialProvider); - credentialProvider.CredentialsUpdated += RaiseCredentialsUpdatedEvent; - credentialProvider.RepositoryConfigUpdated += OnRepoConfigChanged; - RaiseRepositoriesUpdatedEvent(ActionType.Added, new[] {credentialProvider}); - } - - public void RemoveProvider(ICredentialRepository credentialProvider) - { - if (!Contains(credentialProvider.Config.Id)) return; - credentialProvider.CredentialsUpdated -= RaiseCredentialsUpdatedEvent; - credentialProvider.RepositoryConfigUpdated -= OnRepoConfigChanged; - _credentialProviders.Remove(credentialProvider); - RaiseRepositoriesUpdatedEvent(ActionType.Removed, new[] {credentialProvider}); - } - - public bool Contains(Guid repositoryId) - { - return _credentialProviders.Any(repo => repo.Config.Id == repositoryId); - } - - public IEnumerable GetCredentialRecords() - { - var list = new List(); - foreach (var repository in CredentialProviders) - { - list.AddRange(repository.CredentialRecords); - } - - return list; - } - - public ICredentialRecord GetCredentialRecord(Guid id) - { - return CredentialProviders.SelectMany(repo => repo.CredentialRecords) - .FirstOrDefault(record => record.Id.Equals(id)); - } - - public IEnumerator GetEnumerator() - { - return _credentialProviders.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public event EventHandler> RepositoriesUpdated; - public event EventHandler> CredentialsUpdated; - - private void RaiseRepositoriesUpdatedEvent(ActionType action, IEnumerable changedItems) - { - RepositoriesUpdated?.Invoke(this, - new CollectionUpdatedEventArgs(action, changedItems)); - } - - private void RaiseCredentialsUpdatedEvent(object sender, CollectionUpdatedEventArgs args) - { - CredentialsUpdated?.Invoke(sender, args); - } - - private void OnRepoConfigChanged(object sender, EventArgs args) - { - var repo = sender as ICredentialRepository; - if (repo == null) return; - RaiseRepositoriesUpdatedEvent(ActionType.Updated, new[] {repo}); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/Repositories/ICredentialRepositoryConfig.cs b/mRemoteNG/Credential/Repositories/ICredentialRepositoryConfig.cs deleted file mode 100644 index f29ef3940..000000000 --- a/mRemoteNG/Credential/Repositories/ICredentialRepositoryConfig.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.ComponentModel; -using System.Security; - -namespace mRemoteNG.Credential.Repositories -{ - public interface ICredentialRepositoryConfig : INotifyPropertyChanged - { - Guid Id { get; } - string Title { get; set; } - string TypeName { get; } - string Source { get; set; } - SecureString Key { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/Repositories/XmlCredentialRepository.cs b/mRemoteNG/Credential/Repositories/XmlCredentialRepository.cs deleted file mode 100644 index ebb20073b..000000000 --- a/mRemoteNG/Credential/Repositories/XmlCredentialRepository.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Security; -using mRemoteNG.Config; -using mRemoteNG.Tools.CustomCollections; - -namespace mRemoteNG.Credential.Repositories -{ - public class XmlCredentialRepository : ICredentialRepository - { - private readonly CredentialRecordSaver _credentialRecordSaver; - private readonly CredentialRecordLoader _credentialRecordLoader; - - public ICredentialRepositoryConfig Config { get; } - public IList CredentialRecords { get; } - public bool IsLoaded { get; private set; } - - public XmlCredentialRepository(ICredentialRepositoryConfig config, - CredentialRecordSaver credentialRecordSaver, - CredentialRecordLoader credentialRecordLoader) - { - if (config == null) - throw new ArgumentNullException(nameof(config)); - if (credentialRecordSaver == null) - throw new ArgumentNullException(nameof(credentialRecordSaver)); - if (credentialRecordLoader == null) - throw new ArgumentNullException(nameof(credentialRecordLoader)); - - Config = config; - CredentialRecords = new FullyObservableCollection(); - ((FullyObservableCollection)CredentialRecords).CollectionUpdated += - RaiseCredentialsUpdatedEvent; - Config.PropertyChanged += (sender, args) => RaiseRepositoryConfigUpdatedEvent(args); - _credentialRecordSaver = credentialRecordSaver; - _credentialRecordLoader = credentialRecordLoader; - } - - public void LoadCredentials(SecureString key) - { - var credentials = _credentialRecordLoader.Load(key); - foreach (var newCredential in credentials) - { - if (ThisIsADuplicateCredentialRecord(newCredential)) continue; - CredentialRecords.Add(newCredential); - } - - IsLoaded = true; - Config.Key = key; - } - - private bool ThisIsADuplicateCredentialRecord(ICredentialRecord newCredential) - { - return CredentialRecords.Any(cred => cred.Id.Equals(newCredential.Id)); - } - - public void UnloadCredentials() - { - IsLoaded = false; - CredentialRecords.Clear(); - } - - public void SaveCredentials(SecureString key) - { - if (!IsLoaded) return; - _credentialRecordSaver.Save(CredentialRecords, key); - } - - public event EventHandler RepositoryConfigUpdated; - public event EventHandler> CredentialsUpdated; - - protected virtual void RaiseRepositoryConfigUpdatedEvent(PropertyChangedEventArgs args) - { - RepositoryConfigUpdated?.Invoke(this, args); - } - - protected virtual void RaiseCredentialsUpdatedEvent(object sender, - CollectionUpdatedEventArgs args) - { - CredentialsUpdated?.Invoke(this, args); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Credential/Repositories/XmlCredentialRepositoryFactory.cs b/mRemoteNG/Credential/Repositories/XmlCredentialRepositoryFactory.cs deleted file mode 100644 index 8ab806b83..000000000 --- a/mRemoteNG/Credential/Repositories/XmlCredentialRepositoryFactory.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Xml.Linq; -using mRemoteNG.Config; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers; - -namespace mRemoteNG.Credential.Repositories -{ - public class XmlCredentialRepositoryFactory - { - private readonly ISecureSerializer, string> _serializer; - private readonly ISecureDeserializer> _deserializer; - - public XmlCredentialRepositoryFactory(ISecureSerializer, string> serializer, - ISecureDeserializer> deserializer) - { - if (serializer == null) - throw new ArgumentNullException(nameof(serializer)); - if (deserializer == null) - throw new ArgumentNullException(nameof(deserializer)); - - _serializer = serializer; - _deserializer = deserializer; - } - - public ICredentialRepository Build(ICredentialRepositoryConfig config) - { - return BuildXmlRepo(config); - } - - public ICredentialRepository Build(XElement repositoryXElement) - { - var stringId = repositoryXElement.Attribute("Id")?.Value; - Guid id; - Guid.TryParse(stringId, out id); - if (id.Equals(Guid.Empty)) id = Guid.NewGuid(); - var config = new CredentialRepositoryConfig(id) - { - TypeName = repositoryXElement.Attribute("TypeName")?.Value, - Title = repositoryXElement.Attribute("Title")?.Value, - Source = repositoryXElement.Attribute("Source")?.Value - }; - return BuildXmlRepo(config); - } - - private ICredentialRepository BuildXmlRepo(ICredentialRepositoryConfig config) - { - var dataProvider = new FileDataProvider(config.Source); - var saver = new CredentialRecordSaver(dataProvider, _serializer); - var loader = new CredentialRecordLoader(dataProvider, _deserializer); - return new XmlCredentialRepository(config, saver, loader); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Icons/Admin.ico b/mRemoteNG/Icons/Admin.ico deleted file mode 100644 index 5b4a946b1..000000000 Binary files a/mRemoteNG/Icons/Admin.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Anti Virus.ico b/mRemoteNG/Icons/Anti Virus.ico deleted file mode 100644 index 815d01c4c..000000000 Binary files a/mRemoteNG/Icons/Anti Virus.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Apple.ico b/mRemoteNG/Icons/Apple.ico deleted file mode 100644 index d3e843b91..000000000 Binary files a/mRemoteNG/Icons/Apple.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Backup.ico b/mRemoteNG/Icons/Backup.ico deleted file mode 100644 index 3e9165148..000000000 Binary files a/mRemoteNG/Icons/Backup.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Build Server.ico b/mRemoteNG/Icons/Build Server.ico deleted file mode 100644 index b664fa74e..000000000 Binary files a/mRemoteNG/Icons/Build Server.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Console.ico b/mRemoteNG/Icons/Console.ico deleted file mode 100644 index 6800624b9..000000000 Binary files a/mRemoteNG/Icons/Console.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Database.ico b/mRemoteNG/Icons/Database.ico deleted file mode 100644 index 0926231a4..000000000 Binary files a/mRemoteNG/Icons/Database.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Domain Controller.ico b/mRemoteNG/Icons/Domain Controller.ico deleted file mode 100644 index 0582f3cac..000000000 Binary files a/mRemoteNG/Icons/Domain Controller.ico and /dev/null differ diff --git a/mRemoteNG/Icons/ESX.ico b/mRemoteNG/Icons/ESX.ico deleted file mode 100644 index 54eeb2a4d..000000000 Binary files a/mRemoteNG/Icons/ESX.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Fax.ico b/mRemoteNG/Icons/Fax.ico deleted file mode 100644 index 3bdc790ab..000000000 Binary files a/mRemoteNG/Icons/Fax.ico and /dev/null differ diff --git a/mRemoteNG/Icons/File Server.ico b/mRemoteNG/Icons/File Server.ico deleted file mode 100644 index 67676b7d7..000000000 Binary files a/mRemoteNG/Icons/File Server.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Finance.ico b/mRemoteNG/Icons/Finance.ico deleted file mode 100644 index ab813dca8..000000000 Binary files a/mRemoteNG/Icons/Finance.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Firewall.ico b/mRemoteNG/Icons/Firewall.ico deleted file mode 100644 index 2343ae6a6..000000000 Binary files a/mRemoteNG/Icons/Firewall.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Infrastructure.ico b/mRemoteNG/Icons/Infrastructure.ico deleted file mode 100644 index d148dae04..000000000 Binary files a/mRemoteNG/Icons/Infrastructure.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Linux.ico b/mRemoteNG/Icons/Linux.ico deleted file mode 100644 index cb8f13a90..000000000 Binary files a/mRemoteNG/Icons/Linux.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Log.ico b/mRemoteNG/Icons/Log.ico deleted file mode 100644 index 789653ef1..000000000 Binary files a/mRemoteNG/Icons/Log.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Mail Server.ico b/mRemoteNG/Icons/Mail Server.ico deleted file mode 100644 index 9f0d18069..000000000 Binary files a/mRemoteNG/Icons/Mail Server.ico and /dev/null differ diff --git a/mRemoteNG/Icons/PowerShell.ico b/mRemoteNG/Icons/PowerShell.ico deleted file mode 100644 index 1bf2f646c..000000000 Binary files a/mRemoteNG/Icons/PowerShell.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Production.ico b/mRemoteNG/Icons/Production.ico deleted file mode 100644 index 8898ca19c..000000000 Binary files a/mRemoteNG/Icons/Production.ico and /dev/null differ diff --git a/mRemoteNG/Icons/PuTTY.ico b/mRemoteNG/Icons/PuTTY.ico deleted file mode 100644 index f7a1840a8..000000000 Binary files a/mRemoteNG/Icons/PuTTY.ico and /dev/null differ diff --git a/mRemoteNG/Icons/RaspberryPi.ico b/mRemoteNG/Icons/RaspberryPi.ico deleted file mode 100644 index bfaadd84a..000000000 Binary files a/mRemoteNG/Icons/RaspberryPi.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Remote Desktop.ico b/mRemoteNG/Icons/Remote Desktop.ico deleted file mode 100644 index 2ac9c2123..000000000 Binary files a/mRemoteNG/Icons/Remote Desktop.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Router.ico b/mRemoteNG/Icons/Router.ico deleted file mode 100644 index b1cd8e60c..000000000 Binary files a/mRemoteNG/Icons/Router.ico and /dev/null differ diff --git a/mRemoteNG/Icons/SSH.ico b/mRemoteNG/Icons/SSH.ico deleted file mode 100644 index 12b5b5809..000000000 Binary files a/mRemoteNG/Icons/SSH.ico and /dev/null differ diff --git a/mRemoteNG/Icons/SharePoint.ico b/mRemoteNG/Icons/SharePoint.ico deleted file mode 100644 index 5c420c311..000000000 Binary files a/mRemoteNG/Icons/SharePoint.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Staging.ico b/mRemoteNG/Icons/Staging.ico deleted file mode 100644 index a31bf6aa8..000000000 Binary files a/mRemoteNG/Icons/Staging.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Switch.ico b/mRemoteNG/Icons/Switch.ico deleted file mode 100644 index acb7482ad..000000000 Binary files a/mRemoteNG/Icons/Switch.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Tel.ico b/mRemoteNG/Icons/Tel.ico deleted file mode 100644 index b4b401fc0..000000000 Binary files a/mRemoteNG/Icons/Tel.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Telnet.ico b/mRemoteNG/Icons/Telnet.ico deleted file mode 100644 index ebe0c036a..000000000 Binary files a/mRemoteNG/Icons/Telnet.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Terminal Server.ico b/mRemoteNG/Icons/Terminal Server.ico deleted file mode 100644 index c19c6ba67..000000000 Binary files a/mRemoteNG/Icons/Terminal Server.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Test Server.ico b/mRemoteNG/Icons/Test Server.ico deleted file mode 100644 index 6159d9f8c..000000000 Binary files a/mRemoteNG/Icons/Test Server.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Virtual Machine.ico b/mRemoteNG/Icons/Virtual Machine.ico deleted file mode 100644 index 00d805f8e..000000000 Binary files a/mRemoteNG/Icons/Virtual Machine.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Web Server.ico b/mRemoteNG/Icons/Web Server.ico deleted file mode 100644 index d2aa024d7..000000000 Binary files a/mRemoteNG/Icons/Web Server.ico and /dev/null differ diff --git a/mRemoteNG/Icons/WiFi.ico b/mRemoteNG/Icons/WiFi.ico deleted file mode 100644 index 860757459..000000000 Binary files a/mRemoteNG/Icons/WiFi.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Windows.ico b/mRemoteNG/Icons/Windows.ico deleted file mode 100644 index 3a9752bad..000000000 Binary files a/mRemoteNG/Icons/Windows.ico and /dev/null differ diff --git a/mRemoteNG/Icons/Workstation.ico b/mRemoteNG/Icons/Workstation.ico deleted file mode 100644 index 95cbf2321..000000000 Binary files a/mRemoteNG/Icons/Workstation.ico and /dev/null differ diff --git a/mRemoteNG/Icons/mRemote.ico b/mRemoteNG/Icons/mRemote.ico deleted file mode 100644 index 02b38ac0b..000000000 Binary files a/mRemoteNG/Icons/mRemote.ico and /dev/null differ diff --git a/mRemoteNG/Icons/mRemoteNG.ico b/mRemoteNG/Icons/mRemoteNG.ico deleted file mode 100644 index 1c750daf4..000000000 Binary files a/mRemoteNG/Icons/mRemoteNG.ico and /dev/null differ diff --git a/mRemoteNG/Language/Language.Designer.cs b/mRemoteNG/Language/Language.Designer.cs deleted file mode 100644 index 8919ee232..000000000 --- a/mRemoteNG/Language/Language.Designer.cs +++ /dev/null @@ -1,6384 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace mRemoteNG.Resources.Language { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Language { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Language() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mRemoteNG.Language.Language", typeof(Language).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to &Browse.... - /// - internal static string _Browse { - get { - return ResourceManager.GetString("_Browse", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Cancel. - /// - internal static string _Cancel { - get { - return ResourceManager.GetString("_Cancel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Close. - /// - internal static string _Close { - get { - return ResourceManager.GetString("_Close", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warn me when closing connections. - /// - internal static string _CloseWarnAll { - get { - return ResourceManager.GetString("_CloseWarnAll", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Delete. - /// - internal static string _Delete { - get { - return ResourceManager.GetString("_Delete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Export to File.... - /// - internal static string _ExportToFile { - get { - return ResourceManager.GetString("_ExportToFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &File. - /// - internal static string _File { - get { - return ResourceManager.GetString("_File", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Help. - /// - internal static string _Help { - get { - return ResourceManager.GetString("_Help", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Import. - /// - internal static string _Import { - get { - return ResourceManager.GetString("_Import", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Launch. - /// - internal static string _Launch { - get { - return ResourceManager.GetString("_Launch", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &New. - /// - internal static string _New { - get { - return ResourceManager.GetString("_New", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &OK. - /// - internal static string _Ok { - get { - return ResourceManager.GetString("_Ok", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Scan. - /// - internal static string _Scan { - get { - return ResourceManager.GetString("_Scan", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Stop. - /// - internal static string _Stop { - get { - return ResourceManager.GetString("_Stop", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Tools. - /// - internal static string _Tools { - get { - return ResourceManager.GetString("_Tools", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Try again. - /// - internal static string _TryAgain { - get { - return ResourceManager.GetString("_TryAgain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &View. - /// - internal static string _View { - get { - return ResourceManager.GetString("_View", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to About. - /// - internal static string About { - get { - return ResourceManager.GetString("About", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Active Directory. - /// - internal static string ActiveDirectory { - get { - return ResourceManager.GetString("ActiveDirectory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Add. - /// - internal static string Add { - get { - return ResourceManager.GetString("Add", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Add Connection Panel. - /// - internal static string AddConnectionPanel { - get { - return ResourceManager.GetString("AddConnectionPanel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to AddNodeFromXML failed!. - /// - internal static string AddNodeFromXmlFailed { - get { - return ResourceManager.GetString("AddNodeFromXmlFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Address:. - /// - internal static string Address { - get { - return ResourceManager.GetString("Address", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Advanced. - /// - internal static string Advanced { - get { - return ResourceManager.GetString("Advanced", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Advanced security options. - /// - internal static string AdvancedSecurityOptions { - get { - return ResourceManager.GetString("AdvancedSecurityOptions", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to All. - /// - internal static string All { - get { - return ResourceManager.GetString("All", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Allow only a single instance of the application (mRemoteNG restart required). - /// - internal static string AllowOnlySingleInstance { - get { - return ResourceManager.GetString("AllowOnlySingleInstance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Always. - /// - internal static string Always { - get { - return ResourceManager.GetString("Always", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Always connect, even if authentication fails. - /// - internal static string AlwaysConnectEvenIfAuthFails { - get { - return ResourceManager.GetString("AlwaysConnectEvenIfAuthFails", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Always show connection tabs. - /// - internal static string AlwaysShowConnectionTabs { - get { - return ResourceManager.GetString("AlwaysShowConnectionTabs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Always show panel selection dialog when opening connections. - /// - internal static string AlwaysShowPanelSelection { - get { - return ResourceManager.GetString("AlwaysShowPanelSelection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Always show panel tabs. - /// - internal static string AlwaysShowPanelTabs { - get { - return ResourceManager.GetString("AlwaysShowPanelTabs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Always show notification area icon. - /// - internal static string AlwaysShowSysTrayIcon { - get { - return ResourceManager.GetString("AlwaysShowSysTrayIcon", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Appearance. - /// - internal static string Appearance { - get { - return ResourceManager.GetString("Appearance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Apply. - /// - internal static string Apply { - get { - return ResourceManager.GetString("Apply", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Apply default inheritance ähnelt. - /// - internal static string ApplyDefaultInheritance { - get { - return ResourceManager.GetString("ApplyDefaultInheritance", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Apply inheritance to children ähnelt. - /// - internal static string ApplyInheritanceToChildren { - get { - return ResourceManager.GetString("ApplyInheritanceToChildren", resourceCulture); - } - } - - /// - /// Sucht eine lokalisierte Zeichenfolge, die Arguments ähnelt. - /// - internal static string Arguments { - get { - return ResourceManager.GetString("Arguments", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ask me again later. - /// - internal static string AskUpdatesCommandAskLater { - get { - return ResourceManager.GetString("AskUpdatesCommandAskLater", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Customize the settings now. - /// - internal static string AskUpdatesCommandCustom { - get { - return ResourceManager.GetString("AskUpdatesCommandCustom", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use the recommended settings. - /// - internal static string AskUpdatesCommandRecommended { - get { - return ResourceManager.GetString("AskUpdatesCommandRecommended", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} can automatically check for updates that may provide new features and bug fixes. It is recommended that you allow {0} to check for updates weekly.. - /// - internal static string AskUpdatesContent { - get { - return ResourceManager.GetString("AskUpdatesContent", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Automatic update settings. - /// - internal static string AskUpdatesMainInstruction { - get { - return ResourceManager.GetString("AskUpdatesMainInstruction", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Aspect. - /// - internal static string Aspect { - get { - return ResourceManager.GetString("Aspect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Assigned Credential. - /// - internal static string AssignedCredential { - get { - return ResourceManager.GetString("AssignedCredential", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Audio Capture. - /// - internal static string AudioCapture { - get { - return ResourceManager.GetString("AudioCapture", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Server Authentication. - /// - internal static string AuthenticationLevel { - get { - return ResourceManager.GetString("AuthenticationLevel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Authentication mode. - /// - internal static string AuthenticationMode { - get { - return ResourceManager.GetString("AuthenticationMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while trying to reconnect to RDP host '{0}'. - /// - internal static string AutomaticReconnectError { - get { - return ResourceManager.GetString("AutomaticReconnectError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Automatic resize. - /// - internal static string AutomaticResize { - get { - return ResourceManager.GetString("AutomaticResize", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Auto save time in minutes (0 means disabled):. - /// - internal static string AutoSaveEvery { - get { - return ResourceManager.GetString("AutoSaveEvery", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Latest version. - /// - internal static string AvailableVersion { - get { - return ResourceManager.GetString("AvailableVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Default Inheritance. - /// - internal static string ButtonDefaultInheritance { - get { - return ResourceManager.GetString("ButtonDefaultInheritance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Default Properties. - /// - internal static string ButtonDefaultProperties { - get { - return ResourceManager.GetString("ButtonDefaultProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Launch PuTTY. - /// - internal static string ButtonLaunchPutty { - get { - return ResourceManager.GetString("ButtonLaunchPutty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cache Bitmaps. - /// - internal static string CacheBitmaps { - get { - return ResourceManager.GetString("CacheBitmaps", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot start Port Scan, incorrect IP format!. - /// - internal static string CannotStartPortScan { - get { - return ResourceManager.GetString("CannotStartPortScan", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Change. - /// - internal static string Change { - get { - return ResourceManager.GetString("Change", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while trying to change the connection resolution to host '{0}'. - /// - internal static string ChangeConnectionResolutionError { - get { - return ResourceManager.GetString("ChangeConnectionResolutionError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Changelog. - /// - internal static string Changelog { - get { - return ResourceManager.GetString("Changelog", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Check Again. - /// - internal static string CheckAgain { - get { - return ResourceManager.GetString("CheckAgain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Automatically try to reconnect when disconnected from server (RDP && ICA only). - /// - internal static string CheckboxAutomaticReconnect { - get { - return ResourceManager.GetString("CheckboxAutomaticReconnect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do not show this message again.. - /// - internal static string CheckboxDoNotShowThisMessageAgain { - get { - return ResourceManager.GetString("CheckboxDoNotShowThisMessageAgain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This proxy server requires authentication. - /// - internal static string CheckboxProxyAuthentication { - get { - return ResourceManager.GetString("CheckboxProxyAuthentication", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use custom PuTTY path:. - /// - internal static string CheckboxPuttyPath { - get { - return ResourceManager.GetString("CheckboxPuttyPath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reconnect when ready. - /// - internal static string CheckboxReconnectWhenReady { - get { - return ResourceManager.GetString("CheckboxReconnectWhenReady", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use a proxy server to connect. - /// - internal static string CheckboxUpdateUseProxy { - get { - return ResourceManager.GetString("CheckboxUpdateUseProxy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Check failed!. - /// - internal static string CheckFailed { - get { - return ResourceManager.GetString("CheckFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Check for Updates. - /// - internal static string CheckForUpdates { - get { - return ResourceManager.GetString("CheckForUpdates", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Check for updates at startup. - /// - internal static string CheckForUpdatesOnStartup { - get { - return ResourceManager.GetString("CheckForUpdatesOnStartup", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Check now. - /// - internal static string CheckNow { - get { - return ResourceManager.GetString("CheckNow", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Check proper installation of components at startup. - /// - internal static string CheckProperInstallationOfComponentsAtStartup { - get { - return ResourceManager.GetString("CheckProperInstallationOfComponentsAtStartup", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Choose a path for the mRemoteNG log file. - /// - internal static string ChooseLogPath { - get { - return ResourceManager.GetString("ChooseLogPath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Choose panel before connecting. - /// - internal static string ChoosePanelBeforeConnecting { - get { - return ResourceManager.GetString("ChoosePanelBeforeConnecting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Choose path. - /// - internal static string ChoosePath { - get { - return ResourceManager.GetString("ChoosePath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Clear search string. - /// - internal static string ClearSearchString { - get { - return ResourceManager.GetString("ClearSearchString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Clipboard. - /// - internal static string Clipboard { - get { - return ResourceManager.GetString("Clipboard", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Closed Ports. - /// - internal static string ClosedPorts { - get { - return ResourceManager.GetString("ClosedPorts", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Close to notification area. - /// - internal static string CloseToSysTray { - get { - return ResourceManager.GetString("CloseToSysTray", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to When closing connections:. - /// - internal static string ClosingConnections { - get { - return ResourceManager.GetString("ClosingConnections", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Collapse all folders. - /// - internal static string CollapseAllFolders { - get { - return ResourceManager.GetString("CollapseAllFolders", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Colours. - /// - internal static string Colors { - get { - return ResourceManager.GetString("Colors", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to E&xit {0}. - /// - internal static string CommandExitProgram { - get { - return ResourceManager.GetString("CommandExitProgram", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't parse command line args!. - /// - internal static string CommandLineArgsCouldNotBeParsed { - get { - return ResourceManager.GetString("CommandLineArgsCouldNotBeParsed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Open a connection file. - /// - internal static string CommandOpenConnectionFile { - get { - return ResourceManager.GetString("CommandOpenConnectionFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} has detected the Lenovo Auto Scroll Utility running on this system. This utility is known to cause problems with {0}. It is recommended that you disable or uninstall it.. - /// - internal static string CompatibilityLenovoAutoScrollUtilityDetected { - get { - return ResourceManager.GetString("CompatibilityLenovoAutoScrollUtilityDetected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Compatibility problem detected. - /// - internal static string CompatibilityProblemDetected { - get { - return ResourceManager.GetString("CompatibilityProblemDetected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Compression. - /// - internal static string Compression { - get { - return ResourceManager.GetString("Compression", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Config. - /// - internal static string Config { - get { - return ResourceManager.GetString("Config", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to btnIcon_Click failed!. - /// - internal static string ConfigPropertyGridButtonIconClickFailed { - get { - return ResourceManager.GetString("ConfigPropertyGridButtonIconClickFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ShowHideGridItems failed!. - /// - internal static string ConfigPropertyGridHideItemsFailed { - get { - return ResourceManager.GetString("ConfigPropertyGridHideItemsFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to IconMenu_Click failed!. - /// - internal static string ConfigPropertyGridMenuClickFailed { - get { - return ResourceManager.GetString("ConfigPropertyGridMenuClickFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Property Grid object failed!. - /// - internal static string ConfigPropertyGridObjectFailed { - get { - return ResourceManager.GetString("ConfigPropertyGridObjectFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SetHostStatus failed!. - /// - internal static string ConfigPropertyGridSetHostStatusFailed { - get { - return ResourceManager.GetString("ConfigPropertyGridSetHostStatusFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to pGrid_PopertyValueChanged failed!. - /// - internal static string ConfigPropertyGridValueFailed { - get { - return ResourceManager.GetString("ConfigPropertyGridValueFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Config UI load failed!. - /// - internal static string ConfigUiLoadFailed { - get { - return ResourceManager.GetString("ConfigUiLoadFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Create a New Connection File. - /// - internal static string ConfigurationCreateNew { - get { - return ResourceManager.GetString("ConfigurationCreateNew", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use a Custom File Path. - /// - internal static string ConfigurationCustomPath { - get { - return ResourceManager.GetString("ConfigurationCustomPath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Import an Existing File. - /// - internal static string ConfigurationImportFile { - get { - return ResourceManager.GetString("ConfigurationImportFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to close all connections except for "{0}"?. - /// - internal static string ConfirmCloseConnectionOthersInstruction { - get { - return ResourceManager.GetString("ConfirmCloseConnectionOthersInstruction", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to close the panel, "{0}"? Any connections that it contains will also be closed.. - /// - internal static string ConfirmCloseConnectionPanelMainInstruction { - get { - return ResourceManager.GetString("ConfirmCloseConnectionPanelMainInstruction", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete the credential record, {0}?. - /// - internal static string ConfirmDeleteCredentialRecord { - get { - return ResourceManager.GetString("ConfirmDeleteCredentialRecord", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete the external tool, "{0}"?. - /// - internal static string ConfirmDeleteExternalTool { - get { - return ResourceManager.GetString("ConfirmDeleteExternalTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete the {0} selected external tools?. - /// - internal static string ConfirmDeleteExternalToolMultiple { - get { - return ResourceManager.GetString("ConfirmDeleteExternalToolMultiple", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete the connection, "{0}"?. - /// - internal static string ConfirmDeleteNodeConnection { - get { - return ResourceManager.GetString("ConfirmDeleteNodeConnection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete the empty folder, "{0}"?. - /// - internal static string ConfirmDeleteNodeFolder { - get { - return ResourceManager.GetString("ConfirmDeleteNodeFolder", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to delete the folder, "{0}"? Any folders or connections that it contains will also be deleted.. - /// - internal static string ConfirmDeleteNodeFolderNotEmpty { - get { - return ResourceManager.GetString("ConfirmDeleteNodeFolderNotEmpty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to close all open connections?. - /// - internal static string ConfirmExitMainInstruction { - get { - return ResourceManager.GetString("ConfirmExitMainInstruction", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure you want to reset the panels to their default layout?. - /// - internal static string ConfirmResetLayout { - get { - return ResourceManager.GetString("ConfirmResetLayout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connect. - /// - internal static string Connect { - get { - return ResourceManager.GetString("Connect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connect in fullscreen mode. - /// - internal static string ConnectInFullscreen { - get { - return ResourceManager.GetString("ConnectInFullscreen", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connecting.... - /// - internal static string Connecting { - get { - return ResourceManager.GetString("Connecting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connect in View Only mode. - /// - internal static string ConnectInViewOnlyMode { - get { - return ResourceManager.GetString("ConnectInViewOnlyMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection. - /// - internal static string Connection { - get { - return ResourceManager.GetString("Connection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Protocol Event Connected. - /// - internal static string ConnectionEventConnected { - get { - return ResourceManager.GetString("ConnectionEventConnected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection to "{0}" via "{1}" established by user "{2}" (Description: "{3}"; User Field: "{4}"). - /// - internal static string ConnectionEventConnectedDetail { - get { - return ResourceManager.GetString("ConnectionEventConnectedDetail", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A connection protocol error occurred. Host: "{1}"; Error code: "{2}"; Error Description: "{0}". - /// - internal static string ConnectionEventErrorOccured { - get { - return ResourceManager.GetString("ConnectionEventErrorOccured", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection failed!. - /// - internal static string ConnectionFailed { - get { - return ResourceManager.GetString("ConnectionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The connection file could not be found.. - /// - internal static string ConnectionFileNotFound { - get { - return ResourceManager.GetString("ConnectionFileNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Opening connection failed!. - /// - internal static string ConnectionOpenFailed { - get { - return ResourceManager.GetString("ConnectionOpenFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot open connection: No hostname specified!. - /// - internal static string ConnectionOpenFailedNoHostname { - get { - return ResourceManager.GetString("ConnectionOpenFailedNoHostname", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection Panels. - /// - internal static string ConnectionPanels { - get { - return ResourceManager.GetString("ConnectionPanels", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connections. - /// - internal static string Connections { - get { - return ResourceManager.GetString("Connections", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Daily. - /// - internal static string ConnectionsBackupFrequencyDaily { - get { - return ResourceManager.GetString("ConnectionsBackupFrequencyDaily", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Never backup connections. - /// - internal static string ConnectionsBackupFrequencyNever { - get { - return ResourceManager.GetString("ConnectionsBackupFrequencyNever", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to On Edit. - /// - internal static string ConnectionsBackupFrequencyOnEdit { - get { - return ResourceManager.GetString("ConnectionsBackupFrequencyOnEdit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to On Exit. - /// - internal static string ConnectionsBackupFrequencyOnExit { - get { - return ResourceManager.GetString("ConnectionsBackupFrequencyOnExit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Weekly. - /// - internal static string ConnectionsBackupFrequencyWeekly { - get { - return ResourceManager.GetString("ConnectionsBackupFrequencyWeekly", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't set default port!. - /// - internal static string ConnectionSetDefaultPortFailed { - get { - return ResourceManager.GetString("ConnectionSetDefaultPortFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't create backup of connections file!. - /// - internal static string ConnectionsFileBackupFailed { - get { - return ResourceManager.GetString("ConnectionsFileBackupFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connections file "{0}" could not be loaded!. - /// - internal static string ConnectionsFileCouldNotBeLoaded { - get { - return ResourceManager.GetString("ConnectionsFileCouldNotBeLoaded", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connections file "{0}" could not be loaded! - ///Starting with new connections file.. - /// - internal static string ConnectionsFileCouldNotBeLoadedNew { - get { - return ResourceManager.GetString("ConnectionsFileCouldNotBeLoadedNew", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't save connections file as "{0}"!. - /// - internal static string ConnectionsFileCouldNotSaveAs { - get { - return ResourceManager.GetString("ConnectionsFileCouldNotSaveAs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection successful. - /// - internal static string ConnectionSuccessful { - get { - return ResourceManager.GetString("ConnectionSuccessful", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connect without credentials. - /// - internal static string ConnectNoCredentials { - get { - return ResourceManager.GetString("ConnectNoCredentials", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connect to console session. - /// - internal static string ConnectToConsoleSession { - get { - return ResourceManager.GetString("ConnectToConsoleSession", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connect (with options). - /// - internal static string ConnectWithOptions { - get { - return ResourceManager.GetString("ConnectWithOptions", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection to {0} via {1} closed by user {2}.. - /// - internal static string ConnenctionClosedByUser { - get { - return ResourceManager.GetString("ConnenctionClosedByUser", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection Event Closed. - /// - internal static string ConnenctionCloseEvent { - get { - return ResourceManager.GetString("ConnenctionCloseEvent", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection Event Closed failed!. - /// - internal static string ConnenctionCloseEventFailed { - get { - return ResourceManager.GetString("ConnenctionCloseEventFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Copy. - /// - internal static string Copy { - get { - return ResourceManager.GetString("Copy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Copy All. - /// - internal static string CopyAll { - get { - return ResourceManager.GetString("CopyAll", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Copy Hostname. - /// - internal static string CopyHostname { - get { - return ResourceManager.GetString("CopyHostname", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't create new connections file!. - /// - internal static string CouldNotCreateNewConnectionsFile { - get { - return ResourceManager.GetString("CouldNotCreateNewConnectionsFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not find external tool with name "{0}". - /// - internal static string CouldNotFindExternalTool { - get { - return ResourceManager.GetString("CouldNotFindExternalTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not find ToolStrip control in FilteredPropertyGrid.. - /// - internal static string CouldNotFindToolStripInFilteredPropertyGrid { - get { - return ResourceManager.GetString("CouldNotFindToolStripInFilteredPropertyGrid", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Create an empty panel when mRemoteNG starts. - /// - internal static string CreateEmptyPanelOnStartUp { - get { - return ResourceManager.GetString("CreateEmptyPanelOnStartUp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Credentials. - /// - internal static string Credentials { - get { - return ResourceManager.GetString("Credentials", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Credential not available. - /// - internal static string CredentialUnavailable { - get { - return ResourceManager.GetString("CredentialUnavailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Credits. - /// - internal static string Credits { - get { - return ResourceManager.GetString("Credits", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ctrl-Alt-Del. - /// - internal static string CtrlAltDel { - get { - return ResourceManager.GetString("CtrlAltDel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ctrl-Esc. - /// - internal static string CtrlEsc { - get { - return ResourceManager.GetString("CtrlEsc", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Daily. - /// - internal static string Daily { - get { - return ResourceManager.GetString("Daily", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Database:. - /// - internal static string Database { - get { - return ResourceManager.GetString("Database", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Database '{0}' not available.. - /// - internal static string DatabaseNotAvailable { - get { - return ResourceManager.GetString("DatabaseNotAvailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Debug. - /// - internal static string Debug { - get { - return ResourceManager.GetString("Debug", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete. - /// - internal static string Delete { - get { - return ResourceManager.GetString("Delete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete All. - /// - internal static string DeleteAll { - get { - return ResourceManager.GetString("DeleteAll", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Delete External Tool.... - /// - internal static string DeleteExternalTool { - get { - return ResourceManager.GetString("DeleteExternalTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Description. - /// - internal static string Description { - get { - return ResourceManager.GetString("Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Detect. - /// - internal static string Detect { - get { - return ResourceManager.GetString("Detect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disable Cursor blinking. - /// - internal static string DisableCursorBlinking { - get { - return ResourceManager.GetString("DisableCursorBlinking", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disable Cursor Shadow. - /// - internal static string DisableCursorShadow { - get { - return ResourceManager.GetString("DisableCursorShadow", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disable Full Window drag. - /// - internal static string DisableFullWindowDrag { - get { - return ResourceManager.GetString("DisableFullWindowDrag", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disable Menu Animations. - /// - internal static string DisableMenuAnimations { - get { - return ResourceManager.GetString("DisableMenuAnimations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disconnect. - /// - internal static string Disconnect { - get { - return ResourceManager.GetString("Disconnect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disconnect All But This. - /// - internal static string DisconnectOthers { - get { - return ResourceManager.GetString("DisconnectOthers", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disconnect Tabs To The Right. - /// - internal static string DisconnectOthersRight { - get { - return ResourceManager.GetString("DisconnectOthersRight", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disk Drives. - /// - internal static string DiskDrives { - get { - return ResourceManager.GetString("DiskDrives", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Display. - /// - internal static string Display { - get { - return ResourceManager.GetString("Display", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Display Name. - /// - internal static string DisplayName { - get { - return ResourceManager.GetString("DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Display Themes. - /// - internal static string DisplayThemes { - get { - return ResourceManager.GetString("DisplayThemes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Display Wallpaper. - /// - internal static string DisplayWallpaper { - get { - return ResourceManager.GetString("DisplayWallpaper", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Domain. - /// - internal static string Domain { - get { - return ResourceManager.GetString("Domain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to EC2InstanceId. - /// - internal static string EC2InstanceId - { - get - { - return ResourceManager.GetString("EC2InstanceId", resourceCulture); - } - } - /// - /// Looks up a localized string similar to PropertyDescriptionEC2InstanceId. - /// - internal static string PropertyDescriptionEC2InstanceId - { - get - { - return ResourceManager.GetString("PropertyDescriptionEC2InstanceId", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to EC2InstanceId. - /// - internal static string EC2Region - { - get - { - return ResourceManager.GetString("EC2Region", resourceCulture); - } - } - /// - /// Looks up a localized string similar to PropertyDescriptionEC2InstanceId. - /// - internal static string PropertyDescriptionEC2Region - { - get - { - return ResourceManager.GetString("PropertyDescriptionEC2Region", resourceCulture); - } - } - - - /// - /// Looks up a localized string similar to Donate. - /// - internal static string Donate { - get { - return ResourceManager.GetString("Donate", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do not play. - /// - internal static string DoNotPlay { - get { - return ResourceManager.GetString("DoNotPlay", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do not trim spaces from usernames. - /// - internal static string DoNotTrimUsername { - get { - return ResourceManager.GetString("DoNotTrimUsername", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Don't connect to console session. - /// - internal static string DontConnectToConsoleSession { - get { - return ResourceManager.GetString("DontConnectToConsoleSession", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Don't connect if authentication fails. - /// - internal static string DontConnectWhenAuthFails { - get { - return ResourceManager.GetString("DontConnectWhenAuthFails", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Double click on tab closes it. - /// - internal static string DoubleClickTabClosesIt { - get { - return ResourceManager.GetString("DoubleClickTabClosesIt", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Download. - /// - internal static string Download { - get { - return ResourceManager.GetString("Download", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Download and Install. - /// - internal static string DownloadAndInstall { - get { - return ResourceManager.GetString("DownloadAndInstall", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Duplicate. - /// - internal static string Duplicate { - get { - return ResourceManager.GetString("Duplicate", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Duplicate Tab. - /// - internal static string DuplicateTab { - get { - return ResourceManager.GetString("DuplicateTab", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Dynamic. - /// - internal static string Dynamic { - get { - return ResourceManager.GetString("Dynamic", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to continue with no password?. - /// - internal static string EmptyPasswordContinue { - get { - return ResourceManager.GetString("EmptyPasswordContinue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to For empty Username, Password or Domain fields use:. - /// - internal static string EmptyUsernamePasswordDomainFields { - get { - return ResourceManager.GetString("EmptyUsernamePasswordDomainFields", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Desktop Composition. - /// - internal static string EnableDesktopComposition { - get { - return ResourceManager.GetString("EnableDesktopComposition", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Encoding. - /// - internal static string Encoding { - get { - return ResourceManager.GetString("Encoding", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Completely encrypt connection file. - /// - internal static string EncryptCompleteConnectionFile { - get { - return ResourceManager.GetString("EncryptCompleteConnectionFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Block Cipher Mode. - /// - internal static string EncryptionBlockCipherMode { - get { - return ResourceManager.GetString("EncryptionBlockCipherMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Encryption Engine. - /// - internal static string EncryptionEngine { - get { - return ResourceManager.GetString("EncryptionEngine", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Key Derivation Function Iterations. - /// - internal static string EncryptionKeyDerivationIterations { - get { - return ResourceManager.GetString("EncryptionKeyDerivationIterations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Encryption Test. - /// - internal static string EncryptionTest { - get { - return ResourceManager.GetString("EncryptionTest", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Encrypting {0} entries using {1}/{2} and {3} iterations took {4} seconds.. - /// - internal static string EncryptionTestResultMessage { - get { - return ResourceManager.GetString("EncryptionTestResultMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Environment. - /// - internal static string Environment { - get { - return ResourceManager.GetString("Environment", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to AddExternalToolsToToolBar (frmMain) failed. {0}. - /// - internal static string ErrorAddExternalToolsToToolBarFailed { - get { - return ResourceManager.GetString("ErrorAddExternalToolsToToolBarFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to AddFolder (UI.Window.ConnectionTreeWindow) failed. {0}. - /// - internal static string ErrorAddFolderFailed { - get { - return ResourceManager.GetString("ErrorAddFolderFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The database version {0} is not compatible with this version of {1}.. - /// - internal static string ErrorBadDatabaseVersion { - get { - return ResourceManager.GetString("ErrorBadDatabaseVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The connection list could not be saved.. - /// - internal static string ErrorConnectionListSaveFailed { - get { - return ResourceManager.GetString("ErrorConnectionListSaveFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to PuTTY could not be launched.. - /// - internal static string ErrorCouldNotLaunchPutty { - get { - return ResourceManager.GetString("ErrorCouldNotLaunchPutty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Decryption failed. {0}. - /// - internal static string ErrorDecryptionFailed { - get { - return ResourceManager.GetString("ErrorDecryptionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Encryption failed. {0}. - /// - internal static string ErrorEncryptionFailed { - get { - return ResourceManager.GetString("ErrorEncryptionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The Windows security setting, "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing", is enabled. - /// - ///See the Microsoft Support article at http://support.microsoft.com/kb/811833 for more information. - /// - ///{0} is not fully FIPS compliant. Click OK to proceed at your own discretion, or Cancel to Exit.. - /// - internal static string ErrorFipsPolicyIncompatible { - get { - return ResourceManager.GetString("ErrorFipsPolicyIncompatible", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Errors. - /// - internal static string Errors { - get { - return ResourceManager.GetString("Errors", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The startup connection file could not be loaded.{0}{0}{2}{0}{3}{0}{0}In order to prevent data loss, {1} will now exit.. - /// - internal static string ErrorStartupConnectionFileLoad { - get { - return ResourceManager.GetString("ErrorStartupConnectionFileLoad", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VerifyDatabaseVersion (Config.Connections.Save) failed. {0}. - /// - internal static string ErrorVerifyDatabaseVersionFailed { - get { - return ResourceManager.GetString("ErrorVerifyDatabaseVersionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This exception will force mRemoteNG to close. - /// - internal static string ExceptionForcesmRemoteNGToClose { - get { - return ResourceManager.GetString("ExceptionForcesmRemoteNGToClose", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Exception Message. - /// - internal static string ExceptionMessage { - get { - return ResourceManager.GetString("ExceptionMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Exit. - /// - internal static string Exit { - get { - return ResourceManager.GetString("Exit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Expand all folders. - /// - internal static string ExpandAllFolders { - get { - return ResourceManager.GetString("ExpandAllFolders", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Experimental. - /// - internal static string Experimental { - get { - return ResourceManager.GetString("Experimental", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Export. - /// - internal static string Export { - get { - return ResourceManager.GetString("Export", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Export everything. - /// - internal static string ExportEverything { - get { - return ResourceManager.GetString("ExportEverything", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Export File. - /// - internal static string ExportFile { - get { - return ResourceManager.GetString("ExportFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Export Items. - /// - internal static string ExportItems { - get { - return ResourceManager.GetString("ExportItems", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Export Properties. - /// - internal static string ExportProperties { - get { - return ResourceManager.GetString("ExportProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Export the currently selected connection. - /// - internal static string ExportSelectedConnection { - get { - return ResourceManager.GetString("ExportSelectedConnection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Export the currently selected folder. - /// - internal static string ExportSelectedFolder { - get { - return ResourceManager.GetString("ExportSelectedFolder", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to External Tool. - /// - internal static string ExternalTool { - get { - return ResourceManager.GetString("ExternalTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to External Tool After. - /// - internal static string ExternalToolAfter { - get { - return ResourceManager.GetString("ExternalToolAfter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to External Tool Before. - /// - internal static string ExternalToolBefore { - get { - return ResourceManager.GetString("ExternalToolBefore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New External Tool. - /// - internal static string ExternalToolDefaultName { - get { - return ResourceManager.GetString("ExternalToolDefaultName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to External Tool Properties. - /// - internal static string ExternalToolProperties { - get { - return ResourceManager.GetString("ExternalToolProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to External Tools Toolbar. - /// - internal static string ExternalToolsToolbar { - get { - return ResourceManager.GetString("ExternalToolsToolbar", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Favorite. - /// - internal static string Favorite { - get { - return ResourceManager.GetString("Favorite", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Favorites. - /// - internal static string Favorites { - get { - return ResourceManager.GetString("Favorites", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to File &Format:. - /// - internal static string FileFormat { - get { - return ResourceManager.GetString("FileFormat", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Filename. - /// - internal static string Filename { - get { - return ResourceManager.GetString("Filename", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Files. - /// - internal static string Files { - get { - return ResourceManager.GetString("Files", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to All Files (*.*). - /// - internal static string FilterAll { - get { - return ResourceManager.GetString("FilterAll", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to All importable files. - /// - internal static string FilterAllImportable { - get { - return ResourceManager.GetString("FilterAllImportable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Application Files (*.exe). - /// - internal static string FilterApplication { - get { - return ResourceManager.GetString("FilterApplication", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemote CSV Files (*.csv). - /// - internal static string FiltermRemoteCSV { - get { - return ResourceManager.GetString("FiltermRemoteCSV", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemote XML Files (*.xml). - /// - internal static string FiltermRemoteXML { - get { - return ResourceManager.GetString("FiltermRemoteXML", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to PuTTY Connection Manager files. - /// - internal static string FilterPuttyConnectionManager { - get { - return ResourceManager.GetString("FilterPuttyConnectionManager", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remote Desktop Connection Manager files (*.rdg). - /// - internal static string FilterRdgFiles { - get { - return ResourceManager.GetString("FilterRdgFiles", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Files (*.rdp). - /// - internal static string FilterRDP { - get { - return ResourceManager.GetString("FilterRDP", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Filter search matches in connection tree. - /// - internal static string FilterSearchMatchesInConnectionTree { - get { - return ResourceManager.GetString("FilterSearchMatchesInConnectionTree", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to First IP. - /// - internal static string FirstIp { - get { - return ResourceManager.GetString("FirstIp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to First Port. - /// - internal static string FirstPort { - get { - return ResourceManager.GetString("FirstPort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Fit To Panel. - /// - internal static string FitToPanel { - get { - return ResourceManager.GetString("FitToPanel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Font Smoothing. - /// - internal static string FontSmoothing { - get { - return ResourceManager.GetString("FontSmoothing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Inherit {0}. - /// - internal static string FormatInherit { - get { - return ResourceManager.GetString("FormatInherit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Description of inherited property: {0}. - /// - internal static string FormatInheritDescription { - get { - return ResourceManager.GetString("FormatInheritDescription", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Free. - /// - internal static string Free { - get { - return ResourceManager.GetString("Free", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Fullscreen. - /// - internal static string Fullscreen { - get { - return ResourceManager.GetString("Fullscreen", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Gateway. - /// - internal static string Gateway { - get { - return ResourceManager.GetString("Gateway", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to General. - /// - internal static string General { - get { - return ResourceManager.GetString("General", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occured while loading the connection entry for "{0}" from "{1}". {2}. - /// - internal static string GetConnectionInfoFromXmlFailed { - get { - return ResourceManager.GetString("GetConnectionInfoFromXmlFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Automatic Reconnect. - /// - internal static string GroupboxAutomaticReconnect { - get { - return ResourceManager.GetString("GroupboxAutomaticReconnect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG Help. - /// - internal static string HelpContents { - get { - return ResourceManager.GetString("HelpContents", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to High. - /// - internal static string High { - get { - return ResourceManager.GetString("High", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Host. - /// - internal static string Host { - get { - return ResourceManager.GetString("Host", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hostname:. - /// - internal static string Hostname { - get { - return ResourceManager.GetString("Hostname", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hostname/IP. - /// - internal static string HostnameIp { - get { - return ResourceManager.GetString("HostnameIp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to HTTP. - /// - internal static string Http { - get { - return ResourceManager.GetString("Http", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Edge Chromium. - /// - internal static string HttpCEF { - get { - return ResourceManager.GetString("HttpCEF", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to HTTP Connect Failed!. - /// - internal static string HttpConnectFailed { - get { - return ResourceManager.GetString("HttpConnectFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't create new HTTP Connection!. - /// - internal static string HttpConnectionFailed { - get { - return ResourceManager.GetString("HttpConnectionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Changing HTTP Document Tile Failed!. - /// - internal static string HttpDocumentTileChangeFailed { - get { - return ResourceManager.GetString("HttpDocumentTileChangeFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Failed to contruct the URL to load. - /// - internal static string HttpFailedUrlBuild { - get { - return ResourceManager.GetString("HttpFailedUrlBuild", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Internet Explorer. - /// - internal static string HttpInternetExplorer { - get { - return ResourceManager.GetString("HttpInternetExplorer", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to HTTPS. - /// - internal static string Https { - get { - return ResourceManager.GetString("Https", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Set HTTP Props failed!. - /// - internal static string HttpSetPropsFailed { - get { - return ResourceManager.GetString("HttpSetPropsFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Icon. - /// - internal static string Icon { - get { - return ResourceManager.GetString("Icon", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Identify quick connect tabs by adding the prefix "Quick:". - /// - internal static string IdentifyQuickConnectTabs { - get { - return ResourceManager.GetString("IdentifyQuickConnectTabs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Import from Active Directory. - /// - internal static string ImportAD { - get { - return ResourceManager.GetString("ImportAD", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An error occurred while importing the file "{0}".. - /// - internal static string ImportFileFailedContent { - get { - return ResourceManager.GetString("ImportFileFailedContent", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Import from &File.... - /// - internal static string ImportFromFile { - get { - return ResourceManager.GetString("ImportFromFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Import from Port Scan. - /// - internal static string ImportPortScan { - get { - return ResourceManager.GetString("ImportPortScan", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Import sub OUs. - /// - internal static string ImportSubOUs { - get { - return ResourceManager.GetString("ImportSubOUs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Informations. - /// - internal static string Informations { - get { - return ResourceManager.GetString("Informations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Inheritance. - /// - internal static string Inheritance { - get { - return ResourceManager.GetString("Inheritance", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Dispose of Int App process failed!. - /// - internal static string IntAppDisposeFailed { - get { - return ResourceManager.GetString("IntAppDisposeFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Int App Focus Failed!. - /// - internal static string IntAppFocusFailed { - get { - return ResourceManager.GetString("IntAppFocusFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Int App Handle: {0}. - /// - internal static string IntAppHandle { - get { - return ResourceManager.GetString("IntAppHandle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Killing Int App Process failed!. - /// - internal static string IntAppKillFailed { - get { - return ResourceManager.GetString("IntAppKillFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Int App Resize failed!. - /// - internal static string IntAppResizeFailed { - get { - return ResourceManager.GetString("IntAppResizeFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --- IntApp Stuff ---. - /// - internal static string IntAppStuff { - get { - return ResourceManager.GetString("IntAppStuff", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Int App Title: {0}. - /// - internal static string IntAppTitle { - get { - return ResourceManager.GetString("IntAppTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to (Automatically Detect). - /// - internal static string LanguageDefault { - get { - return ResourceManager.GetString("LanguageDefault", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to {0} must be restarted before changes to the language will take effect.. - /// - internal static string LanguageRestartRequired { - get { - return ResourceManager.GetString("LanguageRestartRequired", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Language. - /// - internal static string LanguageString { - get { - return ResourceManager.GetString("LanguageString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Last IP. - /// - internal static string LastIp { - get { - return ResourceManager.GetString("LastIp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Last Port. - /// - internal static string LastPort { - get { - return ResourceManager.GetString("LastPort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Launch External Tool. - /// - internal static string LaunchExternalTool { - get { - return ResourceManager.GetString("LaunchExternalTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to License. - /// - internal static string License { - get { - return ResourceManager.GetString("License", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Load Balance Info. - /// - internal static string LoadBalanceInfo { - get { - return ResourceManager.GetString("LoadBalanceInfo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use UTF8 encoding for RDP "Load Balance Info" property. - /// - internal static string LoadBalanceInfoUseUtf8 { - get { - return ResourceManager.GetString("LoadBalanceInfoUseUtf8", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Load from SQL failed. - /// - internal static string LoadFromSqlFailed { - get { - return ResourceManager.GetString("LoadFromSqlFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The connection information could not be loaded from the SQL server.. - /// - internal static string LoadFromSqlFailedContent { - get { - return ResourceManager.GetString("LoadFromSqlFailedContent", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Load From XML failed!. - /// - internal static string LoadFromXmlFailed { - get { - return ResourceManager.GetString("LoadFromXmlFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Local file. - /// - internal static string LocalFile { - get { - return ResourceManager.GetString("LocalFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Local file does not exist!. - /// - internal static string LocalFileDoesNotExist { - get { - return ResourceManager.GetString("LocalFileDoesNotExist", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Lock toolbar positions. - /// - internal static string LockToolbars { - get { - return ResourceManager.GetString("LockToolbars", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Log file path. - /// - internal static string LogFilePath { - get { - return ResourceManager.GetString("LogFilePath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Logging. - /// - internal static string Logging { - get { - return ResourceManager.GetString("Logging", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Login failed for user '{0}'.. - /// - internal static string LoginFailedForUser { - get { - return ResourceManager.GetString("LoginFailedForUser", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Log these message types. - /// - internal static string LogTheseMessageTypes { - get { - return ResourceManager.GetString("LogTheseMessageTypes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Log to application directory. - /// - internal static string LogToAppDir { - get { - return ResourceManager.GetString("LogToAppDir", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to MAC Address. - /// - internal static string MacAddress { - get { - return ResourceManager.GetString("MacAddress", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Medium. - /// - internal static string Medium { - get { - return ResourceManager.GetString("Medium", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Message. - /// - internal static string Message { - get { - return ResourceManager.GetString("Message", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Minimize to notification area. - /// - internal static string MinimizeToSysTray { - get { - return ResourceManager.GetString("MinimizeToSysTray", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Minutes to Idle. - /// - internal static string MinutesToIdleTimeout { - get { - return ResourceManager.GetString("MinutesToIdleTimeout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Miscellaneous. - /// - internal static string Miscellaneous { - get { - return ResourceManager.GetString("Miscellaneous", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Monthly. - /// - internal static string Monthly { - get { - return ResourceManager.GetString("Monthly", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Move down. - /// - internal static string MoveDown { - get { - return ResourceManager.GetString("MoveDown", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Move up. - /// - internal static string MoveUp { - get { - return ResourceManager.GetString("MoveUp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG CSV. - /// - internal static string MremoteNgCsv { - get { - return ResourceManager.GetString("MremoteNgCsv", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG Unhandled Exception. - /// - internal static string mRemoteNGUnhandledException { - get { - return ResourceManager.GetString("mRemoteNGUnhandledException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG XML. - /// - internal static string MremoteNgXml { - get { - return ResourceManager.GetString("MremoteNgXml", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Multi SSH:. - /// - internal static string MultiSsh { - get { - return ResourceManager.GetString("MultiSsh", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Multi SSH toolbar. - /// - internal static string MultiSshToolbar { - get { - return ResourceManager.GetString("MultiSshToolbar", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Press ENTER to send. Ctrl+C is sent immediately.. - /// - internal static string MultiSshToolTip { - get { - return ResourceManager.GetString("MultiSshToolTip", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Must Be Between 0 and 255. - /// - internal static string MustBeBetween0And255 { - get { - return ResourceManager.GetString("MustBeBetween0And255", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to My current credentials (Windows logon information). - /// - internal static string MyCurrentWindowsCreds { - get { - return ResourceManager.GetString("MyCurrentWindowsCreds", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Name. - /// - internal static string Name { - get { - return ResourceManager.GetString("Name", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Never. - /// - internal static string Never { - get { - return ResourceManager.GetString("Never", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New Connection. - /// - internal static string NewConnection { - get { - return ResourceManager.GetString("NewConnection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New Connection File. - /// - internal static string NewConnectionFile { - get { - return ResourceManager.GetString("NewConnectionFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New External Tool. - /// - internal static string NewExternalTool { - get { - return ResourceManager.GetString("NewExternalTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New Folder. - /// - internal static string NewFolder { - get { - return ResourceManager.GetString("NewFolder", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New Panel. - /// - internal static string NewPanel { - get { - return ResourceManager.GetString("NewPanel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New Title. - /// - internal static string NewTitle { - get { - return ResourceManager.GetString("NewTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No. - /// - internal static string No { - get { - return ResourceManager.GetString("No", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No сompression. - /// - internal static string NoCompression { - get { - return ResourceManager.GetString("NoCompression", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This node is already in this folder.. - /// - internal static string NodeAlreadyInFolder { - get { - return ResourceManager.GetString("NodeAlreadyInFolder", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot drag node onto itself.. - /// - internal static string NodeCannotDragOnSelf { - get { - return ResourceManager.GetString("NodeCannotDragOnSelf", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot drag parent node onto child.. - /// - internal static string NodeCannotDragParentOnChild { - get { - return ResourceManager.GetString("NodeCannotDragParentOnChild", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This node is not draggable.. - /// - internal static string NodeNotDraggable { - get { - return ResourceManager.GetString("NodeNotDraggable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No ext. app specified.. - /// - internal static string NoExtAppDefined { - get { - return ResourceManager.GetString("NoExtAppDefined", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to None. - /// - internal static string None { - get { - return ResourceManager.GetString("None", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Normal. - /// - internal static string Normal { - get { - return ResourceManager.GetString("Normal", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No SmartSize. - /// - internal static string NoSmartSize { - get { - return ResourceManager.GetString("NoSmartSize", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Notifications. - /// - internal static string Notifications { - get { - return ResourceManager.GetString("Notifications", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No update available. - /// - internal static string NoUpdateAvailable { - get { - return ResourceManager.GetString("NoUpdateAvailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You are trying to load a connection file that was created using an very early version of mRemote, this could result in an runtime error. - ///If you run into such an error, please create a new connection file!. - /// - internal static string OldConffile { - get { - return ResourceManager.GetString("OldConffile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open a different file. - /// - internal static string OpenADifferentFile { - get { - return ResourceManager.GetString("OpenADifferentFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open Connection File.... - /// - internal static string OpenConnectionFile { - get { - return ResourceManager.GetString("OpenConnectionFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open file. - /// - internal static string OpenFile { - get { - return ResourceManager.GetString("OpenFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Opening Command. - /// - internal static string OpeningCommand { - get { - return ResourceManager.GetString("OpeningCommand", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open new tab to the right of the currently selected tab. - /// - internal static string OpenNewTabRight { - get { - return ResourceManager.GetString("OpenNewTabRight", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Open Ports. - /// - internal static string OpenPorts { - get { - return ResourceManager.GetString("OpenPorts", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Options. - /// - internal static string Options { - get { - return ResourceManager.GetString("Options", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG Options. - /// - internal static string OptionsPageTitle { - get { - return ResourceManager.GetString("OptionsPageTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Testing.... - /// - internal static string OptionsProxyTesting { - get { - return ResourceManager.GetString("OptionsProxyTesting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warning: Restart is required to commit any theme configuration change.. - /// - internal static string OptionsThemeChangeWarning { - get { - return ResourceManager.GetString("OptionsThemeChangeWarning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you really want to delete the theme?. - /// - internal static string OptionsThemeDeleteConfirmation { - get { - return ResourceManager.GetString("OptionsThemeDeleteConfirmation", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New theme name. - /// - internal static string OptionsThemeNewThemeCaption { - get { - return ResourceManager.GetString("OptionsThemeNewThemeCaption", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Cannot create theme, name already present or special characters in the name. - /// - internal static string OptionsThemeNewThemeError { - get { - return ResourceManager.GetString("OptionsThemeNewThemeError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Type the new theme name. - /// - internal static string OptionsThemeNewThemeText { - get { - return ResourceManager.GetString("OptionsThemeNewThemeText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Out Of Range. - /// - internal static string OutOfRange { - get { - return ResourceManager.GetString("OutOfRange", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Panel. - /// - internal static string Panel { - get { - return ResourceManager.GetString("Panel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Panel Handle: {0}. - /// - internal static string PanelHandle { - get { - return ResourceManager.GetString("PanelHandle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Panel Name. - /// - internal static string PanelName { - get { - return ResourceManager.GetString("PanelName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Password. - /// - internal static string Password { - get { - return ResourceManager.GetString("Password", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Password must contain at least {0} of the following characters: {1}. - /// - internal static string PasswordConstainsSpecialCharactersConstraintHint { - get { - return ResourceManager.GetString("PasswordConstainsSpecialCharactersConstraintHint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Password must contain at least {0} lower case character(s). - /// - internal static string PasswordContainsLowerCaseConstraintHint { - get { - return ResourceManager.GetString("PasswordContainsLowerCaseConstraintHint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Password must contain at least {0} number(s). - /// - internal static string PasswordContainsNumbersConstraint { - get { - return ResourceManager.GetString("PasswordContainsNumbersConstraint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Password must contain at least {0} upper case character(s). - /// - internal static string PasswordContainsUpperCaseConstraintHint { - get { - return ResourceManager.GetString("PasswordContainsUpperCaseConstraintHint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Password length must be between {0} and {1}. - /// - internal static string PasswordLengthConstraintHint { - get { - return ResourceManager.GetString("PasswordLengthConstraintHint", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Password protect. - /// - internal static string PasswordProtect { - get { - return ResourceManager.GetString("PasswordProtect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Both passwords must match.. - /// - internal static string PasswordStatusMustMatch { - get { - return ResourceManager.GetString("PasswordStatusMustMatch", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The password must be at least 3 characters long.. - /// - internal static string PasswordStatusTooShort { - get { - return ResourceManager.GetString("PasswordStatusTooShort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Place search bar above connection tree. - /// - internal static string PlaceSearchBarAboveConnectionTree { - get { - return ResourceManager.GetString("PlaceSearchBarAboveConnectionTree", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please fill all fields. - /// - internal static string PleaseFillAllFields { - get { - return ResourceManager.GetString("PleaseFillAllFields", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Popups. - /// - internal static string Popups { - get { - return ResourceManager.GetString("Popups", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Port. - /// - internal static string Port { - get { - return ResourceManager.GetString("Port", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Portable Edition. - /// - internal static string PortableEdition { - get { - return ResourceManager.GetString("PortableEdition", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ports. - /// - internal static string Ports { - get { - return ResourceManager.GetString("Ports", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Port Scan. - /// - internal static string PortScan { - get { - return ResourceManager.GetString("PortScan", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Port scan complete.. - /// - internal static string PortScanComplete { - get { - return ResourceManager.GetString("PortScanComplete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't load PortScan panel!. - /// - internal static string PortScanCouldNotLoadPanel { - get { - return ResourceManager.GetString("PortScanCouldNotLoadPanel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to PowerShell. - /// - internal static string PowerShell { - get { - return ResourceManager.GetString("PowerShell", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Printers. - /// - internal static string Printers { - get { - return ResourceManager.GetString("Printers", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Properties. - /// - internal static string Properties { - get { - return ResourceManager.GetString("Properties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Toggle all inheritance options.. - /// - internal static string PropertyDescriptionAll { - get { - return ResourceManager.GetString("PropertyDescriptionAll", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select which authentication level this connection should use.. - /// - internal static string PropertyDescriptionAuthenticationLevel { - get { - return ResourceManager.GetString("PropertyDescriptionAuthenticationLevel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select how you want to authenticate against the VNC server.. - /// - internal static string PropertyDescriptionAuthenticationMode { - get { - return ResourceManager.GetString("PropertyDescriptionAuthenticationMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether to automatically resize the connection when the window is resized or when fullscreen mode is toggled. Requires RDC 8.0 or higher.. - /// - internal static string PropertyDescriptionAutomaticResize { - get { - return ResourceManager.GetString("PropertyDescriptionAutomaticResize", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether to use bitmap caching or not.. - /// - internal static string PropertyDescriptionCacheBitmaps { - get { - return ResourceManager.GetString("PropertyDescriptionCacheBitmaps", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select the colour quality to be used.. - /// - internal static string PropertyDescriptionColors { - get { - return ResourceManager.GetString("PropertyDescriptionColors", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select the compression value to be used.. - /// - internal static string PropertyDescriptionCompression { - get { - return ResourceManager.GetString("PropertyDescriptionCompression", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Put your notes or a description for the host here.. - /// - internal static string PropertyDescriptionDescription { - get { - return ResourceManager.GetString("PropertyDescriptionDescription", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Determines whether cursor flashes should be disabled.. - /// - internal static string PropertyDescriptionDisableCursorBlinking { - get { - return ResourceManager.GetString("PropertyDescriptionDisableCursorBlinking", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Determines whether a mouse shadow should be visible.. - /// - internal static string PropertyDescriptionDisableCursorShadow { - get { - return ResourceManager.GetString("PropertyDescriptionDisableCursorShadow", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Determines whether window content is displayed when you drag the window to a new location.. - /// - internal static string PropertyDescriptionDisableFullWindowDrag { - get { - return ResourceManager.GetString("PropertyDescriptionDisableFullWindowDrag", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Determines whether menus and windows can be displayed with animation effects in the remote session.. - /// - internal static string PropertyDescriptionDisableMenuAnimations { - get { - return ResourceManager.GetString("PropertyDescriptionDisableMenuAnimations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select yes if the theme of the remote host should be displayed.. - /// - internal static string PropertyDescriptionDisplayThemes { - get { - return ResourceManager.GetString("PropertyDescriptionDisplayThemes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select yes if the wallpaper of the remote host should be displayed.. - /// - internal static string PropertyDescriptionDisplayWallpaper { - get { - return ResourceManager.GetString("PropertyDescriptionDisplayWallpaper", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter your domain.. - /// - internal static string PropertyDescriptionDomain { - get { - return ResourceManager.GetString("PropertyDescriptionDomain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether to use desktop composition or not.. - /// - internal static string PropertyDescriptionEnableDesktopComposition { - get { - return ResourceManager.GetString("PropertyDescriptionEnableDesktopComposition", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether to use font smoothing or not.. - /// - internal static string PropertyDescriptionEnableFontSmoothing { - get { - return ResourceManager.GetString("PropertyDescriptionEnableFontSmoothing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select the encoding mode to be used.. - /// - internal static string PropertyDescriptionEncoding { - get { - return ResourceManager.GetString("PropertyDescriptionEncoding", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select the external tool to be started.. - /// - internal static string PropertyDescriptionExternalTool { - get { - return ResourceManager.GetString("PropertyDescriptionExternalTool", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select a external tool to be started after the disconnection to the remote host.. - /// - internal static string PropertyDescriptionExternalToolAfter { - get { - return ResourceManager.GetString("PropertyDescriptionExternalToolAfter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select a external tool to be started before the connection to the remote host is established.. - /// - internal static string PropertyDescriptionExternalToolBefore { - get { - return ResourceManager.GetString("PropertyDescriptionExternalToolBefore", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show this connection in the favorites menu.. - /// - internal static string PropertyDescriptionFavorite { - get { - return ResourceManager.GetString("PropertyDescriptionFavorite", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter the hostname or ip you want to connect to.. - /// - internal static string PropertyDescriptionHostnameIp { - get { - return ResourceManager.GetString("PropertyDescriptionHostnameIp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Choose a icon that will be displayed when connected to the host.. - /// - internal static string PropertyDescriptionIcon { - get { - return ResourceManager.GetString("PropertyDescriptionIcon", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specifies the load balancing information for use by load balancing routers to choose the best server.. - /// - internal static string PropertyDescriptionLoadBalanceInfo { - get { - return ResourceManager.GetString("PropertyDescriptionLoadBalanceInfo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter the MAC address of the remote host if you wish to use it in an external tool.. - /// - internal static string PropertyDescriptionMACAddress { - get { - return ResourceManager.GetString("PropertyDescriptionMACAddress", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This is the name that will be displayed in the connections tree.. - /// - internal static string PropertyDescriptionName { - get { - return ResourceManager.GetString("PropertyDescriptionName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A command to run on the remote server after successfully connecting.. - /// - internal static string PropertyDescriptionOpeningCommand { - get { - return ResourceManager.GetString("PropertyDescriptionOpeningCommand", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sets the panel in which the connection will open.. - /// - internal static string PropertyDescriptionPanel { - get { - return ResourceManager.GetString("PropertyDescriptionPanel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter your password.. - /// - internal static string PropertyDescriptionPassword { - get { - return ResourceManager.GetString("PropertyDescriptionPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Set a password needed to encrypt the connection file with. You will be prompted to enter your passcode before starting mRemoteNG.. - /// - internal static string PropertyDescriptionPasswordProtect { - get { - return ResourceManager.GetString("PropertyDescriptionPasswordProtect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter the port the selected protocol is listening on.. - /// - internal static string PropertyDescriptionPort { - get { - return ResourceManager.GetString("PropertyDescriptionPort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Choose the protocol mRemoteNG should use to connect to the host.. - /// - internal static string PropertyDescriptionProtocol { - get { - return ResourceManager.GetString("PropertyDescriptionProtocol", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select a PuTTY session to be used when connecting.. - /// - internal static string PropertyDescriptionPuttySession { - get { - return ResourceManager.GetString("PropertyDescriptionPuttySession", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specifies the domain name that a user provides to connect to the RD Gateway server.. - /// - internal static string PropertyDescriptionRDGatewayDomain { - get { - return ResourceManager.GetString("PropertyDescriptionRDGatewayDomain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specifies the host name of the Remote Desktop Gateway server.. - /// - internal static string PropertyDescriptionRDGatewayHostname { - get { - return ResourceManager.GetString("PropertyDescriptionRDGatewayHostname", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specifies whether or not to log on to the gateway using the same username and password as the connection.. - /// - internal static string PropertyDescriptionRDGatewayUseConnectionCredentials { - get { - return ResourceManager.GetString("PropertyDescriptionRDGatewayUseConnectionCredentials", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specifies the user name that a user provides to connect to the RD Gateway server.. - /// - internal static string PropertyDescriptionRDGatewayUsername { - get { - return ResourceManager.GetString("PropertyDescriptionRDGatewayUsername", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether to receive an alert after the RDP session disconnects due to inactivity. - /// - internal static string PropertyDescriptionRDPAlertIdleTimeout { - get { - return ResourceManager.GetString("PropertyDescriptionRDPAlertIdleTimeout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specifies the password of the Remote Desktop Gateway server.. - /// - internal static string PropertyDescriptionRdpGatewayPassword { - get { - return ResourceManager.GetString("PropertyDescriptionRdpGatewayPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specifies when to use a Remote Desktop Gateway (RD Gateway) server.. - /// - internal static string PropertyDescriptionRdpGatewayUsageMethod { - get { - return ResourceManager.GetString("PropertyDescriptionRdpGatewayUsageMethod", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The number of minutes for the RDP session to sit idle before automatically disconnecting (for no limit use 0). - /// - internal static string PropertyDescriptionRDPMinutesToIdleTimeout { - get { - return ResourceManager.GetString("PropertyDescriptionRDPMinutesToIdleTimeout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The program to be started on the remote server upon connection.. - /// - internal static string PropertyDescriptionRDPStartProgram { - get { - return ResourceManager.GetString("PropertyDescriptionRDPStartProgram", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specifies the working directory of the alternate shell.. - /// - internal static string PropertyDescriptionRDPStartProgramWorkDir { - get { - return ResourceManager.GetString("PropertyDescriptionRDPStartProgramWorkDir", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sets the version of RDP to use when opening connections.. - /// - internal static string PropertyDescriptionRdpVersion { - get { - return ResourceManager.GetString("PropertyDescriptionRdpVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether the default audio input device on the remote machine should be redirected to this computer.. - /// - internal static string PropertyDescriptionRedirectAudioCapture { - get { - return ResourceManager.GetString("PropertyDescriptionRedirectAudioCapture", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether the clipboard should be shared.. - /// - internal static string PropertyDescriptionRedirectClipboard { - get { - return ResourceManager.GetString("PropertyDescriptionRedirectClipboard", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether local disk drives should be shown on the remote host.. - /// - internal static string PropertyDescriptionRedirectDrives { - get { - return ResourceManager.GetString("PropertyDescriptionRedirectDrives", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether key combinations (e.g. Alt-Tab) should be redirected to the remote host.. - /// - internal static string PropertyDescriptionRedirectKeys { - get { - return ResourceManager.GetString("PropertyDescriptionRedirectKeys", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether local ports (ie. com, parallel) should be shown on the remote host.. - /// - internal static string PropertyDescriptionRedirectPorts { - get { - return ResourceManager.GetString("PropertyDescriptionRedirectPorts", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether local printers should be shown on the remote host.. - /// - internal static string PropertyDescriptionRedirectPrinters { - get { - return ResourceManager.GetString("PropertyDescriptionRedirectPrinters", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select whether local smart cards should be available on the remote host.. - /// - internal static string PropertyDescriptionRedirectSmartCards { - get { - return ResourceManager.GetString("PropertyDescriptionRedirectSmartCards", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select how remote sound should be redirected.. - /// - internal static string PropertyDescriptionRedirectSounds { - get { - return ResourceManager.GetString("PropertyDescriptionRedirectSounds", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select one of the available rendering engines that will be used to display HTML.. - /// - internal static string PropertyDescriptionRenderingEngine { - get { - return ResourceManager.GetString("PropertyDescriptionRenderingEngine", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Choose the resolution or mode this connection will open in.. - /// - internal static string PropertyDescriptionResolution { - get { - return ResourceManager.GetString("PropertyDescriptionResolution", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select the SmartSize mode to be used.. - /// - internal static string PropertyDescriptionSmartSizeMode { - get { - return ResourceManager.GetString("PropertyDescriptionSmartSizeMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Choose the Sound Quality provided by the protocol: Dynamic, Medium, High. - /// - internal static string PropertyDescriptionSoundQuality { - get { - return ResourceManager.GetString("PropertyDescriptionSoundQuality", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Specify here additional options to be used for SSH connection. See putty documentation for further details.. - /// - internal static string PropertyDescriptionSshOptions { - get { - return ResourceManager.GetString("PropertyDescriptionSshOptions", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to For connection through a SSH tunnel (jump host) specify SSH connection to be used to establish SSH tunnel.. - /// - internal static string PropertyDescriptionSshTunnel { - get { - return ResourceManager.GetString("PropertyDescriptionSshTunnel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connect to the console session of the remote host.. - /// - internal static string PropertyDescriptionUseConsoleSession { - get { - return ResourceManager.GetString("PropertyDescriptionUseConsoleSession", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use the Credential Security Support Provider (CredSSP) for authentication if it is available.. - /// - internal static string PropertyDescriptionUseCredSsp { - get { - return ResourceManager.GetString("PropertyDescriptionUseCredSsp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connect to a Hyper-V host with enhanced mode enabled.. - /// - internal static string PropertyDescriptionUseEnhancedMode { - get { - return ResourceManager.GetString("PropertyDescriptionUseEnhancedMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Feel free to enter any information you need here.. - /// - internal static string PropertyDescriptionUser1 { - get { - return ResourceManager.GetString("PropertyDescriptionUser1", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter your username.. - /// - internal static string PropertyDescriptionUserViaAPI - { - get - { - return ResourceManager.GetString("PropertyDescriptionUserViaAPI", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter your username.. - /// - internal static string PropertyDescriptionUsername { - get { - return ResourceManager.GetString("PropertyDescriptionUsername", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use VM ID to connect to VM running on Hyper-V.. - /// - internal static string PropertyDescriptionUseVmId { - get { - return ResourceManager.GetString("PropertyDescriptionUseVmId", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to If you want to establish a view only connection to the host select yes.. - /// - internal static string PropertyDescriptionViewOnly { - get { - return ResourceManager.GetString("PropertyDescriptionViewOnly", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The ID of the Hyper-V virtual machine to connect to.. - /// - internal static string PropertyDescriptionVmId { - get { - return ResourceManager.GetString("PropertyDescriptionVmId", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter the proxy address to be used.. - /// - internal static string PropertyDescriptionVNCProxyAddress { - get { - return ResourceManager.GetString("PropertyDescriptionVNCProxyAddress", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter your password for authenticating against the proxy.. - /// - internal static string PropertyDescriptionVNCProxyPassword { - get { - return ResourceManager.GetString("PropertyDescriptionVNCProxyPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter the port the proxy server listens on.. - /// - internal static string PropertyDescriptionVNCProxyPort { - get { - return ResourceManager.GetString("PropertyDescriptionVNCProxyPort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to If you use a proxy to tunnel VNC connections, select which type it is.. - /// - internal static string PropertyDescriptionVNCProxyType { - get { - return ResourceManager.GetString("PropertyDescriptionVNCProxyType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Enter your username for authenticating against the proxy.. - /// - internal static string PropertyDescriptionVNCProxyUsername { - get { - return ResourceManager.GetString("PropertyDescriptionVNCProxyUsername", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Protocol. - /// - internal static string Protocol { - get { - return ResourceManager.GetString("Protocol", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Protocol Event Disconnected. Host: "{1}"; Protocol: "{2}" Message: "{0}". - /// - internal static string ProtocolEventDisconnected { - get { - return ResourceManager.GetString("ProtocolEventDisconnected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Protocol Event Disconnected failed. - ///{0}. - /// - internal static string ProtocolEventDisconnectFailed { - get { - return ResourceManager.GetString("ProtocolEventDisconnectFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Protocol to import. - /// - internal static string ProtocolToImport { - get { - return ResourceManager.GetString("ProtocolToImport", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Proxy. - /// - internal static string Proxy { - get { - return ResourceManager.GetString("Proxy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Proxy Address. - /// - internal static string ProxyAddress { - get { - return ResourceManager.GetString("ProxyAddress", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Proxy Password. - /// - internal static string ProxyPassword { - get { - return ResourceManager.GetString("ProxyPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Proxy Port. - /// - internal static string ProxyPort { - get { - return ResourceManager.GetString("ProxyPort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Proxy test failed!. - /// - internal static string ProxyTestFailed { - get { - return ResourceManager.GetString("ProxyTestFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Proxy test succeeded!. - /// - internal static string ProxyTestSucceeded { - get { - return ResourceManager.GetString("ProxyTestSucceeded", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Proxy Type. - /// - internal static string ProxyType { - get { - return ResourceManager.GetString("ProxyType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Proxy Username. - /// - internal static string ProxyUsername { - get { - return ResourceManager.GetString("ProxyUsername", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Dispose of Putty process failed!. - /// - internal static string PuttyDisposeFailed { - get { - return ResourceManager.GetString("PuttyDisposeFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't set focus!. - /// - internal static string PuttyFocusFailed { - get { - return ResourceManager.GetString("PuttyFocusFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Putty Handle: {0}. - /// - internal static string PuttyHandle { - get { - return ResourceManager.GetString("PuttyHandle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Killing Putty Process failed!. - /// - internal static string PuttyKillFailed { - get { - return ResourceManager.GetString("PuttyKillFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Putty Resize Failed!. - /// - internal static string PuttyResizeFailed { - get { - return ResourceManager.GetString("PuttyResizeFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to PuTTY Saved Sessions. - /// - internal static string PuttySavedSessionsRootName { - get { - return ResourceManager.GetString("PuttySavedSessionsRootName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to PuTTY Session. - /// - internal static string PuttySession { - get { - return ResourceManager.GetString("PuttySession", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to To configure PuTTY sessions click this button:. - /// - internal static string PuttySessionsConfig { - get { - return ResourceManager.GetString("PuttySessionsConfig", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to PuTTY Settings. - /// - internal static string PuttySettings { - get { - return ResourceManager.GetString("PuttySettings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show PuTTY Settings Dialog failed!. - /// - internal static string PuttyShowSettingsDialogFailed { - get { - return ResourceManager.GetString("PuttyShowSettingsDialogFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to --- PuTTY Stuff ---. - /// - internal static string PuttyStuff { - get { - return ResourceManager.GetString("PuttyStuff", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Maximum PuTTY and integrated external tools wait time:. - /// - internal static string PuttyTimeout { - get { - return ResourceManager.GetString("PuttyTimeout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to PuTTY Title: {0}. - /// - internal static string PuttyTitle { - get { - return ResourceManager.GetString("PuttyTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Quick: {0}. - /// - internal static string Quick { - get { - return ResourceManager.GetString("Quick", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Quick Connect. - /// - internal static string QuickConnect { - get { - return ResourceManager.GetString("QuickConnect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Quick Connect Add Failed!. - /// - internal static string QuickConnectAddFailed { - get { - return ResourceManager.GetString("QuickConnectAddFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Creating quick connect failed. - /// - internal static string QuickConnectFailed { - get { - return ResourceManager.GetString("QuickConnectFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Quick Connect Toolbar. - /// - internal static string QuickConnectToolbar { - get { - return ResourceManager.GetString("QuickConnectToolbar", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warn me only when e&xiting mRemoteNG. - /// - internal static string RadioCloseWarnExit { - get { - return ResourceManager.GetString("RadioCloseWarnExit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warn me only when closing &multiple connections. - /// - internal static string RadioCloseWarnMultiple { - get { - return ResourceManager.GetString("RadioCloseWarnMultiple", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do &not warn me when closing connections. - /// - internal static string RadioCloseWarnNever { - get { - return ResourceManager.GetString("RadioCloseWarnNever", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RAW. - /// - internal static string Raw { - get { - return ResourceManager.GetString("Raw", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP. - /// - internal static string Rdp { - get { - return ResourceManager.GetString("Rdp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 16777216 Colours (24-bit). - /// - internal static string Rdp16777216Colors { - get { - return ResourceManager.GetString("Rdp16777216Colors", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 256 Colours (8-bit). - /// - internal static string Rdp256Colors { - get { - return ResourceManager.GetString("Rdp256Colors", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 32768 Colours (15-bit). - /// - internal static string Rdp32768Colors { - get { - return ResourceManager.GetString("Rdp32768Colors", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 16777216 Colours (32-bit). - /// - internal static string Rdp4294967296Colors { - get { - return ResourceManager.GetString("Rdp4294967296Colors", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 65536 Colours (16-bit). - /// - internal static string Rdp65536Colors { - get { - return ResourceManager.GetString("Rdp65536Colors", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't create RDP control, please check mRemoteNG requirements.. - /// - internal static string RdpControlCreationFailed { - get { - return ResourceManager.GetString("RdpControlCreationFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Disconnect failed, trying to close!. - /// - internal static string RdpDisconnectFailed { - get { - return ResourceManager.GetString("RdpDisconnectFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Internal error code 1.. - /// - internal static string RdpErrorCode1 { - get { - return ResourceManager.GetString("RdpErrorCode1", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Internal error code 2.. - /// - internal static string RdpErrorCode2 { - get { - return ResourceManager.GetString("RdpErrorCode2", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Internal error code 3. This is not a valid state.. - /// - internal static string RdpErrorCode3 { - get { - return ResourceManager.GetString("RdpErrorCode3", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Internal error code 4.. - /// - internal static string RdpErrorCode4 { - get { - return ResourceManager.GetString("RdpErrorCode4", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An unrecoverable error has occurred during client connection.. - /// - internal static string RdpErrorConnection { - get { - return ResourceManager.GetString("RdpErrorConnection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to GetError failed (FatalErrors). - /// - internal static string RdpErrorGetFailure { - get { - return ResourceManager.GetString("RdpErrorGetFailure", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An out-of-memory error has occurred.. - /// - internal static string RdpErrorOutOfMemory { - get { - return ResourceManager.GetString("RdpErrorOutOfMemory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An unknown error has occurred.. - /// - internal static string RdpErrorUnknown { - get { - return ResourceManager.GetString("RdpErrorUnknown", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A window-creation error has occurred.. - /// - internal static string RdpErrorWindowCreation { - get { - return ResourceManager.GetString("RdpErrorWindowCreation", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Winsock initialization error.. - /// - internal static string RdpErrorWinsock { - get { - return ResourceManager.GetString("RdpErrorWinsock", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Focus failed!. - /// - internal static string RdpFocusFailed { - get { - return ResourceManager.GetString("RdpFocusFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Gateway Domain. - /// - internal static string RdpGatewayDomain { - get { - return ResourceManager.GetString("RdpGatewayDomain", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Gateway Hostname. - /// - internal static string RdpGatewayHostname { - get { - return ResourceManager.GetString("RdpGatewayHostname", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Gateway is supported.. - /// - internal static string RdpGatewayIsSupported { - get { - return ResourceManager.GetString("RdpGatewayIsSupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Gateway is not supported!. - /// - internal static string RdpGatewayNotSupported { - get { - return ResourceManager.GetString("RdpGatewayNotSupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remote Desktop Gateway Password. - /// - internal static string RdpGatewayPassword { - get { - return ResourceManager.GetString("RdpGatewayPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use Gateway. - /// - internal static string RdpGatewayUsageMethod { - get { - return ResourceManager.GetString("RdpGatewayUsageMethod", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Gateway Credentials. - /// - internal static string RdpGatewayUseConnectionCredentials { - get { - return ResourceManager.GetString("RdpGatewayUseConnectionCredentials", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Gateway Username. - /// - internal static string RdpGatewayUsername { - get { - return ResourceManager.GetString("RdpGatewayUsername", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Connection Timeout. - /// - internal static string RdpOverallConnectionTimeout { - get { - return ResourceManager.GetString("RdpOverallConnectionTimeout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Could not create RDP client. RDP protocol version {0} is not supported on this machine. Please choose an older protocol version.. - /// - internal static string RdpProtocolVersionNotSupported { - get { - return ResourceManager.GetString("RdpProtocolVersionNotSupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP reconnection count:. - /// - internal static string RdpReconnectCount { - get { - return ResourceManager.GetString("RdpReconnectCount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetAuthenticationLevel failed!. - /// - internal static string RdpSetAuthenticationLevelFailed { - get { - return ResourceManager.GetString("RdpSetAuthenticationLevelFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetUseConsoleSession failed!. - /// - internal static string RdpSetConsoleSessionFailed { - get { - return ResourceManager.GetString("RdpSetConsoleSessionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Setting Console switch for RDC {0}.. - /// - internal static string RdpSetConsoleSwitch { - get { - return ResourceManager.GetString("RdpSetConsoleSwitch", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetCredentials failed!. - /// - internal static string RdpSetCredentialsFailed { - get { - return ResourceManager.GetString("RdpSetCredentialsFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetEventHandlers failed!. - /// - internal static string RdpSetEventHandlersFailed { - get { - return ResourceManager.GetString("RdpSetEventHandlersFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetRDGateway failed!. - /// - internal static string RdpSetGatewayFailed { - get { - return ResourceManager.GetString("RdpSetGatewayFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetPerformanceFlags failed!. - /// - internal static string RdpSetPerformanceFlagsFailed { - get { - return ResourceManager.GetString("RdpSetPerformanceFlagsFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetPort failed!. - /// - internal static string RdpSetPortFailed { - get { - return ResourceManager.GetString("RdpSetPortFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetProps failed!. - /// - internal static string RdpSetPropsFailed { - get { - return ResourceManager.GetString("RdpSetPropsFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Set Redirection Failed!. - /// - internal static string RdpSetRedirectionFailed { - get { - return ResourceManager.GetString("RdpSetRedirectionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Set Redirect Keys Failed!. - /// - internal static string RdpSetRedirectKeysFailed { - get { - return ResourceManager.GetString("RdpSetRedirectKeysFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP SetResolution failed!. - /// - internal static string RdpSetResolutionFailed { - get { - return ResourceManager.GetString("RdpSetResolutionFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Bring to this computer. - /// - internal static string RdpSoundBringToThisComputer { - get { - return ResourceManager.GetString("RdpSoundBringToThisComputer", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Leave at remote computer. - /// - internal static string RdpSoundLeaveAtRemoteComputer { - get { - return ResourceManager.GetString("RdpSoundLeaveAtRemoteComputer", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Alternate Shell. - /// - internal static string RDPStartProgram { - get { - return ResourceManager.GetString("RDPStartProgram", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Alternate shell working directory. - /// - internal static string RDPStartProgramWorkDir { - get { - return ResourceManager.GetString("RDPStartProgramWorkDir", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP ToggleFullscreen failed!. - /// - internal static string RdpToggleFullscreenFailed { - get { - return ResourceManager.GetString("RdpToggleFullscreenFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP ToggleSmartSize failed!. - /// - internal static string RdpToggleSmartSizeFailed { - get { - return ResourceManager.GetString("RdpToggleSmartSizeFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to RDP Version. - /// - internal static string RdpVersion { - get { - return ResourceManager.GetString("RdpVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Read only:. - /// - internal static string ReadOnly { - get { - return ResourceManager.GetString("ReadOnly", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reconnect. - /// - internal static string Reconnect { - get { - return ResourceManager.GetString("Reconnect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reconnect All Connections. - /// - internal static string ReconnectAllConnections { - get { - return ResourceManager.GetString("ReconnectAllConnections", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reconnect to previously opened sessions on startup. - /// - internal static string ReconnectAtStartup { - get { - return ResourceManager.GetString("ReconnectAtStartup", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Redirect. - /// - internal static string Redirect { - get { - return ResourceManager.GetString("Redirect", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Disk Drives. - /// - internal static string RedirectDrives { - get { - return ResourceManager.GetString("RedirectDrives", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Key Combinations. - /// - internal static string RedirectKeys { - get { - return ResourceManager.GetString("RedirectKeys", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Smart Cards. - /// - internal static string RedirectSmartCards { - get { - return ResourceManager.GetString("RedirectSmartCards", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Refresh. - /// - internal static string Refresh { - get { - return ResourceManager.GetString("Refresh", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Refresh Screen (VNC). - /// - internal static string RefreshScreen { - get { - return ResourceManager.GetString("RefreshScreen", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Release Channel. - /// - internal static string ReleaseChannel { - get { - return ResourceManager.GetString("ReleaseChannel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Stable channel includes final releases only. - ///Preview channel includes Betas & Release Candidates. - ///Nightly Channel includes Alphas, Betas & Release Candidates.. - /// - internal static string ReleaseChannelExplanation { - get { - return ResourceManager.GetString("ReleaseChannelExplanation", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Released under the GNU General Public License (GPL). - /// - internal static string ReleasedUnderGPL { - get { - return ResourceManager.GetString("ReleasedUnderGPL", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remote Desktop Services. - /// - internal static string RemoteDesktopServices { - get { - return ResourceManager.GetString("RemoteDesktopServices", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remote file. - /// - internal static string RemoteFile { - get { - return ResourceManager.GetString("RemoteFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Remove All. - /// - internal static string RemoveAll { - get { - return ResourceManager.GetString("RemoveAll", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rename. - /// - internal static string Rename { - get { - return ResourceManager.GetString("Rename", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rename Tab. - /// - internal static string RenameTab { - get { - return ResourceManager.GetString("RenameTab", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rendering Engine. - /// - internal static string RenderingEngine { - get { - return ResourceManager.GetString("RenderingEngine", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Report a Bug. - /// - internal static string ReportBug { - get { - return ResourceManager.GetString("ReportBug", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Reset layout. - /// - internal static string ResetLayout { - get { - return ResourceManager.GetString("ResetLayout", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Resolution. - /// - internal static string Resolution { - get { - return ResourceManager.GetString("Resolution", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Rlogin. - /// - internal static string Rlogin { - get { - return ResourceManager.GetString("Rlogin", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Run elevated. - /// - internal static string RunElevated { - get { - return ResourceManager.GetString("RunElevated", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save. - /// - internal static string Save { - get { - return ResourceManager.GetString("Save", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save All. - /// - internal static string SaveAll { - get { - return ResourceManager.GetString("SaveAll", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save Connection File. - /// - internal static string SaveConnectionFile { - get { - return ResourceManager.GetString("SaveConnectionFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save Connection File As.... - /// - internal static string SaveConnectionFileAs { - get { - return ResourceManager.GetString("SaveConnectionFileAs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Save connections after every edit. - /// - internal static string SaveConnectionsAfterEveryEdit { - get { - return ResourceManager.GetString("SaveConnectionsAfterEveryEdit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to save the current connections file before loading another?. - /// - internal static string SaveConnectionsFileBeforeOpeningAnother { - get { - return ResourceManager.GetString("SaveConnectionsFileBeforeOpeningAnother", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png. - /// - internal static string SaveImageFilter { - get { - return ResourceManager.GetString("SaveImageFilter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Screen. - /// - internal static string Screen { - get { - return ResourceManager.GetString("Screen", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Screenshot. - /// - internal static string Screenshot { - get { - return ResourceManager.GetString("Screenshot", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Screenshots. - /// - internal static string Screenshots { - get { - return ResourceManager.GetString("Screenshots", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Search. - /// - internal static string SearchPrompt { - get { - return ResourceManager.GetString("SearchPrompt", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Seconds. - /// - internal static string Seconds { - get { - return ResourceManager.GetString("Seconds", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select a panel from the list below or click New to add a new one. Click OK to continue.. - /// - internal static string SelectPanel { - get { - return ResourceManager.GetString("SelectPanel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Send Special Keys (VNC). - /// - internal static string SendSpecialKeys { - get { - return ResourceManager.GetString("SendSpecialKeys", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Send To.... - /// - internal static string SendTo { - get { - return ResourceManager.GetString("SendTo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Server '{0}' was not accessible.. - /// - internal static string ServerNotAccessible { - get { - return ResourceManager.GetString("ServerNotAccessible", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Server status:. - /// - internal static string ServerStatus { - get { - return ResourceManager.GetString("ServerStatus", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Set hostname like display name when creating or renaming connections. - /// - internal static string SetHostnameLikeDisplayName { - get { - return ResourceManager.GetString("SetHostnameLikeDisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Couldn't save settings or dispose SysTray Icon!. - /// - internal static string SettingsCouldNotBeSavedOrTrayDispose { - get { - return ResourceManager.GetString("SettingsCouldNotBeSavedOrTrayDispose", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show description tooltips in connection tree. - /// - internal static string ShowDescriptionTooltips { - get { - return ResourceManager.GetString("ShowDescriptionTooltips", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show full connections file path in window title. - /// - internal static string ShowFullConsFilePath { - get { - return ResourceManager.GetString("ShowFullConsFilePath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to &Show Help Text. - /// - internal static string ShowHelpText { - get { - return ResourceManager.GetString("ShowHelpText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show/Hide Menu Strip. - /// - internal static string ShowHideMenu { - get { - return ResourceManager.GetString("ShowHideMenu", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show logon information on tab names. - /// - internal static string ShowLogonInfoOnTabs { - get { - return ResourceManager.GetString("ShowLogonInfoOnTabs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show On Toolbar. - /// - internal static string ShowOnToolbar { - get { - return ResourceManager.GetString("ShowOnToolbar", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show on toolbar column. - /// - internal static string ShowOnToolbarColumnHeader { - get { - return ResourceManager.GetString("ShowOnToolbarColumnHeader", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show protocols on tab names. - /// - internal static string ShowProtocolOnTabs { - get { - return ResourceManager.GetString("ShowProtocolOnTabs", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show Text. - /// - internal static string ShowText { - get { - return ResourceManager.GetString("ShowText", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show these message types. - /// - internal static string ShowTheseMessageTypes { - get { - return ResourceManager.GetString("ShowTheseMessageTypes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Single click on connection opens it. - /// - internal static string SingleClickOnConnectionOpensIt { - get { - return ResourceManager.GetString("SingleClickOnConnectionOpensIt", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Single click on opened connection in Connection Tree switches to opened Connection Tab. - /// - internal static string SingleClickOnOpenConnectionSwitchesToIt { - get { - return ResourceManager.GetString("SingleClickOnOpenConnectionSwitchesToIt", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SmartCard. - /// - internal static string SmartCard { - get { - return ResourceManager.GetString("SmartCard", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SmartSize (RDP/VNC). - /// - internal static string SmartSize { - get { - return ResourceManager.GetString("SmartSize", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SmartSize Mode. - /// - internal static string SmartSizeMode { - get { - return ResourceManager.GetString("SmartSizeMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Socks 5. - /// - internal static string Socks5 { - get { - return ResourceManager.GetString("Socks5", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sort. - /// - internal static string Sort { - get { - return ResourceManager.GetString("Sort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ascending (A-Z). - /// - internal static string SortAsc { - get { - return ResourceManager.GetString("SortAsc", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Descending (Z-A). - /// - internal static string SortDesc { - get { - return ResourceManager.GetString("SortDesc", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sound quality. - /// - internal static string SoundQuality { - get { - return ResourceManager.GetString("SoundQuality", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sounds. - /// - internal static string Sounds { - get { - return ResourceManager.GetString("Sounds", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please see Help - Getting started - SQL Configuration for more Info!. - /// - internal static string SQLInfo { - get { - return ResourceManager.GetString("SQLInfo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SQL Server. - /// - internal static string SQLServer { - get { - return ResourceManager.GetString("SQLServer", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH background transfer failed!. - /// - internal static string SshBackgroundTransferFailed { - get { - return ResourceManager.GetString("SshBackgroundTransferFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH File Transfer. - /// - internal static string SshFileTransfer { - get { - return ResourceManager.GetString("SshFileTransfer", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH Options. - /// - internal static string SshOptions { - get { - return ResourceManager.GetString("SshOptions", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH transfer failed.. - /// - internal static string SshTransferFailed { - get { - return ResourceManager.GetString("SshTransferFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH Tunnel. - /// - internal static string SshTunnel { - get { - return ResourceManager.GetString("SshTunnel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH Tunnel connection configuration problem. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. A connection with the name configured as SSH Tunnel and protocol SSH version 1 or SSH2 version 2 cannot be found in the connection tree. Clear SSH Tunnel configuration or specify existing SSH connection.. - /// - internal static string SshTunnelConfigProblem { - get { - return ResourceManager.GetString("SshTunnelConfigProblem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH tunnel connection failed. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. Putty process terminated. Check for any problems with the connection configured as SSH Tunnel.. - /// - internal static string SshTunnelFailed { - get { - return ResourceManager.GetString("SshTunnelFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH tunnel configuration problem. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. Connection configured as SSH Tunnel found in tree, but protocol is not derived from putty. Make sure connection configured as SSH Tunnel is using SSH protocol.. - /// - internal static string SshTunnelIsNotPutty { - get { - return ResourceManager.GetString("SshTunnelIsNotPutty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH tunnel connection problem. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. SSH connection failed. Check for any problems with the connection configured as SSH Tunnel.. - /// - internal static string SshTunnelNotConnected { - get { - return ResourceManager.GetString("SshTunnelNotConnected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH tunnel initialization problem. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. SSH connection could not be initialized. Check for any problems with the connection configured as SSH Tunnel.. - /// - internal static string SshTunnelNotInitialized { - get { - return ResourceManager.GetString("SshTunnelNotInitialized", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH tunnel connection timed out. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. Local tunnel port did not become available in time. Check for any problems with the connection configured as SSH Tunnel.. - /// - internal static string SshTunnelPortNotReadyInTime { - get { - return ResourceManager.GetString("SshTunnelPortNotReadyInTime", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH version 1. - /// - internal static string SshV1 { - get { - return ResourceManager.GetString("SshV1", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SSH version 2. - /// - internal static string SshV2 { - get { - return ResourceManager.GetString("SshV2", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Stack trace. - /// - internal static string StackTrace { - get { - return ResourceManager.GetString("StackTrace", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Start Chat (VNC). - /// - internal static string StartChat { - get { - return ResourceManager.GetString("StartChat", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Start minimized. - /// - internal static string StartMinimized { - get { - return ResourceManager.GetString("StartMinimized", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Startup/Exit. - /// - internal static string StartupExit { - get { - return ResourceManager.GetString("StartupExit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Status. - /// - internal static string Status { - get { - return ResourceManager.GetString("Status", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Backup. - /// - internal static string strBackup { - get { - return ResourceManager.GetString("strBackup", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Browse.... - /// - internal static string strBrowse { - get { - return ResourceManager.GetString("strBrowse", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Connection Backup Frequency. - /// - internal static string strConnectionBackupFrequency { - get { - return ResourceManager.GetString("strConnectionBackupFrequency", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Maximum number of backups. - /// - internal static string strConnectionsBackupMaxCount { - get { - return ResourceManager.GetString("strConnectionsBackupMaxCount", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Location of connection file backup. - /// - internal static string strConnectionsBackupPath { - get { - return ResourceManager.GetString("strConnectionsBackupPath", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Support Forum. - /// - internal static string SupportForum { - get { - return ResourceManager.GetString("SupportForum", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Switch to Notifications panel on:. - /// - internal static string SwitchToErrorsAndInfos { - get { - return ResourceManager.GetString("SwitchToErrorsAndInfos", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Tabs && Panels. - /// - internal static string TabsAndPanels { - get { - return ResourceManager.GetString("TabsAndPanels", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Security. - /// - internal static string TabSecurity { - get { - return ResourceManager.GetString("TabSecurity", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Telnet. - /// - internal static string Telnet { - get { - return ResourceManager.GetString("Telnet", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Test connection. - /// - internal static string TestConnection { - get { - return ResourceManager.GetString("TestConnection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Testing connection. - /// - internal static string TestingConnection { - get { - return ResourceManager.GetString("TestingConnection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Test Proxy. - /// - internal static string TestProxy { - get { - return ResourceManager.GetString("TestProxy", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Test Settings. - /// - internal static string TestSettings { - get { - return ResourceManager.GetString("TestSettings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The following:. - /// - internal static string TheFollowing { - get { - return ResourceManager.GetString("TheFollowing", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Theme. - /// - internal static string Theme { - get { - return ResourceManager.GetString("Theme", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Timeout [seconds]. - /// - internal static string TimeoutInSeconds { - get { - return ResourceManager.GetString("TimeoutInSeconds", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Title. - /// - internal static string Title { - get { - return ResourceManager.GetString("Title", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error ({0}). - /// - internal static string TitleError { - get { - return ResourceManager.GetString("TitleError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Information ({0}). - /// - internal static string TitleInformation { - get { - return ResourceManager.GetString("TitleInformation", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG password. - /// - internal static string TitlePassword { - get { - return ResourceManager.GetString("TitlePassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG password for {0}. - /// - internal static string TitlePasswordWithName { - get { - return ResourceManager.GetString("TitlePasswordWithName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select Panel. - /// - internal static string TitleSelectPanel { - get { - return ResourceManager.GetString("TitleSelectPanel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warning ({0}). - /// - internal static string TitleWarning { - get { - return ResourceManager.GetString("TitleWarning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Track active connection in the connection tree. - /// - internal static string TrackActiveConnectionInConnectionTree { - get { - return ResourceManager.GetString("TrackActiveConnectionInConnectionTree", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Transfer. - /// - internal static string Transfer { - get { - return ResourceManager.GetString("Transfer", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Transfer File (SSH). - /// - internal static string TransferFile { - get { - return ResourceManager.GetString("TransferFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Try to integrate. - /// - internal static string TryToIntegrate { - get { - return ResourceManager.GetString("TryToIntegrate", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Ultra VNC Repeater. - /// - internal static string UltraVncRepeater { - get { - return ResourceManager.GetString("UltraVncRepeater", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to UltraVNC SingleClick port:. - /// - internal static string UltraVNCSCListeningPort { - get { - return ResourceManager.GetString("UltraVNCSCListeningPort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to UltraVNC SingleClick. - /// - internal static string UltraVNCSingleClick { - get { - return ResourceManager.GetString("UltraVNCSingleClick", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Uncheck the properties you want not to be saved!. - /// - internal static string UncheckProperties { - get { - return ResourceManager.GetString("UncheckProperties", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to An unhandled exception has occurred. - /// - internal static string UnhandledExceptionOccured { - get { - return ResourceManager.GetString("UnhandledExceptionOccured", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG requires an update. - /// - internal static string UpdateAvailable { - get { - return ResourceManager.GetString("UpdateAvailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to mRemoteNG can periodically connect to the mRemoteNG website to check for updates.. - /// - internal static string UpdateCheck { - get { - return ResourceManager.GetString("UpdateCheck", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The update information could not be downloaded.. - /// - internal static string UpdateCheckCompleteFailed { - get { - return ResourceManager.GetString("UpdateCheckCompleteFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Download complete! - ///mRemoteNG will now quit and begin with the installation.. - /// - internal static string UpdateDownloadComplete { - get { - return ResourceManager.GetString("UpdateDownloadComplete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The update could not be downloaded.. - /// - internal static string UpdateDownloadCompleteFailed { - get { - return ResourceManager.GetString("UpdateDownloadCompleteFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The update download could not be initiated.. - /// - internal static string UpdateDownloadFailed { - get { - return ResourceManager.GetString("UpdateDownloadFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Every {0} days. - /// - internal static string UpdateFrequencyCustom { - get { - return ResourceManager.GetString("UpdateFrequencyCustom", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The change log could not be downloaded.. - /// - internal static string UpdateGetChangeLogFailed { - get { - return ResourceManager.GetString("UpdateGetChangeLogFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Download Completed!. - /// - internal static string UpdatePortableDownloadComplete { - get { - return ResourceManager.GetString("UpdatePortableDownloadComplete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Updates. - /// - internal static string Updates { - get { - return ResourceManager.GetString("Updates", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use Console Session. - /// - internal static string UseConsoleSession { - get { - return ResourceManager.GetString("UseConsoleSession", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use CredSSP. - /// - internal static string UseCredSsp { - get { - return ResourceManager.GetString("UseCredSsp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use default. - /// - internal static string UseDefault { - get { - return ResourceManager.GetString("UseDefault", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use a different username and password. - /// - internal static string UseDifferentUsernameAndPassword { - get { - return ResourceManager.GetString("UseDifferentUsernameAndPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use enhanced mode. - /// - internal static string UseEnhancedMode { - get { - return ResourceManager.GetString("UseEnhancedMode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User. - /// - internal static string User { - get { - return ResourceManager.GetString("User", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to User Field. - /// - internal static string UserField { - get { - return ResourceManager.GetString("UserField", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Username. - /// - internal static string UserViaAPI - { - get - { - return ResourceManager.GetString("UserViaAPI", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Username. - /// - internal static string Username { - get { - return ResourceManager.GetString("Username", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use the same username and password. - /// - internal static string UseSameUsernameAndPassword { - get { - return ResourceManager.GetString("UseSameUsernameAndPassword", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use a smart card. - /// - internal static string UseSmartCard { - get { - return ResourceManager.GetString("UseSmartCard", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use SQL Server to load && save connections. - /// - internal static string UseSQLServer { - get { - return ResourceManager.GetString("UseSQLServer", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Use VM ID. - /// - internal static string UseVmId { - get { - return ResourceManager.GetString("UseVmId", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Verify:. - /// - internal static string Verify { - get { - return ResourceManager.GetString("Verify", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Version. - /// - internal static string Version { - get { - return ResourceManager.GetString("Version", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to View Only. - /// - internal static string ViewOnly { - get { - return ResourceManager.GetString("ViewOnly", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VM ID. - /// - internal static string VmId { - get { - return ResourceManager.GetString("VmId", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VNC. - /// - internal static string Vnc { - get { - return ResourceManager.GetString("Vnc", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VNC disconnect failed!. - /// - internal static string VncConnectionDisconnectFailed { - get { - return ResourceManager.GetString("VncConnectionDisconnectFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VNC Refresh Screen Failed!. - /// - internal static string VncRefreshFailed { - get { - return ResourceManager.GetString("VncRefreshFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VNC SendSpecialKeys failed!. - /// - internal static string VncSendSpecialKeysFailed { - get { - return ResourceManager.GetString("VncSendSpecialKeysFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VNC Set Event Handlers failed!. - /// - internal static string VncSetEventHandlersFailed { - get { - return ResourceManager.GetString("VncSetEventHandlersFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VNC Set Props Failed!. - /// - internal static string VncSetPropsFailed { - get { - return ResourceManager.GetString("VncSetPropsFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VNC Toggle SmartSize Failed!. - /// - internal static string VncToggleSmartSizeFailed { - get { - return ResourceManager.GetString("VncToggleSmartSizeFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to VNC Toggle ViewOnly Failed!. - /// - internal static string VncToggleViewOnlyFailed { - get { - return ResourceManager.GetString("VncToggleViewOnlyFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Wait for exit. - /// - internal static string WaitForExit { - get { - return ResourceManager.GetString("WaitForExit", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warn me if authentication fails. - /// - internal static string WarnIfAuthFails { - get { - return ResourceManager.GetString("WarnIfAuthFails", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warnings. - /// - internal static string Warnings { - get { - return ResourceManager.GetString("Warnings", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Website. - /// - internal static string Website { - get { - return ResourceManager.GetString("Website", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to WebView2 creation failed with exception. - /// - internal static string WebView2InitializationFailed { - get { - return ResourceManager.GetString("WebView2InitializationFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Weekly. - /// - internal static string Weekly { - get { - return ResourceManager.GetString("Weekly", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Windows. - /// - internal static string Windows { - get { - return ResourceManager.GetString("Windows", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Working directory. - /// - internal static string WorkingDirColumnHeader { - get { - return ResourceManager.GetString("WorkingDirColumnHeader", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Working directory:. - /// - internal static string WorkingDirectory { - get { - return ResourceManager.GetString("WorkingDirectory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Yes. - /// - internal static string Yes { - get { - return ResourceManager.GetString("Yes", resourceCulture); - } - } - } -} diff --git a/mRemoteNG/Language/Language.cs-CZ.resx b/mRemoteNG/Language/Language.cs-CZ.resx deleted file mode 100644 index 41f1d16ee..000000000 --- a/mRemoteNG/Language/Language.cs-CZ.resx +++ /dev/null @@ -1,1807 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - O Aplikaci - - - Aktuální složka - - - Operace přidání uzlu (AddNodeFromXML) selhala! - - - Umožnit spuštění jen jedné instance aplikace (bude potřeba restartovat mRemoteNG) - - - Vždy - - - Vždy připojit, i když autentizace selže - - - Při navázání spojení vždy nabídnout výběr panelu - - - Vždy zobrazovat záložky (taby) panelů - - - Vždy zobrazit notifikační ikonu - - - Zeptat se na nastavení později - - - Upravit nastavení teď - - - Použít doporučená nastavení - - - {0} může automaticky hledat aktualizace, které mohou obsahovat nové funkce a opravy chyb. Doporučuje se, abyste dovolili {0} hledat aktualizace každý týden. - - - Natavení automatických aktualizací - - - Poměr stran - - - Automaticky ukládat každých: - - - Poslední verze - - - &Procházet... - - - &Storno - - - Změnit - - - &Zavřít - - - Výchozí převezetí z nadřízené - - - Výchozí vlastnosti - - - Odpojit - - - Ikona - - - &Importovat - - - Z nadřazené - - - &Spustit - - - Spustit PuTTY - - - &OK - - - Vlastnosti - - - &Scanovat - - - &Stop - - - Test Proxy - - - Nelze scanovat porty, IP adresa má nesprávný tvar! - - - Vzhled - - - Spojení - - - Zobrazení - - - Brána - - - Různé - - - Protokol - - - Přesměrování - - - Kontrola selhala! - - - Automaticky obnovit připojení v případě přerušení spojení se serverem(pouze RDP && ICA) - - - Tuto zprávu příště nezobrazovat. - - - Tento proxy server vyžaduje autentizaci - - - Vlastní cesta k PuTTY: - - - Obnovit spojení jakmile je připraveno - - - Pro spojení použít proxy server - - - Login - - - Čekat na logout - - - Opakovat kontrolu - - - Zkontroluj aktualizace při spuštění - - - Zkontrolovat nyní - - - Zkontroluj komponenty při spuštění - - - Před připojením vybrat panel - - - Zavřené porty - - - Sbalit vše - - - Přepínače (parametry) - - - Jméno souboru - - - Zpráva - - - E&xit {0} - - - Nemohl jsem zpracovat přepínače z příkazového řádku! - - - &Otevřít seznam spojení - - - &Zkusit znovu - - - {0} detekoval v systému běžící aplikaci Lenovo Auto Scroll Utility. Tato aplikace je známá jako zdroj problémů s {0}. Doporučujeme ji uzavřít nebo odinstalovat. - - - Detekován porblém s kompatibilitou - - - Operace btnIcon_Click selhala! - - - Operace ShowHideGridItems selhala! - - - Operace IconMenu_Click selhala! - - - Operace vlastností (Property Grid object) selhala! - - - Operace SetHostStatus selhala! - - - Operace pGrid_PopertyValueChanged selhala! - - - Operace Config UI load selhala! - - - Opravdu chcete zavřít panel "{0}"? Všechna spojení v něm obsažená budou také uzavřena. - - - Jste si jisti, že si přejete smazat externí nástroj "{0}"? - - - Jste si jisti, že si přejete smazat {0} vybraných externích nástorojů? - - - Jste si jisti, že si přejete smazat spojení "{0}"? - - - Jste si jisti, že si přejete smazat prázdnou složku "{0}"? - - - Jste si jisti, že si přejete smazat složku "{0}"? Všechny složky a spojení v ní obsažené budou smazány také!!!! - - - Přejte si zavřít všechna otevřená spojení? - - - Jste si jisti, že si přejete obnovit výchozí rozložení panelů? - - - Připojit - - - Připojit na celou obrazovku - - - Připojuji... - - - Protokol událostí připojen - - - Připojení k "{0}" přes "{1}" bylo provedeno uživatelem "{2}" (Popis: "{3}"; Login: "{4}") - - - Připojení selhalo! - - - Chyba protokolu (či horizontu?) událostí - - - Otevření spojení selhalo! - - - Nemohu navázat spojení: Nebyla specifikována adresa či jméno hostitele! - - - Spojení - - - nastavit výchozí port! - - - Nepovedlo se vytvořit zálohu souboru seznamu spojení! - - - Nepovedlo se načíst soubor seznamu spojení "{0}"! - - - Nepovedlo se načíst soubor seznamu spojení "{0}"! -Otevírám nový prázdný soubor seznamu spojení. - - - Nepovedlo se uložit soubor seznamu spojení "{0}"! - - - Připojit bez loginu - - - Připojit k otevřenému sezení konzole - - - Připojit (s možnostmi) - - - Připojení k {0} přes {1} uzavřeno uživatelem {2}. - - - Událost uzavření spojení - - - Události uzavření spojení selhala! - - - Nepovedlo se vytvořit nový soubor seznamu připojení! - - - Nepovedlo se najít ovládací prvek ToolStrip control v objektu FilteredPropertyGrid. - - - Detekovat - - - Nepovedlo se připojit do sezení konzole - - - Nepřipojovat pokud autentizace selže - - - Zavřít tab dvojklikem na něj - - - Stáhnout a nainstalovat - - - Duplikovat - - - Přejete si pokračovat bez hesla? - - - Pro prázdná políčka Login, Heslo nebo Doména použít: - - - Zakódovat celý soubor seznamu připojení - - - Koncová IP - - - Skončit portem - - - Metoda AddExternalToolsToToolBar (frmMain) selhala. {0} - - - Metoda AddFolder (UI.Window.ConnectionTreeWindow) selhala. {0} - - - Tato verze databáze {0} není kompatibilní s touto verzí {1}. - - - Seznam připojení nemohl být uložen. - - - Spuštění PuTTY se nezdařilo. - - - Dešifrování se nezdařilo. {0} - - - Začifrování se nezdařilo. {0} - - - Chyby - - - Výchozí soubor seznamu spojení se nepodařilo načíst.{0}{0}{2}{0}{3}{0}{0}Aby se zabránilo ztrátě dat, {1} se nyní ukončí. - - - Metoda VerifyDatabaseVersion (Config.Connections.Save) selhala. {0} - - - Rozbalit vše - - - Experimentální - - - Exportovat - - - Exportovat vše - - - Exportovat soubor - - - Exportovat položky - - - Exportovat vlastnosti - - - Exportuj vybrané spojení - - - Export vybranou složku - - - &Exportovat do souboru... - - - Nový Externí Nástroj - - - &Formát souboru: - - - Všechny soubory (*.*) - - - Všechny importovatelné soubory - - - Soubory aplikací (*.exe) - - - Soubory mRemote CSV (*.csv) - - - Soubory mRemote XML (*.xml) - - - Soubory PuTTY Connection Manager - - - Soubory Remote Desktop Connection Manager (*.rdg) - - - Soubory RDP (*.rdp) - - - Převzít {0} - - - Popis převzaté vlastnosti: {0} - - - Uvolnit - - - Celá obrazovka - - - Všeobecné - - - Došlo k chybě při čtení tohoto nastavení připojení "{0}" z "{1}". {2} - - - Automaticky obnovit spojení - - - Vlastnosti externích nástrojů - - - Soubory - - - Hostitel - - - HTTP - - - Spojení HTTP selhalo! - - - Nezdařilo se vytvoření noebého spojení HTTP! - - - Změna nadpisu dokumentu HTTP selhala! - - - Internet Explorer - - - HTTPS - - - Nastavení vlast. HTTP selhalo! - - - Import z Active Directory - - - Při importování souboru "{0}" došlo k chybě. - - - Import ze &souboru... - - - Importovat ze scanu portů - - - Informace - - - Zrušení procesu Int App process selhalo! - - - Metoda Int App Focus selhala! - - - Int App Handle: {0} - - - Ukončení Int App Process selhalo! - - - Metoda Int App Resize selhala! - - - --- IntApp výstup --- - - - Int App Název: {0} - - - Adresa: - - - Když se ukončují spojení: - - - Zobrazený název: - - - Doména - - - Hostitel: - - - Přenosná verze - - - Pro konfiguraci sezení PuTTY stiskněte toto tlačítko: - - - Maximální doba čekání na PuTTY a integrované externí nástroje: - - - Vydáno pod GNU General Public License (GPL) - - - sekund - - - Z níže uvedeného seznamu vyberte panel nebo stiskněte "Nový" pro přidání nového. Pro pokračování stiskněte "OK". - - - Stav Serveru: - - - Databáze: - - - Verifikuj: - - - Jazyk - - - (Automaticky) - - - Aby se projevila změna jazyka, musí být {0} restartován. - - - Načtení z SQL selhalo - - - Informace o spojení nemohly být načteny z SQL serveru. - - - Načtení z XML selhalo! - - - Lokální soubor - - - Lokální soubor neexistuje! - - - Nový panel spojení - - - Vyhledat aktualizace - - - Nastavení - - - Panely - - - Kopírovat - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - Smazat vnější nástroj... - - - Přispějte - - - Klonovat záložku tabu - - - Exit - - - Nástrojová lišta externích nástrojů - - - &Soubor - - - &Nápověda - - - Nápověda mRemoteNG - - - Spustit externí nástroj - - - Nový soubor seznamu spojení - - - Nový externí nástroj - - - Varovné zprávy - - - Kopírovat vše - - - Smazat vše - - - Otevřít soubor seznamu spojení... - - - Možnosti - - - Scan portů - - - Nástrojová lišta rychlého připojení - - - Obnovit připojení - - - Obnovit obraz (VNC) - - - Přejmonovat záložku tabu - - - Nahlásit chybu - - - Výchozí vzhled - - - Uložit seznam spojení - - - Uložit seznam spojení jako... - - - Poslat speciální stisk kláves (VNC) - - - &Zobraz texty nápovedy - - - Zobraz text - - - Automatická velikost (RDP/VNC) - - - SSH přenos souborů - - - Spustit (VNC) chat - - - Diskuzní fórum podpory - - - &Nástroje - - - Přenos souboru (SSH) - - - &Zobrazení - - - Pouze prohlížet (VNC) - - - Webová stránka - - - Minimizovat do oznamovací oblasti - - - Přesunout dolů - - - Přesunout nahoru - - - mRemoteNG CSV - - - mRemoteNG XML - - - Aktivní přihl. údaje (z Windows logon) - - - Nikdy - - - Nové spojení - - - Nová složka - - - Nový panel - - - Nový popisek - - - Ne - - - Bez komprimace - - - Nebyla specifikována ext. aplikace. - - - (žádné) - - - Normal - - - Ne automatickou velikost - - - Nejsou k dispozici žádné aktualizace - - - Pokoušíte se načíst soubor seznamu spojení, který byl vytvořen pomocí velmi ranné verze mRemote, což by mohlo vést k běhové chybě. -Pokud k takové chybě dojde, prosím vytvořte nový soubor se seznamem spojení! - - - Otevřít novou záložku tabu vpravo od právě vybraného - - - Otevřené porty - - - Ověřuji... - - - Vzhled - - - &Odstranit - - - &Nový - - - Název panelu - - - Chránit heslem - - - Obě hesla musejí být stejná. - - - helso musí být dlouhé alespoň 3 znaky. - - - Prosím vyplňte všechna vstupní pole - - - Scanování portů dokončeno. - - - Nezdařilo se otevřít panel PortScan! - - - zadejte název hostitele nebo jeho IP adresu ke které se chcete připojit. - - - Změnit všude převzetí z nadřazené. - - - Vyberte jakou úroveň autentizace má toto spojení použít. - - - Vyberte jak se chcete autentizovat VNC serveru. - - - Vyberte zda si přejete autoamticky změnit velikost virtuální obrazovky v rámci spojení když se změní velikost okna nebo je zapnut režim celé obrazovky. Toto vyžaduje RDC ve verzi 8.0 nebo vyšší. - - - Vyberte zda chcete využívat mezipamět bitmapových dat či nikoliv. - - - Vyberte barevnou hloubku. - - - Vyberete úroveň komprese. - - - Sem zadejte své poznámky nebo popis hostitele. - - - Zvolte "ano" pokud má být použit vzhled (téma) nastavený na vzdáleném hostiteli. - - - Zvolte "ano" pokud se má zobrazovat pozadí plochy dle nastavení na vzdáleném hosititeli. - - - Zadejte doménu pod kterou spadají uživatelské přihlašovací údaje (NETBIOSNAME před '\') . - - - Vyberte zda použít pokročilé prvky rozhraní (Aero etc.) nebo ne. - - - Vyberte zda použít vyhlazování písem. - - - Vyberte způsob kódování přenosu. - - - Vyberte externí nástroj, který má být spuštěn. - - - Vyberte externí nástroj, který má být spuštěn po odpojení od vzdáleného hostitele. - - - Vyberte externí nástroj, který má být spuštěn před spojením se vzdáleným hostitelem. - - - Vyberte ikonu zobrazovanou pro toto spojení. - - - Specifikuje pomocné informace pro rozkladače zátěže (load balancery - NLB) pro výběr nejlepšího serveru. - - - Pokud se využívá v externím nástroji, zadejte sem MAC adresu vzdáleného hostitele. - - - Toto jméno bude zobrazeno ve stromě seznamu spojení a jejich složek. - - - Zadaný název určí panel, ve kterém se má spojení otevřít. - - - Sem zadejte Vaše heslo. - - - Zadejte port typu protokolu, na kterém poslouchá server/hostitel, ke kterému se připojujete. - - - Vyberte jakým způsobem (typem spojení) se má mRemoteNG spojit s tímto hostitelem. - - - Vyberte uložené sezení PuTTY, které se použije pro toto spojení. - - - Specifikuje doménové jměno, které uživatel předává při spojení s bránou vzdálené plochy (RD Gateway server). - - - Specifikuje název hostitele serveru brány vzdálené plochy (Remote Desktop Gateway server), přes kterého má být toto spojení zprostředkováno. - - - Specifikuje kdy má být použít server brány vzdálené plochy (Remote Desktop Gateway = RD Gateway). - - - Specifikuje, zda pro přihlášení k serveru brány vzdálené plochy použít stejné jméno a heslo jako je hlavní login pro toto spojení. - - - Specifikuje uživatelské jméno (login) odlišné od hlavního, které se použije pouze pro spojení se serverem brány vzdálené plochy (RD Gateway server). - - - Specifikuje, zda mají být lokální disky na tomto počítači připojeny ke vzdálenému hostiteli. - - - Vyberte, zda mají být složené stisky kláves (např. Alt-Tab) přesměrovány na vzdáleného hostitele, když je okno mRemote aktivní (má focus). - - - Specifikuje, zda mají být lokální hardwarové porty (COM, LPT - paralelní) z tohoto počítače připojeny ke vzdálenému hostiteli. - - - Specifikuje, zda mají být tiskárny lokálně připojené (nainstalované na tomto počítači) připojeny ke vzdálenému hostiteli. - - - Specifikuje, zda mají být čipové karty disponibilní na tomto počítači zprostředkovány také vzdálenému hostiteli. - - - Vyberte, jak mají být přesměrovány zvuky ze vzdáleného hostitele. - - - Vyberte který vykreslovací engine má zobrazovat webové stránky HTML. - - - Vyberte rozlišení nebo režim, ve kterém se toto spojení otevře. - - - Vyberte zda má být použita automatická změna velikosti (rozlišení). - - - Připojit se ke konzoli (příkazovému řádku) vzdáleného hostitele (pokud podporuje více variant). - - - V případě jeho dostupnosti, použít při autentizaci poskytovatele podpory bezpečných přihlašovacích údajů (Credential Security Support Provider - CredSSP). - - - Sem můžete zadat jakékoliv informace uznáte za vhodné. - - - Sem vložte své uživatelské (přihlašovací) jméno = login. - - - Pokud si přejete připojit se k hostiteli v režimu pouze prohlížení (bez ovládání), vyberte "ano". - - - Vložte adresu proxy serveru, přes který má spojení probíhat. - - - Zadejte heslo k proxy serveru, který má spojení zprostředkovat. - - - Zadejte port, na kterém proxy server naslouchá. - - - Pokud používáte proxy pro zprostřekování (tunelování) VNC psojení, zadejte jakým typem proxy tak činíte. - - - Vložte vaše uživatelské jméno pro autentizaci vůči proxy serveru. - - - Hostname/DN/IP - - - Vše - - - Po autentizaci - - - Režim autentizace - - - Automatické rozlišení - - - Mezipaměť bitmap - - - Bar. hloubka - - - Komprese - - - Popis - - - Použít téma vzhledu - - - Pozadí plochy - - - Pokroč. plocha (Aero) - - - Vyhlazování písem - - - Kódování - - - Externí nástroj - - - Externí nástroj po odp. - - - Externí nástroj před spoj. - - - Load Balance Info - - - Adresa MAC - - - Jméno - - - Panel - - - Heslo - - - Port - - - Konfigurace PuTTY - - - Doména (RD brána) - - - Host/DN/IP (RD brána) - - - Heslo (RD brána) - - - Použít RD bránu - - - Přihl. údaje brány - - - Login brány - - - Připojit lok. disky - - - Posílat kláv. zkr. - - - Připoj COM/LPT - - - Připoj tiskárny - - - Zvuky - - - Vykreslovací engine - - - Rozlišení - - - Režim resize - - - Připoj k příkazové konzoli - - - Použít CredSSP - - - Poznámka - - - Adresa proxy - - - Heslo proxy - - - Port proxy - - - Typ proxy - - - Login k proxy - - - Událost prokolu Odpojeno. -Zpráva: -{0} - - - Událost protokolu "Odpojeno" selhala. -{0} - - - Protocol k importu - - - Test proxy selhal! - - - Test proxy uspěl! - - - Odstranění procesu PuTTY selhalo! - - - Nemohu aktivovat okno (focus)! - - - PuTTY Handle: {0} - - - Ukončení procesu PuTTY selhalo! - - - Panel Handle: {0} - - - Změna rozlišení okna PuTTY selhala! - - - Uložená sezení/spojení PuTTY - - - Nastavení PuTTY - - - Příkaz na zobrazení dialogového okna PuTTY Nastavení selhal! - - - --- PuTTY výstup --- - - - PuTTY název okna: {0} - - - Quick: {0} - - - Rychlé spojení - - - Přidání rychlého spojení selhalo! - - - Vytvoření rychlého spojení selhalo - - - &Varuj mě, když zavírám spojení - - - Varuj mě jen, když u&končuji mRemoteNG - - - Varuj mě jen, když zavírám více&násobná spojení - - - Neva&ruj mě, když zavírám spojení - - - RAW - - - RDP - - - 16777216 barev (24-bit) - - - 256 barev (8-bit) - - - 32768 barev (15-bit) - - - 16777216 barev (32-bit) - - - 65536 barev (16-bit) - - - Nebylo možné aktivovat ovládací prvek okna RDP, prosím zkontrolujte požadavky mRemoteNG na prerekvizity. - - - Vypnout blikání kurzoru - - - Vypnout stín kurzoru - - - Vypnout přetahování celého okna (Full Window) - - - Vypnout animace menu - - - Pokud o odpojední RDP selhal, zkouším uzavřít! - - - Interní chyba kód 1. - - - Interní chyba kód 2. - - - Interní chyba kód 3. Toto není validní stav. - - - Interní chyba kód 4. - - - Během připojování klienta došlo k nepominutelné chybě. - - - Metoda GetError selhala (FatalErrors) - - - Došlo k chybě "nedostatek paměti". - - - Došlo k neznámé chybě. - - - Došlo k chybě při vytváření okna. - - - Chyba inicializace Winsock. - - - Přizpůsobit panelu - - - Aktivace RDP okna (focus) selhala! - - - Brána RD (RD Gateway) je podporována. - - - Brána RD (RD Gateway) NENÍ podporována! - - - Metoda RDP Počet pokusů o znovunavázání spojení RDP: - - - Metoda RDP SetAuthenticationLevel selhala! - - - Metoda RDP SetUseConsoleSession selhala! - - - Nastavuji přepínací parametr konzole Setting RDC {0}. - - - Metoda RDP SetCredentials selhala! - - - Metoda RDP SetEventHandlers selhala! - - - Metoda RDP SetRDGateway selhala! - - - Metoda RDP SetPerformanceFlags selhala! - - - Metoda RDP SetPort selhala! - - - Metoda RDP SetProps selhala! - - - Metoda RDP Set Redirection selhala! - - - Metoda RDP Nastavení přesměrování klávesových zkratek (Rdp Set Redirect Keys) selhalo! - - - Metoda RDP SetResolution selhala! - - - Přehrávat v místním počítači - - - Vůbec nepřehrávat - - - Přehrávat na vzdáleném počítači - - - Metoda RDP ToggleFullscreen selhala! - - - Metoda RDP ToggleSmartSize selhala! - - - Znovu se připojit k předchozím otevřeným relacím při startu aplikace - - - Vzdálený soubor - - - Odstranit vše - - - Přejmenovat - - - Rlogin - - - Uložit - - - Uložit vše - - - Přejete si uložit stávající soubor seznamu připojení před načtením jiného? - - - Ukládat spojení při ukončení aplikace - - - Soubor Graphics Interchange Format (.gif)|*.gif|Soubor Joint Photographic Experts Group (.jpeg)|*.jpeg|Soubor Joint Photographic Experts Group (.jpg)|*.jpg|Soubor Portable Network Graphics (.png)|*.png - - - Obrazovka - - - Snímek obrazovky - - - Snímky obrazovek - - - Hledat - - - Odeslat.. - - - Při konfiguraci spojení vyplnit DN hostitele podle zadaného názvu spojení - - - Nebylo možné uložti nastavení nebo zrušit ikonu v oznamovací oblasti! - - - Zobrazovat "popis" jako tooltip v seznamu spojení - - - V názvu okna zobrazovat úplnou cestu k souboru seznamu spojení - - - Zobrazovat v názvu záložek (tabech) informace o loginu - - - Zobrazovat v názvu záložek (tabech) protokol (typ spojení) - - - Otevírat spojením jedním klikem v seznamu - - - Kliknutím na již otevřené spojení v seznamu přepne na jeho tab záložku - - - Socks 5 - - - Řazení - - - Vzestupně (A-Z) - - - Sestupně (Z-A) - - - Prosím navštivte nápovědu - Začínáme - Konfigurace SQL pro získání dalších informací! - - - SQL Server - - - SSH ver 1 - - - SSH ver 2 - - - Selhal přenos na pozadí přes SSH! - - - Selhal přenos přes SSH. - - - Počáteční IP - - - Počáteční Port - - - Startup/Exit - - - Stav - - - Přepnout do notifikačního panelu při: - - - Pokročilé - - - Taby && Panely - - - Aktualizace - - - Telnet - - - Následující: - - - Chyba ({0}) - - - Informace ({0}) - - - Heslo - - - Heslo pro {0} - - - Vybrat panel - - - Varování ({0}) - - - Přenést - - - Zkouším integrovat - - - Ultra VNC Repeater - - - UltraVNC SingleClick port: - - - Nezaškrtávejte ty vlastnosti, které nechcete uložit! - - - mRemoteNG vyžaduje aktualizaci - - - mRemoteNG se může pravidelně připojovat k webu mRemoteNG aby zkontroloval aktualizace. - - - Informace o aktualizacích nemohly být staženy. - - - Stahování ukončeno! -mRemoteNG se nyní ukončí a zahájí instalaci. - - - Aktualizaci se nepodařilo stáhnout. - - - Stahování aktualizací se nepodařilo zahájit. - - - Každý(ch) {0} dnů - - - Denně - - - Měsíčně - - - Týdně - - - Seznam informací o změnách se nepodařilo stáhnout. - - - Použít jiné uživatelské jméno (login) a heslo - - - Uživatel - - - Použít stejné uživatelské jméno (login) a heslo - - - Použít čipovou kartu - - - Použít SQL Server ke stažení && uloženho seznamu spojení - - - Verze - - - VNC - - - Odpojení VNC selhalo! - - - Obnovení obrazovky VNC selhalo! - - - VNC zaslat klávesovou zkratku selhalo! - - - Selhala metoda VNC Set Event Handlers! - - - Nastavení VNC Set Props selhalo! - - - Přepnutí VNC automatické velikosti (SmartSize) selhalo! - - - Přepnutí VNC do režimu ViewOnly selhalo! - - - Varuj mě pokud autentizace selže - - - Varování - - - Ano - - - Čas čekání (timeout) na RDP spojení - - - Tento uzel již v této složce existuje. - - - Nelze přetáhnout uzel na sebe sama. - - - Nelze přetáhnout nadřazený uzel na jeho potomka. - - - Tento uzel nelze přetahovat myší. - - - Režim blokové šifry - - - Šifrovací metody - - - Bezpečnost - - - Počet iterací funkce derivující klíč - - - Variabilní - - - Vysoká - - - Střední - - - Vyberte si jednu z kvalit zvuku poskytovanou protokolem: Variabilní, Střední, Vvysoká - - - Kvalita zvuku - - - Stahování přenosné verze dokončeno! - - - Stáhnout - - - Počet minut neaktivity v sezení RDP než bude automaticky odpojeno (0 = bez omezení) - - - Minut neaktivity do odp. - - - Přidat - - - Název - - - Jste si jisti že chcete odstranit záznam přihlašovacích údajů {0}? - - - Zapsat zprávu logu když se RDP sezení odpojí kvůli neaktivitě. - - - Heslo musí obsahovat alespoň {0} z těchto písmen: {1} - - - Heslo musí obsahovat alespoň {0} malých písmen. - - - Heslo musí obsahovat alespoň {0} číslic. - - - Heslo musí obsahovat alespoň {0} velkých písmen. - - - Delká hesla musí být alespoň {0} a nejvýše {1} znaků. - - - Vyberte cestu k souboru logu aplikace mRemoteNG. - - - Debugging - - - Zobrazovat tyto zprávy - - - Cesta k souboru logu - - - Logovat tyto typy zpráv - - - Vybrat cestu - - - Otevřít soubor - - - Použít výchozí - - - Logování - - - Zprávy logu - - - Logovat do adresáře kde je aplikace umístěna. - -+ -+ -+ - Přiřazené přihlašovací informace - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.de.resx b/mRemoteNG/Language/Language.de.resx deleted file mode 100644 index 9ffeed4a4..000000000 --- a/mRemoteNG/Language/Language.de.resx +++ /dev/null @@ -1,2034 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Über - - - Das Laden des Knotens über XML ist fehlgeschlagen! - - - Nur eine Instanz zulassen (mRemoteNG-Neustart benötigt) - - - Immer - - - Immer verbinden, auch wenn Authentifizierung fehlschlägt - - - Panel Auswahldialog immer anzeigen - - - Panel immer anzeigen - - - Tray Icon immer anzeigen - - - Später nochmal fragen - - - Einstellungen jetzt anpassen - - - Empfohlenen Einstellungen verwenden - - - {0} kann automatisch nach Updates suchen, die neue Funktionen und Fehlerbehebungen enthalten können. Es wird empfohlen, dass Sie {0} erlauben wöchentlich nach Updates zu suchen. - - - Automatische Update-Einstellungen - - - Aspekt - - - Automatisch speichern in Minuten (0 bedeutet deaktiviert): - - - Verfügbare Version - - - &Wählen... - - - &Abbrechen - - - Ändern - - - &Schließen - - - Standardvererbung - - - Standardeigenschaften - - - Trennen - - - Symbol - - - &Importieren - - - Vererbung - - - Starte PuTTY - - - &Okay - - - Eigenschaften - - - &Scannen - - - &Halt - - - Proxy prüfen - - - Die eingegebenen IP-Daten sind ungültig, kann den Port Scan nicht starten. - - - Aussehen - - - Verbindung - - - Anzeige - - - Gateway - - - Verschiedenes - - - Protokoll - - - Umleitung - - - Prüfung fehlgeschlagen! - - - Automatisch versuchen zu verbinden, wenn Verbindung getrennt wird (nur RDP && ICA) - - - Diese Nachricht nicht erneut zeigen. - - - Benutze Authentifizierung - - - Eigener PuTTY-Pfad: - - - Verbinden wenn bereit - - - Proxy für automatische Updates verwenden - - - Benutzername - - - Auf Beendigung warten - - - Prüfen - - - Beim Start auf Updates und Benachrichtigungen prüfen - - - Jetzt prüfen - - - Überprüfe die Installation aller Komponenten beim Start - - - Panel vor Verbindung auswählen - - - Geschlossene Ports - - - Alle Ordner schließen - - - Parameter - - - Dateiname - - - Nachricht - - - Die Kommandozeilenparameter konnten nicht ausgewertet werden! - - - {0} hat festgestellt, dass das Lenovo Auto Scroll Utility auf diesem Computer ausgeführt wird. Dieses Dienstprogramm ist dafür bekannt, dass es Probleme mit {0} verursacht. Es wird empfohlen, dass Sie es deaktivieren oder deinstallieren. - - - Kompatibilitätsproblem entdeckt - - - Bild Knopf Ereignis fehlgeschlagen! - - - Verstecken nicht benötigter Eigenschaften fehlgeschlagen! - - - Menü Ereignis fehlgeschlagen! - - - Eigenschaften Grid Objekt Fehler! - - - Host Status setzen fehlgeschlagen! - - - Eigenschaften Grid Wert Fehler! - - - Laden des Konfigurationsfensters fehlgeschlagen! - - - Sind Sie sicher, dass Sie das Panel "{0}" schließen möchten? -Alle Verbindungen die es enthält werden ebenfalls geschlossen. - - - Sind Sie sicher, dass Sie das extene Programm "{0}" entfernen möchten? - - - Sind Sie sicher, dass Sie die {0} selektierten externen Programme entfernen möchten? - - - Sind Sie sicher, dass Sie die Verbindung "{0}" entfernen möchten? - - - Sind Sie sicher, dass Sie den leeren Ordner "{0}" entfernen möchten? - - - Sind Sie sicher, dass Sie den Ordner "{0}" entfernen möchten? Jeder Ordner und jede Verbindung in diesem Ordner werden ebenfalls gelöscht. - - - Möchten Sie alle offenen Verbindungen schließen? - - - Sind Sie sicher, dass Sie das Panel auf das Standardlayout zurücksetzen wollen? - - - Verbinden - - - Im Vollbildmodus verbinden - - - Verbinde... - - - Ereignis Verbindung hergestellt - - - Verbindung zu "{0}" mit "{1}" hergestellt von Benutzer "{2}" (Beschreibung: "{3}"; Benutzer Feld: "{4}") - - - Verbindung fehlgeschlagen! - - - Ein Protokoll-Ereignisfehler ist aufgetreten! - - - Öffnen der Verbindung ist fehlgeschlagen! - - - Öffnen der Verbindung fehlgeschlagen: Kein Hostname definiert! - - - Verbindungen - - - Setzen der Standard-Verbindungsdaten fehlgeschlagen! - - - Sicherheitskopie der Verbindungsdatei konnte nicht erstellt werden! - - - Verbindungsdatei "{0}" konnte nicht geladen werden! - - - Verbindungsdatei "{0}" konnte nicht geladen werden! -Starte mit neuer Datei. - - - Verbindungsdatei konnte nicht als "{0}" gespeichert werden! - - - Mit der Konsolensitzung verbinden - - - Verbinden (mit Optionen) - - - Verbindung zu {0} mit {1} wurde vom Benutzer {2} getrennt. (Description: " & Prot.InterfaceControl.Info.Description & "; User Field: " & Prot.InterfaceControl.Info.UserField & ")" - - - Ereignis Verbindung beenden - - - Ereignis Verbindung beenden fehlgeschlagen! - - - Kann keine neue Verbindungsdatei erstellen! - - - Das ToolStrip-Steuerelement konnte in FilteredPropertyGrid nicht gefunden werden. - - - Erkennen - - - Keine Verbindung herstellen, wenn Authentifizierung fehlschlägt - - - Doppelklick schließt Tabs - - - Herunterladen && Installieren - - - Duplizieren - - - Wollen Sie ohne Passwort fortfahren? - - - Bei leeren Feldern für Benutzername, Passwort oder Domäne verwende: - - - Verbindungsdatendatei vollständig verschlüsseln - - - Letzte IP - - - Letzter Port - - - AddExternalToolsToToolBar (FrmMain) ist fehlgeschlagen. {0} - - - AddFolder (UI.Window.Tree) ist fehlgeschlagen. {0} - - - Die Datenbankversion {0} ist nicht kompatibel mit dieser Version von {1}. - - - Die Verbindungsliste konnte nicht gespeichert werden. - - - Entschlüsselung ist gescheitert. {0} - - - Verschlüsselung fehlgeschlagen. {0} - - - Fehler - - - Die Verbindungseinstellungen konnten nicht geladen werden.{0}{0}{2}{0}{3}{0}{0}Um Datenverlust zu vermeiden, wird {1} jetzt beendet. - - - VerifyDatabaseVersion (Config.Connections.Save) ist fehlgeschlagen. {0} - - - Alle Ordner erweitern - - - Experimentell - - - Exportieren - - - Alle Dateien (*.*) - - - Application Dateien (*.exe) - - - mRemote-CSV-Dateien (*.csv) - - - mRemote-XML-Dateien (*.xml) - - - RDP-Dateien (*.rdp) - - - Vererbe {0} - - - Beschreibung des zu vererbenden Elements: {0} - - - Frei - - - Vollbild - - - Allgemein - - - Fehler beim Laden des Verbindungseintrags für "{0}" von "{1}". {2} - - - Automatisches Wiederverbinden - - - Eigenschaften des externen Programmes - - - Dateien - - - Host - - - Verbindung mit HTTP fehlgeschlagen! - - - Erstellen der HTTP-Verbindung fehlgeschlagen! - - - Fehler beim Ändern des HTTP-Dokumentfensters! - - - Setzen der HTTP-Parameter fehlgeschlagen! - - - Von Active Directory importieren - - - Von Port Scan importieren - - - Informationen - - - Zerstören des Internen Programmes fehlgeschlagen! - - - Setzen des Fokus fehlgeschlagen! - - - Internes Programm Handle: {0} - - - Beenden des Internen Programmes fehlgeschlagen! - - - Internes Programm Größenanpassung fehlgeschlagen! - - - --- Internes Programm --- - - - Internes Programm Titel: {0} - - - Addresse: - - - Beim Schließen der Verbindungen: - - - Anzeigename - - - Domäne - - - Hostname: - - - Portable Edition - - - Klicken Sie hier, um die PuTTY-Sitzung zu konfigurieren: - - - Maximale Zeit, die auf PuTTY und integrierte externe Programme gewartet wird: - - - Unter der GNU General Public License (GPL) veröffentlicht - - - Sekunden - - - Wählen Sie ein Panel aus der Liste oder klicken Sie auf Neu, um ein neues zu erstellen. Klicken Sie OK um fortzufahren. - - - Serverstatus: - - - Datenbank: - - - Überprüfen: - - - Sprache - - - (Automatisch erkannt) - - - {0} muss neu gestartet werden, bevor die Sprache aktiv wird. - - - Laden per SQL fehlgeschlagen! - - - Laden der XML-Datei fehlgeschlagen! - - - Lokale Datei - - - Die lokale Datei existiert nicht! - - - Verbindungs-Panel hinzufügen - - - Suche nach Updates - - - Konfiguration - - - Verbindungs-Panels - - - Kopieren - - - STRG-ALT-ENTF - - - STRG-ESC - - - Entfernen - - - Spenden - - - Tab klonen - - - Beenden - - - Externe Programme Symbolleiste - - - &Datei - - - &Hilfe - - - Hilfe - - - Starten - - - Neue Verbindungsdatei - - - Meldungen - - - Alle Kopieren - - - Alle Löschen - - - Verbindungsdatei öffnen - - - Optionen - - - Port-Scan - - - QuickConnect Symbolleiste - - - Wiederverbinden - - - Anzeige aktualisieren (VNC) - - - Tab umbenennen - - - Fehler melden - - - Layout zurücksetzen - - - Verbindungsdatei speichern - - - Verbindungsdatei speichern unter - - - Tastenkombination senden (VNC) - - - &Hilfetext anzeigen - - - Text anzeigen - - - Smart-Size-Modus (RDP/VNC) - - - SSH-Dateiübertragung - - - Chat starten (VNC) - - - Forum - - - E&xtras - - - Datei übertragen (SSH) - - - &Ansicht - - - View-Only-Modus - - - Webseite - - - In den System Tray minimieren - - - Nach unten - - - Nach oben - - - meine aktuellen Windows-Anmeldeinformationen - - - Niemals - - - Neue Verbindung - - - Neuer Ordner - - - Neues Panel - - - Neuer Titel - - - Nein - - - Keine Kompression - - - Kein externes Programm definiert! - - - Keine Angabe - - - Normal - - - Keine automatische Größenanpassung (Smart-Size) - - - Keine Updates verfügbar - - - Sie versuchen, eine Verbindungsdatei zu laden, die mit einer sehr frühen mRemote/mRemoteNG-Version erstellt wurde - dies kann zu Fehlern führen. -Wenn Sie Fehler feststellen, dann sollten Sie eine neue Verbindungsdatei erstellen! - - - Neue Tabs rechts vom momentan selektierten Tab öffnen - - - Offene Ports - - - Theme - - - &Löschen - - - &Neu - - - Panel-Name - - - Passwortschutz - - - Bitte alle Felder ausfüllen! - - - Kann das Port-Scan-Panel nicht laden! - - - Der Hostname oder die IP, zu der eine Verbinung aufgebaut werden soll. - - - Umschalten aller Vererbungen - - - Wählen Sie, welche Authentifizierungs-Variante verwendet wird. - - - Wählen Sie, wie Sie sich am VNC-Server authentifizieren wollen. - - - Wählen Sie, ob Bitmap-Zwischenspeicherung verwendet werden soll. - - - Wählen Sie die zu verwendende Farbqualität. - - - Wählen Sie die Kompressionsrate, die verwendet werden soll. - - - Geben Sie hier Ihre Notitzen oder eine Beschreibung des Hosts ein. - - - Wählen Sie, ob Themen am Remote Host angezeigt werden sollen. - - - Wählen Sie, ob Hintergrundbilder am Remote Host angezeigt werden sollen. - - - Geben Sie hier ihre Domäne ein. - - - Wählen, ob die Desktopgestaltung genutzt werden soll. - - - Wählen Sie, ob eine Schriftglättung genutzt werden soll oder nicht. - - - Wählen Sie die zu verwendende Codierung. - - - Wählen Sie die zu startende externe Applikation. - - - Wählen Sie eine externe Applikation, die gestartet werden soll, nachdem die Verbindung zum Remote Host getrennt wurde. - - - Wählen Sie eine externe Applikation, die gestartet werden soll, bevor die Verbindung zum Remote Host aufgebaut wurde. - - - Das ausgewählte Icon wird bei Verbindung zum Host im Tab angezeigt. - - - Geben Sie die MAC-Adresse des Remote Hosts ein (kann für externe Applikationen verwendet werden). - - - Dies ist der Name, der im Verbindungsbaum angezeigt wird. - - - Setzt das Panel, in dem die Verbindung geöffnet wird. - - - Geben Sie hier ihr Passwort ein. - - - Geben Sie den Port ein, auf dem das Protokoll auf Verbindungen wartet. - - - Wählen Sie das Protokoll, das verwendet werden soll, um eine Verbindung aufzubauen. - - - Wählen Sie eine PuTTY-Sitzung, die bei Verbindung verwendet werden soll. - - - Gibt den Domänennamen an, der für die Verbindung zum Gateway-Server verwendet werden soll. - - - Gibt den Namen des Remote-Desktop-Gateway-Servers an. - - - Spezifiziert, ob ein Remote-Desktop-Gateway- (RD-Gateway-) Server verwendet werden soll. - - - Gibt an, ob die Anmeldung am Gateway mit den Zugangsdaten für die Verbindung erfolgen sollen oder nicht. - - - Definiert den Benutzernamen zum Verbinden mit dem Gateway-Server. - - - Wählen Sie, ob ihre lokalen Festplatten im entfernten System angezeigt werden sollen. - - - Wählen Sie, ob Tastenkombinationen wie z.B. Alt-Tab auf das entfernte System umgeleitet werden sollen. - - - Wählen Sie, ob ihre lokalen Ports wie z.B. COM, Parallel auf dem entfernte System angezeigt werden sollen. - - - Wählen Sie, ob ihre lokalen Drucker auf dem entfernten System zur Verfügung stehen sollen. - - - Wählen Sie, ob lokale Smartcards auf dem Remotehost verfügbar sein sollen. - - - Wählen Sie, wie Töne auf dem entfernten System wiedergegeben werden sollen. - - - Wählen Sie eine der Rendering Engines die verwendet wird um HTML darzustellen. - - - Wählen Sie die Auflösung, in welcher die Verbindung geöffnet werden soll. - - - Wählen Sie den automatischen Anpassungsmodus (SmartSize), der verwendet werden soll. - - - Zur Konsolensitzung des entfernten Hosts verbinden. - - - Verwenden Sie den Anmeldeinformationen-Security-Support-Provider (CredSSP) für die Authentifizierung, wenn er verfügbar ist. - - - Dieses Feld ist frei beschreibbar. - - - Geben Sie hier ihren Benutzernamen ein. - - - Wählen Sie, ob sie eine Nur-Anzeige- (View-Only-) Verbindung aufbauen wollen. - - - Geben Sie die IP des Proxy-Servers ein. - - - Geben Sie Ihr Passwort ein. - - - Geben Sie den Port des Proxy-Servers ein. - - - Wenn Sie einen Proxy verwenden um auf das entfernte System zugreifen zu können, wählen sie hier den Typ. - - - Geben Sie Ihren Benutzernamen ein. - - - Hostname/IP - - - Alles - - - Serverauthentifizierung - - - Authentifizierungsmodus - - - Bitmaps zwischenspeichern - - - Farben - - - Komprimierung - - - Beschreibung - - - Themen anzeigen - - - Hintergrundbild anzeigen - - - Desktopgestaltung - - - Schriftglättung - - - Codierung - - - Externes Programm - - - Externes Programm nachher - - - Externes Programm vorher - - - MAC-Adresse - - - Name - - - Panel - - - Passwort - - - Port - - - PuTTY-Sitzung - - - Gateway-Domäne - - - Gateway-Hostname - - - Gateway-Passwort - - - Verwende Gateway - - - Gateway-Anmeldedaten - - - Gateway-Benutzername - - - Festplatten - - - Tastenkombinationen - - - Ports - - - Drucker - - - Töne - - - Rendering Engine - - - Auflösung - - - Smart-Size-Modus - - - Verwende Konsole - - - Verwenden Sie CredSSP - - - Benutzerfeld - - - Proxy-Adresse - - - Proxy-Passwort - - - Proxy-Port - - - Proxy-Typ - - - Proxy-Benutzername - - - Protokollereignis Verbindung getrennnt. -{0} - - - Protokollereignis Verbindung trennen fehlgeschlagen. -{0} - - - Zu importierendes Protokoll - - - Proxy-Test fehlgeschlagen! - - - Proxy-Test erfolgreich! - - - Zerstören von PuTTY fehlgeschlagen! - - - Setzen des Fokus fehlgeschlagen! - - - Putty Handle: {0} - - - Beenden von PuTTY fehlgeschlagen! - - - Panel Handle: {0} - - - Ändern der Größe fehlgschlagen! - - - PuTTY-gespeicherte Sitzungen - - - PuTTY-Einstellungen - - - Anzeigen des PuTTY-Konfigurationsfensters fehlgeschlagen! - - - --- PuTTY --- - - - Putty Title: {0} - - - Direkt: {0} - - - Hinzufügen zur Direktverbindungshistorie fehlgeschlagen! - - - Direkte Verbindung fehlgeschlagen! - - - &Warnen, wenn Verbindungen beendet werden - - - Warne mich nur beim B&eenden von mRemoteNG - - - Nur beim Beenden &mehrerer Verbindungen warnen - - - Nicht warnen, wenn Verbindungen beendet werden - - - Rohdaten (RAW) - - - RDP - - - 16777216 Farben (24Bit) - - - 256 Farben (8Bit) - - - 32768 Farben (15Bit) - - - 16777216 Farben (32Bit) - - - 65536 Farben (16Bit) - - - Konte das RDP-Plugin nicht einbinden, bitte prüfen Sie die mRemoteNG-Voraussetzungen. - - - Cursor-Blinken abschalten - - - Cursorschatten deaktivieren - - - Fensterinhalt beim Ziehen nicht anzeigen - - - Menüanimationen deaktivieren - - - Trennen der Verbindung fehlgeschlagen, versuche zu schließen! - - - Interner Fehler Code 1. - - - Interner Fehler Code 2. - - - Interner Fehler Code 3 - dies ist kein zugelassener Zustand. - - - Interner Fehler Code 4. - - - Beim Aufbau der Verbindung ist ein nicht behebbarer Fehler aufgetreten! - - - Fehler beim Auslesen der Fehlermeldung! - - - Kein freier Speicher verfügbar. - - - Ein unbekannter Fehler ist aufgetreten. - - - Fenster konnte nicht erstellt werden. - - - Winsock-Initialisierung fehlgeschlagen! - - - An Panel anpassen - - - Setzen des Fokus fehlgeschlagen! - - - RDP-Gateway wird unterstützt. - - - RDP-Gateway wird nicht unterstützt! - - - RDP-Verbindungsversuche: - - - Setzen des RDP-Authenifizierungs-Levels fehlgeschlagen! - - - Verwenden der Konsolensitzung fehlgeschlagen! - - - Setzen der Konsolenumschaltung für RDC {0}. - - - Setzen der RDP-Anmeldedaten fehlgeschlagen! - - - Setzen der RDP-Fehlderbehandlungsroutine fehlgeschlagen! - - - Setzen des RDP-Gateway fehlgeschlagen! - - - Setzen der Performanz-Parameter fehlgeschlagen! - - - Setzen des RDP-Ports fehlgeschlagen! - - - Setzen der RDP-Parameter fehlgeschlagen! - - - Setzen der RDP-Weiterleitung fehlgeschlagen! - - - Setzen der RDP-Weiterleitungsschlüssel fehlgeschlagen! - - - Setzen der Auflösung fehlgeschlagen! - - - Hier wiedergeben - - - Nicht wiedergeben - - - Auf dem Host wiedergeben - - - Umschalten in Vollbild-Modus fehlgeschlagen! - - - Umschalten der automatischen Größenanpassung (SmartSize) fehlgeschlagen! - - - Offene Verbindungen speichern und beim nächsten Start wiederverbinden - - - Entfernte Datei - - - Alle entfernen - - - Umbenennen - - - Rlogin - - - Speichern - - - Alle speichern - - - Wollen sie die aktuelle Verbindungsdatei speichern, bevor eine andere geladen wird? - - - Verbindungen beim Schließen speichern - - - Graphics Interchange Format Datei (.gif)|*.gif|Joint Photographic Experts Group Datei (.jpeg)|*.jpeg|Joint Photographic Experts Group Datei (.jpg)|*.jpg|Portable Network Graphics Datei (.png)|*.png - - - Bildschirm - - - Bildschirmschnappschuss - - - Bilschirmschnappschüsse - - - Suche - - - Senden an... - - - Beim Anlegen einer neuen Verbindung Hostname wie Anzeigename setzen - - - Konnte die Konfiguration nicht sichern oder das Tray Symbol entfernen! - - - Beschreibungs-Tooltips in der Verbindungsliste anzeigen - - - Vollen Verbindungsdateipfad im Titel anzeigen - - - Anmeldeinformationen im Tab Titel anzeigen - - - Protokoll im Titel des Tab anzeigen - - - Ein einzelner Klick auf eine Verbindung öffnet diese - - - Ein einzelner Klick auf eine geöffnete Verbindung springt zu dieser - - - Socks 5 - - - Sortieren - - - Aufsteigend (A-Z) - - - Absteigend (Z-A) - - - Für mehr Informationen bitte Hilfeeintrag lesen (Info - Help - Getting started - SQL Configuration) - - - SQL-Server: - - - SSH Version 1 - - - SSH Version 2 - - - SSH Übertragung im Hintergrund fehlgeschlagen! - - - SSH-Übertragung fehlgeschlagen. - - - Erste IP - - - Erster Port - - - Start/Ende - - - Status - - - Öffne das Fehler && Infos Panel bei: - - - Erweitert - - - Tabs && Panele - - - Aktualisierungen - - - Telnet - - - die folgenden: - - - Fehler ({0}) - - - Informationen ({0}) - - - mRemoteNG Passwort - - - Wähle Panel - - - Warnung ({0}) - - - Übertragen - - - Integration versuchen - - - Ultra Vnc Repeater - - - UltraVNC SingleClick Port: - - - Deaktivieren Sie alle Eigenschaften, die nicht gespeichert werden sollen. - - - mRemoteNG-Update verfügbar! - - - mRemoteNG kann periodisch auf der mRemoteNG-Webseite nach Aktualisierungen und Neuigkeiten suchen. - - - Abschliessen der Prüfung auf Aktualisierung ist fehlgeschlagen! - - - Download fertiggestellt! -mRemoteNG wird nun geschlossen und die Installation gestartet. - - - Abschluss des Downloads ist fehlgeschlagen! - - - Herunterladen der Aktualisierung ist fehlgeschlagen! - - - Alle {0} Tage - - - Täglich - - - Monatlich - - - Wöchentlich - - - Anderen Benutzernamen und Passwort verwenden - - - Benutzer - - - Selben Benutzer und Passwort verwenden - - - Verwenden sie eine Smartcard - - - SQL-Server für das Laden && Speichern der Verbindungen verwenden - - - Version - - - VNC - - - Trennen der VNC-Verbindung fehlgeschlagen! - - - VNC atualisieren des Bildschirminhalts ist fehlgeschlagen! - - - Senden spezieller Tastenkombinationen ist fehlgeschlagen! - - - Setzen der Fehlerbehandlungsroutine fehlgeschlagen! - - - Setzen der VNC-Parameter fehlgeschlagen! - - - Setzen der automatischen Größenanpassung (SmartSize) fehlgeschlagen! - - - Setzen des Nur-Ansicht-Modus fehlgeschlagen! - - - Warnung anzeigen, wenn Authentifizierung fehlschlägt - - - Warnungen - - - Ja - - - &Starten - - - Eine Verbindungsdatei öffnen - - - Ohne Anmeldedaten verbinden - - - Keine Verbindung zur Konsolensitzung herstellen - - - PuTTY konnte nicht gestartet werden. - - - Alles exportieren - - - Datei exportieren - - - Eigenschaften exportieren - - - Alle wichtigen Dateien - - - Von &Datei importieren - - - Testen... - - - Verschlüsselungs-Engine - - - Sicherheit - - - Dynamisch - - - Hoch - - - Mittel - - - Klangqualität - - - Download abgeschlossen! - - - Titel - - - Datei öffnen - - - Andere Datei öffnen - - - Neue Verbindungsdatei erstellen - - - B&eende {0} - - - &Nochmal versuchen - - - Neues externes Programm - - - Die Verbindungsinformationen konnten nicht vom SQL-Server geladen werden. - - - Die beide Passwörter müssen übereinstimmen. - - - Das Passwort muss mindestens 3 Zeichen lang sein. - - - Port-Scan abgeschlossen. - - - Wählen Sie aus, ob die Größe der Verbindung automatisch angepasst werden soll, wenn die Fenstergröße geändert oder der Vollbildmodus umgeschaltet wird. Benötigt RDC 8.0 oder höher. - - - Gibt die Lastausgleichsinformationen an, die von Lastenausgleichsroutern verwendet werden, um den besten Server auszuwählen. - - - Lastausgleichsinfo - - - mRemoteNG Passwort für {0} - - - RDP-Verbindungs-Timeout - - - Dieser Knoten befindet sich bereits in diesem Ordner. - - - Der Knoten kann nicht auf sich selbst gezogen werden. - - - Der übergeordnete Knoten kann nicht auf den untergeordneten Knoten gezogen werden. - - - Dieser Knoten ist nicht verschiebbar. - - - Block-Cipher-Modus - - - Zeige diese Nachrichtentypen - - - Die Verbindungsdatei konnte nicht gefunden werden. - - - Existierende Datei importieren - - - Verbindung erfolgreich - - - Datenbank '{0}' ist nicht verfügbar. - - - Verbindungen nach jeder Bearbeitung speichern - - - Suchergebnisse in Verbindungen filtern - - - Verbindung testen - - - Time-Out [Sekunden] - - - Automatische Größenänderung - - - In der Symbolleiste anzeigen - - - Zugewiesene Anmeldedaten - - - Neuer Thema Name - - - Verbindung testen - - - In Datei &exportieren... - - - Beim Importieren der Datei ist ein Fehler aufgetreten ("{0}"). - - - Erweiterte Sicherheitsoptionen - - - Diese Nachrichtentypen protokollieren - - - Login fehlgeschlagen für Benutzer '{0}'. - - - mRemoteNG Optionen - - - Neues externes Tool - - - Der Changelog konnte nicht heruntergeladen werden. - - - Wählen Sie die vom Protokoll bereitgestellte Klangqualität: Dynamisch, Mittel, Hoch - - - Die Anzahl der Minuten, die die RDP-Sitzung im Leerlauf verbleibt, bevor sie automatisch getrennt wird (0 bedeutet kein Limit) - - - Minuten zum Leerlauf - - - Hinzufügen - - - Möchten Sie die Anmeldeinformationen {0} wirklich löschen? - - - Wählen Sie, ob eine Benachrichtigung empfangen werden soll, nachdem die RDP-Sitzung aufgrund von Inaktivität getrennt wurde - - - Das Passwort muss mindestens {0} der folgenden Zeichen enthalten: {1} - - - Das Passwort muss mindestens {0} Kleinbuchstaben enthalten - - - Passwort muss mindestens {0} Nummer (n) enthalten - - - Passwort muss mindestens {0} Großbuchstaben enthalten - - - -Die Passwortlänge muss zwischen {0} und {1} liegen - - - Wählen Sie einen Pfad für das mRemoteNG-Logfile - - - Pfad des Logfiles - - - Pfad auswählen - - - Standard verwenden - - - Protokollierung - - - In das Anwendungsverzeichnis protokollieren - - - Anmeldeinformationen nicht verfügbar - - - Soll das Theme wirklich gelöscht werden? - - - Das Theme kann nicht erstellt werden, Name bereits vorhanden oder Sonderzeichen im Namen - - - Namen des neuen Theme angeben - - - Externes Tool mit Namen "{0}" konnte nicht gefunden werden - - - Eigenen Pfad verwenden - - - Server '{0}' nicht erreichbar - - - Verwenden Sie die UTF8-Codierung für die RDP-Eigenschaft "Load Balance Info" - - - Die Aktuell gewählte Verbindung exportieren - - - Den Aktuell gewählten Ordner exportieren - - - Pop-ups - - - Element exportieren - - - HTTP - - - Internet Explorer - - - HTTPS - - - Download - - - Suchleiste über den Verbindungen anzeigen - - - Erstelle ein leeres Panel, wenn mRemoteNG gestartet wird - - - Update-Kanal - - - Stable enthält nur finale Versionen. -Preview beinhaltet Betas & Release Candidates. -Nightly umfasst Alphas, Betas und Release Candidates. - - - Aktive Verbindung im Verbindungsbaum verfolgen - - - Iterationen der Ableitungsfunktion - - - Anmeldedaten - - - Anwenden - - - Warnung: Ein Neustart ist erforderlich, um Änderungen am Theme anzuwenden. - - - Zwischenablage - - - Umleitung der Zwischenablage erlauben. - - - Multi-SSH Symbolleiste - - - Zeige diese Verbindung in den Favoriten - - - Favorit - - - Favoriten - - - Suchbegriff löschen - - - Im View-Only-Modus verbinden - - - Leerzeichen nicht aus Benutzernamen entfernen - - - Benutze VM ID - - - Verwenden Sie die VM ID, um eine Verbindung zu einer VM herzustellen die auf Hyper-V ausgeführt wird. - - - Die ID der virtuellen Hyper-V-Maschine, zu der eine Verbindung hergestellt werden soll. - - - RDP-Client konnte nicht erstellt werden. Die RDP-Protokollversion {0} wird auf diesem System nicht unterstützt. Bitte wählen Sie eine ältere Protokollversion. - - - Legt die Version des RDP fest, die beim Öffnen von Verbindungen verwendet wird. - - - Zum Verbinden mittels eines SSH Tunnels (Jump Host) geben Sie hier den Namen der SSH Verbindung an, welche benutzt werden soll um den SSH Tunnel einzurichten. - - - Geben Sie hier zusaetzliche Optionen an welche fuer die SSH Verbindung verwendet werden sollen. Fuer weitere Infos zu den moeglichen Optionen konsultieren sie die Putty Dokumentation. - - - Konfigurationsfehler der Verbindung. Verbindung zu: "{0}" via SSH Tunnel: "{1}" nicht möglich. Eine Verbindung mit dem als SSH Tunnel konfiguriertem Namen konnte nicht gefunden werden. Löschen Sie die SSH Tunnel Konfiguration or geben sie eine existierende SSH Verbindung an, welche zum Aufbau eine Tunnels zum Erreichen des eigentlichen Zielsystems verwendet werden soll. - - - Konfigurationsfehler des SSH Tunnel. Verbindung zu: "{0}" via SSH Tunnel: "{1}" nicht möglich. Die als SSH Tunnel konfigurierte Verbindung wurde zwar gefunden, aber das zugehörige Protokoll ist nicht von Putty abgeleitet. Stellen Sie sicher dass die als SSH Tunnel konfigurierte Verbindung das SSH version 1 oder 2 Protokoll verwendet. - - - Initialisierungsproblem des SSH Tunnel. Verbindung zu: "{0}" via SSH Tunnel: "{1}" nicht möglich. Initialisierung der SSH Verbindung fehlgeschlagen. Überprüfen Sie die als SSH Tunnel konfigurierte Verbindung auf etwaige Probleme. - - - Verbindungsproblem des SSH Tunnel. Verbindung zu: "{0}" via SSH Tunnel: "{1}" nicht möglich. SSH Verbindungsaufbau fehlgeschlagen. Überprüfen Sie die als SSH Tunnel konfigurierte Verbindung auf etwaige Probleme. - - - SSH Tunnel Verbindung fehlgeschlagen. Verbindung zu: "{0}" via SSH Tunnel: "{1}" nicht möglich. Putty Prozess vorzeitig beendet. Überprüfen Sie die als SSH Tunnel konfigurierte Verbindung auf etwaige Probleme. - - - Zeitüberschreitung des SSH Tunnel. Verbindung zu: "{0}" via SSH Tunnel: "{1}" nicht möglich. Lokaler Tunnel Port nicht vor Ablauf der Zeitüberschreitung verfügbar. Überprüfen Sie die als SSH Tunnel konfigurierte Verbindung auf etwaige Probleme. - - - Minimiert starten - - - Legen Sie ein Kennwort fest, mit dem die Verbindungsdatei verschlüsselt werden soll. Sie werden aufgefordert Ihr Passwort einzugeben, bevor Sie mRemoteNG starten. - - - In den System Tray schließen - - - Lizenz - - - Legt fest, ob das Blinken des Cursors deaktiviert werden soll. - - - Legt fest, ob ein Mausschatten sichtbar sein soll. - - - Legt fest, ob Menüs und Fenster mit Animationseffekten in der Remote-Sitzung angezeigt werden können. - - - Legt fest, ob der Fensterinhalt angezeigt wird, wenn Sie das Fenster an eine neue Position ziehen. - - - Verstecke/Zeige Menü - - - Arbeitsverzeichnis - - - Arbeitsverzeichnis: - - - Erweiterten Modus verwenden - - - Eine unbehandelte Ausnahme ist aufgetreten - - - Alle Verbindungen wieder verbinden - - - Schnellverbindung - - - SSH-Optionen - - - SSH-Tunnel - - - Muss zwischen 0 und 255 liegen - - - Beim Versuch, die Verbindung zum RDP-Host '{0}' wiederherzustellen, ist ein Fehler aufgetreten - - - Beim Versuch, die Verbindungsauflösung auf den Host '{0}' zu ändern, ist ein Fehler aufgetreten - - - Sind Sie sicher, dass Sie alle Verbindungen bis auf "{0}" schließen wollen? - - - Hostnamen kopieren - - - Löschen - - - Alles außer dieser Verbindung trennen - - - Position der Symbolleiste sperren - - - Fehlermeldung - - - WebView2-Erstellung fehlgeschlagen - - - Standardvererbung anwenden - - - Vererbung auf Kinder anwenden - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.el.resx b/mRemoteNG/Language/Language.el.resx deleted file mode 100644 index 8ecc995e2..000000000 --- a/mRemoteNG/Language/Language.el.resx +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Σχετικά με - - - AddNodeFromXML απέτυχε! - - - Επιτρέπετε μόνο ένα μόνο παράδειγμα της εφαρμογής (απαιτείται επανεκκίνηση του mRemoteNG) - - - Πάντα - - - Πάντοτε να συνδεθεί, ακόμη και αν ο έλεγχος ταυτότητας αποτυγχάνει - - - Πάντα Εμφάνιση πίνακα διαλόγου επιλογής κατά το άνοιγμα συνδέσεων - - - Να εμφανίζονται πάντα γνωστοποίησης περιοχων εικόνας - - - Ρωτήστε με ξανά αργότερα - - - Προσαρμογή των ρυθμίσεων τώρα - - - Χρήση των προτεινόμενων ρυθμίσεων - - - {0} μπορεί να ελέγχει αυτόματα ενημερώσεις που μπορούν να παρέχουν νέα χαρακτηριστικά και διορθώσεις σφαλμάτων. Συνιστάται να επιτρέψετε {0} να ελέγξει για ενημερώσεις σε εβδομαδιαία βάση. - - - Ρυθμίσεις αυτόματης ενημέρωσης - - - Πτυχή - - - Αυτόματη αποθήκευση κάθε: - - - Τρέχουσα έκδοση - - - &Αναζήτηση... - - - &Ακύρωση - - - Αλλαγή - - - &Κλείσιμο - - - Προεπιλογή κληρονομικότητας - - - Προεπιλεγμένες ιδιότητες - - - Αποσύνδεση - - - Εικονίδιο - - - &Εισαγωγή - - - Κληρονομιά - - - Εκκίνηση του PuTTY - - - &ΟΚ - - - Ιδιότητες - - - &Σάρωση - - - &Διακοπή - - - Δοκιμή διακομιστή μεσολάβησης - - - Δεν είναι δυνατή η εκκίνηση της σάρωσης υποδοχων, εσφαλμένη μορφή IP! - - - Εμφάνιση - - - Σύνδεση - - - Οθόνη - - - Πύλη - - - Διάφορα - - - Πρωτόκολλο - - - Ανακατεύθυνση - - - Ο ελέγχος απέτυχε! - - - Σύνδεση σε λειτουργία πλήρους οθόνης - - - Σύνδεση... - - - Πρωτόκολλο γεγονός που συνδέεται - - - Σύνδεση με "{0}" μέσω "{1}" από το χρήστη "{2}" (Περιγραφή: «{3}»? Χρήστη το πεδίο: «{4}") - - - Η συνδεση απέτυχε! - - - Πρωτόκολλο ErrorOccured εκδήλωση - - - Άνοιγμα σύνδεσης απέτυχε! - - - Δεν μπορεί να ανοίχθει η σύνδεση: Το όνομα του κεντρικού υπολογιστή δεν ειναι καθορισμένο! - - - Συνδέσεις - - - Αδυναμία ορισμού προεπιλεγμένης θύρας! - - - Δεν ήταν δυνατή η δημιουργία αντιγράφων ασφαλείας των συνδέσεων αρχείου! - - - Το αρχείο συνδέσεων "{0}" δεν μπορεί να φορτωθεί! - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.es-AR.resx b/mRemoteNG/Language/Language.es-AR.resx deleted file mode 100644 index 704bc8f7b..000000000 --- a/mRemoteNG/Language/Language.es-AR.resx +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Propiedades por defecto - - - Desconectar - - - Icono - - - Ejecutar PuTTY - - - & OK - - - Propiedades - - - & Scanear - - - & Parar - - - Probar Proxy - - - Varios - - - Intentar reconectar automáticamente cuando se desconecte (solo para RDP && ICA) - - - No mostrar este mensaje de nuevo. - - - Este servidor proxy requiere autenticación - - - Usar ruta de Putty personalizada: - - - Vuelva a conectarse cuando esté listo - - - Usar un servidor proxy para conectarse - - - Usuario - - - Esperar a Salir - - - Pruebe nuevamente - - - Comprobar las actualizaciones y anuncios en el inicio - - - Compruebe ahora - - - Verifique la correcta instalación de los componentes en el inicio - - - Elija el panel antes de conectarse - - - Puertos Cerrados - - - Contraer todas las carpetas - - - btnIcon_Click falló! - - - ¿Está seguro que desea cerrar el panel, "{0}"? Cualquier conexión que contenga el panel también estará cerrada. - - - ¿Está seguro que desea eliminar la carpeta vacía, "{0}"? - - - ¿Está seguro que desea eliminar la carpeta "{0}"? También se eliminará cualquier carpetas o conexiones que contiene. - - - ¿Desea cerrar todas las conexiones abiertas? - - - ¿Estás seguro que deseas restablecer los paneles a su diseño predeterminado? - - - Conectar - - - Conectando... - - - Evento de protocolo conectado - - - ¡Error de conexión! - - - No se pudo abrir la conexión! - - - No se puede abrir la conexión: ningún nombre de host especificado! - - - Conexiones - - - No se ha podido establecer el puerto predeterminado! - - - No se pudo crear copia de seguridad del archivo de conexiones! - - - No se pudo cargar el archivo de conexiones "{0}"! - - - No se pudo guardar archivo de conexiones como "{0}"! - - - Conectar con la sesión de consola - - - Conectar (con opciones) - - - Conexión a {0} {1} vía cerrada por usuario {2}. - - - Evento de conexión cerrada - - - Evento de cerrar conexión falló! - - - No se pudo crear el nuevo archivo de conexiones! - - - Detectar - - - No conectar si falla la autenticación - - - Descargar e instalar - - - Duplicar - - - ¿Desea continuar sin contraseña? - - - Si desea Nombre de usuario, password o dominio vacio use: - - - Encriptar completamente el archivo de conexiones - - - Último IP - - - Último puerto - - - BarraAgregarHerramientasExternas (frmMain) falló. {0} - - - La versión de la base de datos {0} no es compatible con esta versión de {1}. - - - La lista de conexiones no pudo ser guardada. - - - La decriptación falló. {0} - - - La encriptación falló. {0} - - - Errores - - - VerificarVersionBasedeDatos (Config.Connections.Save) falló. {0} - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.es.resx b/mRemoteNG/Language/Language.es.resx deleted file mode 100644 index f80570a4a..000000000 --- a/mRemoteNG/Language/Language.es.resx +++ /dev/null @@ -1,1544 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Acerca de - - - ¡Adición de Nodo desde XML fallida! - - - Permitir una sola instancia de la aplicación (reinicio de mRemoteNG necesario) - - - Siempre - - - Conectar siempre, aunque falle la autentificación - - - Mostrar siempre el diálogo de selección de panel cuando se abran conexiones - - - Mostrar las pestañas del panel siempre - - - Mostrar siempre el Icono de la Bandeja del Sistema - - - Pregúnteme más adelante - - - Personalice las opciones ahora - - - Emplear la opciones recomendadas - - - {0} puede comprobar automáticamente actualizaciones que aportarán nuevas funcionalidades y correción de errores. Es recomendable que permita a {0} comprobar actualizaciones semanalmente. - - - Opciones de actualización automática - - - Aspecto - - - Autoguardar cada: - - - Versión Disponible - - - &Ver... - - - &Cancelar - - - Cambiar - - - &Cerra - - - Herencia por Defecto - - - Propiedades por Defecto - - - Desconectar - - - Icono - - - &Importar - - - Herencia - - - Lanzar PuTTY - - - &OK - - - Propiedades - - - &Escanear - - - &Parar - - - Probar Proxy - - - ¡No puede iniciarse el Escáner de Puertos, incorrecto formato IP! - - - Apariencia - - - Conexión - - - Pantalla - - - Puerta de Enlace - - - Varios - - - Protocolo - - - Redirección - - - Comprobación fallida! - - - Tratar de reconectar automáticamente al ser desconectado del servidor (solo RDP && ICA) - - - No mostar este mensaje de nuevo. - - - Este servidor procy requiere autentificación - - - Usar ruta a PuTTY personalizada: - - - Reconectar cuando esté listo - - - Usar servidor proxy para conectar - - - Nombre de Usuario - - - Esperar a Salir - - - Comprobar de nuevo - - - Comprobar actualizaciones y novedades en el arranque - - - Comprobar ahora - - - Comprobar la adecuada instalación de componentes en el arranque - - - Seleccionar Panel antes de conectar - - - Puertos Cerrados - - - Contraer todas las carpetas - - - Argumentos - - - Nombre de Archivo - - - Mensaje - - - ¡No se pudieron procesar los argumentos de línea de comandos! - - - Detectado problema de compatibilidad - - - ¡Error en btnIcon_Click! - - - ¡Fallo en ShowHideGridItems! - - - ¡Fallo en IconMenu_Click! - - - ¡Fallo en el objeto de propiedad de red! - - - No se pudo definir el estado del host! - - - ¡Fallo en pGrid_PopertyValueChanged! - - - Error al Cargar la Interfaz de Configuración de Usuario - - - ¿Está seguro de querer cerrar el panel, "{0}"? Cualquier conexión que contenga el panel también será cerrada. - - - ¿Está seguro de querer borrar la herramienta externa, "{0}"? - - - ¿Está seguro de querer borrar las {0} herramientas externas seleccionadas? - - - ¿Está seguro de querer eliminar la conexión, "{0}"? - - - ¿Está seguro de querer eliminar la carpeta vacía, "{0}"? - - - ¿Está seguro de querer eliminar la carpeta, "{0}"? Cualquier carpeta o conexión que contenga será también eliminada. - - - ¿Quiere cerrar todas las conexiones abiertas? - - - ¿Está seguro de querer resetear los paneles a su configuración inicial? - - - Conectar - - - Conectar en modo de pantalla completa - - - Conectando... - - - Se lanzó el evento Connected en Protocol - - - Connexión a "{0}" via "{1}" establecida por el usuario "{2}" (Descripción: "{3}"; Campo de Usuario: "{4}") - - - ¡Conexión fallida! - - - Ha ocurrido un error en evento de protocolo - - - ¡Conexión fallida! - - - ¡No se pudo establecerse la conexión: No se ha especificado el nombre del host! - - - Conexiones - - - ¡No se pudo definir el puerto por defecto! - - - ¡No pudo crearse copia de seguridad del archivo de conexiones! - - - ¡El archivo de conexiones "{0}" no pudo ser cargado! - - - ¡El archivo de conexiones "{0}" no pudo ser cargado! -Arrancando con un nuevo archivo de conexiones. - - - ¡No pudo guardarse el archivo de conexiones como "{0}"! - - - Conectar a sesión de consola - - - Conectar (con Opciones) - - - Connexión a {0} via {1} cerrada por el usuario {2}. - - - Evento de conexión cerrado - - - ¡Ha fallado el evento Closed en Connection! - - - ¡No se pudo crear un nuevo archivo de conexiones! - - - Detectar - - - No conectar si la autentificación falla - - - Doble clic en una pestaña la cierra - - - Descargar e Instalar - - - Duplicar - - - ¿Quiere continuar sin contraseña? - - - Para campos de Nombre de Usuario, Contraseña y Dominio vacíos usar: - - - Cifrar por completo el archivo de conexión - - - IP Final - - - Puerto Final - - - Fallo al AddExternalToolsToToolBar (frmMain). {0} - - - Añadir Carpeta (UI.Window.Tree) fallida. {0} - - - La versión de Base de Datos {0} No es compatible con esta versión de {1}. - - - La lista de conexiones no ha podido ser grabada. - - - Descifrado fallido. {0} - - - Cifrado fallido. {0} - - - Errores - - - No ha podido cargarse el archivo de conexión inicial.{0}{0}{2}{0}{3}{0}{0}Para evitar la pérdida de datos, {1} se cerrará ahora. - - - Error.{0} en Proceso VerifyDatabaseVersion (Config.Connections.Save) - - - Expandir todas las carpetas - - - Experimental - - - Exportar - - - Todos los archivos (*.*) - - - Archivos de Aplicación (*.exe) - - - Archivos CSV de mRemote (*.csv) - - - Archivos XML de mRemote (*.xml) - - - Archivos RDP (*.rdp) - - - Herencia {0} - - - Descripción de la propiedad heredada: {0} - - - Gratis - - - Pantalla Completa - - - General - - - Ha ocurrido un error mientras se cargaba la conexión de "{0}" desde "{1}". {2} - - - Reconexión Automática - - - Propiedades de la Herramienta Externa - - - Archivos - - - Servidor - - - ¡Conexión HTTP Fallida! - - - ¡No se pudo crear una nueva conexión HTTP! - - - ¡Fallo al cambiar el azulejo del documento HTTP! - - - ¡Asignación de Propiedades HTTP fallida! - - - Importar desde Directorio Activo - - - Importar desde el Escáner de Puertos - - - Informaciones - - - ¡La liberación del proceso Int App ha fallado! - - - ¡No se pudo centrar el foco en Int App! - - - Manejar aplicación interna: {0} - - - ¡Fallo en el proceso de detención de la aplicación interna! - - - ¡Fallo al redimensionar la aplicación interna! - - - --- Cosas de la aplicación interna --- - - - Título Int App: {0} - - - Dirección: - - - Al cerrar las conexiones: - - - Nombre Mostrado - - - Dominio - - - Nombre del Host: - - - Edición Portable - - - Para configurar las conexiones PuTTY hacer clic en este botón: - - - Tiempo de espera Max. para PuTTY && Applicaciones Ext. Integradas: - - - Publicado bajo la GNU General Public License (GPL) - - - segundos - - - Seleccione un panel de la lista o haga clic en Nuevo para añadir uno. Haga clic en OK para continuar. - - - Estado de Servidor: - - - Base de Datos: - - - Verificar: - - - Idioma - - - (Detección Automática) - - - {0} debe ser reiniciado antes de que los cambios en el idioma tengan efecto. - - - ¡Carga desde SQL fallida! - - - ¡Carga de XML fallida! - - - Archivo local - - - ¡El archivo local no existe! - - - Agregar Panel de Conexión - - - Comprobar Actualizaciones - - - Configuración - - - Paneles de Conexión - - - Copiar - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - Borrar Herramienta Externa... - - - Donar - - - Duplicar Pestaña - - - Salir - - - Barra de Herramientas Externas - - - &Archivo - - - &Ayuda - - - Ayuda de mRemoteNG - - - Lanzar Aplicación Externa - - - Nuevo Archivo de Conexión - - - Nueva Herramienta Externa - - - Notificaciones - - - Copiar todo - - - Borrar todo - - - Abrir Archivo de Conexión... - - - Opciones - - - Escanear Puertos - - - Barra de Conexión Rápida - - - Reconectar - - - Refrescar Pantalla (VNC) - - - Renombrar Pestaña - - - Informar de un Bug - - - Resetear distribución de pantalla - - - Guardar Archivo de Conexión - - - Guardar Archivo de Conexión como... - - - Enviar Teclas Especiales (VNC) - - - &Mostrar texto de ayuda - - - Mostar Texto - - - SmartSize (RDP/VNC) - - - Tranferencia de Archivos por SSH - - - Comenzar Chat (VNC) - - - Foro de Soporte - - - &Herramientas - - - Transferir Archivo (SSH) - - - &Ver - - - Solo Ver (VNC) - - - Sitio Web - - - Minimizar en la bandeja del sistema - - - Mover abajo - - - Mover arriba - - - Mis credenciales actuales (información de inicio de sesión en Windows) - - - Nunca - - - Nueva Conexión - - - Nueva Carpeta - - - Nuevo Panel - - - Nuevo Título - - - No - - - Sin Compresión - - - App Externa no especificada. - - - Ninguno - - - Normal - - - Sin SmartSize - - - Sin actualizaciones disponibles - - - Está intentando cargar un archivo de conexión que ha sido creado con una versión muy antigua de mRemote, ésto puede causar un error en tiempo de ejecución. -¡Si este error se produce, cree un nuevo archivo de conexión! - - - Abrir nueva pestaña a la derecha de la actualmente seleccionada - - - Puertos Abiertos - - - Tema - - - &Eliminar - - - &Nuevo - - - Nombre del Panel - - - Protegido por Contraseña - - - Pro favor, complete todos los campos - - - ¡No se pudo cargar el Panel de Escaneo de Puertos! - - - Introduzca el nombre del host o IP con la que quiere conectar. - - - Cambiar todas las opciones heredadas. - - - Seleccione el nivel de autentificación que esta conexión debe emplear. - - - Seleccione cómo quiere autentificar contra el servidor VNC. - - - Seleccione si quiere cachear bitmap o no. - - - Seleccione la calidad de color a emplear. - - - Seleccione el nivel de compresión a emplear. - - - Introduzca aquí sus notas ó una descripción del host. - - - Seleccione sí si el tema del host remoto debe ser mostrado. - - - Seleccione sí si el fondo de escritorio del host remoto debe ser mostrado. - - - Introduzca su dominio. - - - Seleccione si emplear composición de escritorio o no. - - - Seleccione si emplear suavizado de fuentes o no. - - - Seleccione el modo de codificación a emplear. - - - Seleccione la herramienta externa a iniciar. - - - Seleccione la herramienta externa a iniciar tras la desconexión del host remoto. - - - Seleccione la herramienta externa a iniciar antes de establecer la conexión con el host remoto. - - - Seleccione el icono que se mostrará cuando conecte con el host. - - - Introduzca la dirección MAC del host remoto si desea usarlo en una herramienta externa. - - - Este es el nombre que se mostrará en el árbol de conexiones. - - - Determina el panel en el que la conexión se abrirá. - - - Introduzca su contraseña. - - - Introduzca el puerto por el que escucha el protocolo seleccionado. - - - Seleccione el protocolo que mRemoteNG debe emplear para conectar con el host. - - - Seleccione una sesión PuTTY para emplear cuando conecte. - - - Indica el nombre del dominio que el usuario indica para conectar con el servidor RD Gateway. - - - Indica el nombre del servidor Gateway de Escritorio Remoto - - - Indica cuándo usar un servidor Gateway para Escritorio Remoto (RD Gateway). - - - Indica si iniciar o no sesión en el gateway empleando el mismo usuario y contraseña que en la conexión. - - - Indica el nombre de usuario empleado para conectar con el servidor de Gateway de Escritorio Remoto. - - - Seleccione si los discos locales deben ser mostrados en el host remoto. - - - Seleccione si las combinaciones de teclas (ej. Alt-Tab) deben ser redireccionadas al host remoto. - - - Seleccione si los puertos locales (ej. com, paralelo) deben ser mostrados en el host remoto. - - - Seleccione si las impresoras locales deben ser mostradas en el host remoto. - - - Seleccione si el portapapeles debe compartirse con el host remoto. - - - Seleccione si las tarjetas inteligentes deben presentarse a la máquina remota. - - - Seleccione cómo deberá ser redireccionado el sonido remoto. - - - Seleccione uno de los motores de renderizado disponibles para mostrar HTML. - - - Seleccione la resolución o modo en que esta conexión será abierta. - - - Seleccione el modo SmartSize a emplear. - - - Conectar a la sesión de consola del host remoto. - - - Introduzca aquí cualquier información que necesite. - - - Introduzca su nombre de usuario. - - - Seleccione "si" si desea establecer una conexión de sólo observación. - - - Introduzca la dirección del proxy a emplear. - - - Introduzca su contraseña de autentificación en el proxy. - - - Introduzca el puerto de escucha del proxy. - - - Si utiliza un proxy para conexiones VNC, seleccione de qué tipo es. - - - Introduzca su nombre de usuario de autentificación en el proxy. - - - Nombre del host/IP - - - Todo - - - Autentificación de servidor - - - Modo de autentificación - - - Cache de Bitmaps - - - Colores - - - Compresión - - - Descripción - - - Mostrar Temas - - - Mostrar Fondo de Pantalla - - - Composición de Escritorio - - - Suavizado de Fuentes - - - Codificación - - - Herramienta Externa - - - Tras la Herramienta Externa - - - Antes de la Herramienta Externa - - - Dirección MAC - - - Nombre - - - Panel - - - Contraseña - - - Puerto - - - Sesión PuTTY - - - Dominio del Gateway - - - Nombre del Gateway - - - Contraseña del Gateway para Escritorio Remoto - - - Usar Gateway - - - Credenciales del Gateway - - - Nombre de Usuario para el Gateway - - - Unidades de Disco - - - Combinaciones de Teclas - - - Puertos - - - Impresoras - - - Portapapeles - - - Sonidos - - - Motor de Renderizado - - - Resolución - - - Modo SmartSize - - - Usar Sesión de Consola - - - Usar CredSSP - - - Campo de Usuario - - - Dirección del Proxy - - - Contraseña del Proxy - - - Puerto del Proxy - - - Tipo de Proxy - - - Nombre de Usuario del Proxy - - - Protocol Event Disconnected. -Mensaje: -{0} - - - Protocolo a importar - - - ¡Test de Proxy fallido! - - - ¡Test de Proxy correcto! - - - ¡No se pudo fikar el foco! - - - Manejar Putty: {0} - - - ¡Kill del Proceso Putty fallido! - - - Manejar el panel: {0} - - - ¡Redimensionamiento de Putty fallido! - - - Sesiones guardadas de PuTTY - - - Opciones de PuTTY - - - ¡Fallo al mostrar el Diálogo de Preferencias de Putty! - - - --- Cosas de PuTTY --- - - - Titulo PuTTy: {0} - - - Conexión Rápida - - - ¡Fallo agregando Conexión Rápida! - - - Creación de conexión rápida fallida - - - &Avisarme al cerrar conexiones - - - RAW - - - RDP - - - 16777216 Colores (24-bit) - - - 256 Colores (8-bit) - - - 32768 Colores (15-bit) - - - 16777216 Colores (32-bit) - - - 65536 Colores (16-bit) - - - No se pudo crear el control RDP, por favor verifique los requerimientos de mRemoteNG. - - - Desactivar Parpadeo del Cursor - - - Desactivar Sombra del Cursor - - - Desactivar Mostar Ventana al arrastrar - - - Desactivar Animaciones de Menús - - - ¡Fallo en la desconexión RDP, intentando cerrar! - - - Código de error interno 1. - - - Código de error interno 2. - - - Código de error interno 3. No es un estado válido. - - - Código de error interno 4. - - - Ha ocurrido un error irrecuperable durante la conexión del cliente. - - - Ha ocurrido un error de desbordamiento de memoria. - - - Ha ocurrido un error desconocido. - - - Ha ocurrido un error en la creación de la ventana. - - - Error de inicialización del Winsock. - - - Ajustar al panel - - - ¡RDP Focus fallido! - - - RD Gateway soportado. - - - ¡No está soportada la Gateway RD! - - - Contador de Reconexiones RDP: - - - ¡RDP Asignación de Nivel de Autenticación fallida! - - - ¡RDP Uso de Sesión de Consola fallida! - - - Configurando switch de Consola para RDC {0}. - - - ¡RDP Asignación de Credenciales fallida! - - - ¡RDP Asignación de Manejadores de Eventos fallida! - - - ¡RDP asignar RDGateway fallida! - - - ¡RDP Asignación de Valores de Rendimiento fallida! - - - ¡RDP Asignación de Puerto fallida! - - - ¡RDP Asignación de Propiedades fallida! - - - ¡RDP Asignación de Redirección fallida! - - - ¡RDP Asignación de Claves de Redirección fallida! - - - ¡RDP Asignación de Resolución fallida! - - - Traer a este equipo - - - Sin sonido - - - Mantener en el equipo remoto - - - ¡RDP fallo en el cambio a Pantalla Completa! - - - ¡RDP fallo en el cambio a Tamaño Automático! - - - Reconectar en el arranque sesiones previamente abiertas - - - Archivo remoto - - - Eliminar Todo - - - Renombrar - - - Rlogin - - - Guardar - - - Guardar Todo - - - ¿Quiere guardar el actual archivo de conexiones antes de cargar otro? - - - Guardar conexiones al salir - - - Pantalla - - - Volcado de pantalla - - - Volcados de Pantalla - - - Buscar - - - Enviar a... - - - Usar el nombre del host como nombre a mostrar cuando se creen nuevas conexiones - - - ¡No se pudieron guardar las preferencias o disponer el Icono de la Bandeja del Sistema! - - - Mostrar la descripción de las tooltips en el arbol de conexiones - - - Mostrar la ruta completa al archivo de conexión en el título de la ventana - - - Mostrar información de sesión en los nombres de las pestañas - - - Mostrar el protocolo en los nombres de las pestañas - - - Un solo clic en una conexión la abre - - - Un solo clic en una conexión abierta cambia a ella - - - Socks 5 - - - Ordenar - - - Ascendente (A-Z) - - - Descendente (Z-A) - - - ¡Por favor, mire en Ayuda - Comenzando - Configuración SQL para más información! - - - SQL Server: - - - SSH versión 1 - - - SSH versión 2 - - - ¡Tranferencia SSH en segundo plano fallida! - - - IP Inicial - - - Puerto Inicial - - - Inicio/Salir - - - Estado - - - Cambiar al Panel de Notificaciones: - - - Avanzado - - - Pestañas && Paneles - - - Actualizaciones - - - Telnet - - - El siguiente: - - - Error ({0}) - - - Información ({0}) - - - Contraseña - - - Seleccionar Panel - - - Alerta ({0}) - - - Transferir - - - Intentar integrar - - - Repetidor de Ultra VNC - - - Puerto SingleClick de UltraVNC: - - - ¡Desmarque las propiedades que no quiera que sean guardadas! - - - Actualización de mRemoteNG disponible - - - mRemoteNG puede conectar periódicamente con el sitio web de mRemoteNG para comprobar actualizaciones y novedades. - - - ¡Comprobación de finalización de la actualización fallida! - - - ¡Descarga completada! -mRemoteNG ahora se cerrará y comenzará la instalación. - - - ¡Finalización de la descarga fallida! - - - ¡Descarga de actualización fallida! - - - Cada {0} días - - - Diariamente - - - Mensualmente - - - Semanalmente - - - Usar otro nombre de usuario y contraseña - - - Usuario - - - Usar el mismo nombre de usuario y contraseña - - - Usar una tarjeta inteligente - - - Emplear SQL Server para cargar && guardar las conexiones - - - Versión - - - VNC - - - ¡Desconexión VNC fallida! - - - ¡Fallo en el refresco de pantalla de VNC! - - - ¡Fallo en el envío de teclas especiales VNC! - - - ¡Asignación de Manejadores de Eventos VNC fallida! - - - ¡VNC asignación de Propedades fallida!! - - - ¡VNC fallo en el cambio a Tamaño Automático! - - - ¡VNC fallo en el cambio a modo ViewOnly! - - - Alertarme si la autentificación falla - - - Alertas - - - - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.fi-FI.resx b/mRemoteNG/Language/Language.fi-FI.resx deleted file mode 100644 index 028971666..000000000 --- a/mRemoteNG/Language/Language.fi-FI.resx +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Valitse käytettävä värilaatu. - - - Värit - - - 16777216 Värit (24-bit) - - - 256 Värit (8-bit) - - - 32768 Värit (15-bit) - - - 16777216 Värit (32-bit) - - - 65536 Värit (16-bit) - - diff --git a/mRemoteNG/Language/Language.fr.resx b/mRemoteNG/Language/Language.fr.resx deleted file mode 100644 index 106194b55..000000000 --- a/mRemoteNG/Language/Language.fr.resx +++ /dev/null @@ -1,2156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - À propos - - - AddNodeFromXML a échoué ! - - - Autoriser une seule instance de l'application (redémarrage de mRemoteNG nécessaire) - - - Toujours - - - Toujours se connecter, même si l'authentification échoue - - - Toujours demander la sélection d'un panneau lors de l'ouverture d'une connexion - - - Toujours afficher les onglets du panneau - - - Toujours afficher l'icône dans la zone de notification - - - Me le demander plus tard - - - Personnaliser les paramètres maintenant - - - Utiliser les paramètres recommandés - - - {0} peut vérifier automatiquement les mises à jour qui peuvent contenir de nouvelles fonctionnalités et/ou corrections de bugs. Il est recommandé de laisser {0} vérifier les mises à jour chaque semaine. - - - Paramètres de mise à jour automatique - - - Apparence - - - Sauvegarde automatique en minutes (0 = désactivé) : - - - Dernière version - - - &Parcourir... - - - &Annuler - - - Changer - - - &Fermer - - - Héritage par défaut - - - Propriétés par défaut - - - Déconnexion - - - Icône - - - &Importer - - - Héritage - - - Lancement de PuTTY - - - &OK - - - Propriétés - - - &Scanner - - - &Arrêter - - - Tester le proxy - - - Impossible de démarrer le scan de port : format d'adresse IP incorrect ! - - - Apparence - - - Connexion - - - Affichage - - - Passerelle - - - Divers - - - Protocole - - - Rediriger - - - Vérification échouée ! - - - Reconnexion automatique en cas de déconnexion du serveur (RDP seulement) - - - Ne plus afficher ce message. - - - Ce serveur proxy requiert une authentification - - - Utiliser un chemin personnalisé pour PuTTY : - - - Se reconnecter une fois prêt - - - Utiliser un serveur proxy pour se connecter - - - Nom d'utilisateur - - - En attente de fermeture - - - Vérifier de nouveau - - - Vérifier les mises à jour au démarrage - - - Vérifier maintenant - - - Vérifier l'installation correcte des composants au démarrage - - - Choisir un panneau avant de se connecter - - - Ports fermés - - - Réduire tous les dossiers - - - Arguments - - - Nom du fichier - - - Message - - - Impossible de convertir les arguments de la ligne de commande ! - - - {0} a détecté que l'utilitaire Lenovo Auto Scroll Utility est exécuté sur le système. Cet utilitaire est connu pour générer des problèmes avec {0}. Il est recommandé de le désactiver ou de le désinstaller. - - - Problème de compatibilité détecté - - - btnIcon_Click a échoué ! - - - ShowHideGridItems a échoué ! - - - IconMenu_Click a échoué ! - - - Propriété Grid objet a échoué ! - - - SetHostStatus a échoué ! - - - pGrid_PopertyValueChanged a échoué ! - - - Échec du chargement de la fenêtre de configuration ! - - - Êtes-vous sûr de vouloir fermer le panneau "{0}" ? Toutes les connexions contenues dans ce panneau seront également fermées. - - - Êtes-vous sûr de vouloir supprimer l'outil externe "{0}" ? - - - Êtes-vous sûr de vouloir supprimer l'outil externe sélectionné "{0}" ? - - - Êtes-vous sûr de vouloir supprimer la connexion "{0}" ? - - - Êtes-vous sûr de vouloir supprimer le dossier vide "{0}" ? - - - Êtes-vous sûr de vouloir supprimer le dossier "{0}" ? Tous les dossiers et connexions qu'il contient seront également supprimés. - - - Voulez-vous fermer toutes les connexions ouvertes ? - - - Êtes-vous sûr de vouloir réinitialiser la position des panneaux ? - - - Connexion - - - Se connecter en mode plein écran - - - Connexion... - - - Évènement de protocole connecté - - - Connexion à "{0}" via "{1}" créée par l'utilisateur "{2}" (Description : "{3}" Champ utilisateur : "{4}") - - - Connexion échouée ! - - - L'ouverture de la connexion a échoué ! - - - Impossible d'ouvrir la connexion : aucun nom d'hôte spécifié ! - - - Connexions - - - Impossible de définir le port par défaut ! - - - Impossible de créer le fichier de sauvegarde des connexions ! - - - Le fichier des connexions "{0}" ne peut pas être chargé ! - - - Le fichier des connexions "{0}" ne peut pas être chargé ! -Démarrage avec un nouveau fichier de connexions. - - - Impossible d'enregistrer le fichier des connexions sous "{0}" ! - - - Se connecter à une session de console - - - Connexion (avec options) - - - Connexion à {0} via {1} fermée par l'utilisateur {2}. - - - Connexion terminée - - - Échec de fermeture de la connexion ! - - - Impossible de créer le nouveau fichier des connexions ! - - - Le contrôle ToolStrip est introuvable dans le FilteredPropertyGrid. - - - Détecter - - - Ne pas se connecter si l'authentification échoue - - - Double-cliquer sur l'onglet pour le fermer - - - Télécharger et installer - - - Doublon - - - Voulez-vous continuer sans mot de passe ? - - - Pour un identifiant, mot de passe ou domaine vide, utiliser : - - - Chiffrer complètement le fichier des connexions - - - IP de fin - - - Port de fin - - - Échec de AddExternalToolsToToolBar (frmMain).{0} - - - Échec de l'ajout du dossier (UI.Window.Tree).{0} - - - La base de données version {0} n'est pas compatible avec cette version {1}. - - - La liste des connexions n'a pas pu être sauvegardée. - - - Échec du déchiffrement.{0} - - - Échec du chiffrement.{0} - - - Erreurs - - - Le fichier des connexions ne peut pas être chargé. {0}{0}{2}{0}{3}{0}{0} Pour éviter la perte de données, {1} va être fermé. - - - Échec de VerifyDatabaseVersion (Config.Connections.Save). {0} - - - Développer tous les dossiers - - - Expérimental - - - Exporter - - - Tous les fichiers (*.*) - - - Applications (*.exe) - - - Fichiers CSV mRemoteNG (*.csv) - - - Fichiers XML mRemoteNG (*.xml) - - - Fichiers RDP (*.rdp) - - - Hériter {0} - - - Description de la propriété héritée : {0} - - - Gratuit - - - Plein écran - - - Général - - - Une erreur est survenue pendant le chargement de l'entrée de connexion "{0}" depuis "{1}". {2} - - - Reconnexion automatique - - - Propriétés de l'outil externe - - - Fichiers - - - Hôte - - - Échec de la connexion HTTP ! - - - Impossible de créer de nouvelles connexions HTTP ! - - - Échec de changement de tuile du document HTTP ! - - - Échec de Set HTTP Props ! - - - Identifier les onglets de connexion rapide en ajoutant le préfixe "Rapide" - - - Importer à partir d'Active Directory - - - Importer à partir du scan de ports - - - Informations - - - Échec de l'arrêt du processus Int App ! - - - Échec du focus Int App ! - - - Handle Int App : {0} - - - Échec de l'arrêt forcé du processus Int App ! - - - Échec du redimensionnement Int App ! - - - --- Éléments Int App --- - - - Titre Int App : {0} - - - Adresse : - - - Lors de la fermeture des connexions : - - - Nom affiché - - - Domaine - - - Nom d'hôte : - - - Édition portable - - - Configurer les sessions PuTTY : - - - Temps d'attente max. pour PuTTY : - - - Paru sous la licence GNU General Public License (GPL) - - - secondes - - - Sélectionner un groupe dans la liste ci-dessous ou cliquer sur Nouveau pour en ajouter un nouveau. Cliquer sur OK pour continuer. - - - État du serveur : - - - Base de données : - - - Vérifier : - - - Langue - - - (Détection automatique) - - - {0} doit être redémarré pour que le changement de langue prenne effet. - - - Le chargement à partir de la base de données SQL a échoué - - - Le chargement à partir du fichier XML a échoué ! - - - Fichier local - - - Le fichier local n'existe pas ! - - - Ajouter un panneau de connexion - - - Rechercher les mises à jour - - - Configuration - - - Panneaux de connexion - - - Copier - - - Ctrl-Alt-Suppr - - - Ctrl-Échap - - - Supprimer l'outil externe... - - - Faire un don - - - Dupliquer l'onglet - - - Quitter - - - Barre d'outils externes - - - &Fichier - - - &Aide - - - Aide mRemoteNG - - - Lancer l'outil externe - - - Nouveau fichier de connexions - - - Nouvel outil externe - - - Notifications - - - Tout copier - - - Tout supprimer - - - Ouvrir un fichier de connexions... - - - Options - - - Scan de ports - - - Barre de connexion rapide - - - Reconnecter - - - Rafraîchir l'écran (VNC) - - - Renommer l'onglet - - - Signaler un bug - - - Réinitialiser la disposition des panneaux - - - Enregistrer le fichier de connexions - - - Enregistrer le fichier de connexions sous... - - - Envoyer des touches spéciales (VNC) - - - &Afficher le texte d'aide - - - Afficher le texte - - - Taille dynamique (RDP/VNC) - - - Transfert de fichiers SSH - - - Démarrer le chat (VNC) - - - Forum du support - - - &Outils - - - Transfert de fichiers (SSH) - - - &Affichage - - - Voir seulement (VNC) - - - Site web - - - Réduire dans la zone de notification - - - Déplacer vers le bas - - - Déplacer vers le haut - - - Mes identifiants de connexion actuels (informations de connexion Windows) - - - Jamais - - - Nouvelle connexion - - - Nouveau dossier - - - Nouveau panneau - - - Nouveau titre - - - Non - - - Aucune compression - - - Aucune application externe spécifiée. - - - Aucun - - - Normal - - - Pas de taille dynamique - - - Aucune mise à jour disponible - - - Vous essayez de charger un fichier de connexions qui a été créé avec une version plus ancienne de mRemoteNG. Des erreurs internes peuvent survenir. -Si vous rencontrez une erreur, créez un nouveau fichier de connexions ! - - - Ouvrir les nouveaux onglets à droite de l'onglet actuellement sélectionné - - - Ports ouverts - - - Thème - - - &Supprimer - - - &Nouveau - - - Nom du panneau - - - Protéger le mot de passe - - - Merci de remplir tous les champs - - - Impossible de charger le panneau Scan de ports ! - - - Entrer le nom ou l'adresse IP de l'hôte auquel vous souhaitez vous connecter. - - - Sélectionner toutes les options d'héritage. - - - Sélectionner le niveau d'authentification que cette connexion doit utiliser. - - - Sélectionner la manière de vous authentifier auprès du serveur VNC. - - - Indiquer si vous souhaitez utiliser le cache bitmap ou non. - - - Sélectionner la qualité des couleurs à utiliser. - - - Sélectionner la valeur de compression à utiliser. - - - Entrer des notes ou une description de l'hôte ici. - - - Sélectionner Oui pour afficher le thème de l'hôte distant. - - - Sélectionner Oui pour afficher le fond d'écran de l'hôte distant. - - - Entrer un nom de domaine. - - - Choisir d'utiliser la composition du bureau ou non. - - - Choisir d'utiliser le lissage des polices ou non. - - - Choisir l'encodage à utiliser. - - - Sélectionner l'outil externe à démarrer. - - - Sélectionner un outil externe à démarrer après la déconnexion de l'hôte distant. - - - Sélectionner un outil externe à démarrer avant que la connexion à l'hôte distant ne soit établie. - - - Choisir une icône qui s'affichera lorsque vous serez connecté à l'hôte. - - - Entrer l'adresse MAC de l'hôte distant si vous souhaitez l'utiliser dans un outil externe. - - - Nom affiché dans l'arborescence des connexions. - - - Panneau dans lequel la connexion sera ouverte. - - - Entrer un mot de passe. - - - Entrer le port d'écoute du protocole choisi. - - - Choisir le protocole utilisé par mRemoteNG pour se connecter à l'hôte. - - - Sélectionner une session PuTTY à utiliser lors de la connexion. - - - Spécifier le nom de domaine fourni par l'utilisateur pour se connecter au serveur RD Gateway. - - - Indiquer le nom d'hôte du serveur RD Gateway. - - - Spécifier quand utiliser un serveur RD Gateway. - - - Spécifier de se connecter ou non à la passerelle en utilisant les mêmes identifiants que la connexion. - - - Spécifier le nom de domaine que l'utilisateur fournit pour se connecter au serveur RD Gateway. - - - Choisir si les lecteurs de disques locaux doivent être redirigés vers l'hôte distant. - - - Choisir si les combinaisons de touches (par exemple Alt-Tab) doivent être redirigées vers l'hôte distant. - - - Choisir si les ports locaux doivent être redirigés vers l'hôte distant. - - - Choisir si les imprimantes locales doivent être redirigées vers l'hôte distant. - - - Choisir si les cartes à puce doivent être disponibles sur l'hôte distant. - - - Choisir de quelle manière les sons de l'hôte distant doivent être redirigés. - - - Choisir quel moteur de rendu disponible sera utilisé pour afficher du HTML. - - - Choisir la résolution ou le mode pour lesquels la connexion sera ouverte. - - - Sélectionner le mode de taille intelligente à utiliser. - - - Connexion à la console de l'hôte distant. - - - Utiliser les informations d'identification Security Support Provider (CredSSP) pour l'authentification si disponibles. - - - Entrer toutes les informations dont vous avez besoin ici. - - - Entrer le nom d'utilisateur. - - - Si vous souhaitez établir une vue uniquement de l'hôte distant, sélectionnez Oui. - - - Entrer l'adresse du proxy à utiliser. - - - Entrer le mot de passe pour l'authentification au proxy. - - - Entrer le port d'écoute du serveur proxy. - - - Si vous utilisez un proxy pour tunneler vos connexions VNC, sélectionnez son type. - - - Entrer le nom d'utilisateur pour vous authentifier sur le proxy. - - - Nom d'hôte / IP - - - Tous - - - Niveau d'authentification - - - Mode d'authentification - - - Mettre en cache les bitmaps - - - Couleurs - - - Compression - - - Description - - - Afficher les thèmes - - - Afficher le fond d'écran - - - Activer la composition du bureau - - - Lissage des polices - - - Encodage - - - Outil externe - - - Outil externe après - - - Outil externe avant - - - Adresse MAC - - - Nom - - - Panneau - - - Mot de passe - - - Port - - - Session PuTTY - - - Domaine de la passerelle RDP - - - Nom d'hôte de la passerelle RDP - - - Mot de passe de la passerelle RDP - - - Utilisation de la passerelle RDP - - - Utiliser les informations de connexion pour l'identification à la passerelle RDP - - - Nom d'utilisateur de la passerelle RDP - - - Lecteurs de disque - - - Combinaisons de touches - - - Ports - - - Imprimantes - - - Sons - - - Moteur de rendu - - - Résolution - - - Mode SmartSize - - - Utiliser la session console - - - Utiliser CredSSP - - - Champ utilisateur - - - Adresse du proxy - - - Mot de passe du proxy - - - Port du proxy - - - Type du proxy - - - Nom d'utilisateur du proxy - - - Évènement de déconnexion du protocole. Hôte : "{1}" ; Protocole : "{2}" ; Message : "{0}" - - - Évènement d'échec de déconnexion du protocole. -{0} - - - Protocole à importer - - - Test du proxy échoué ! - - - Test du proxy réussi ! - - - Échec de l'arrêt du processus PuTTY ! - - - Impossible de définir le focus ! - - - Prise en charge de PuTTY : {0} - - - Échec de la fermeture forcée du processus PuTTY ! - - - Prise en charge du panneau : {0} - - - Échec du redimensionnement du processus PuTTY ! - - - Sessions PuTTY sauvegardées - - - Paramètres de PuTTY - - - Échec de l'affichage de la fenêtre des paramètres de PuTTY ! - - - --- Outils PuTTY --- - - - Titre PuTTY : {0} - - - Rapide : {0} - - - Connexion rapide - - - Échec de l'ajout d'une connexion rapide ! - - - La connexion rapide a échoué - - - &M'avertir lors de la fermeture des connexions - - - M'avertir uniquement à la f&ermeture de mRemoteNG - - - M'avertir uniquement lors de la fermeture de connexions &multiples - - - &Ne pas m'avertir lors de la fermeture des connexions - - - RAW - - - RDP - - - 16777216 couleurs (24 bits) - - - 256 couleurs (8 bits) - - - 32768 couleurs (15 bits) - - - 16777216 couleurs (32 bits) - - - 65536 couleurs (16 bits) - - - Impossible de lancer une connexion RDP. Vérifiez les prérequis mRemoteNG. - - - Désactiver le clignotement du curseur - - - Désactiver l'ombre du curseur - - - Désactiver le glissement de la fenêtre complète - - - Désactiver les animations du menu - - - Échec de la déconnexion RDP. Tentative d'arrêt en cours ! - - - Code d'erreur RDP 1. - - - Code d'erreur RDP 2. - - - Code d'erreur RDP 3. - - - Code d'erreur RDP 4. - - - Une erreur irrécupérable s'est produite lors de la connexion au client. - - - Échec GetError (FatalErrors) - - - Une erreur de mémoire insuffisante s'est produite. - - - Une erreur inconnue s'est produite. - - - Une erreur de création de fenêtre s'est produite. - - - Une erreur d'initialisation de Winsock s'est produite. - - - Ajuster au panneau - - - Échec du focus RDP ! - - - La passerelle RDP est prise en charge. - - - La passerelle RDP n'est pas prise en charge ! - - - Nombre de reconnexions RDP : - - - Échec de RDP SetAuthenticationLevel ! - - - Échec de RDP SetUseConsoleSession ! - - - Configuration du basculement de la console pour RDP {0}. - - - Échec de RDP SetCredentials ! - - - Échec de RDP SetEventHandlers ! - - - Échec de RDP SetRDGateway ! - - - Échec de RDP SetPerformanceFlags ! - - - Échec de RDP SetPort ! - - - Échec de RDP SetProps ! - - - Échec de RDP SetRedirection ! - - - Échec de RDP SetRedirectKeys ! - - - Échec de RDP SetResolution ! - - - Transférer le son vers cet ordinateur - - - Ne pas lire - - - Sortir le son sur l'ordinateur distant - - - Échec de RDP ToggleFullscreen ! - - - Échec de RDP ToggleSmartSize ! - - - Reconnecter les sessions ouvertes au démarrage - - - Fichier distant - - - Tout supprimer - - - Renommer - - - Rlogin - - - Enregistrer - - - Tout enregistrer - - - Souhaitez-vous enregistrer le fichier actuel de connexions avant d'en charger un autre ? - - - Enregistrer les connexions à la fermeture - - - Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png - - - Écran - - - Capture d'écran - - - Captures d'écran - - - Invite de recherche - - - Envoyer à... - - - Utiliser le nom d'hôte comme nom affiché lors de la création ou le renommage de connexions - - - Échec de sauvegarde des paramètres ou de suppression de l'icône de la barre des tâches ! - - - Afficher des info-bulles avec les descriptions dans l'arborescence - - - Afficher le chemin d'accès complet du fichier de connexions dans le titre de la fenêtre - - - Afficher les informations de connexion dans le titre des onglets - - - Afficher le protocole dans le titre des onglets - - - Un simple clic sur une connexion ouvre celle-ci - - - Un simple clic sur une connexion ouverte affiche l'onglet correspondant - - - Socks 5 - - - Trier - - - Croissant (A-Z) - - - Décroissant (Z-A) - - - Consulter l'aide - Démarrage rapide - Configuration SQL - pour plus d'informations ! - - - SQL Server - - - SSH version 1 - - - SSH version 2 - - - Le transfert SSH en tâche de fond a échoué ! - - - Échec du transfert SSH. - - - IP de début - - - Port de début - - - Démarrer/Quitter - - - Statut - - - Se rendre sur le panneau des notifications : - - - Avancé - - - Onglets && panneaux - - - Mises à jour - - - Telnet - - - Ce qui suit : - - - Erreur ({0}) - - - Information ({0}) - - - Mot de passe - - - Choix du panneau - - - Avertissement ({0}) - - - Transfert - - - Essayer d'intégrer - - - UltraVNC Repeater - - - Port UltraVNC SingleClick : - - - Décocher les propriétés que vous ne souhaitez pas enregistrer ! - - - Une mise à jour est disponible pour mRemoteNG - - - mRemoteNG peut se connecter périodiquement sur le site mRemoteNG pour vérifier les mises à jour. - - - Le téléchargement des informations de mise à jour a échoué. - - - Téléchargement terminé ! -mRemoteNG va se fermer et l'installation va commencer. - - - Le téléchargement de la mise à jour a échoué. - - - Le téléchargement de la mise à jour a échoué. - - - Tous les {0} jours - - - Quotidien - - - Mensuel - - - Hebdomadaire - - - Utiliser des noms d'utilisateur et mots de passe différents - - - Utilisateur - - - Utiliser les mêmes noms d'utilisateur et mots de passe - - - Utiliser une carte à puce - - - Utiliser SQL Server pour charger et enregistrer les connexions - - - Version - - - VNC - - - Déconnexion de VNC échouée ! - - - Échec du rafraîchissement de l'écran VNC ! - - - Échec de VNC SendSpecialKeys ! - - - Échec de VNC SetEventHandlers ! - - - Échec de VNC SetProps ! - - - Échec de VNC ToggleSmartSize ! - - - Échec de VNC ToggleViewOnly ! - - - M'avertir si l'authentification échoue - - - Avertissements - - - Oui - - - Crédits - - - Démarrer minimisé - - - Fermer vers la zone de notification - - - &Exporter vers le fichier... - - - &Démarrer - - - &Réessayer - - - Active Directory - - - Ajouter - - - Options de sécurité avancées - - - Toujours afficher les onglets des connexions - - - Appliquer - - - Capture audio - - - Redimensionner automatiquement - - - Historique des modifications - - - Sélectionner un chemin pour le fichier de log de mRemoteNG - - - Sélectionner un chemin - - - Effacer la chaîne de recherche - - - Presse-papiers - - - &Ouvrir un fichier de connexions - - - Tous les fichiers importables - - - Une erreur est survenue lors de l'import du fichier "{0}". - - - Une exception non gérée s'est produite - - - Les deux mots de passe doivent correspondre. - - - Impossible de créer le thème : le libellé existe déjà ou des caractères spéciaux sont présents dans le nom - - - Impossible de glisser-déposer un noeud sur lui-même. - - - Favori - - - Favoris - - - Utiliser les paramètres par défaut - - - UltraVNC SingleClick - - - Entrer le nouveau nom du thème - - - Titre - - - Délai d'expiration [secondes] - - - Ce noeud n'est pas sélectionnable pour glisser-déposer. - - - Cette exception va forcer la fermeture de mRemoteNG - - - Le mot de passe doit faire au minimum 3 caractères. - - - En cours de test... - - - Test de la connexion - - - Tester les paramètres - - - Tester la connexion - - - Démarrer un programme / un shell alternatif - - - Démarrer un programme - - - Pile d'appels - - - En dehors de l'index - - - Dynamique - - - Quitter {0} - - - Qualité du son - - - Multi SSH : - - - Barre d'outils multi SSH - - - Répertoire de travail : - - - Répertoire de travail - - - Fenêtre - - - Proxy - - - Popups - - - PowerShell - - - SmartCard - - - VM ID - - - Utiliser le VM ID - - - Utiliser le mode amélioré - - - Traquer la connexion active dans l'arborescence des connexions - - - Ce noeud est déjà présent dans ce dossier. - - - Tunnel SSH - - - Options SSH - - - Afficher/masquer les menus - - - Afficher dans la barre d'outils - - - Utiliser un chemin de fichier personnalisé - - - Le fichier de connexions est introuvable. - - - Sécurité - - - Enregistrer les connexions après chaque modification - - - Démarrer avec des privilèges élevés - - - Canal stable - - - Lecture seule : - - - Version RDP - - - Minutes avant la veille - - - Une erreur du protocole de connexion s'est produite. Hôte : "{1}" ; Code d'erreur : "{2}" ; Description de l'erreur : "{0}" - - - Exception non gérée mRemoteNG - - - Message de l'exception - - - Supprimer - - - Tout déconnecter sauf cet onglet - - - Déconnecter les onglets à droite - - - Reconnecter toutes les connexions - - - Doit être entre 0 et 255 - - - Options mRemoteNG - - - Verrouiller la position de la barre d'outils - - - Connexion réussie - - - Le serveur '{0}' n'était pas accessible. - - - Importer un fichier existant - - - Base de données '{0}' indisponible. - - - Identification échouée pour l'utilisateur '{0}'. - - - Avertissement : un redémarrage est nécessaire pour prendre en compte les modifications apportées aux thèmes. - - - Nouveau nom du thème - - - Copier le nom d'hôte - - - Edge Chromium - - - Environnement - - - Ne pas supprimer les espaces dans les noms d'utilisateurs - - - Créer un panneau vide au démarrage de mRemoteNG - - - Licence - - - Informations de connexion - - - Informations de connexion non disponibles - - - Télécharger - - - Moteur de chiffrage - - - Débugage - - - Tout exporter - - - Exporter le fichier - - - Exporter les éléments - - - Test de chiffrage - - - Exporter les propriétés - - - &Format de fichier : - - - Téléchargement terminé ! - - - Exporter la connexion sélectionnée - - - Exporter le dossier sélectionné - - - Construction de l'URL à charger échouée - - - Haut - - - HTTP - - - HTTPS - - - Importer depuis le &fichier... - - - Internet Explorer - - - Itérations de la fonction de clé de dérivation - - - Impossible de glisser le noeud parent sur l'enfant. - - - Créer un nouveau fichier de connexions - - - Filtrer les résultats de la recherche dans l'arborescence des connexions - - - Charger les informations de répartition - - - Logger vers le répertoire de l'application - - - Logger les types de messages suivants - - - Chemin du fichier de log - - - Moyen - - - CSV mRemoteNG - - - Mot de passe mRemoteNG pour {0} - - - XML mRemoteNG - - - Nouvel outil externe - - - Ouvrir un fichier différent - - - Ouvrir un fichier - - - Scan des ports terminé. - - - Appuyer sur ENTRER pour envoyer. Ctrl+C est envoyé immédiatement. - - - Placer la barre de recherche au-dessus de l'arborescence des connexions - - - Ne pas se connecter à la session console - - - L'historique des changements n'a pas pu être téléchargé. - - - Les informations de connexion n'ont pas pu être chargées depuis SQL Server. - - - L'ID de la machine virtuelle Hyper-V à laquelle se connecter. - - - PuTTY n'a pas pu être démarré. - - - Afficher sur la colonne de la barre d'outils - - - Afficher les types de messages suivants - - - Afficher cette connexion dans le menu des favoris. - - - La longueur du mot de passe doit être entre {0} et {1} - - - Le mot de passe doit contenir au minimum {0} caractère(s) minuscule(s) - - - Le mot de passe doit contenir au minimum {0} caractère(s) numérique(s) - - - Le mot de passe doit contenir au minimum {0} caractères suivants : {1} - - - Le mot de passe doit contenir au minimum {0} caractère(s) majuscule(s) - - - Une erreur s'est produite en tentant de changer la résolution de l'hôte '{0}' - - - Log en cours - - - Délai d'expiration de la connexion RDP - - - Se connecter sans informations de connexion - - - Fichiers du gestionnaire de connexions PuTTY - - - Fichiers Remote Desktop Connection Manager (*.rdg) - - - Informations de connexion assignées - - - Impossible de trouver l'outil externe "{0}" - - - Détermine si l'ombre du curseur doit être visible. - - - Détermine si le clignotement du curseur doit être désactivé. - - - Le canal stable ne concerne que les versions finalisées. -Le canal preview inclut les versions beta et release candidates. -Le canal nightly inclut les versions alpha, beta et release candidates. - - - Une erreur s'est produite en tentant de se reconnecter à l'hôte RDP '{0}' - - - Voulez-vous vraiment supprimer les informations de connexion {0} ? - - - Bloquer le mode de chiffrement - - - Se connecter en visualisation seulement - - - Création WebView2 échouée avec une exception - - - Utiliser le VM ID pour se connecter à la machine virtuelle en fonctionnement sur Hyper-V. - - - Utiliser l'encodage UTF-8 pour la propriété RDP "Load Balance Info" - - - Le paramètre de sécurité Windows "Utiliser des algorithmes compatibles FIPS pour le chiffrement, le hachage et la signature" est activé. - -Voir l'article de support Microsoft http://support.microsoft.com/kb/811833 pour plus d'informations. - -{0} n'est pas totalement compatible avec FIPS. Cliquer sur OK pour poursuivre à vos risques et périls ou Annuler pour quitter. - - - Voulez-vous vraiment fermer toutes les connexions à l'exception de "{0}" ? - - - Sélectionner la qualité audio fournie par le protocole : dynamique, moyenne, élevée - - - Se connecter à un hôte Hyper-V avec le mode amélioré activé. - - - Impossible de créer un client RDP. La version du protocole RDP {0} n'est pas supportée sur cette machine. Veuillez choisir une ancienne version du protocole. - - - Détermine si les menus et fenêtres doivent être affichés avec des animations dans la session à distance. - - - Détermine si le contenu de la fenêtre est affiché lors du glisser-déposer vers un autre emplacement. - - - Voulez-vous vraiment supprimer le thème ? - - - Le chiffrement de {0} entrée(s) en utilisant {1}/{2} et {3} itérations a duré {4} secondes. - - - Importer les sub OUs - - - Sélectionner si le presse-papiers doit être partagé. - - - Sélectionner si le périphérique d'entrée audio par défaut sur la machine distance doit être redirigé vers cet ordinateur. - - - Sélectionner de redimensionner automatiquement la connexion quand la fenêtre est redimensionnée ou lorsque le mode plein écran est activé. -Nécessite RCD 8.0 ou postérieur. - - - Pour les connexions à travers un tunnel SSH, spécifier la connexion SSH à utiliser pour établir le tunnel SSH. - - - Choisir de recevoir une alerte lors de la déconnexion de la session RDP pour cause d'inactivité - - - Spécifier un mot de passe pour chiffrer le fichier de connexions. Ce mot de passe vous sera demandé au démarrage de mRemoteNG. - - - Spécifier la version de RDP à utiliser pour ouvrir les connexions. - - - Spécifier les informations de répartition de charge à utiliser par les routeurs pour choisir le meilleur serveur. - - - Spécifier le mot de passe du serveur Remote Desktop Gateway. - - - Préciser ici les options additionnelles à utiliser pour les connexions SSH. Se reporter à la documentation PuTTY pour plus de détails. - - - Problème de configuration du tunnel SSH. La connexion vers : "{0}" via le tunnel SSH : "{1}" est impossible. Une connexion de tunnel SSH a été trouvée dans l'arborescence mais le protocole n'est pas dérivé de PuTTY. Vérifiez que la connexion de tunnel SSH utilise bien le protocole SSH. - - - Problème de configuration du tunnel SSH. La connexion vers : "{0}" via le tunnel SSH : "{1}" est impossible. Aucune connexion de tunnel SSH utilisant le protocole SSH 1 ou 2 n'a été trouvée dans l'arborescence. Supprimez le tunnel SSH ou spécifiez un tunnel SSH existant. - - - Problème de configuration du tunnel SSH. La connexion vers : "{0}" via le tunnel SSH : "{1}" est impossible. Le processus PuTTY s'est terminé. Vérifiez d'éventuels problèmes avec la connexion de tunnel SSH. - - - Problème de configuration du tunnel SSH. La connexion vers : "{0}" via le tunnel SSH : "{1}" est impossible. La connexion SSH a échoué. Vérifiez d'éventuels problèmes avec la connexion de tunnel SSH. - - - Expiration du délai pour la connexion au tunnel SSH. La connexion vers : "{0}" via le tunnel SSH : "{1}" est impossible. Le port du tunnel local n'as pas répondu à temps. Vérifiez d'éventuels problèmes avec la connexion de tunnel SSH. - - - Initialisation du tunnel SSH échouée. La connexion vers : "{0}" via le tunnel SSH : "{1}" est impossible. La connexion SSH n'a pas pu être initialisée. Vérifiez d'éventuels problèmes avec la connexion de tunnel SSH. - - - Nombre de minutes pendant lesquelles laisser la session RDP en veille avant déconnexion (utiliser 0 pour ne pas mettre de limite) - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.hu.resx b/mRemoteNG/Language/Language.hu.resx deleted file mode 100644 index bfc1adc7e..000000000 --- a/mRemoteNG/Language/Language.hu.resx +++ /dev/null @@ -1,336 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Névjegy - - - Mindig - - - Kapcsolódj mindig, sikertelen hitelesítés esetén is - - - Kérdezz rá később - - - Javasolt beállítások használata - - - Automatikus frissítés beállításai - - - Automatikus mentés minden: - - - Aktuális verzió - - - &Böngészés... - - - &Mégsem - - - Módosít - - - Be&zár - - - Kapcsolat bontása - - - Ikon - - - &Improtálás - - - PuTTY indítása - - - &OK - - - Tulajdonságok - - - Helytelen IP cím, a port szkennelés nem indítható! - - - Megjelenés - - - Kapcsolat - - - Képernyő - - - Átjáró - - - Egyéb - - - Protokoll - - - Átirányítás - - - Az ellenőrzés sikertelen! - - - Többé ne mutasd ezt az üzenetet. - - - Fájlnév - - - Üzenet - - - Nem értelmezhető parancssori argumentum! - - - Kapcsolódás... - - - Sikertelen kapcsolódás! - - - Kapcsolatok - - - Ne kapcsolódj sikertelen hitelesítéskor - - - Duplaklikk a fülön bezárja azt - - - Kísérleti - - - Teljes képernyő - - - Általános - - - Fájlok - - - A HTTP csatlakozás nem sikerült! - - - Cím: - - - Megjelenítendő név - - - Tartomány - - - Hosztnév: - - - Hordozható kiadás - - - Szerver állapot: - - - Adatbázis: - - - Ellenőrzés: - - - Nyelv - - - (Automatikus észlelés) - - - Frissítés keresése - - - Külső eszköz indítása - - - Új kapcsolatfájl - - - Új külső eszköz - - - Értesítések - - - Kapcsolatfájl megnyitása... - - - Opciók - - - Újrakapcsolódás - - - Fül átnevezése - - - Hibabejelentés - - - Elrendezés alaphelyzetbe állítása - - - Kapcsolatfájl mentése - - - Kapcsolatfájl mentése, mint... - - - Honlap - - - Soha - - - Új kapcsolat - - - Új mappa - - - Új panel - - - Új cím - - - Nem - - - SQL szerver használata a kapcsolatok kezelésére - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.it.resx b/mRemoteNG/Language/Language.it.resx deleted file mode 100644 index 4ac931eed..000000000 --- a/mRemoteNG/Language/Language.it.resx +++ /dev/null @@ -1,1559 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Informazioni su - - - Operazione AddNodeFromXML fallita! - - - Consenti soltanto un'istanza dell'applicazione (richiede il riavvio di mRemoteNG) - - - Sempre - - - Connetti sempre, anche se l'autenticazione fallisce - - - Mostra sempre la finestra di selezione pannello all'apertura di una connessione - - - Mostra sempre le schede dei pannelli - - - Mostra sempre l'icona nell'area delle notifiche - - - Chiedimelo più tardi - - - Personalizza le impostazioni adesso - - - Utilizza le impostazioni raccomandate - - - {0} può verificare automaticamente la presenza di aggiornamenti che potrebbero fornire nuove funzionalità e risolvere alcuni bug. Si raccomanda di consentire a {0} di controllare gli aggiornamenti una volta alla settimana. - - - Impostazioni di aggiornamento automatico - - - Aspetto - - - Salva automaticamente ogni: - - - Versione attuale - - - &Sfoglia... - - - &Cancella - - - Cambia - - - &Chiudi - - - Ereditarietà predefinita - - - Proprietà predefinite - - - Disconnetti - - - Icona - - - &Importa - - - Ereditarietà - - - Esegui PuTTY - - - &OK - - - Proprietà - - - &Scansione - - - &Stop - - - Verifica le impostazioni del proxy - - - Impossibile eseguire una scansione delle porte, il formato IP non è corretto! - - - Aspetto - - - Connessione - - - Schermo - - - Gateway - - - Altro - - - Protocollo - - - Redirezione - - - Controllo fallito! - - - Prova a riconnettersi automaticamente quando disconnesso (solo RDP ed ICA) - - - Non visualizzare più questo messaggio. - - - Questo proxy richiede l'autenticazione - - - Utilizza un percorso personalizzato per PuTTY: - - - Riconnetti quando pronto - - - Utilizza un proxy per la connessione - - - Nome utente - - - Attendi l'uscita - - - Controlla ancora - - - Verifica la presenza di aggiornamenti all'avvio - - - Controlla adesso - - - Durante l'avvio controlla che i componenti siano installati correttamente - - - Seleziona il pannello prima della connessione - - - Porte chiuse - - - Comprimi tutte le cartelle - - - Argomenti - - - Nome del file - - - Messaggio - - - Impossibile processare i parametri da linea di comando! - - - btnIcon_Click fallito! - - - Operazione ShowHideGridItems fallita! - - - Operazione IconMenu_Click fallita! - - - Oggetto Property Grid fallito! - - - Operazione SetHostStatus fallita! - - - Operazione pGrid_PropertyValueChanged fallita! - - - Caricamento Config UI fallito! - - - Sei sicuro di voler chiudere il pannello "{0}"? Tutte le connessioni contenute in esso verranno terminate. - - - Sei sicuro di voler cancellare l'applicazione esterna "{0}"? - - - Sei sicuro di voler cancellare l'applicazione esterna selezionata {0}? - - - Sei sicuro di voler cancellare la connessione "{0}"? - - - Sei sicuro di voler cancellare la cartella vuota "{0}"? - - - Sei sicuro di voler cancellare la cartella "{0}"? Tutte le sottocartelle e le connessioni contenute in essa verranno eliminate. - - - Vuoi chiudere tutte le connessioni aperte? - - - Reimpostare i pannelli secondo la disposizione predefinita? - - - Connetti - - - Connetti in modalità a schermo intero - - - Connessione in corso... - - - Protocol Event Connected - - - Connessione a "{0}" attraverso "{1}" stabilita dall'utente "{2}" (Descrizione: "{3}"; Campo utente: "{4}") - - - Connessione fallita! - - - Protocol Event ErrorOccured - - - Apertura della connessione fallita! - - - Impossibile aprire la connessione: nessun nome host specificato! - - - Connessioni - - - Impossibile impostare la porta predefinita! - - - Impossibile creare un backup del file delle connessioni! - - - Il file delle connessioni "{0}" non può essere caricato! - - - Il file delle connessioni "{0}" non può essere caricato! -Creazione di un nuovo file delle connessioni. - - - Impossibile salvare il file delle connessioni come "{0}"! - - - Connetti alla sessione della console - - - Connetti (con opzioni) - - - Connessione a {0} attraverso {1} chiusa dall'utente {2}. - - - Connection Event Closed - - - Operazione Connection Event Closed fallita! - - - Impossibile creare un nuovo file delle connessioni! - - - Rileva - - - Non connettere in caso di autenticazione fallita - - - Doppio click per chiudere la tab - - - Scarica ed installa - - - Duplica - - - Vuoi continuare anche in assenza di password? - - - Quando i campi "Nome utente", "Password" o "Dominio" sono vuoti, utilizza i seguenti: - - - Crittografa completamente il file delle connessioni - - - IP finale - - - Porta finale - - - Operazione AddExternalToolsToToolBar (frmMain) fallita. {0} - - - Operazione AddFolder (UI.Window.Tree) fallita. {0} - - - La versione del database {0} non è compatibile con questa versione di {1}. - - - L'elenco delle connessioni non può essere salvato. - - - Decriptaggio fallito. {0} - - - Criptaggio fallito. {0} - - - Errori - - - Il file delle connessioni da aprire all'avvio non può essere caricato.{0}{0}{2}{0}{3}{0}{0}Per evitare perdite di dati, {1} sarà immediatamente chiuso. - - - Verifica della versione del database (Config.Connections.Save) fallita. {0} - - - Espandi tutte le cartelle - - - Sperimentale - - - Esporta - - - Tutti i file (*.*) - - - Applicazioni (*.exe) - - - File CSV mRemote (*.csv) - - - File XML mRemote (*.xml) - - - File RDP (*.rdp) - - - Eredita {0} - - - Descrizione delle proprietà ereditate: {0} - - - Libero - - - Schermo intero - - - Generale - - - Errore durante il caricamento della connessione per "{0}" da "{1}". {2} - - - Riconnetti automaticamente - - - Proprietà dell'applicazione esterna - - - File - - - Host - - - HTTP Connect fallita! - - - Impossibile creare una nuova connessione HTTP! - - - Impostazione delle proprietà HTTP fallita! - - - Aggiungi il prefisso "Quick:" alle schede di connessioni rapide - - - Importa da Active Directory - - - Importa da scansione delle porte - - - Informazioni - - - Operazione Dispose of Int App Process fallita! - - - Int App Focus fallito! - - - Int App handle: {0} - - - Operazione Killing Int App Process fallita! - - - Int App Resize fallito! - - - --- Roba di IntApp --- - - - Int App Title: {0} - - - Indirizzo: - - - Alla chiusura delle connessioni: - - - Nome visualizzato - - - Dominio - - - Nome host: - - - Edizione Portable - - - Per configurare le sessioni PuTTY premere questo bottone: - - - Massimo tempo di attesa per PuTTY ed applicazioni esterne integrate: - - - Rilasciato sotto la licenza GNU GPL - - - secondi - - - Seleziona un pannello dalla lista sottostante o clicca Nuovo per aggiungerne un altro. Clicca OK per continuare. - - - Stato del server: - - - Database: - - - Verifica: - - - Lingua - - - (rileva automaticamente) - - - {0} deve essere riavviato prima che le nuove impostazioni della lingua abbiano effetto. - - - Operazione Load From SQL fallita! - - - Operazione Load From XML fallita! - - - File locale - - - Il file locale non esiste! - - - Aggiungi pannello delle connessioni - - - Verifica la presenza di aggiornamenti - - - Configurazione - - - Pannelli di connessione - - - Copia - - - Ctrl-Alt-Canc - - - Ctrl-Esc - - - Elimina applicazione esterna... - - - Effettua una donazione - - - Duplica tab - - - Esci - - - Barra delle applicazioni esterne - - - &File - - - &Aiuto - - - Guida di mRemoteNG - - - Esegui applicazione esterna - - - Nuovo file delle connessioni - - - Nuova applicazione esterna - - - Notifiche - - - Copia tutto - - - Elimina tutto - - - Apri file delle connessioni... - - - Opzioni - - - Scansione delle porte - - - Barra di connessione rapida - - - Riconnetti - - - Aggiorna lo schermo (VNC) - - - Rinomina tab - - - Segnala un bug - - - Reimposta la disposizione - - - Salva file delle connessioni - - - Salva file delle connessioni con nome... - - - Invia tasti speciali (VNC) - - - &Mostra testo di aiuto - - - Mostra testo - - - SmartSize (RDP/VNC) - - - Trasferimento file SSH - - - Avvia chat (VNC) - - - Forum di supporto - - - &Strumenti - - - Trasferisci file (SSH) - - - &Visualizza - - - Visualizza soltanto (VNC) - - - Sito web - - - Riduci a icona nell'area delle notifiche - - - Sposta sotto - - - Sposta sopra - - - Le mie credenziali (di accesso a Windows) - - - Mai - - - Nuova connessione - - - Nuova cartella - - - Nuovo pannello - - - Nuovo titolo - - - No - - - Nessuna compressione - - - Nessuna applicazione esterna specificata. - - - Nessuno - - - Normale - - - Disattiva SmartSize - - - Nessun aggiornamento disponibile - - - Se stai tentando di caricare un file delle connessioni creato con una vecchia versione di mRemote, questo potrebbe portare ad un errore durante l'esecuzione. Se succede, per favore crea un nuovo file delle connessioni! - - - Apri un nuovo tab a destra del tab selezionato - - - Porte aperte - - - Tema - - - Elimina - - - &Nuovo - - - Nome del pannello - - - Proteggi con password - - - Per favore compila tutti i campi - - - Impossibile caricare il pannello di scansione delle porte! - - - Inserisci il nome host o l'IP a cui ti vuoi connettere. - - - Inverti tutte le opzioni di ereditarietà. - - - Seleziona quale livello di autenticazione deve essere utilizzato per questa connessione. - - - Seleziona come effettuare l'autenticazione con il server VNC. - - - Scegli se utilizzare la cache per i bitmap o meno. - - - Seleziona la qualità del colore da utilizzare. - - - Seleziona la quantità di compressione da utilizzare. - - - Inserisci qui le tue note o una descrizione dell'host. - - - Scegli "sì" se vuoi che il tema dell'host remoto sia visualizzato. - - - Scegli "sì" se vuoi che lo sfondo dell'host remoto sia visualizzato. - - - Inserisci il tuo dominio. - - - Scegli se usare la composizione del desktop o meno. - - - Scegli se usare il font smoothing o meno. - - - Seleziona la modalità di codifica da utilizzare. - - - Seleziona l'applicazione esterna da avviare. - - - Seleziona l'applicazione esterna da avviare dopo la disconnessione dall'host remoto. - - - Seleziona l'applicazione esterna da avviare prima di stabilire la connessione all'host remoto. - - - Scegli un'icona da visualizzare quando connesso all'host. - - - Inserisci l'indirizzo MAC dell'host remoto se vuoi utilizzarlo con un'applicazione esterna. - - - Questo nome verrà mostrato nell'albero delle connessioni. - - - Imposta il pannello in cui aprire la connessione. - - - Inserisci la tua password. - - - Inserisci la porta sulla quale il protocollo è in ascolto. - - - Seleziona il protocollo che mRemoteNG deve usare per connettersi all'host. - - - Seleziona una sessione PuTTY da utilizzare per la connessione. - - - Indica il nome di dominio che l'utente fornisce per connettersi al server gateway RDP. - - - Indica il nome host del server gateway RDP. - - - Indica quando utilizzare il server gateway RDP. - - - Indica se autenticarsi sul gateway utilizzando le stesse credenziali della connessione. - - - Indica il nome utente che l'utente fornisce per connettersi al server gateway RDP. - - - Seleziona se visualizzare i dischi locali sull'host remoto. - - - Seleziona se le combinazioni di tasti (as es. Alt-Tab) devono essere inviate all'host remoto. - - - Seleziona se visualizzare le porte locali (ad es. COM1, LPT1) sull'host remoto. - - - Seleziona se visualizzare le stampanti locali sull'host remoto. - - - Selezionare se le smart card locali devono essere rese disponibili sull'host remoto. - - - Seleziona come l'audio remoto deve essere reindirizzato. - - - Seleziona uno dei motori di rendering da utilizzare per mostrare le pagine HTML. - - - Scegli la risoluzione o la modalità di apertura della connessione. - - - Scegli la modalità SmartSize da utilizzare. - - - Connettiti alla sessione della console dell'host remoto. - - - Usa Credential Security Support Provider (CredSSP) per l'autenticazione, se disponibile. - - - Sentiti libero di inserire qui informazioni a piacimento. - - - Inserisci il tuo nome utente. - - - Seleziona "sì" se vuoi stabilire una connessione di sola visualizzazione verso l'host. - - - Inserisci l'indirizzo del proxy da utilizzare. - - - Inserisci la password per l'autenticazione sul proxy. - - - Inserisci la porta sulla quale il proxy è in ascolto. - - - Se utilizzi un proxy per effettuare il tunneling delle connessioni VNC, seleziona la sua tipologia. - - - Inserire il nome utente per l'autenticazione con il proxy. - - - Nome host / IP - - - Tutti - - - Autenticazione server - - - Modalità di autenticazione - - - Memorizza bitmap nella cache - - - Colori - - - Compressione - - - Descrizione - - - Visualizza temi - - - Visualizza sfondo - - - Composizione del desktop - - - Font smoothing - - - Codifica - - - Applicazione esterna - - - Applicazione esterna dopo - - - Applicazione esterna prima - - - Indirizzo MAC - - - Nome - - - Pannello - - - Password - - - Porta - - - Sessione PuTTY - - - Dominio del gateway - - - Nome host del gateway - - - Password del gateway desktop remoto - - - Utilizza gateway - - - Credenziali del gateway - - - Nome utente del gateway - - - Unità disco - - - Combinazioni di tasti - - - Porte - - - Stampanti - - - Audio - - - Motore di rendering - - - Risoluzione - - - Modalità SmartSize - - - Utilizza la sessione della console - - - Usa CredSSP - - - Campo utente - - - Indirizzo del proxy - - - Password del proxy - - - Porta del proxy - - - Tipo del proxy - - - Nome utente del proxy - - - Protocol Event Disconnected. -Messaggio: -{0} - - - Protocol Event Disconnected fallito. -{0} - - - Protocollo da importare - - - Test del proxy fallito! - - - Test del proxy riuscito! - - - Operazione Dispose of PuTTY process fallita! - - - Impossibile impostare il focus! - - - PuTTY Handle: {0} - - - Operazione Killing Putty Process fallita! - - - Panel Handle: {0} - - - Operazione Putty Resize fallita! - - - Impostazioni PuTTY - - - Operazione Show PuTTY Settings Dialog fallita! - - - --- Roba di PuTTY --- - - - PuTTY Title: {0} - - - Rapido: {0} - - - Connessione rapida - - - Operazione Quick Connect Add fallita! - - - Operazione Creating Quick Connect fallita - - - &Avvisami alla chiusura delle connessioni - - - Avvisami soltanto all'&uscita da mRemoteNG - - - Avvisami soltanto alla chiusura di &più connessioni - - - &Non avvisarmi alla chiusura delle connessioni - - - RAW - - - RDP - - - 16777216 colori (24-bit) - - - 256 colori (8-bit) - - - 32768 colori (15-bit) - - - 16777216 colori (32-bit) - - - 65536 colori (16-bit) - - - Impossibile creare il controllo RDP, per favore controlla i requisiti di mRemoteNG. - - - Disattiva il lampeggio del cursore - - - Disattiva l'ombra del cursore - - - Disattiva il trascinamento finestra intera - - - Disattiva le animazioni dei menu - - - Disconnessione RDP fallita, tentativo di chiusura in corso! - - - Codice di errore interno 1. - - - Codice di errore interno 2. - - - Codice di errore interno 3. Questo stato non è valido. - - - Codice di errore interno 4. - - - Si è verificato un errore irreversibile durante la connessione del client. - - - GetError fallito (FatalErrors) - - - Si è verificato un errore di memoria esaurita. - - - Si è verificato un errore sconosciuto. - - - Si è verificato un errore di creazione della finestra. - - - Errore di inizializzazione WinSock. - - - Adatta al pannello - - - RDP Focus fallito! - - - Il gateway RDP è supportato. - - - Il gateway RDP non è supportato! - - - Contatore riconnessioni RDP: - - - RDP SetAuthenticationLevel fallito! - - - RDP SetUseConsoleSession fallito! - - - Impostazione del cambio console per RDC {0}. - - - RDP SetCredentials fallito! - - - RDP SetEventHandlers fallito! - - - RDP SetRDGateway fallito! - - - RDP SetPerformanceFlags fallito! - - - RDP SetPort fallito! - - - RDP SetProps fallito! - - - RDP SetRedirection fallito! - - - RDP SetRedirectKeys fallito! - - - RDP SetResolution fallito! - - - Portare su questo computer - - - Non riprodurre - - - Lasciare sul computer remoto - - - RDP ToggleFullscreen fallito! - - - RDP ToggleSmartSize fallito! - - - All'avvio, riconnetti alle sessioni precentemente aperte - - - File remoto - - - Rimuovi tutto - - - Rinomina - - - Rlogin - - - Salva - - - Salva tutto - - - Vuoi salvare il file delle connessioni corrente prima di caricarne un altro? - - - Salva le connessioni all'uscita - - - File Graphics Interchange Format (.gif)|*.gif|File Joint Photographic Experts Group (.jpeg)|*.jpeg|File Joint Photographic Experts Group (.jpg)|*.jpg|File Portable Network Graphics (.png)|*.png - - - Schermo - - - Screenshot - - - Screenshot - - - Cerca - - - Invia a... - - - Imposta il nome host come il nome visualizzato durante la creazione o la modifica delle connessioni - - - Impossibile salvare le impostazioni o eliminare l'icona nella barra di sistema! - - - Mostra suggerimenti descrittivi nell'albero delle connessioni - - - Mostra il percorso completo del file delle connessioni nel titolo della finestra - - - Mostra le informazioni di accesso sul nome dei tab - - - Mostra i protocolli sul nome dei tab - - - Singolo click sulla connessione per aprirla - - - Singolo click sulla connessione aperta per passare ad essa - - - SOCKS 5 - - - Ordina - - - Ascendente (A-Z) - - - Discendente (Z-A) - - - Per maggiori informazioni si prega di visualizzare Aiuto -> Per incominciare -> Configurazione SQL - - - Server SQL - - - SSH versione 1 - - - SSH versione 2 - - - Trasferimento SSH in background fallito! - - - IP iniziale - - - Porta iniziale - - - Avvio/Uscita - - - Stato - - - Passa al pannello delle notifiche quando: - - - Avanzate - - - Tab e pannelli - - - Aggiornamenti - - - Telnet - - - Il seguente: - - - Errore ({0}) - - - Informazione ({0}) - - - Password - - - Seleziona pannello - - - Attenzione ({0}) - - - Trasferimento - - - Prova ad integrare - - - UltraVNC Repeater - - - Porta UltraVNC SingleClick: - - - Deseleziona le proprietà che non vuoi salvare! - - - mRemoteNG richiede un aggiornamento - - - mRemoteNG è in grado di connettersi periodicamente al sito web per controllare la presenza di aggiornamenti o comunicati. - - - Completamento del controllo aggiornamenti fallito! - - - Scaricamento completato! -mRemoteNG verrà chiuso e l'installazione avrà inizio. - - - Completamento del download fallito! - - - Aggiornamento del download fallito! - - - Ogni {0} giorni - - - Giornalmente - - - Mensilmente - - - Settimanalmente - - - Utilizza nome utente e password differenti - - - Utente - - - Utilizza gli stessi nome utente e password - - - Utilizza una smart card - - - Utilizza il server SQL per caricare e salvare le connessioni - - - Versione - - - VNC - - - Disconnessione VNC fallita! - - - Aggiornamento dello schermo VNC fallito! - - - Invio di tasti speciali VNC fallito! - - - Impostazione gestore eventi VNC fallito! - - - Impostazione proprietà VNC fallita! - - - Cambiamento SmartSize VNC fallito! - - - Cambiamento ViewOnly VNC fallito! - - - Avvisami se l'autenticazione fallisce - - - Avvisi - - - - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.ja-JP.resx b/mRemoteNG/Language/Language.ja-JP.resx deleted file mode 100644 index 277722fb9..000000000 --- a/mRemoteNG/Language/Language.ja-JP.resx +++ /dev/null @@ -1,1719 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mRemoteNGについて - - - Active Directory - - - AddNodeFromXMLは失敗しました - - - アプリケーションの単一インスタンスのみを許可する(mRemoteNGを再起動する必要があります) - Allow only a single instance of the application (mRemoteNG restart required) - - - 常時 - - - 認証が失敗しても常に接続する - - - Always show panel selection dialog when opening connections - - - 常にパネルのタブを表示 - - - 常に通知領域アイコンを表示 - - - もう一度後で聞く - - - Customize the settings now - - - 推奨設定を使用 - - - {0} can automatically check for updates that may provide new features and bug fixes. It is recommended that you allow {0} to check for updates weekly. - - - 自動更新設定 - - - Aspect - - - 自動保存の間隔: - - - 最新バージョン - - - &Browse... - - - キャンセル(&C) - - - 変更 - - - 閉じる(&C) - - - Default Inheritance - - - デフォルトのプロパティ - - - 切断 - - - アイコン - - - インポート(&I) - - - Inheritance - - - 立ち上げる(&L) - - - PuTTYを開始 - - - &OK - - - プロパティ - - - スキャン(&S) - - - 停止(&S) - - - プロキシーをテストする - - - IPアドレスのフォーマットが正しくないのでポートスキャンの開始に失敗しました - Cannot start Port Scan, incorrect IP format! - - - 外観 - - - 接続 - - - ディスプレイ - - - ゲートウェイ - - - その他 - - - プロトコル - - - Redirect - - - 確認に失敗しました - - - Automatically try to reconnect when disconnected from server (RDP && ICA only) - - - このメッセージを再び表示しない - - - このプロキシーに接続するには資格情報が必要です - - - PuTTY実行ファイルへのパス: - - - 再接続をする - - - プロキシーサーバーを使用する - - - ユーザー名 - - - 終了まで待機する - - - もう一度点検する - - - Check for updates at startup - - - 点検する - - - 起動時に必要なコンポネントがインストールされているかを確認する - Check proper installation of components at startup - - - 接続時にパネルを選択する - Choose panel before connecting - - - 閉じているポート - - - すべてのフォルダを折りたたむ - - - パラメータ - - - ファイル名 - - - メッセージ - - - {0}を終了(&X) - E&xit {0} - - - コマンドのパラメータが正しくありません - - - 接続ファイルを開く(&O) - - - 再度試みる(&T) - - - {0} has detected the Lenovo Auto Scroll Utility running on this system. This utility is known to cause problems with {0}. It is recommended that you disable or uninstall it. - - - 互換性の問題が検出されました - - - btnIcon_Clickがエラーを発生しました - - - ShowHideGridItemsがエラーを発生しました - - - IconMenu_Clickがエラーを発生しました - - - プロパティを表示するグリッドがエラーを発生しました - - - SetHostStatusがエラーを発生しました - - - pGrid_PopertyValueChangedがエラーを発生しました - - - Config UI loadがエラーを発生しました - - - パネル内で開いている接続も全て切断されますが、パネル「{0}」を閉じますか? - - - 外部ツール「{0}」を削除してもよろしいですか? - - - 選択された外部ツール「{0}」を削除してもよろしいですか? - - - 接続「{0}」を削除してもよろしいですか? - Are you sure you want to delete the connection, "{0}"? - - - 空のフォルダ「{0}」削除してもよろしいですか? - - - Are you sure you want to delete the folder, "{0}"? Any folders or connections that it contains will also be deleted. - - - すべてのセッションを切断しますか? - - - パネル配置を初期化しますか? - - - 接続 - - - 全画面モードで接続する - - - 接続しています... - - - Protocol Event Connected - - - Connection to "{0}" via "{1}" established by user "{2}" (Description: "{3}"; User Field: "{4}") - - - 接続に失敗しました - - - Protocol Event ErrorOccured - - - 接続の開始に失敗しました - - - ホスト名が入力されていないので接続出来ません - - - 接続 - - - デフォルトのポートを設定できませんでした - - - Couldn't create backup of connections file! - - - Connections file "{0}" could not be loaded! - - - Connections file "{0}" could not be loaded! -Starting with new connections file. - - - Couldn't save connections file as "{0}"! - - - 資格情報なしで接続 - - - コンソールセッションに接続 - - - オプションを使用して接続 - - - ユーザー{1}によって接続「{0}」は切断されました - Connection to {0} via {1} closed by user {2}. - - - 接続イベントに失敗しました - - - - Connection Event Closed failed! - - - Couldn't create new connections file! - - - Could not find ToolStrip control in FilteredPropertyGrid. - - - 検出する - - - Don't connect to console session - - - Don't connect if authentication fails - - - ダブルクリックでタブを閉じる - - - ダウンロードとインストール - - - 複製 - - - パスワード無しでよろしいですか? - - - For empty Username, Password or Domain fields use: - - - 接続設定ファイルをすべて暗号化する - - - 最終IPアドレス - - - 最終ポート - - - AddExternalToolsToToolBar (frmMain) failed. {0} - - - AddFolder (UI.Window.Tree) failed. {0} - - - The database version {0} is not compatible with this version of {1}. - - - 接続リストが保存できませんでした - - - PuTTYの実行に失敗しました - - - 復号化に失敗しました:{0} - - - 暗号化に失敗しました:{0} - - - エラー - - - The startup connection file could not be loaded.{0}{0}{2}{0}{3}{0}{0}In order to prevent data loss, {1} will now exit. - - - VerifyDatabaseVersion (Config.Connections.Save) failed. {0} - - - すべてのフォルダを展開 - - - 試験的機能 - - - エクスポート - - - すべてエクスポート - - - ファイルをエクスポート - - - アイテムをエクスポート - - - プロパティのエクスポート - - - Export the currently selected connection - - - Export the currently selected folder - - - ファイルへの書き出し...(&E) - - - 新規外部ツール - - - File &Format: - - - すべてのファイル(*.*) - - - インポート可能なすべてのファイル - - - 実行ファイル(*.exe) - - - mRemote CSVファイル(*.csv) - - - mRemote XMLファイル(*.xml) - - - PuTTY Connection Manager files - - - Remote Desktop Connection Manager files (*.rdg) - - - RDP Files (*.rdp) - - - Inherit {0} - - - Description of inherited property: {0} - - - Free - - - 全画面 - - - 一般 - - - An error occured while loading the connection entry for "{0}" from "{1}". {2} - - - 自動的に再接続する - - - 外部ツールプロパティ - - - ファイル - - - ホスト - - - HTTP - - - HTTP接続に失敗しました - - - 新規のHTTP接続に失敗しました - - - Changing HTTP Document Tile Failed! - - - Internet Explorer - - - HTTPS - - - Set HTTP Props failed! - - - Identify quick connect tabs by adding the prefix "Quick:" - - - アクティブディレクトリからインポート - - - ファイル「{0}」のインポート中にエラーが発生しました - - - ファイルからインポート...(&F) - - - ポートスキャンからインポート - - - 情報 - - - Dispose of Int App process failed! - - - Int App Focus Failed! - - - Int App Handle: {0} - - - Killing Int App Process failed! - - - Int App Resize failed! - - - --- IntApp Stuff --- - - - Int App Title: {0} - - - アドレス: - - - 切断時: - - - ディスプレイ名 - - - ドメイン - - - ホスト名: - - - ポータブル - - - To configure PuTTY sessions click this button: - - - Maximum PuTTY and integrated external tools wait time: - - - Released under the GNU General Public License (GPL) - - - - - - パネルを選択するか新規パネルを追加してください。 - Select a panel from the list below or click New to add a new one. Click OK to continue. - - - サーバーの状態: - - - データベース: - - - 確認: - - - 言語 - - - (自動検出) - - - 言語設定の変更を有効にするには{0}の再起動が必要です - {0} must be restarted before changes to the language will take effect. - - - SQLサーバーからの読み込みに失敗しました - - - 接続情報はSQLサーバーから読み込むことが出来ませんでした - The connection information could not be loaded from the SQL server. - - - XMLファイルからの読み込みに失敗しました - - - ローカルファイル - - - ファイルが存在しません - - - 接続表示パネルの追加 - - - 最新バージョンをチェック - - - 設定 - - - 接続表示パネル - - - コピー - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - 外部ツールを削除... - - - 寄付のお願い - - - タブを複製する - - - 終了 - - - 外部ツールのツールバー - - - ファイル(&F) - - - ヘルプ(&H) - - - mRemoteNGヘルプ - - - 外部ツールの立ち上げ - - - 新規接続ファイル - - - 新規外部ツール - - - 通知 - - - 全てコピー - - - 全て削除 - - - 接続ファイルを開く... - - - オプション - - - ポートをスキャンする - - - クイック接続ツールバー - - - 再接続 - - - スクリーンを更新する (VNC) - - - タブ名を変更 - - - バグを報告する - - - レイアウトを初期化 - - - 接続ファイルの保存 - - - 接続ファイルを別名で保存... - - - Send Special Keys (VNC) - - - ヘルプ文字を表示(&S) - &Show Help Text - - - 文字の表示 - - - SmartSize (RDP/VNC) - - - SSHによるファイル転送 - - - Start Chat (VNC) - - - サポートフォーラム - - - ツール(&T) - - - SSHによるファイルの転送 - - - 表示(&V) - - - View Only (VNC) - - - ウェブサイト(英語) - - - 通知領域に最小化 - - - 下へ移動 - - - 上へ移動 - - - mRemoteNG CSVフォーマット - - - mRemoteNG XMLフォーマット - - - My current credentials (Windows logon information) - - - なし - - - 新規接続 - - - 新規フォルダ - - - 新規パネル - - - 新規タイトル - - - いいえ - - - 圧縮なし - - - No Ext. App specified. - - - なし - - - Normal - - - No SmartSize - - - 更新はありません - - - You are trying to load a connection file that was created using an very early version of mRemote, this could result in an runtime error. -If you run into such an error, please create a new connection file! - You are trying to load a connection file that was created using an very early version of mRemote, this could result in an runtime error. -If you run into such an error, please create a new connection file! - - - 選択されているタブの右側に新規タブを作成 - Open new tab to the right of the currently selected tab - - - Open Ports - - - テストの実行中 - - - テーマ - - - 削除(&D) - - - 新規(&N) - - - パネル名 - - - パスワードの保護 - - - 同じパスワードを入力してください - - - パスワードは最低3文字必要です - - - 全て入力してください - - - ポートのスキャンが完了しました - - - Couldn't load PortScan panel! - - - ホスト名かIPアドレスを入力してください - - - Toggle all inheritance options. - - - Select which authentication level this connection should use. - - - Select how you want to authenticate against the VNC server. - - - Select whether to automatically resize the connection when the window is resized or when fullscreen mode is toggled. Requires RDC 8.0 or higher. - - - Select whether to use bitmap caching or not. - - - Select the colour quality to be used. - - - Select the compression value to be used. - - - Put your notes or a description for the host here. - - - Select yes if the theme of the remote host should be displayed. - - - Select yes if the wallpaper of the remote host should be displayed. - - - ドメインを入力してください - - - Select whether to use desktop composition or not. - - - Select whether to use font smoothing or not. - - - Select the encoding mode to be used. - - - Select the external tool to be started. - - - Select a external tool to be started after the disconnection to the remote host. - - - Select a external tool to be started before the connection to the remote host is established. - - - Choose a icon that will be displayed when connected to the host. - - - Specifies the load balancing information for use by load balancing routers to choose the best server. - - - Enter the MAC address of the remote host if you wish to use it in an external tool. - - - This is the name that will be displayed in the connections tree. - - - 接続をするパネルを指定 - Sets the panel in which the connection will open. - - - パスワードを入力 - - - プロトコルのポートを入力 - Enter the port the selected protocol is listening on. - - - Choose the protocol mRemoteNG should use to connect to the host. - - - Select a PuTTY session to be used when connecting. - - - Specifies the domain name that a user provides to connect to the RD Gateway server. - - - Specifies the host name of the Remote Desktop Gateway server. - - - Specifies when to use a Remote Desktop Gateway (RD Gateway) server. - - - Specifies whether or not to log on to the gateway using the same username and password as the connection. - - - Specifies the user name that a user provides to connect to the RD Gateway server. - - - Select whether local disk drives should be shown on the remote host. - - - Select whether key combinations (e.g. Alt-Tab) should be redirected to the remote host. - - - Select whether local ports (ie. com, parallel) should be shown on the remote host. - - - Select whether local printers should be shown on the remote host. - - - Select whether local smart cards should be available on the remote host. - - - Select how remote sound should be redirected. - - - Select one of the available rendering engines that will be used to display HTML. - - - Choose the resolution or mode this connection will open in. - - - Select the SmartSize mode to be used. - - - Connect to the console session of the remote host. - - - Use the Credential Security Support Provider (CredSSP) for authentication if it is available. - - - Feel free to enter any information you need here. - - - ユーザー名を入力してください - - - If you want to establish a view only connection to the host select yes. - - - Enter the proxy address to be used. - - - Enter your password for authenticating against the proxy. - - - Enter the port the proxy server listens on. - - - If you use a proxy to tunnel VNC connections, select which type it is. - - - Enter your username for authenticating against the proxy. - - - ホスト名またはIPアドレス - - - 全て - - - サーバー認証 - - - 認証モード - - - 自動サイズ変更 - - - ビットマップをキャッシュ - - - - - - 圧縮 - - - 説明 - - - テーマの表示 - - - ウォールペーパーを表示 - - - Desktop Composition - - - フォントの滑らかさ - - - エンコード - - - 外部ツール - - - External Tool After - - - External Tool Before - - - Load Balance Info - - - MACアドレス - - - 名前 - - - パネル - - - パスワード - - - ポート - - - PuTTYのセッション - - - ゲートウェイのドメイン - - - ゲートウェイのホスト名 - - - Remote Desktop Gateway Password - - - ゲートウェイを使用 - - - ゲートウェイの資格情報 - - - ゲートウェイのユーザー名 - - - ディスク・ドライブ - - - キーの組み合わせ - - - ポート - - - プリンター - - - サウンド - - - レンダリングエンジン - - - 解像度 - - - スマートサイズモード - - - コンソールセッションを使用 - - - Use CredSSP - - - User Field - - - プロキシーのアドレス - Proxy Address - - - プロキシーのパスワード - Proxy Password - - - プロキシーのポート - - - プロキシーの種類 - - - プロキシーのユーザー名 - - - Protocol Event Disconnected. -Message: -{0} - - - Protocol Event Disconnected failed. -{0} - - - インポートするプロトコル - - - Proxy test failed! - - - Proxy test succeeded! - - - Dispose of Putty process failed! - - - Couldn't set focus! - - - Putty Handle: {0} - - - Killing Putty Process failed! - - - Panel Handle: {0} - - - Putty Resize Failed! - - - PuTTY Saved Sessions - - - PuTTY Settings - - - Show PuTTY Settings Dialog failed! - - - --- PuTTY Stuff --- - - - PuTTY Title: {0} - - - Quick: {0} - - - クイック接続 - - - Quick Connect Add Failed! - - - Creating quick connect failed - - - &Warn me when closing connections - - - Warn me only when e&xiting mRemoteNG - - - Warn me only when closing &multiple connections - - - Do &not warn me when closing connections - - - RAW - - - RDP - - - 16777216 Colours (24-bit) - - - 256 Colours (8-bit) - - - 32768 Colours (15-bit) - - - 16777216 Colours (32-bit) - - - 65536 Colours (16-bit) - - - Couldn't create RDP control, please check mRemoteNG requirements. - - - Disable Cursor blinking - - - Disable Cursor Shadow - - - Disable Full Window drag - - - メニューのアニメーションを無効にする - - - RDP Disconnect failed, trying to close! - - - Internal error code 1. - - - Internal error code 2. - - - Internal error code 3. This is not a valid state. - - - Internal error code 4. - - - An unrecoverable error has occurred during client connection. - - - GetError failed (FatalErrors) - - - An out-of-memory error has occurred. - - - An unknown error has occurred. - - - A window-creation error has occurred. - - - Winsock initialization error. - - - Fit To Panel - - - RDP Focus failed! - - - RD Gateway is supported. - - - RD Gateway is not supported! - - - RDP reconnection count: - - - RDP SetAuthenticationLevel failed! - - - RDP SetUseConsoleSession failed! - - - Setting Console switch for RDC {0}. - - - RDP SetCredentials failed! - - - RDP SetEventHandlers failed! - - - RDP SetRDGateway failed! - - - RDP SetPerformanceFlags failed! - - - RDP SetPort failed! - - - RDP SetProps failed! - - - Rdp Set Redirection Failed! - - - Rdp Set Redirect Keys Failed! - - - RDP SetResolution failed! - - - このコンピューターで再生 - - - 再生しない - - - 遠隔コンピューターで再生 - - - RDP ToggleFullscreen failed! - - - RDP ToggleSmartSize failed! - - - 起動時に前セッション時の接続を開始する - Reconnect to previously opened sessions on startup - - - 遠隔ファイル - - - 全て削除 - - - 名前の変更 - - - Rlogin - - - 保存 - - - 全て保存 - - - Do you want to save the current connections file before loading another? - - - 終了時に保存する - - - Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png - - - スクリーン - - - スクリーンショット - - - 複数のスクリーンショット - - - 検索 - - - 送信... - - - Set hostname like display name when creating or renaming connections - - - Couldn't save settings or dispose SysTray Icon! - - - 接続ツリーに接続の説明をツールチップを表示する - Show description tooltips in connection tree - - - ウィンドウのタイトルに接続設定ファイルへのフルパス名を表示する - Show full connections file path in window title - - - タブ名と一緒にログオン情報を表示する - Show logon information on tab names - - - タブ名と一緒にプロトコルを表示する - Show protocols on tab names - - - ワンクリックで接続を開始する - Single click on connection opens it - - - - Single click on opened connection switches to it - - - Socks 5 - - - 並び替え - - - 昇順 - - - 降順 - - - Please see Help - Getting started - SQL Configuration for more Info! - - - SQL Server - - - SSHバージョン1 - - - SSHバージョン2 - - - SSH background transfer failed! - - - SSH経由の転送に失敗しました - - - 開始IP - - - 開始のポート - - - 起動と終了 - - - ステータス - - - Switch to Notifications panel on: - - - 詳細設定 - - - タブとパネル - - - タブの更新 - - - Telnet - - - 以下: - - - エラー({0}) - - - Information ({0}) - - - Password - - - Password for {0} - - - パネルを選択 - - - Warning ({0}) - - - 転送 - - - Try to integrate - - - Ultra VNC Repeater - - - UltraVNC SingleClick port: - - - Uncheck the properties you want not to be saved! - - - mRemoteNG requires an update - - - mRemoteNG can periodically connect to the mRemoteNG website to check for updates. - - - The update information could not be downloaded. - - - ダウンロードが終了しました -mRemoteNGを終了してインストールを開始します - - - The update could not be downloaded. - - - The update download could not be initiated. - - - {0}日毎 - - - 毎日 - - - 毎月 - - - 毎週 - - - The change log could not be downloaded. - - - Use a different username and password - - - ユーザー - - - Use the same username and password - - - Use a smart card - - - 接続設定の保存にSQLサーバーを使用する - Use SQL Server to load && save connections - - - バージョン - - - VNC - - - VNCの切断に失敗しました - - - VNCのスクリーンの更新に失敗しました - - - VNC SendSpecialKeys failed! - - - VNC Set Event Handlers failed! - - - VNC Set Props Failed! - - - VNC Toggle SmartSize Failed! - - - VNC Toggle ViewOnly Failed! - - - 認証に失敗した場合は警告する - - - 警告 - - - はい - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.ko-KR.resx b/mRemoteNG/Language/Language.ko-KR.resx deleted file mode 100644 index 06586bdcf..000000000 --- a/mRemoteNG/Language/Language.ko-KR.resx +++ /dev/null @@ -1,1809 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mRemoteNG 정보 - - - Active Directory - - - AddNodeFromXML 실패! - - - 어플리케이션에 단일 인스턴스만 허용(mRemoteNG 재시작 필요) - - - 항상 - - - 인증이 실패하더라도 항상 연결 - - - 연결시 패널 선택 대화상자 항상 표시 - - - 패널 탭 항상 표시 - - - 알림 영역 아이콘 항상 표시 - - - 다음에 다시 묻기 - - - 지금 사용자 설정 - - - 권장 설정 사용 - - - {0}은 새로운 기능 및 버그 수정을 제공 할 수있는 업데이트를 자동으로 확인할 수 있습니다. 매주 업데이트를 확인하도록 {0}을 허용하는 것이 좋습니다. - - - 자동 업데이트 설정 - - - 양상 - - - 자동 저장 간격 : - - - 최종 버전 - - - 검색(&B) - - - 취소(&C) - - - 변경 - - - 닫기(&C) - - - 기본 상속 - - - 기본 속성 - - - 연결 끊기 - - - 아이콘 - - - 임포트(&I) - - - 상속 - - - 시작(&L) - - - PuTTY 시작 - - - 확인(&O) - - - 등록정보 - - - 스캔(&S) - - - 중단(&S) - - - 포록시 테스트 - - - 포트 스캔을 시작 할 수 없습니다. 잘못된 IP 형식 입니다. - - - 모양 - - - 연결 - - - 표시 - - - 게이트웨이 - - - 기타 - - - 프로토콜 - - - 리디렉션 - - - 검사 실패! - - - 서버와의 연결이 끊어지면 자동으로 다시 연결을 시도합니다 (RDP && ICA 만 해당). - - - 이 메시지를 다시 표시 안 함. - - - 이 프록시 서버에는 인증이 필요합니다 - - - 사용자 정의 PuTTY 경로 사용 : - - - 준비되면 다시 연결 - - - 프록시 서버를 사용해서 연결 - - - 사용자 이름 - - - 종료까지 대기 - - - 다시 확인 - - - 시작시 업데이트 확인 - - - 지금 확인 - - - 시작시 구성 요소가 제대로 설치되었는지 확인 - - - 연결 전에 패널 선택 - - - 닫힌 포트 - - - 모든 폴더 접기 - - - 로깅 - - - 팝업 - - - 응용 프로그램 디렉토리에 로그 - - - 할당 된 자격 증명 - - - 디버그 - - - 이 메시지 형시 표시 - - - 로그 파일 경로 - - - 이 메시지 형식 로그 - - - 경로 선택 - - - 파일 열기 - - - 기본값 사용 - - - 자격 증명 레코드 {0}을 (를) 삭제 하시겠습니까? - - - 비활성으로 인해 RDP 세션 연결이 끊어진 후 알림 수신 여부 선택 - - - 비밀번호는 {0} 이상의 문자를 포함해야합니다 : {1} - - - 비밀번호는 적어도 소문자가 {0} 이상이어야합니다. - - - 비밀번호는 최소한 {0} 숫자를 포함해야합니다. - - - 비밀번호는 적어도 {0} 이상의 대문자를 포함해야합니다. - - - 암호 길이는 {0}에서 {1} 사이 여야합니다. - - - mRemoteNG 로그 파일의 경로 선택 - - - 타이틀 - - - 유휴(idle) 분 - - - 추가 - - - 자동으로 연결을 끊기 전에 RDP 세션이 유휴 상태가되는 시간 (제한 없이 사용 : 0) - - - 음질 - - - 다운로드 완료! - - - 다운로드 - - - 암호화 엔진 - - - 보안 - - - 키 유도 함수 반복 - - - 동적 - - - 높음 - - - 중간 - - - 프로토콜에서 제공하는 음질을 선택하십시오 : 동적, 중간, 높음 - - - 인수 - - - 파일 이름 - - - 메시지 - - - 종료 (&X) {0} - - - 명령 줄 인수를 구문 분석 할 수 없음! - - - 연결 파일 열기(&O) - - - 다시 시도(&T) - - - {0}이 시스템에서 실행중인 레노버 자동 스크롤 유틸리티를 감지했습니다. 이 유틸리티는 당신이 비활성화하거나 제거하는 것이 좋습니다 {0}.에 문제를 일으킨다 고 알려져있다. - - - 호환성 문제 감지 - - - btnIcon_Click 실패! - - - ShowHideGridItems 실패! - - - IconMenu_Click 실패! - - - 속성 그리드 오브젝트 실패! - - - SetHostStatus 실패! - - - pGrid_PopertyValueChanged 실패! - - - 구성 UI 로드 실패! - - - 패널을 닫으시겠습니까 "{0}"? 포함 된 모든 연결도 닫힙니다. - - - 외부 도구를 삭제 하시겠습니까 "{0}"? - - - 선택한 외부 도구를 삭제 하시겠습니까 "{0}"? - - - 연결을 삭제 하시겠습니까 "{0}"? - - - 당신이 빈 폴더를 삭제 하시겠습니까 "{0}"? - - - 폴더를 삭제 하시겠습니까 "{0}"? 포함 된 모든 폴더 또는 연결도 삭제됩니다. - - - 열려있는 모든 연결을 닫으시겠습니까? - - - 기본 레이아웃 패널을 재설정 하시겠습니까? - - - 연결 - - - 전체 화면 모드에서 연결 - - - 연결 중 ... - - - 프로토콜 이벤트 연결 - - - 사용자 "{2}"가 설정한 "{1}"을 통해 "{0}"에 연결 (설명 : "{3}", 사용자 필드 : "{4}") - - - 연결 실패! - - - 프로토콜 이벤트 오류 발생. - - - 열기 연결에 실패했습니다! - - - 연결을 열 수 없습니다 : 호스트 이름 지정이 안됨! - - - 연결 - - - 기본 포트를 설정할 수 없습니다! - - - 연결 파일의 백업을 생성 할 수 없습니다! - - - 연결 파일은 "{0}"를 로드 할 수 없습니다! - - - 연결 파일은 "{0}"를 로드 할 수 없습니다! -새로운 연결 파일과 함께 시작. - - - "{0}"로 연결 파일을 저장할 수 없습니다! - - - 자격 증명없이 연결 - - - 세션을 콘솔에 연결 - - - 연결 (옵션 사용) - - - 사용자 {2}이(가) {1} 통해 {0}에 연결. - - - 연결 이벤트 닫힘. - - - 연결 이벤트 담힘 실패. - - - 새로운 연결 파일을 생성 할 수 없습니다! - - - FilteredPropertyGrid에서의 ToolStrip 컨트롤을 찾을 수 없습니다. - - - 검색 - - - 콘솔 세션에 연결하지 않음 - - - 인증에 실패하면 연결하지 않음 - - - 더블 클릭으로 탭 닫기 - - - 다운로드 및 설치 - - - 복제 - - - 암호를 사용하지 않고 계속 하시겠습니까? - - - 빈 사용자 이름, 비밀번호 또는 도메인 필드의 경우 다음을 사용 : - - - 연결 파일을 완전히 암호화 - - - 최종 IP - - - 최종 포트 - - - AddExternalToolsToToolBar (frmMain)가 실패. {0} - - - AddFolder (UI.Window.ConnectionTreeWindow)가 실패. {0} - - - 데이터베이스 버전 {0}은 (는)이 버전의 {1}과 호환되지 않습니다. - - - 연결 목록을 저장할 수 없습니다. - - - PuTTY를 시작할 수 없습니다. - - - 암호 해독에 실패. {0} - - - 암호화에 실패. {0} - - - 오류 - - - 시작 연결 파일을로드 할 수 없습니다. {0} {0} {2} {0} {3} {0} {0} 데이터 손실을 방지하기 위해 {1}을 종료합니다. - - - VerifyDatabaseVersion (Config.Connections.Save)이 실패. {0} - - - 모든 폴더 확장 - - - 실험적 - - - 내보내기 - - - 모든 항목 내보내기 - - - 파일 내보내기 - - - 항목 내보내기 - - - 속성 내보내기 - - - 현재 선택된 연결 내보내기 - - - 현재 선택된 폴더 내보내기 - - - 파일 내보내기(&E) - - - 새로운 외부 도구 - - - 파일 형식(&F): - - - 모든 파일 (*.*) - - - 가져올 수있는 모든 파일 - - - 응용 프로그램 파일 (*.exe) - - - mRemote CSV 파일 (*.csv) - - - mRemote XML 파일 (*.XML) - - - PuTTY 연결 관리자 파일 - - - 원격 데스크톱 연결 관리자 파일 (*.rdg) - - - RDP 파일 (*.rdp) - - - {0} 상속 - - - 상속 된 속성에 대한 설명 : {0} - - - Free - - - 전체 화면 - - - 일반 - - - "{1}"에서 "{0}"에 대한 연결 항목을로드하는 중 오류가 발생. {2} - - - 자동 다시 연결 - - - 외부 도구 속성 - - - 파일 - - - 호스트 - - - HTTP - - - HTTP 연결 실패! - - - 새로운 HTTP 연결을 만들 수 없습니다! - - - HTTP 문서 타일 변경 실패! - - - 인터넷 익스플로러 - - - HTTPS - - - HTTP Props 설정에 실패! - - - "빠른"접두어를 추가하여 빠른 연결 탭을 확인하십시오. - - - Active Directory에서 가져 오기 - - - "{0}"파일을 가져 오는 중 오류가 발생했습니다. - - - 파일에서 가져 오기(&F) ... - - - 포트 검사에서 가져 오기 - - - 정보 - - - Dispose of Int App process failed! - - - Int App Focus Failed! - - - Int App Handle: {0} - - - Killing Int App Process failed! - - - Int App Resize failed! - - - --- IntApp Stuff --- - - - Int App Title: {0} - - - 주소: - - - 연결을 닫을 때 : - - - 표시 이름 - - - 도메인 - - - 호스트 이름 : - - - 휴대용 버전 - - - PuTTY 세션을 구성하려면이 단추를 누르십시오: - - - Maximum PuTTY and integrated external tools wait time: - - - GNU 일반 공중 사용 허가서 (GPL) - - - - - - 아래 목록에서 패널을 선택하거나 새로 만들기를 클릭하여 새 패널을 추가하십시오. 확인을 클릭하여 계속하십시오. - - - 서버 상태 : - - - 데이터 베이스: - - - 검증: - - - 언어 - - - (자동 감지) - - - 언어 변경 사항이 적용 되려면 {0}를 다시 시작해야합니다. - - - SQL에서 로드 실패 - - - 연결 정보를 SQL 서버에서 로드 할 수 없습니다. - - - XML에서 로드 실패! - - - 로컬 파일 - - - 로컬 파일이 존재하지 않습니다! - - - 연결 패널 추가 - - - 업데이트 확인 - - - 구성 - - - 연결 패널 - - - 복사 - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - 외부 도구를 삭제 ... - - - 기부 - - - 중복 탭 - - - 종료 - - - 외부 도구 모음 - - - 파일(&F) - - - 도움말(&H) - - - mRemoteNG 도움말 - - - 외부 도구 실행 - - - 새 연결 파일 - - - 새로운 외부 도구 - - - 알림 - - - 모두 복사 - - - 모두 삭제 - - - 연결 파일 열기 ... - - - 옵션 - - - 포트 스캔 - - - 빠른 연결 도구 모음 - - - 다시 연결 - - - 화면 새로 고침 (VNC) - - - 탭 이름 바꾸기 - - - 버그 신고 - - - 레이아웃 재설정 - - - 연결 파일 저장 - - - 연결 파일 다른 이름으로 저장 ... - - - 특수 키 보내기 (VNC) - - - 도움말 텍스트 표시 (&H) - - - 텍스트 표시 - - - SmartSize (RDP / VNC) - - - SSH 파일 전송 - - - 채팅 시작 (VNC) - - - 지원 포럼 - - - 도구(&T) - - - 파일 전송 (SSH) - - - 보기(&V) - - - 보기 전용 (VNC) - - - 웹 사이트 - - - 알림 영역 최소화 - - - 아래로 이동 - - - 위로 이동 - - - mRemoteNG CSV - - - mRemoteNG XML - - - 내 현재 자격 증명 (Windows 로그온 정보) - - - 없음 - - - 새 연결 - - - 새 폴더 - - - 새로운 패널 - - - 새로운 제목 - - - 아니요 - - - 압축 안함 - - - No Ext. App specified. - - - 없음 - - - 표준 - - - No SmartSize - - - 사용 가능한 업데이트가 없습니다. - - - 매우 초기 버전의 mRemote를 사용하여 생성 된 연결 파일을로드하려고하면 런타임 오류가 발생할 수 있습니다. -이러한 오류가 발생하면 새 연결 파일을 만드십시오! - - - 현재 선택된 탭의 오른쪽에 새 탭을 열기 - - - 열린 포트 - - - 테스트 ... - - - 테마 - - - 삭제(&D) - - - 새로운(&N) - - - 패널 이름 - - - 암호 보호 - - - 두 암호가 일치해야합니다. - - - 암호는 3 자 이상이어야합니다. - - - 모든 입력란을 채우십시오. - - - 포트 스캔 완료. - - - 포트 스캔 패널을 로드 할 수 없습니다! - - - 연결할 호스트 이름 또는 IP를 입력하십시오. - - - 모든 상속 옵션을 토글합니다. - - - 이 연결에서 사용할 인증 수준을 선택하십시오. - - - VNC 서버에 대한 인증 방법을 선택하십시오. - - - 창 크기를 조정할 때 또는 전체 화면 모드를 전환 할 때 자동으로 연결의 크기를 조정할지 여부를 선택하십시오. RDC 8.0 이상이 필요합니다. - - - 비트 맵 캐싱 사용 여부를 선택하십시오. - - - 사용할 색 품질을 선택하십시오. - - - 사용할 압축 값을 선택하십시오. - - - 여기에 호스트에 대한 메모 나 설명을 입력하십시오. - - - 원격 호스트의 테마를 표시하려면 "예"를 선택하십시오. - - - 원격 호스트의 배경 화면을 표시하려면 "예"를 선택하십시오. - - - 도메인을 입력하십시오. - - - 바탕 화면 구성을 사용할지 여부를 선택하십시오. - - - 글꼴 다듬기 사용 여부를 선택하십시오. - - - 사용할 인코딩 모드를 선택하십시오. - - - 시작할 외부 도구를 선택하십시오. - - - 원격 호스트와의 연결 해제 후 시작할 외부 도구를 선택하십시오. - - - 원격 호스트에 연결되기 전에 시작할 외부 도구를 선택하십시오. - - - 호스트에 연결될 때 표시 될 아이콘을 선택하십시오. - - - 로드 밸런싱 라우터가 최적의 서버를 선택하는 데 사용할로드 균형 조정 정보를 지정합니다. - - - 외부 도구에서 사용하려는 경우 원격 호스트의 MAC 주소를 입력하십시오. - - - 연결 트리에 표시 될 이름입니다. - - - 연결이 열리는 패널을 지정. - - - 암호 입력. - - - 선택한 프로토콜이 수신중인 포트를 입력. - - - mRemoteNG가 호스트에 연결하는 데 사용해야하는 프로토콜 선택. - - - 연결시 사용할 PuTTY 세션 선택. - - - 사용자가 RD 게이트웨이 서버에 연결하기 위해 제공하는 도메인 이름 지정. - - - 원격 데스크톱 게이트웨이 서버의 호스트 이름을 지정. - - - RD 게이트웨이 (원격 데스크톱 게이트웨이) 서버를 사용할시기를 지정. - - - 연결과 동일한 사용자 이름 및 암호를 사용하여 게이트웨이에 로그온할지 여부를 지정. - - - 사용자가 RD 게이트웨이 서버에 연결하기 위해 제공하는 사용자 이름을 지정. - - - 로컬 디스크 드라이브를 원격 호스트에 표시할지 여부 선택. - - - 키 조합 (예 : Alt-Tab)을 원격 호스트로 리디렉션해야하는지 여부 선택. - - - 로컬 포트 (예 : com, parallel)를 원격 호스트에 표시할지 여부 선택. - - - 로컬 프린터를 원격 호스트에 표시할지 여부 선택. - - - 원격 호스트에서 로컬 스마트 카드를 사용할 수 있어야하는지 여부 선택. - - - 원격 사운드를 리디렉션하는 방법 선택. - - - HTML을 표시하는 데 사용할 수있는 렌더링 엔진 중 하나 선택. - - - 이 연결이 열리는 해상도 또는 모드를 선택. - - - 사용할 SmartSize 모드 선택. - - - 원격 호스트의 콘솔 세션에 연결하십시오. - - - 사용 가능한 경우 인증에 CredSSP (Credential Security Support Provider)를 사용하십시오. - - - 여기에 필요한 정보를 언제든지 입력하십시오. - - - 사용자 이름 입력. - - - 호스트에 대한보기 전용 연결을 설정하려면 "예"를 선택하십시오. - - - 사용할 프록시 주소 입력. - - - 프록시 인증을위한 비밀번호를 입력하십시오. - - - 프록시 서버가 수신하는 포트를 입력하십시오. - - - 프록시를 사용하여 VNC 연결을 터널링하는 경우 해당 유형을 선택하십시오. - - - 프록시 인증을위한 사용자 이름을 입력하십시오. - - - 호스트 이름 / IP - - - 모든 - - - 서버 인증 - - - 인증 모드 - - - 자동 크기 조정 - - - 캐시 비트 맵 - - - - - - 압축 - - - 설명 - - - 테마 표시 - - - 바탕 화면 표시 - - - 바탕 화면 구성 - - - 글꼴 다듬기 - - - 인코딩 - - - 외부 도구 - - - External Tool After - - - External Tool Before - - - 로드 균형 정보 - - - MAC 주소 - - - 이름 - - - 패널 - - - 암호 - - - 포트 - - - PuTTY 세션 - - - 게이트웨이 도메인 - - - 게이트웨이 호스트 이름 - - - 원격 데스크톱 게이트웨이 암호 - - - 게이트웨이 사용 - - - 게이트웨이 자격 증명 - - - 게이트웨이 사용자 이름 - - - 디스크 드라이브 - - - 키 조합 - - - 포트 - - - 프린터 - - - 사운드 - - - 렌더링 엔진 - - - 해상도 - - - SmartSize 모드 - - - 콘솔 세션 사용 - - - CredSSP 사용 - - - 입력란 사용 - - - 프록시 주소 - - - 프록시 암호 - - - 프록시 포트 - - - 프록시 유형 - - - 프록시 사용자 이름 - - - 프로토콜 이벤트 연결이 끊어졌습니다. -메시지: -{0} - - - 프로토콜 이벤트 연결이 끊어졌습니다. -{0} - - - 가져올 프로토콜 - - - 프록시 테스트 실패! - - - 프록시 테스트 성공! - - - PuTTY 프로세스 폐기 실패! - - - 포커스를 설정할 수 없습니다! - - - Putty Handle: {0} - - - PuTTY 프로세스를 죽이지 못했습니다! - - - 패널 핸들 : {0} - - - PuTTY 크기 조정 실패! - - - PuTTY 저장된 세션 - - - PuTTY 설정 - - - PuTTY 설정 대화 상자가 표시되지 않았습니다! - - - --- PuTTY Stuff --- - - - PuTTY 타이틀 : {0} - - - 빠른 : {0} - - - 빠른 연결 - - - 빠른 연결 추가 실패! - - - 빠른 연결 만들기 실패 - - - 연결 종료시 경고 (&A) - - - mRemoteNG를 종료 할 때만 경고(&X) - - - 여러 연결을 닫을 때만 경고(&M) - - - 연결을 종료 할 때 경고하지 않음(&N) - - - RAW - - - RDP - - - 16,777,216 색 (24 비트) - - - 256 색 (8 비트) - - - 32768 색 (15 비트) - - - 16,777,216 색 (32 비트) - - - 65536 색 (16 비트) - - - RDP 컨트롤을 만들 수 없습니다. mRemoteNG 요구 사항을 확인하십시오. - - - 커서 깜박임 해제 - - - 커서 그림자 해제 - - - 전체 창 끌기 해제 - - - 메뉴 애니메이션 해제 - - - RDP 연결 끊기 실패, 닫기 시도! - - - 내부 오류 코드 1. - - - 내부 오류 코드 2. - - - 내부 오류 코드 3. 유효한 상태가 아닙니다. - - - 내부 오류 코드 4. - - - 클라이언트 연결 중에 복구 할 수없는 오류가 발생했습니다. - - - GetError 변경 (FatalErrors) - - - 메모리 부족 오류가 발생했습니다. - - - 알 수없는 오류가 발생했습니다. - - - 창 생성 오류가 발생했습니다. - - - Winsock 초기화 오류입니다. - - - 패널 맞추기 - - - RDP 초점 실패! - - - RD 게이트웨이가 지원됩니다. - - - RD 게이트웨이는 지원되지 않습니다! - - - RDP 재 연결 수 : - - - RDP SetAuthenticationLevel 실패! - - - RDP SetUseConsoleSession 실패! - - - RDC {0}에 대한 콘솔 스위치 설정 중입니다. - - - RDP setCredentials 실패! - - - RDP SetEventHandlers 실패! - - - RDP SetRDGateway 실패! - - - RDP SetPerformanceFlags 실패! - - - RDP SetPort 실패! - - - RDP SetProps 실패! - - - RDP 설정 리디렉션 실패! - - - RDP 설정 리디렉션 키 실패! - - - RDP 해상도 설정 실패! - - - 컴퓨터 가져 오기 - - - 재생 금지 - - - 원격 컴퓨터 나가기 - - - RDP 전체화면 전환 실패! - - - RDP SmartSize 전환 실패! - - - 시작시 이전에 열린 세션에 다시 연결 - - - 원격 파일 - - - 모두 제거 - - - 이름 바꾸기 - - - Rlogin - - - 저장 - - - 모두 저장 - - - 다른 연결 파일을로드하기 전에 현재 연결 파일을 저장 하시겠습니까? - - - 종료시 연결 저장 - - - Graphics Interchange Format File (.gif) | * .gif | Joint Photographic Experts Group 파일 (.jpeg) | * .jpeg | Joint Photographic Experts Group 파일 (.jpg) | * .jpg | Portable Network Graphics File (.png) | * .png - - - 화면 - - - 스크린 샷 - - - 스크린 샷 - - - 검색 - - - 보내기 ... - - - 연결을 만들거나 이름을 변경할 때 표시 이름과 같은 호스트 이름 설정 - - - 설정을 저장하거나 시스 트레이 아이콘을 삭제할 수 없습니다! - - - 연결 트리에 설명 툴팁 표시 - - - 창 제목에 전체 연결 파일 경로 표시 - - - 탭 이름에 로그온 정보 표시 - - - 탭 이름에 프로토콜 표시 - - - 연결을 한번 클릭하면 열기 - - - 연결 트리에서 열린 연결을 한 번 클릭하면 열린 연결 탭으로 전환. - - - Socks 5 - - - 정렬 - - - 오름차순 (A-Z) - - - 내림차순 (Z-A) - - - 자세한 정보는 도움말 - 시작하기 - SQL 구성을 참조하십시오! - - - SQL 서버 - - - SSH 버전 1 - - - SSH 버전 2 - - - SSH 배경 전송 실패! - - - SSH 전송에 실패했습니다. - - - 시작 IP - - - 시작 포트 - - - 시작 / 종료 - - - 상태 - - - 알림 패널에서 다음으로 전환 : - - - 고급 - - - 탭 & 패널 - - - 업데이트 - - - Telnet - - - 다음 : - - - 오류 ({0}) - - - 정보 ({0}) - - - 암호 - - - {0} 비밀번호 - - - 선택 패널 - - - 경고 ({0}) - - - 전송 - - - 통합 시도 - - - Ultra VNC Repeater - - - UltraVNC SingleClick port: - - - 저장하지 않으려는 속성을 선택 취소하십시오! - - - mRemoteNG에는 업데이트가 필요합니다. - - - mRemoteNG는 주기적으로 mRemoteNG 웹 사이트에 연결하여 업데이트를 확인합니다. - - - 업데이트 정보를 다운로드 할 수 없습니다. - - - 다운로드 완료! -mRemoteNG는 이제 종료되고 설치로 시작됩니다. - - - 업데이트를 다운로드 할 수 없습니다. - - - 업데이트 다운로드가 시작되지 않을 수 있습니다. - - - {0} 일마다 - - - 매일 - - - 매월 - - - 매주 - - - 변경 로그를 다운로드 할 수 없습니다. - - - 다른 사용자 이름과 암호 사용 - - - 사용자 - - - 동일한 사용자 이름과 암호 사용 - - - 스마트 카드 사용 - - - SQL Server를 사용하여 연결로드 및 저장 - - - 버전 - - - VNC - - - VNC 연결 끊기 실패! - - - VNC 화면 새로 고침 실패! - - - VNC 특수 키 보내기 실패! - - - VNC 이벤트 처리기 설정 실패! - - - VNC 설정 실패! - - - VNC SmartSize 전환 실패! - - - VNC 보기 전용 전환 실패! - - - 인증 실패시 경고 - - - 경고 - - - - - - RDP 연결 시간 초과 - - - 이 노드는 이미 이 폴더에 있습니다. - - - 노드를 자체로 드래그 할 수 없습니다. - - - 상위 노드를 하위 노드로 끌 수 없습니다. - - - 이 노드는 드래그 할 수 없습니다. - - - 블록 암호 모드 - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.lt.resx b/mRemoteNG/Language/Language.lt.resx deleted file mode 100644 index 4b3af83d0..000000000 --- a/mRemoteNG/Language/Language.lt.resx +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Place search bar above connection tree - - - Select the color quality to be used. - - - Colors - - - 16777216 Colors (24-bit) - - - 256 Colors (8-bit) - - - 32768 Colors (15-bit) - - - 16777216 Colors (32-bit) - - - 65536 Colors (16-bit) - - - Active Directory - - - The Windows security setting, "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing", is enabled. - -See the Microsoft Support article at http://support.microsoft.com/kb/811833 for more information. - -{0} is not fully FIPS compliant. Click OK to proceed at your own discretion, or Cancel to Exit. - - - Internet Explorer - - - None - - - Select whether clipboard should be shared. - - - Clipboard - - - Warning: Restart is required to commit any theme configuration change. - - - Must Be Between 0 and 255 - - - Out Of Range - - - Delete... - - - Reconnect All Connections - - - UltraVNC SingleClick - - - Disconnect All But This - - - An error occurred while trying to reconnect to RDP host '{0}' - - - An error occurred while trying to change the connection resolution to host '{0}' - - - Stack trace - - - Exception Message - - - mRemoteNG Unhandled Exception - - - An unhandled exception has occurred - - - This exception will force mRemoteNG to close - - - Copy Hostname - - - Track active connection in the connection tree - - - Always show connection tabs - - - Release Channel - - - Stable channel includes final releases only. -Preview channel includes Betas & Release Candidates. -Nightly Channel includes Alphas, Betas & Release Candidates. - - - Apply - - - Proxy - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.nb-NO.resx b/mRemoteNG/Language/Language.nb-NO.resx deleted file mode 100644 index 449cb202b..000000000 --- a/mRemoteNG/Language/Language.nb-NO.resx +++ /dev/null @@ -1,2008 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Om - - - AddNodeFromXML mislyktes! - - - Tillat bare én instans av programmet (omstart av mRemoteNG påkrevd) - - - Alltid - - - Alltid koble til, selv om autentisering feiler - - - Alltid vis panelvalgdialog når tilkoblinger åpnes - - - Alltid vis panelfaner - - - Alltid vis ikon i notisfeltet - - - Spør meg igjen senere - - - Tilpass innstillingene nå - - - Bruk de anbefalte innstillingene - - - {0} kan automatisk se etter oppdateringer som kan tilby ny funksjonalitet og feilrettinger. Det er anbefalt at du lar {0} se etter oppdateringer ukentlig. - - - Innstillinger for automatiske oppdateringer - - - Aspekt - - - Lagre automatisk hvert: - - - Gjeldende versjon - - - &Bla gjennom... - - - &Avbryt - - - Endre - - - &Lukk - - - Standard arv - - - Standardegenskaper - - - Koble fra - - - Ikon - - - &Importer - - - Arv - - - Start PuTTY - - - &OK - - - Egenskaper - - - &Søk - - - &Stopp - - - Test proxy - - - Kan ikke starte portskanning, feil IP-format! - - - Utseende - - - Tilkobling - - - Skjerm - - - Gateway - - - Diverse - - - Protokoll - - - Omdiriger - - - Sjekk mislyktes! - - - Forsøk å automatisk koble til på nytt ved frakobling fra server (kun RDP && ICA) - - - Ikke vis denne meldingen igjen. - - - Denne proxyserveren krever autentisering - - - Bruk egendefinert sti til PuTTY: - - - Koble til på nytt når klar - - - Bruk proxyserver for tilkobling - - - Brukernavn - - - Vent på avslutning - - - Sjekk igjen - - - Se etter oppdateringer og kunngjøringer ved oppstart - - - Sjekk nå - - - Sjekk for korrekt installasjon av komponenter ved oppstart - - - Velg panel før tilkobling - - - Lukkede porter - - - Slå sammen alle mapper - - - Argumenter - - - Filnavn - - - Melding - - - Kunne ikke tolke kommandolinjeargumenter! - - - {0} har oppdaget at Lenovo Auto Scroll-verktøyet kjører på dette systemet. Dette verktøyet er kjent for å forårsake problemer med {0}. Det anbefales at du deaktiverer eller avinstallerer dette programmet. - - - Kompatibilitetsproblem oppdaget - - - btnIcon_Click mislyktes! - - - ShowHideGridItems mislyktes! - - - IconMenu_Click mislyktes! - - - Property Grid-objekt mislyktes! - - - SetHostStatus mislyktes! - - - pGrid_PopertyValueChanged mislyktes! - - - Innlasting av Konfigurasjonsgrensesnitt mislyktes! - - - Er du sikker på at du ønsker å lukke panelet "{0}"? Alle tilkoblinger den inneholder vil også bli lukket. - - - Er du sikker på at du ønsker å slette det eksterne verktøyet "{0}"? - - - Er du sikker på at du ønsker å slette de {0} valgte eksterne verktøyene? - - - Er du sikker på at du ønsker å slette tilkoblingen "{0}"? - - - Er du sikker på at du ønsker å slette den tomme mappen "{0}"? - - - Er du sikker på at du ønsker å slette mappen "{0}"? Alle undermapper eller tilkoblinger den inneholder vil også bli slettet. - - - Ønsker du å avslutte alle åpne tilkoblinger? - - - Er du sikker på at du ønsker å tilbakestille alle paneler til standardoppsett? - - - Koble til - - - Koble til i fullskjermmodus - - - Kobler til... - - - Protokollhendelse tilkoblet - - - Tilkobling til "{0}" via "{1}" etablert av bruker "{2}" (Beskrivelse: "{3}"; Brukerfelt "{4}") - - - Tilkobling mislyktes! - - - Feil i tilkoblingsprotokoll har oppstått. Vertt: "{1}"; Feilkode: "{2}"; Feilbeskrivelse: "{0}" - - - Åpning av tilkobling mislyktes! - - - Kan ikke åpne forbindelse: Vertsnavn ikke angitt! - - - Tilkoblinger - - - Kunne ikke angi standardport! - - - Kunne ikke opprette sikkerhetskopi av tilkoblingsfilen! - - - Tilkoblingsfilen "{0}" kunne ikke lastes inn! - - - Tilkoblingsfilen "{0}" kunne ikke lastes inn! -Starter med ny tilkoblingsfil. - - - Kunne ikke lagre tilkoblingsfilen som "{0}"! - - - Koble til konsolløkt - - - Koble til (med alternativer) - - - Tilkobling til {0} via {1} ble avsluttet av bruker {2}. - - - Tilkoblingshendelse avsluttet - - - Tilkoblingshendelse avsluttet feilet! - - - Kunne ikke opprette ny tilkoblingsfil! - - - Fant ikke ToolStrip-kontroll i FilteredPropertyGrid. - - - Oppdag - - - Ikke koble til dersom godkjenning mislykkes - - - Dobbeltklikk på fanen lukker den - - - Last ned og installer - - - Duplikat - - - Ønsker du å fortsette uten passord? - - - For tomt brukernavn, passord eller domenefelt, bruk: - - - Krypter tilkoblingsfil fullstendig - - - Siste IP - - - Siste port - - - AddExternalToolsToToolBar (frmMain) mislyktes. {0} - - - AddFolder (UI.Window.Tree) mislyktes. {0} - - - Databaseversjonen {0} er ikke kompatibel med denne versjonen av {1}. - - - Tilkoblingslisten kan ikke lagres. - - - Dekryptering mislyktes. {0} - - - Kryptering mislyktes. {0} - - - Feil - - - Kan ikke laste inn oppstartstilkoblingsfilen.{0}{0}{2}{0}{3}{0}{0}For å hindre tap av data, avsluttes {1} nå. - - - VerifyDatabaseVersion (Config.Connections.Save) mislyktes. {0} - - - Utvid alle mapper - - - Eksperimentell - - - Eksporter - - - Alle filer (*.*) - - - Programfiler (*.exe) - - - mRemote CSV-filer (*.csv) - - - mRemote XML-filer (*.xml) - - - RDP-filer (*.rdp) - - - Arve {0} - - - Beskrivelse av arvet egenskap: {0} - - - Fri - - - Fullskjerm - - - Generelt - - - Det oppstod en feil under innlasting av tilkoblingsoppføring for "{0}" fra "{1}". {2} - - - Koble til på nytt automatisk - - - Egenskaper for eksterne verktøy - - - Filer - - - Vert - - - HTTP-tilkobling mislyktes! - - - Kunne ikke opprette ny HTTP-tilkobling! - - - Endring av HTTP-dokumentflate mislyktes! - - - Angi HTTP-egenskaper mislyktes! - - - Identifisere hurtigkoblingsfaner ved prefikset "Hurtig:" - - - Importer fra Active Directory - - - Import fra Port Scan - - - Informasjon - - - Forkasting av Int App-prosess mislyktes! - - - Int App-fokus mislyktes! - - - Int App Handle: {0} - - - Tvungen avslutning av Int App-prosess mislyktes! - - - Int App Resize mislyktes! - - - --- IntApp-ting --- - - - Int App-tittel: {0} - - - Adresse: - - - Ved lukking av tilkoblinger: - - - Visningsnavn - - - Domene - - - Vertsnavn: - - - Portable Edition - - - Klikk denne knappen for å konfigurere PuTTY-sesjoner: - - - Maksimal ventetid for PuTTY og integrerte verktøy: - - - Utgitt under GNU General Public License (GPL) - - - sekunder - - - Velg et panel fra listen under eller klikk Ny for å legge til en ny. Klikk OK for å fortsette. - - - Serverstatus: - - - Database: - - - Bekreft: - - - Språk - - - (Oppdag automatisk) - - - {0} må startes på nytt for at endringer i språkinnstillinger skal tre i kraft. - - - Innlasting fra SQL mislyktes! - - - Innlasting fra XML mislyktes! - - - Lokal fil - - - Lokal fil eksisterer ikke! - - - Legg til tilkoblingspanel - - - Se etter oppdateringer - - - Oppsett - - - Tilkoblingspaneler - - - Kopier - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - Slett eksternt verktøy... - - - Donér - - - Kopier fane - - - A&vslutt - - - Eksterne verktøy-verktøylinje - - - &Fil - - - &Hjelp - - - mRemoteNG-hjelp - - - Kjør eksternt verktøy - - - Ny tilkoblings&fil - - - Nytt eksternt verktøy - - - Varslinger - - - Kopier alle - - - Slett alle - - - Åpne tilkoblingsfil... - - - Alternativer - - - Portskanning - - - Hurtigtilkoblingsverktøylinje - - - Koble til på nytt - - - Oppdater skjerm (VNC) - - - Gi nytt navn til fane - - - Rapporter en feil - - - Tilbakestill oppsett - - - Lagre tilkoblingsfil - - - Lagre tilkoblingsfilen &som... - - - Send spesialtastekombinasjoner (VNC) - - - &Vis hjelpetekst - - - Vis tekst - - - SmartSize (RDP/VNC) - - - SSH-filoverføring - - - Start chat (VNC) - - - Forum for brukerstøtte - - - V&erktøy - - - Overfør fil (SSH) - - - &Vis - - - Kun visning (VNC) - - - Nettsted - - - Minimer til notisområde - - - Flytt ned - - - Flytt opp - - - Min gjeldende legitimasjon (Windows-påloggingsinformasjon) - - - Aldri - - - &Ny tilkobling - - - Ny &mappe - - - Nytt panel - - - Ny tittel - - - Nei - - - Ingen komprimering - - - Ingen ekstern applikasjon spesifisert. - - - Ingen - - - Normal - - - Ingen SmartSize - - - Ingen oppdateringer tilgjengelig - - - Du prøver å laste inn en tilkoblingsfil opprettet i en veldig tidlig versjon av mRemote. Dette kan føre til kjørefeil. Hvis du støter på en slik feil, vennligst opprett en ny tilkoblingsfil! - - - Åpne ny fane til høyre for aktiv fane - - - Åpne porter - - - Tema - - - &Slett - - - &Ny - - - Panelnavn - - - Passordbeskyttelse - - - Vennligst fyll inn alle felt - - - Kunne ikke laste inn portskanningpanelet! - - - Angi vertsnavnet eller IP-adressen du ønsker å koble til. - - - Veksle alle alternativer for arv. - - - Velg hvilket autentiseringsnivå denne tilkoblingen skal bruke. - - - Velg hvordan du ønsker å autentisere deg mot VNC-serveren. - - - Velg om du vil bruke hurtigbufring av punktgrafikk eller ikke. - - - Velg hvilken fargekvalitet som skal brukes. - - - Velg kompresjonsverdien som skal brukes. - - - Skriv inn notater eller en beskrivelse for verten her. - - - Velg ja hvis den eksterne vertens tema skal vises. - - - Velg ja hvis den eksterne vertens bakgrunnsbilde skal vises. - - - Skriv inn domenenavn. - - - Velg om du vil bruke skrivebordskomposisjon eller ikke. - - - Velg om du vil bruke skriftutjevning eller ikke. - - - Velg hvilken tekstkodingsmodus som skal brukes. - - - Velg det eksterne verktøyet som skal startes. - - - Velg et eksternt verktøy som skal startes etter frakobling fra den eksterne verten. - - - Velg et eksternt verktøy som skal startes før tilkoblingen til den eksterne verten er opprettet. - - - Velg et ikon som skal vises når man er tilkoblet verten. - - - Angi MAC-adressen til den eksterne verten dersom du ønsker å bruke denne i et eksternt verktøy. - - - Dette er navnet som vises i tilkoblingstreet. - - - Angir panelet tilkoblingen vil åpnes i. - - - Skriv inn ditt passord. - - - Angi porten den valgte protokollen lytter på. - - - Velg protokollen mRemoteNG skal bruke for å koble til verten. - - - Velg en PuTTY-sesjon som skal brukes ved tilkobling. - - - Angir navnet på domenet som brukeren oppgir for å koble til RD Gateway-serveren. - - - Angir vertsnavnet til Remote Desktop Gateway-serveren. - - - Angir når en server for eksternt skrivebord (ES-Gateway) skal brukes. - - - Angir om pålogging til gatewayen skal skje med det samme brukernavnet og passordet som tilkoblingen eller ikke. - - - Angir brukernavnet som brukeren oppgir for å koble til RD Gateway-serveren. - - - Velg om lokale diskstasjoner skal vises på den eksterne verten. - - - Velg om tastekombinasjoner (f.eks. Alt-Tab) skal omadresseres til den eksterne verten. - - - Velg om lokale porter (dvs. com, parallell) skal vises på den eksterne verten. - - - Velg om lokale skrivere skal vises på den eksterne verten. - - - Velg om lokale smartkort skal være tilgjengelig på den eksterne verten. - - - Velg hvordan ekstern lyd skal omadresseres. - - - Velg en av de tilgjengelige renderingsmotorene som skal brukes til å vise HTML. - - - Velg oppløsning eller modus denne tilkoblingen skal åpnes i. - - - Velg SmartSize-modus som skal brukes. - - - Koble til konsolløkten på den eksterne verten. - - - Bruk Credential Security Support Provider (CredSSP) for godkjenning hvis den er tilgjengelig. - - - Skriv inn informasjon du trenger her. - - - Skriv inn ditt brukernavn. - - - Velg Ja hvis du vil opprette en kun-visning-tilkobling til verten. - - - Angi proxy-adressen som skal brukes. - - - Skriv inn passordet for autentisering mot proxy. - - - Angi porten proxy-serveren lytter på. - - - Hvis du bruker en proxy til å tunnelere VNC-tilkoblinger, velg hvilken type proxy det er. - - - Skriv inn ditt brukernavn for godkjenning mot proxy. - - - Vertsnavn/IP-adresse - - - Alle - - - Server-godkjenning - - - Godkjenningsmodus - - - Hurtigbufring av punktgrafikk - - - Farger - - - Komprimering - - - Beskrivelse - - - Visningstemaer - - - Vis bakgrunnbilde - - - Skrivebordskomposisjon - - - Skriftutjevning - - - Tekstkoding - - - Eksternt verktøy - - - Eksternt verktøy etter - - - Eksternt verktøy før - - - MAC-adresse - - - Navn - - - Panel - - - Passord - - - Port - - - PuTTY-sesjon - - - Gateway-domene - - - Gateway-vertsnavn - - - Gateway for eksternt skrivebord-passord - - - Bruk gateway - - - Legitimasjon for gateway - - - Gateway-brukernavn - - - Diskstasjoner - - - Tastekombinasjoner - - - Porter - - - Skrivere - - - Lyder - - - Renderingsmotor - - - Oppløsning - - - SmartSize-modus - - - Bruk konsolløkt - - - Bruk CredSSP - - - Brukerfelt - - - Proxy-adresse - - - Proxy-passord - - - Proxy-port - - - Proxy-type - - - Proxy-brukernavn - - - Protokollhendelse Frakoblet. Vert: "{1}"; Protokoll: "{2}" Beskjed: "{0}" - - - Protokollhendelse Frakoblet mislyktes. -{0} - - - Protokoll å importere - - - Proxy-test mislyktes! - - - Proxy-test var vellykket! - - - Avslutning av PuTTY-prosessen mislyktes! - - - Kunne ikke sette fokus! - - - Putty Handle: {0} - - - Avslutning av PuTTY-prosess mislyktes! - - - Panel Handle: {0} - - - Endring av størrelse på PuTTY-vindu mislyktes! - - - PuTTY lagrede sesjoner - - - PuTTY-innstillinger - - - Vis dialog for PuTTY-innstillinger mislyktes! - - - --- PuTTY-ting --- - - - PuTTY-tittel: {0} - - - Hurtig: {0} - - - Hurtigtilkobling - - - Kunne ikke legge til hurtigtilkobling! - - - Oppretting av hurtigtilkobling mislyktes - - - &Advar meg når tilkoblinger lukkes - - - Advar meg bare ved a&vslutning av mRemoteNG - - - Advar meg bare ved lukking av &mange tilkoblinger samtidig - - - &Ikke advar meg når tilkoblinger lukkes - - - RAW - - - RDP - - - 16777216 farger (24-biters) - - - 256 farger (8-biters) - - - 32768 farger (15-biters) - - - 16777216 farger (32-biters) - - - 65536 farger (16-biters) - - - Kunne ikke opprette RDP-kontroll, vennligst kontroller mRemoteNGs systemkrav. - - - Deaktiver blinkende markør - - - Deaktiver markørskygge - - - Deaktiver fullvindudragning - - - Deaktiver menyanimasjoner - - - RDP-frakobling mislyktes, forsøker å lukke! - - - Intern feilkode 1. - - - Intern feilkode 2. - - - Intern feilkode 3. Dette er ikke en gyldig tilstand. - - - Intern feilkode 4. - - - Det oppstod en uopprettelig feil under klienttilkoblingen. - - - GetError mislyktes (FatalErrors) - - - Det oppstod en ut-av-minne-feil. - - - En ukjent feil har oppstått. - - - En vindusopprettingsfeil har oppstått. - - - Feil ved initialisering av Winsock. - - - Tilpass til panel - - - RDP-fokus mislyktes! - - - RD Gateway støttes. - - - RD Gateway støttes ikke! - - - Antall RDP gjentilkoblingsforsøk: - - - RDP SetAuthenticationLevel mislyktes! - - - RDP SetUseConsoleSession mislyktes! - - - Angir konsollvalg for RDC {0}. - - - RDP SetCredentials mislyktes! - - - RDP SetEventHandlers mislyktes! - - - RDP SetRDGateway mislyktes! - - - RDP SetPerformanceFlags mislyktes! - - - RDP SetPort mislyktes! - - - RDP SetProps mislyktes! - - - RDP Set Redirection mislyktes! - - - RDP Set Redirect Keys mislyktes! - - - RDP SetResolution mislyktes! - - - Hent til denne datamaskinen - - - Ikke spill av - - - La være på ekstern datamaskin - - - RDP ToggleFullscreen mislyktes! - - - RDP ToggleSmartSize mislyktes! - - - Koble til tidligere åpnede økter ved oppstart - - - Ekstern fil - - - Fjern alle - - - Omdøp - - - Rlogin - - - Lagre - - - Lagre alle - - - Vil du lagre den gjeldende tilkoblingsfilen før du laster inn en annen? - - - Lagre tilkoblinger ved avslutning - - - Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png - - - Skjerm - - - Skjermbilde - - - Skjermbilder - - - Søk - - - Send til... - - - Angi vertsnavnet som visningsnavn når du oppretter eller gir nytt navn til tilkoblinger - - - Kunne ikke lagre innstillinger eller fjerne SysTray-ikon! - - - Vis verktøytips i tilkoblingstreet - - - Vis full sti til tilkoblingsfilen i vindustittel - - - Vis påloggingsinformasjon i fanenavn - - - Vis protokoller i fanenavn - - - Enkeltklikk på tilkoblinger åpner den - - - Enkeltklikk på en åpnet tilkobling bytter til valgt tilkobling - - - Socks 5 - - - Sorter - - - Stigende (A-Z) - - - Synkende (Z-A) - - - Vennligst se Hjelp - Komme i gang - SQL-konfigurasjon for mer informasjon! - - - SQL Server - - - SSH versjon 1 - - - SSH versjon 2 - - - SSH-bakgrunnsoverføring mislyktes! - - - SSH-overføringen mislyktes. - - - Start IP-adresse - - - Start-port - - - Oppstart/Avslutning - - - Status - - - Bytte til varslingspanelet ved: - - - Avansert - - - Faner && paneler - - - Oppdateringer - - - Telnet - - - Følgende: - - - Feil ({0}) - - - Informasjon ({0}) - - - Passord - - - Velg panel - - - Advarsel ({0}) - - - Overfør - - - Prøv å integrere - - - Ultra VNC Repeater - - - UltraVNC SingleClick port: - - - Fjern avkryssingen for egenskapene du ikke ønsker å lagre! - - - mRemoteNG krever en oppdatering - - - mRemoteNG kan med jevne mellomrom koble til mRemoteNG-webområdet for å se etter oppdateringer og produktkunngjøringer. - - - Fullføring av sjekk for oppdatering mislyktes! - - - Nedlastingen er fullført! -mRemoteNG vil nå avslutte og starte installasjonen. - - - Nedlasting fullført mislyktes! - - - Last ned oppdatering mislyktes! - - - Hver {0} dag - - - Daglig - - - Månedlig - - - Ukentlig - - - Bruk et annet brukernavn og/eller passord - - - Bruker - - - Bruk samme brukernavn og passord - - - Bruk et smartkort - - - Bruk SQL Server for å laste inn og lagre tilkoblinger - - - Versjon - - - VNC - - - VNC-frakobling mislyktes! - - - Oppfrisking av skjermen i VNC mislyktes! - - - VNC SendSpecialKeys mislyktes! - - - VNC Set Event behandlingsrutiner mislyktes! - - - VNC Set Props-handling mislyktes! - - - VNC Vis/Skjul SmartSize mislyktes! - - - VNC Vis/Skjul ViewOnly mislyktes! - - - Advar meg hvis autentisering mislykkes - - - Advarsler - - - Ja - - - &Start - - - Avslu&tt {0} - - - Åpne tilkoblingsfil - - - Prøv igjen - - - Koble til uten legitimasjon - - - Ikke koble til konsollsesjon - - - PuTTY kunne ikke startes. - - - Sikkerhetsinnstillingen "Systemkryptografi: Bruk FIPS-kompatible algoritmer til kryptering, hash-koding og signering" i Windows er aktivert. - -Se Microsofts support-artikkel på http://support.microsoft.com/kb/811833 for mer informasjon. - -{0} er ikke fullt ut FIPS-kompatibel. Klikk OK for å fortsette, eller Avbryt for å avslutte. - - - - Eksporter alt - - - Eksporter fil - - - Eksporter elementer - - - Eksporter egenskaper - - - Eksporter valgt tilkobling - - - Eksporter valgt mappe - - - &Eksporter til fil... - - - Nytt eksternt verktøy - - - &Filformat: - - - Alle filer som kan importeres - - - PuTTY Connection Manager-filer - - - Remote Desktop Connection Manager-filer (*.rdg) - - - En feil har oppstått under import av filen "{0}". - - - Importer fra &fil... - - - Tilkoblingsinformasjonen kunne ikke lastes fra SQL server. - - - Begge passordene må være like. - - - Passordet må være minst 3 tegn langt. - - - Portskanning ferdig. - - - Velg om tilkoblingen skal endre størrelse når vinduet endrer størrelse eller fullskjermsmodus slås av eller på. Krever RDC 8.0 eller høyere. - - - Angi informasjon for lastbalanseringsrutere for å velge den beste verten. - - - Velg om utklippstavlen skal deles. - - - Velg om standard lydinndataenhet på den eksterne maskinen skal omadresseres til denne maskinen. - - - Automatisk størrelsesendring - - - Lastbalanseringsinformasjon - - - Utklippstavle - - - Lydopptak - - - Passord for {0} - - - Vis på verktøylinjen - - - Endringsloggen kunne ikke lastes ned. - - - RDP tidsavbrudd - - - Elementet finnes allere i denne mappen. - - - Kan ikke dra elementet til seg selv. - - - Kan ikke dra foreldreelementet til underordnet element. - - - Elementet kan ikke flyttes. - - - Blokkrypteringsmodus - - - Krypteringsmotor - - - Sikkerhet - - - Antall iterasjoner for nøkkelderivasjon - - - Dynamisk - - - Høy - - - Medium - - - Velg lydkvalitet: dynamisk, medium, høy - - - Lydkvalitet - - - Nedlasting ferdig! - - - Nedlasting - - - Antall minutter med inaktivitet før RDP-sesjonen automatisk kobles fra (bruk 0 for ubegrenset) - - - Inaktivitet i minutter - - - Legg til - - - Tittel - - - Er du sikker på at du vil fjerne legitimasjonen {0}? - - - Velg om du ønsker et varsel når RDP-sesjonen avsluttes på grunn av inaktivitet - - - Passordet må inneholde minst {0} av de følgende tegnene: {1} - - - Passordet må inneholde minst {0} små bokstaver - - - Passordet må inneholde minst {0} tall - - - Passordet må inneholde minst {0} store bokstaver - - - Passordlengden må være mellom {0} og {1} - - - Velg plassering for mRemoteNGs loggfil - - - Feilsøking - - - Vis disse beskjedtypene - - - Sti til loggfil - - - Logg disse beskjedtypene - - - Velg sti - - - Åpne fil - - - Bruk standard - - - Logging - - - Oppsprettvinduer - - - Logg til applikasjonens mappe - - - Tilordnet legitimasjon - - - Legitimasjoner - - - Åpne en annen fil - - - Legitimasjon ikke tilgjengelig - - - Vil du slette dette temaet? - - - Navn på nytt tema - - - Kan ikke opprette tema, navnet finnes allerede eller inneholder spesialtegn - - - Skriv inn navn på nytt tema - - - Advarsel: applikasjonen må startes på nytt før endringer i tema trer i kraft. - - - Kunne ikke finne eksternt verktøy "{0}" - - - Lag en ny tilkoblingsfil - - - Tilkoblingsfilen ble ikke funnet. - - - Importer en eksisterende fil - - - Bruk egendefinert filsti - - - Tester tilkobling - - - Verten '{0}' var ikke tilgjengelig. - - - Tilkobling vellykket - - - Innlogging feilet for brukeren '{0}'. - - - Databasen '{0}' er ikke tilgjengelig. - - - Lagre tilkoblinger etter hver endring - - - Filtrer søketreff i tilkoblingstre - - - Test tilkobling - - - Bare lesemodus: - - - Bruk UTF8-koding for RDP "Lastbalanseringsinformasjon"-egenskap - - - Tidsavbrudd [sekunder] - - - Start i: - - - Kjør elevert - - - Vis på verktøylinjens kolonne - - - Start i - - - Lås verktøylinjeposisjoner - - - Multi SSH-verktøylinje - - - Importer under-OUer - - - Avanserte sikkerhetsvalg - - - mRemoteNG-valg - - - Lag et tomt panel når mRemoteNG starter - - - Må være mellom 0 og 255 - - - Utenfor gyldig område - - - Slett... - - - Koble til alle tilkoblinger på nytt - - - UltraVNC SingleClick - - - Koble fra faner til høyre - - - Koble fra alle unntatt denne - - - Er du sikker på at du vil lukke alle tilkoblinger bortsett fra "{0}"? - - - En feil oppsto under gjenoppretting av tilkobling til RDP-vert '{0}' - - - En feil oppsto under endring av oppløsning til vert '{0}' - - - Stakksporing - - - Unntaksbeskjed - - - mRemoteNG ubehandlet unntak - - - Et ubehandlet unntak har oppstått - - - Dette unntaket gjør at mRemoteNG må lukkes - - - Kopier vertsnavn - - - Plasser søkelinjen over tilkoblingstreet - - - Vis aktiv tilkobling i tilkoblingstreet - - - Vis alltid tilkoblingsfaner - - - Release-kanal - - - Stable-kanalen inkluderer bare endelige versjoner. -Preview-kanalen inkluderer beta- og release candidate-versjoner. -Nightly-kanalen inkluderer alpha-, beta- og release candidate-versjoner. - - - Bruk - - - Proxy-innstillinger - - - Multi-SSH: - - - Trykk ENTER for å sende, Ctrl+C sendes umiddelbart. - - - Vis denne tilkoblingen i favoritter-menyen. - - - Favoritt - - - Favoritter - - - Nullstill søkestreng - - - Koble til i bare visningsmodus - - - Ikke fjern mellomrom fra brukernavn - - - Miljø - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.nl.resx b/mRemoteNG/Language/Language.nl.resx deleted file mode 100644 index b35f40822..000000000 --- a/mRemoteNG/Language/Language.nl.resx +++ /dev/null @@ -1,1575 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Over - - - AddNodeFromXML mislukt! - - - Laat slechts één exemplaar van de applicatie toe (mRemoteNG herstart vereist) - - - Altijd - - - Altijd verbinding maken, zelfs als verificatie mislukt - - - Altijd Paneel dialoogvenster tonen bij het openen van verbindingen - - - Altijd tabbladen tonen - - - Altijd het icoon in het systeemvak tonen - - - Later opnieuw vragen - - - Pas nu de instellingen aan - - - Gebruik de aanbevolen instellingen - - - {0} kan automatisch controleren op updates die kunnen zorgen voor nieuwe functionaliteit en bugfixes. Het is aanbevolen dat u {0} toestaat om wekelijks te controleren voor updates. - - - Automatisch bijwerken instellingen - - - Verhouding - - - Automatisch opslaan elke: - - - Huidige Versie - - - &Bladeren... - - - &Annuleren - - - Wijzig - - - &Sluiten - - - Standaard Successierechten - - - Standaard Eigenschappen - - - Verbreek verbinding - - - Icoon - - - &Importeer - - - Successierecht - - - PuTTY Starten - - - &OK - - - Eigenschapen - - - &Scan - - - &Stop - - - Test Proxy - - - Kan Poort Scan niet starten, onjuist IP formaat! - - - Uiterlijk - - - Connectie - - - Scherm - - - Gateway - - - Diversen - - - Protocol - - - Verwijzing - - - Controle mislukt! - - - Automatisch proberen opnieuw te verbinden wanneer de verbinding is verbroken van de server (RDP && ICA Alleen) - - - Toon dit bericht niet opnieuw. - - - Deze proxy server vereist authenticatie - - - Gebruik aangepaste PuTTY pad: - - - Opnieuw verbinden zodra gereed - - - Gebruik een proxy server om verbinding te maken - - - Gebruikersnaam - - - Wachten Voor Afsluiten - - - Controleer opnieuw - - - Controleren op updates en aankondigingen bij het opstarten - - - Controleer nu - - - Controleer de juiste installatie van onderdelen bij het opstarten - - - Sluit paneel voordat er verbinding wordt gemaakt - - - Gesloten Poorten - - - Klap alle mappen in - - - Argumenten - - - Bestandsnaam - - - Bericht - - - Kan opdrachtprompt argumenten niet parsen! - - - {0} heeft de Lenovo Auto Scroll Utility op het systeem ontdekt. Deze utility staat bekend om problemen met {0}. Het wordt aangeraden om het uit te schakelen of te deïnstalleren. - - - Compatibiliteits probleem ontdekt - - - btnIcon_Click mislukt! - - - ShowHideGridItems mislukt! - - - IconMenu_Click mislukt! - - - Eigenschap Grid object mislukt! - - - Instellen Host Status mislukt! - - - pGrid_PopertyValueChanged mislukt! - - - Configuratie UI laden mislukt! - - - Weet u zeker dat u het paneel wilt sluiten, "{0}"? Alle connecties zullen dan ook worden gesloten. - - - Weet u het zeker dat u de geselecteerde externe applicatie wilt verwijderen, "{0}"? - - - Weet u het zeker dat u de {0} geselecteerde externe applicaties wilt verwijderen? - - - Weet u het zeker dat u de connectie wilt verwijderen, "{0}"? - - - Weet u het zeker dat u de lege map wilt verwijderen, "{0}"? - - - Weet u het zeker dat u de map wilt verwijderen, "{0}"? Alle mappen of connecties daaronder zullen ook worden verwijderd. - - - Wilt u alle geopende verbindingen sluiten? - - - Weet u het zeker dat u de panelen weer op hun standaard lay-out wilt terugzetten? - - - Verbind - - - Verbinden in volledig scherm modus - - - Bezig met verbinding maken... - - - Protocol Gebeurtenis Verbonden - - - Verbinding naar "{0}" via "{1}" tot stand gebracht door gebruiker "{2}" (Omschrijving: "{3}"; Gebruiker Veld: "{4}") - - - Connectie mislukt! - - - Protocol Gebeurtenis Fout Opgetreden - - - Openen van verbinding mislukt! - - - Kan verbinding niet openen: Geen hostnaam opgegeven! - - - Connecties - - - Kan geen standaard poort instellen! - - - Kan geen back-up maken van Connectie bestand! - - - Connectie bestand "{0}" kon niet worden geladen! - - - Connectie bestand "{0}" kon niet worden geladen! -Beginnen met nieuwe Connectie bestand. - - - Kan connectie bestand niet opslaan als "{0}"! - - - Verbinding maken met console sessie - - - Verbinden (met opties) - - - Verbinding naar {0} via {1} gesloten door gebruiker {2}. - - - Connectie gebeurtenis gesloten - - - Connectie gebeurtenis gesloten mislukt! - - - Kon geen nieuwe connectie bestand aanmaken! - - - Kan geen ToolStrip vinden in FilteredPropertyGrid. - - - Detecteer - - - Geen verbinding maken als verificatie mislukt - - - Dubbel klik op het tabblad om te sluiten - - - Downloaden en installeren - - - Duplicaat - - - Wilt u doorgaan met zonder wachtwoord op te geven? - - - Voor lege gebruikersnaam, wachtwoord of domein velden gebruiken: - - - Volledig versleutelen connection bestand - - - Eind IP - - - Eind Poort - - - AddExternalToolsToToolBar (frmMain) is mislukt. {0} - - - Map toevoegen (UI.Window.Tree) is mislukt. {0} - - - De database versie {0} is niet compatibel met deze versie van {1}. - - - De connectie lijst kan niet worden opgeslagen.. - - - Decryptie is mislukt. {0} - - - Encryptie is mislukt. {0} - - - Foutmeldingen - - - Het verbindingsopstartbestand kon niet worden geladen. {0}{0}{2}{0}{3}{0}{0} Om dataverlies te voorkomen zal {1} nu worden afgesloten. - - - Controleer Database Versie (Config.Connections.Save) is mislukt. {0} - - - Vouw alle mappen uit - - - Experimenteel - - - Exporteer - - - Alle Bestanden(*.*) - - - Applicatie Bestanden (*.exe) - - - mRemote CSV Bestanden (*.csv) - - - mRemote XML Bestanden (*.xml) - - - RDP Bestanden (*.rdp) - - - Erven {0} - - - Omschrijving van de erfelijke eigenschap: {0} - - - Gratis - - - Volledig Scherm - - - Algemeen - - - Een fout is opgetreden tijdens het laden van de verbinding voor "{0}" van "{1}". {2} - - - Automatisch opnieuw verbinden - - - Externe Applicatie Eigenschappen - - - Bestanden - - - Host - - - HTTP verbinding mislukt! - - - Kon geen nieuwe HTTP verbinding aanmaken! - - - Verandering van HTTP document tegel niet gelukt! - - - Instellen HTTP Eigenschappen mislukt! - - - Importeer van Active Directory - - - Importeer van Poort Scan - - - Informatie - - - Sluiten Interne Applicatie mislukt! - - - Interne Applicatie Focus mislukt! - - - Interne Applicatie Handeling: {0} - - - Beëindigen Interne Applicatie Proces mislukt! - - - Interne Applicatie Formaat Wijzigen mislukt! - - - --- Interne Applicatie Spulen --- - - - Interne Applicatie naam: {0} - - - Adres: - - - Bij het sluiten van connecties: - - - Weergavenaam - - - Domein - - - Hostnaam: - - - Mobiele Editie - - - Om PuTTY Sessies te configureren klik op deze knop: - - - Max. PuTTY && Geïntegreerde Ext. Applicatie wachttijd: - - - Vrijgegeven onder de GNU General Public License (GPL) - - - seconden - - - Selecteer een paneel uit de onderstaande lijst of klik op Nieuw om een nieuwe toe te voegen. Klik op OK om verder te gaan. - - - Server Status: - - - Database: - - - Verifiëren: - - - Taal - - - (Automatisch detecteren) - - - {0} moet opnieuw worden opgestart voordat de wijzigingen van de taal actief zullen worden. - - - Laden van SQL mislukt! - - - Laden van XML mislukt! - - - Lokaal bestand - - - Lokaal bestand bestaat niet! - - - Voeg Connectie Paneel toe - - - Controleer voor beschikbare Updates - - - Configuratie - - - Connectie Panelen - - - Kopiëren - - - Ctrl-Alt-Del - - - CTRL-Esc - - - Verwijder Externe Applicatie... - - - Doneer - - - Dupliceer Tab - - - Suiten - - - Externe Applicaties menubalk - - - &Bestand - - - &Help - - - mRemoteNG Help - - - Start Externe Applicatie - - - Nieuwe Connectie Bestand - - - Nieuwe Externe Applicatie - - - Notificaties - - - Kopieër alles - - - Verwijder alles - - - Open Connectie Bestand... - - - Opties - - - Poort Scan - - - Quick Connect menubalk - - - Opnieuw verbinden - - - Vernieuw Scherm (VNC) - - - Hernoem Tab - - - Meld een bug - - - Herstel lay-out - - - Opslaan Connectie bestand - - - Opslaan Connectie bestand Als... - - - Stuur Speciale toetsencombinatie (VNC) - - - &Laat hulp zien - - - Toon tekst - - - SmartSize (RDP/VNC) - - - SSH Bestandsoverdracht - - - Start Chat (VNC) - - - Ondersteunings Forum - - - &Extra - - - Bestandsoverdracht (SSH) - - - &Beeld - - - Alleen bekijken (VNC) - - - Website - - - Minimaliseer naar het systeemvak - - - Omlaag - - - Omhoog - - - Mijn huidige gegevens (Windows login-informatie) - - - Nooit - - - Nieuwe Connectie - - - Nieuwe Map - - - Nieuw Paneel - - - Naamloos - - - Nee - - - Geen Compressie - - - Geen externe applicatie opgegeven. - - - Geen - - - Normaal - - - Geen SmartSize - - - Geen update beschikbaar - - - U probeert een verbindings bestand te openen dat is gemaakt met behulp van een zeer vroege versie van mRemote dit kan resulteren in een vastlopende applicatie. -Als dergelijke problemen voorkomen maak dan een nieuwe verbindings bestand aan! - - - Open een nieuw tabblad aan de rechterkant van het geselecteerde tabblad - - - Open Poorten - - - Thema - - - &Verwijder - - - &Nieuw - - - Paneel Naam - - - Beveiligen met een wachtwoord - - - Vul alstublieft alle velden in - - - Poortscan paneel kon niet worden geladen - - - Geef de hostnaam of IP adres op waarmee u verbinding wilt maken - - - Schakelen alle successierechten opties. - - - Selecteer welke authenticatie niveau deze verbinding moet gebruiken. - - - Selecteer hoe u wilt authenticeren naar de VNC-server. - - - Geef aan of u bitmap caching wel of niet wil gebruiken. - - - Selecteer de kleurkwaliteit welke moet worden gebruikt. - - - Selecteer de compressie waarde welke moet worden gebruikt. - - - Zet hier uw notities of een omschrijving van de desbetreffende host - - - Selecteer of het Bureaubladachtergrond wel of niet moet worden gebruikt. - - - Selecteer of het Bureaubladachtergrond wel of niet moet worden gebruikt. - - - Voer de domeinnaam in. - - - Bureaubladsamenstellingen wel of niet inschakelen - - - Lettertypen wel of niet vloeiend maken - - - Selecteer de codering modus welke moet worden gebruikt. - - - Selecteer een externe applicatie welke gestart moet worden. - - - Selecteer een externe applicatie welke gestart moet worden nadat de verbinding met de externe host is verbroken - - - Selecteer een externe applicatie welke gestart moet worden voordat de verbinding met de externe host tot stand word gebracht. - - - Kies een pictogram dat wordt weergegeven wanneer verbinding wordt gemaakt met de host. - - - Voer het MAC-adres van de externe host in, indien u wenst te gebruiken in een externe applicatie. - - - Dit is de naam die wordt weergegeven in de opgeslagen verbindingen - - - Stel het paneel in waarin de verbinding wordt geopend. - - - Voer uw wachtwoord in. - - - Voer de poortnummer in waar het geselecteerde protocol op luistert. - - - Kies het protocol dat mRemoteNG moet gebruiken om verbinding te maken met de host. - - - Selecteer een PuTTY sessie welke wordt gebruikt bij het verbinden. - - - Hiermee geeft u de domeinnaam op die een gebruiker geeft om verbinding te maken naar de RD-gateway-server. - - - Hiermee geeft u de hostnaam van de Remote Desktop-gatewayserver op. - - - Specificeert wanneer een Remote Desktop Gateway (RD-gateway-server) gebruikt moet worden. - - - Geeft aan of niet aan te melden bij de gateway met dezelfde gebruikersnaam en wachtwoord van de aansluiting. - - - Hiermee geeft u de gebruikersnaam op waarmee een gebruiker verbinding kan maken met de RD-gateway-server. - - - Selecteer of lokale schijfstations op de externe host moeten worden weergegeven. - - - Selecteer of toetscombinaties (b.v. Alt-Tab) moeten worden doorgestuurd naar de externe host. - - - Selecteer of lokale poorten (v.b. com, parallel) dienen te worden getoond op de externe host. - - - Selecteer of lokale printers getoond moeten worden op de externe host. - - - Selecteer of lokale smartcards beschikbaar moeten zijn op de externe host. - - - Selecteer hoe externe geluiden moeten worden doorgestuurd. - - - Selecteer een van de beschikbare rendering engines die zullen worden gebruikt om de HTML-weergave weer te geven. - - - Kies de resolutie of de modus waarin deze verbinding zal worden opgezet - - - Selecteer de SmartSize modus welke moet worden gebruikt. - - - Verbinding maken met de console sessie van de remote host. - - - Gebruik, indien beschikbaar, de Credential Security Support Provider (CredSSP) voor authenticatie. - - - Voel je vrij om alle informatie die u nodig heeft hier in te voeren. - - - Voer uw gebruikersnaam in. - - - Als je een alleen kijken connectie wilt opzetten naar de desbetreffende host selecteer dan ja. - - - Voer het Proxy adres in welke wordt gebruikt. - - - Voer uw wachtwoord in voor authenticatie van de proxy server. - - - Voer de poortnummer van de proxy server in waarop deze luistert. - - - Indien er gebruik van een proxy server wordt gemaakt om VNC connecties te tunnelen selecteer dan welke type. - - - Voer uw gebruikersnaam in voor authenticatie van de proxy server. - - - Hostnaam/IP - - - Alle - - - Server Authenticatie - - - Authenticatie Modus - - - Cache Bitmapafbeeldingen - - - Kleuren - - - Compressie - - - Omschrijving - - - Thema's weergeven - - - Bureaubladachtergrond - - - Samenstelling bureaublad - - - Lettertype vloeiend maken - - - Codering - - - Externe Applicatie - - - Externe Applicatie Na - - - Externe Applicatie voordat - - - MAC Adres - - - Naam - - - Paneel - - - Wachtwoord - - - Poort - - - PuTTY Sessie - - - Gateway Domein - - - Gateway Hostnaam - - - Extern Bureaublad Gateway Wachtwoord - - - Gebruik Gateway - - - Gateway Gegevens - - - Gateway Gebruikersnaam - - - Harde Schijven - - - Toetsencombinaties - - - Poorten - - - Printers - - - Geluiden - - - Rendering Engine - - - Resolutie - - - SmartSize Modus - - - Gebruik consolesessie - - - Gebruik CredSSP - - - Gebruiker veld - - - Proxy Adres - - - Proxy Wachtwoord - - - Proxy Poort - - - Proxy-type - - - Proxy Gebruikersnaam - - - Protocol Event Verbinding Verbreken. -Bericht: -{0} - - - Protocol Event verbinding verbreken mislukt. -{0} - - - Protocol om te importeren - - - Proxy test mislukt! - - - Proxy test geslaagd! - - - Sluiten PuTTy proces mislukt! - - - Kan de focus niet verkrijgen! - - - PuTTy Handeling: {0} - - - Beëindigen Putty Proces mislukt! - - - Paneel Handeling: {0} - - - PuTTy Formaat Wijzigen Mislukt! - - - PuTTY opgeslagen sessies - - - PuTTY Instellingen - - - Toon PuTTY Instellingen mislukt! - - - --- PuTTY Spullen --- - - - PuTTY Titel: {0} - - - Snel: {0} - - - Snel verbinden - - - Snelle Connectie toevoegen mislukt! - - - Het aanmaken van een snelle connectie is mislukt - - - &Waarschuw bij het sluiten van connecties - - - &xWaarschuw alleen bij het sluiten van mRemoteNG - - - Waarschuw alleen bij het sluiten van &meerdere connecties - - - Waarschuw &niet bij het sluiten van connecties - - - RAW - - - RDP - - - 16777216 Kleuren (24-bit) - - - 256 Kleuren (8-bit) - - - 32768 Kleuren (15-bit) - - - 16777216 Kleuren (32-bit) - - - 65536 Kleuren (16-bit) - - - Kan geen RDP controle aanmaken, controleer mRemoteNG systeemeisen. - - - Cursor Knipperen Uitschakelen - - - Cursor Schaduw Uitschakelen - - - Slepen van volledig venster uitschakelen - - - Menu Animaties Uitschakelen - - - RDP verbreken mislukt, probeer te sluiten! - - - Interne fout code 1. - - - Interne fout code 2. - - - Interne fout code 3. Dit is geen geldige status. - - - Interne fout code 4. - - - Een onherstelbare fout opgetreden tijdens de client-verbinding. - - - Ophalen foutmelding mislukt (fatale foutmelding) - - - Een out-of-memory fout is opgetreden. - - - Er is een onbekende fout opgetreden. - - - Een venster-creatie fout opgetreden. - - - Winsock initialisatie fout. - - - Pas aan paneel aan - - - RDP Focus mislukt! - - - RD Gateway is ondersteund. - - - RD Gateway is niet ondersteund! - - - RDP aantal malen opnieuw proberen te verbinden: - - - RDP instelling verificatie niveau mislukt! - - - RDP instelling Console sessie mislukt! - - - Instelling console wisselen voor RDC {0}. - - - RDP instellen kenmerken mislukt! - - - RDP instellen gebeurtenis afhandeling mislukt! - - - RDP instellen RDGateway mislukt! - - - RDP instellen prestatie vinkjes mislukt! - - - RDP instellen poort mislukt! - - - RDP instellen eigenschappen mislukt! - - - RDP instellen omleiding mislukt! - - - RDP instellen Redirect toetsen mislukt! - - - RDP instellen resolutie mislukt! - - - Afspelen op deze computer - - - Niet afspelen - - - Afspelen op externe computer - - - RDP wisselen volledig scherm mislukt! - - - RDP wisselen SmartSize mislukt! - - - Opnieuw verbinding maken met eerder geopende sessies bij het opstarten - - - Extern bestand - - - Alles verwijderen - - - Hernoemen - - - Rlogin - - - Opslaan - - - Alles opslaan - - - Wil je de huidige verbindingen opslaan voordat er een andere wordt geopend? - - - Sla verbindingen op bij afsluiten - - - Graphics Interchange Format bestand (.gif)|*.gif|Joint Photographic Experts Group bestand (.jpeg)|*.jpeg|Joint Photographic Experts Group bestand (.jpg)|*.jpg|Portable Network Graphics bestand (.png)|*.png - - - Scherm - - - Schermafbeelding - - - Schermafbeeldingen - - - Zoek - - - Verstuur naar... - - - Stel hostnaam zoals weergegeven naam in bij het ​​maken van nieuwe verbindingen - - - Kon de instellingen niet opslaan of taakbalk pictogram verwijderen! - - - Toon beschrijving tooltips in connectie's - - - Toon volledige verbindingsbestandspad in het venster titel - - - Toon login-informatie op het tabblad - - - Toon protocollen op het tabblad - - - Enkele klik om verbinding te openen - - - Enkele klik om naar geopende verbinding om te schakelen - - - Socks 5 - - - Sorteer - - - Oplopend (A-Z) - - - Aflopend (Z-A) - - - Zie Help - Aan de slag - SQL Configuratie voor meer informatie! - - - SQL Server: - - - SSH versie 1 - - - SSH versie 2 - - - SSH achtergrond overdracht mislukt! - - - SSH overdracht heeft gefaald. - - - Start IP - - - Start Poort - - - Opstarten/Afsluiten - - - Status - - - Schakel Notificatiepaneel in: - - - Geavanceerd - - - Tabbladen && Panelen - - - Updates - - - Telnet - - - De volgende: - - - Fout ({0}) - - - Informatie ({0}) - - - Wachtwoord - - - Selecteer Paneel - - - Waarschuwing ({0}) - - - Overdracht - - - Probeer te integreren - - - UltraVNC Repeater - - - Ultra VNC Enkele Klik Poort: - - - Verwijder het vinkje bij eigenschappen die u niet wil opslaan! - - - Er is een update voor mRemoteNG beschikbaar - - - mRemoteNG kan periodiek verbinding maken met de mRemoteNG website om te controleren op updates en product aankondigingen. - - - Check voor de update voltooiing is mislukt! - - - Download voltooid! -mRemoteNG zal nu worden gesloten en beginnen met de installatie. - - - Download complete mislukt! - - - Download Update mislukt! - - - Elke {0} dag(en) - - - Dagelijks - - - Maandelijks - - - Wekelijks - - - Gebruik een andere gebruikersnaam en wachtwoord - - - Gebruiker - - - Gebruik dezelfde gebruikersnaam en wachtwoord - - - Gebruik een SmartCard - - - Gebruik SQL Server om te connecties te laden en op te slaan - - - Versie - - - VNC - - - VNC Sluiten connectie mislukt! - - - VNC Vernieuwen scherm mislukt! - - - VNC Stuur speciale toetsen mislukt! - - - VNC Instellen gebeurtenis handeling mislukt! - - - VNC Eigenschappen instellen mislukt! - - - VNC Wisselen Formaat wijzigen mislukt! - - - VNC Wisselen ViewOnly mislukt! - - - Waarschuw als verificatie is mislukt - - - Waarschuwingen - - - Ja - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.pl.resx b/mRemoteNG/Language/Language.pl.resx deleted file mode 100644 index 85875429a..000000000 --- a/mRemoteNG/Language/Language.pl.resx +++ /dev/null @@ -1,1418 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - O programie - - - Wykonanie fukcji AddNodeFromXML nie powiodło się! - - - Pozwól uruchomić tylko jedną kopię programu (wymaga restartu mRemoteNG) - - - Zawsze - - - Łącz zawsze, nawet jeśli uwierzytelnianie się nie powiedzie - - - Pozwól wybrać panel przed każdym połączeniem - - - Zawsze pokazuj zakładki paneli - - - Zawsze pokazuj ikonę w obszarze powiadomień - - - Zapytaj mnie znów później - - - Dostosuj ustawienia - - - Użyj zalecanych ustawień - - - {0} może automaczycznie sprawdzać aktualizacje które mogą zawierać nowe funkcjonalności oraz poprawki błędów. Zaleca się, aby zezwolnić {0} na sprawdzanie aktualizacji co tydzień. - - - Ustawienia automatycznej aktualizacji - - - Propocjonalnie - - - Automatyczny zapis co: - - - Aktualna wersja - - - &Wybierz... - - - &Anuluj - - - Zmiana - - - &Zamknij - - - Dziedziczenie domyślne - - - Ustawienia domyślne - - - Rozłącz - - - Ikona - - - &Importuj - - - Dziedziczenie - - - Uruchom - - - Uruchom PuTTY - - - &OK - - - Ustawienia - - - &Skanuj - - - &Stop - - - Testuj Proxy - - - Nie można rozpocząć skanowania portów - niewłaściwy format adresu IP! - - - Wygląd - - - Połączenie - - - Wyświetl - - - Brama - - - Pozostałe - - - Protokół - - - Przekierowanie - - - Sprawdzenie nie powiodło się! - - - Automatycznie połącz ponownie jeśli nastąpi odłączenie od serwera (tylko RDP && ICA) - - - Nie pokazuj więcej tej informacji. - - - Ten serwer proxy wymaga uwierzytelnienia - - - Użyj niestandardowej ścieżki PuTTY: - - - Połącz ponownie, gdy gotowy - - - Użyj serwera proxy do połączenia - - - Użytkownik - - - Czekaj na wyjście - - - Sprawdź ponownie - - - Sprawdź aktualizacje i powiadomienia podczas startu - - - Sprawdź teraz - - - Sprawdź poprawność zainstalowanych komponentów podczas startu - - - Przed połączeniem wybierz panel - - - Porty zamknięte - - - Zwiń wszystkie foldery - - - Argumenty - - - Nazwa pliku - - - Wiadomość - - - Nie można przeanalizować argumentów wejściowych! - - - {0} wykrył, że w systemie działa Lenovo Auto Scroll Utility. To narzędzie jest znane jako przyczyna problemów z {0}. Zaleca się, wyłączyć lub odinstalować ten program. - - - Spróbuj ponownie - - - Wykryto problem z kompatybilnością - - - Wykonanie btnIcon_Click nie powiodło się! - - - Wykonanie ShowHideGridItems nie powiodło się! - - - Wykonanie IconMenu_Click nie powiodło się! - - - Wykonanie SetHostStatus nie powiodło się! - - - Wykonanie pGrid_PopertyValueChanged nie powiodło się! - - - Czy na pewno chcesz zamknąć panel, "{0}"? Wszystkie połączenia, które zawiera również zostaną zamknięte. - - - Czy na pewno chcesz usunąć zewnętrzne narzędzie, "{0}"? - - - Czy na pewno chcesz usunąć {0} wybranych narzędzi zewnętrznych? - - - Czy jesteś pewien, że chcesz usunąć połączenie, "{0}"? - - - Czy jesteś pewien, że chcesz usunąć pusty folder, "{0}"? - - - Czy jesteś pewien, że chcesz usunąć folder, "{0}"? Wszystkie foldery oraz połączenia które zawiera także zostaną usunięte. - - - Czy chcesz zamknąć wszystkie otwarte połączenia? - - - Czy jesteś pewien, że chcesz powrócić z ustawieniami paneli do ich domyślego wyglądu? - - - Połącz - - - Połącz w trybie pełnego ekranu - - - Łączenie... - - - Połączenie "{0}" przez "{1}" ustanowione przez użytkownika "{2}" (Opis: "{3}"; Pole użytkownika: {4}) - - - Połączenie nie powiodło się! - - - Otwarcie połączenia nie powiodło się! - - - Nie można otworzyć połączenia: nie określono nazwy hosta! - - - Połączenia - - - Nie można ustawić domyślnego portu! - - - Nie można utworzyć kopii zapasowej pliku połączeń! - - - Nie można załadować pliku połączeń "{0}"! - - - Nie można załadować pliku połączeń "{0}"! -Załadowano nowy plik połączeń. - - - Nie można zapisać pliku połączeń jako "{0}"! - - - Połącz się bez uwierzytelnienia - - - Połącz się z sesją konsoli - - - Połącz (z opcjami) - - - Połączenie do {0} za pomocą {1} zostało zamknięte przez użytkownika {2}. - - - Nie można utworzyć nowego pliku połączeń! - - - Nie można odnaleźć ToolStrip w FilteredPropertyGrid. - - - Wykryj - - - Nie łącz, jeśli uwierzytelnianie nie powiedzie się - - - Dwukrotne kliknięcie na karcie, zamyka ją - - - Ściągnij i zainstaluj - - - Duplikuj - - - Czy chcesz kontynuować bez hasła? - - - Dla pustej nazwy pola użytkownika, hasła lub domeny użyj: - - - Całkowicie szyfruj plik połączeń - - - Końcowe IP - - - Port końcowy - - - Wykonanie AddExternalToolsToToolBar (frmMain) nie powiodło się. {0} - - - Wykonanie AddFolder (UI.Window.Tree) nie powiodło się. {0} - - - Wersja bazy danych {0} nie jest zgodna z wersją {1}. - - - Nie można zapisać listy połączeń. - - - Nie udało się uruchomić PuTTY. - - - Odszyfrowywanie nie powiodło się. {0} - - - Szyfrowywanie nie powiodło się. {0} - - - Błędy - - - Nie można załadować pliku startowego połączenia.{0}{0}{2}{0}{3}{0}{0}Aby zapobiec utracie danych, {1} zakończy teraz działanie. - - - Wykonanie VerifyDatabaseVersion (Config.Connections.Save) nie powiodło się. {0} - - - Rozwiń wszystkie foldery - - - Eksperymentalny - - - Eksport - - - Eksportuj wszystko - - - Eksportuj do pliku - - - Nowe narzędzie zewnętrzne - - - Wszystkie pliki (*.*) - - - Pliki programów (*.exe) - - - Pliki CSV mRemote (*.csv) - - - Pliki XML mRemote (*.xml) - - - Pliki RDP (*.rdp) - - - Dziedzicz {0} - - - Wolne - - - Pełen ekran - - - Ogólne - - - Wystąpił błąd podczas ładowania wpisu połączenia dla "{0}" z "{1}". {2} - - - Połącz automatycznie - - - Właściwości zewnętrznego narzędzia - - - Pliki - - - Host - - - Błąd połączenia HTTP! - - - Nie można utworzyć nowego połączenia HTTP! - - - Zmiana tytułu dokumentu HTTP nie powiodła się! - - - Konfiguracja ustawień HTTP nie powiodła się! - - - Importów z Active Directory - - - Import z Port Scan - - - Informacje - - - Adres: - - - Przy zamykaniu połączeń: - - - Widoczna nazwa - - - Domena - - - Nazwa hosta: - - - Wersja przenośna. - - - Aby skonfigurować sesje PuTTY kliknij ten przycisk: - - - Wydane na licencji GNU General Public License (GPL) - - - sekund - - - Wybierz panel z poniższej listy lub kliknij przycisk Nowy, aby dodać nowy. Aby kontynuować, kliknij przycisk OK. - - - Status serwera: - - - Baza danych: - - - Sprawdź: - - - Język - - - (Wykryj automatycznie) - - - {0} musi być ponownie uruchomiony aby zmiany języka zaczęły obowiązywać. - - - Import z SQL nie powiódł się! - - - Import z XML nie powiódł się! - - - Plik lokalny - - - Plik lokalny nie istnieje! - - - Dodaj panel połączenia - - - Sprawdź aktualizacje - - - Konfiguracja - - - Panele połączeń - - - Kopiuj - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - Skazuj zewnętrzne narzędzie... - - - Darowizna - - - Duplikuj zakładkę - - - Wyjście - - - Pasek narzędzi zewnętrznych - - - &Plik - - - &Pomoc - - - Pomoc mRemoteNG - - - Uruchom narzędzie zewnętrzne - - - Nowy plik połączeń - - - Nowe narzędzie zewnętrzne - - - Powiadomienia - - - Kopiuj wszystko - - - Usuń wszystko - - - Otwórz plik połączenia... - - - Opcje - - - Skaner portów - - - Pasek szybkiego połączenia - - - Połącz ponownie - - - Odśwież ekran (VNC) - - - Zmień nazwę zakładki - - - Zgłoś błąd - - - Przywróć domyślny layout - - - Zapisz plik połączeń - - - Zapisz plik połączeń jako ... - - - Wyślij klawisze specjalne (VNC) - - - &Pokaż tekst pomocy - - - Pokaż tekst - - - Dopasuj (RDP/VNC) - - - Transfer plików poprzez SSH - - - Zacznij Chat (VNC) - - - Forum pomocy - - - &Narzędzia - - - Transfer pliku (SSH) - - - &Widok - - - Tylko pogląd (VNC) - - - Strona WWW - - - Minimalizuj do obszaru powiadomień - - - Idź w dół - - - Idź w górę - - - Nigdy - - - Nowe połączenie - - - Nowy folder - - - Nowy panel - - - Nowy tytuł - - - Nie - - - Bez kompresji - - - Nie wskazano zewnętrznej aplikacji. - - - Żaden - - - Normalny - - - Wyłącz dopasowanie - - - Brak aktualizacji - - - Próbujesz załadować plik połączenia, który utworzono przy użyciu bardzo wczesnej wersji mRemote - to może spowodować poważne błędy działania programu. Jeśli napotkasz na taki błąd, należy utworzyć nowy plik połączenia! - - - Otwórz nową zakładkę na prawo od aktualnie zaznaczonej - - - Porty otwarte - - - Motyw - - - &Usuń - - - &Nowy - - - Nazwa panelu - - - Wypełnij wszystkie pola - - - Nie można załadować panelu skanowania portów! - - - Wpisz nazwę hosta lub IP, do którego chcesz się połączyć. - - - Wybierz sposób uwierzytelnienia serwera VNC. - - - Wybierz czy bitmapy mają być przechowywane w pamięci podręcznej czy nie. - - - Wybierz jaką jakość kolorów używać. - - - Wybierz jaką wartość kompresji użyć. - - - Wybierz "Tak" jeśli motyw ma być wyświetlany na zdalnym komputerze. - - - To jest nazwa, która będzie wyświetlana na drzewie połączeń. - - - Podaj domenę. - - - Wpisz swoje hasło. - - - Wybierz, czy lokalne dyski powinny być dostępne na zdalnym hoście. - - - Wybierz, czy kombinacje klawiszy (np. Alt-Tab) powinny być przekierowane do komputera zdalnego. - - - Wybierz, czy lokalne karty inteligentne powinny być dostępne na zdalnym hoście. - - - Wybierz jak dźwięk z zdalnego komputera powinien być przekierowany. - - - Wybierz jeden z silników renderowania, który będzie używany do wyświetlania stron HTML. - - - Wybierz rozdzielczość lub tryb, w którym otworzy się połączenie. - - - Wybierz typ dopasowania jaki ma być użyty. - - - Połącz z sesją konsoli hosta zdalnego. - - - Tu możesz wpisać wszelkie informacje jakich potrzebujesz. - - - Nazwa użytkownika. - - - Jeśli chcesz nawiązać połączenie tylko do podglądu, wybierz Tak. - - - Wprowadź jaki adres serwera proxy będzie używany. - - - Wprowadź hasło uwierzytelniania poprzez proxy. - - - Wpisz numer portu na którym nasłuchuje proxy. - - - Jeśli do połączenia z VNC korzystasz z serwera proxy, wybierz typ typ tunerowania. - - - Wprowadź nazwę użytkownika dla uwierzytelniania poprzez proxy. - - - Nazwa hosta/IP - - - Wszystkie - - - Autentykacja serwera - - - Tryb autentykacji - - - Przechowuj bitmapy w pamięci podręcznej - - - Kolory - - - Kompresja - - - Opis - - - Wyświetlaj motywy - - - Wyświetl tapetę - - - Kompozycja pulpitu - - - Wygładzenie czcionki - - - Kodowanie - - - Zewnętrzne narzędzie - - - Zewnętrzne narzędzie po - - - Zewnętrzne narzędzie przed - - - Adres MAC - - - Nazwa - - - Panel - - - Hasło - - - Port - - - Sesja PuTTY - - - Domena bramy - - - Nazwa hosta bramy - - - Hasło bramy zdalnego pulpitu - - - Użyj bramy - - - Poświadczenia bramy - - - Użytkownik bramy - - - Dyski - - - Kombinacja klawiszy - - - Porty - - - Drukarki - - - Dźwięki - - - Silnik renderujący - - - Rozdzielczość - - - Tryb dopasowania - - - Użyj konsoli sesji - - - Użyj CredSSP - - - Pole użytkownika - - - Adres proxy - - - Hasło proxy - - - Port proxy - - - Typ proxy - - - Użytkownik proxy - - - Protokół do zaimportowania - - - Test proxy nie powiódł się! - - - Test proxy powiódł się! - - - Nie można ustawić ostrości! - - - Zamknięcie procesu Putty nie powiodło się! - - - Zmiana rozmiaru Putty nie powiodła się! - - - Ustawienia PuTTY - - - Szybkie połączenie - - - &Ostrzegaj przed zamknięciem połączenia - - - Ostrzegaj tylko przy zamykaniu mRemoteNG - - - Otrzegaj tylko przy zamykaniu wielu połączeń - - - Nie ostrzegaj przed zamknięciem połączeń - - - RAW - - - RDP - - - 16777216 Kolorów (24-bir) - - - 256 Kolorów (8-bit) - - - 32768 Kolorów (15-bit) - - - 16777216 Kolorów (32-bit) - - - 65536 Kolorów (16-bit) - - - Wyłącz miganie kursora - - - Wyłącz cień kursora - - - Wyłącz animacje menu - - - Nie udało sie rozłączyć RDP, spróbuj zamknąć! - - - Wewnętrzny kod błędu 1. - - - Wewnętrzny kod błędu 2. - - - Błąd wewnętrzny: kod 3. To nie tak miało być... - - - Wewnętrzny kod błędu 4. - - - Błąd pobrania kodu błędu (FatalErrors) - - - Inicjalizacja Winsock nie powiodła się. - - - Dostosuj do panelu - - - Brama zdalnego pulpitu jest wspierana. - - - Brama zdalnego pulpitu nie jest wspierana! - - - Liczba ponownych połączeń RDP: - - - Wykonanie RDP SetAuthenticationLevel nie powiodło się! - - - Wykonanie RDP SetUseConsoleSession nie powiodło się! - - - Wykonanie RDP SetCredentials nie powiodło się! - - - Wykonanie RDP SetEventHandlers nie powiodło się! - - - Wykonanie RDP SetRDGateway nie powiodło się! - - - Wykonanie RDP SetPerformanceFlags nie powiodło się! - - - Wykonanie RDP SetPort nie powiodło się! - - - Wykonanie RDP SetProps nie powiodło się! - - - Wykonanie RDP SetResolution nie powiodło się! - - - Przenieś na ten komputer - - - Nie odtwarzaj - - - Zostaw na komputerze zdalnym - - - Wykonanie RDP ToggleFullscreen nie powiodło się! - - - Wykonanie RDP ToggleSmartSize nie powiodło się! - - - Przy otwarciu programu podłącz ostatnio otwarte połączenia - - - Plik zdalny - - - Usuń wszystkie - - - Zmień nazwę - - - Rlogin - - - Zapisz - - - Zapisz wszystkie - - - Czy chcesz zapisać bieżący plik połączeń przed załadowaniem kolejnego? - - - Zapisz połączenia przy wyjściu - - - GIF(.gif)|*.gif|JPEG(.jpeg)|*.jpeg|JPEG(.jpg)|*.jpg|PNG(.png)|*.png - - - Ekran - - - Zrzut ekranu - - - Zrzuty ekranów - - - Szukaj - - - Wyślij do... - - - Ustaw nawę hosta taką samą jak wyświetlaną nazwę gdy tworzysz lub zmieniasz nazwę połączeń - - - Pokaż opisy podpowiedzi w drzewie połączenia - - - Pokaż pełną ścieżkę pliku połączenia w tytule okna - - - Pokaż informacje logowania na zakładce nazwy - - - Pokaż nazwy protokołów na zakładkach - - - Pojedyncze kliknięcie na połączeniu otwiera je - - - Pojedyncze klikniknięcie na otwarym połączeniu przełącza na nie - - - Socks 5 - - - Sortuj - - - Rosnąco (A-Z) - - - Malejąco (Z-A) - - - Aby więcej się dowiedzieć sprawdź w systemie pomocy: Rozpocznij Pracę - Konfiguracja SQL. - - - Serwer SQL: - - - SSH wersja 1 - - - SSH wersja 2 - - - Transfer SSH w tle nie powiódł się! - - - Transfer SSH nie powiódł się. - - - Początkowe IP - - - Port początkowy - - - Uruchomienie/Wyjście - - - Stan - - - Przełącz do okna powiadomień dla: - - - Zaawansowane - - - Aktualizacje - - - Telnet - - - Błąd ({0}) - - - Informacja ({0}) - - - Hasło - - - Wybierz panel - - - Ostrzeżenie ({0}) - - - Transfer - - - Spróbuj zintegrować - - - Ultra VNC Repeater - - - mRemoteNG wymaga aktualizacji - - - mRemoteNG może okresowo łączyć się do strony mRemoteNG, aby sprawdzić dostępność aktualizacji i zapowiedzi produktów. - - - Sprawdzenie aktualizacji nie powiodło się! - - - Pobranie zakończone! -mRemoteNG zostanie teraz zamknięty i rozpocznie instalację. - - - Pobieranie nie powiodło się! - - - Pobieranie aktualizacji nie powiodło się! - - - Co {0} dni - - - Codziennie - - - Miesięcznie - - - Tygodniowo - - - Użyj innego loginu użytkownika i hasła - - - Użytkownik - - - Użyj tego samego użytkownika i hasła - - - Użyj karty inteligentnej - - - Użyj serwera SQL aby przechowywać konfigurację połączeń - - - Wersja - - - VNC - - - Odłączenie VNC nie powiodło się! - - - Odświeżenie ekranu VNC nie powiodło się! - - - VNC SendSpecialKeys nie powiodło się! - - - Ostrzegaj, jeśli uwierzytelnianie nie powiedzie się - - - Ostrzeżenia - - - Tak - - - Wyświetlaj wiadomości następujących typów - - - Ścieżka pliku logów - - - Loguj wiadomości następujących typów - - - Wybierz katalog - - - Otwórz plik - - - Użyj domyślnego - - - Logowanie - - - Wyskakujące okienka - - - Loguj do katalogu aplikacji - - - Uwierzytelnienia - - - Timeout połączeń RDP - - - Katalog roboczy: - - - Stwórz pusty panel przy uruchamianiu mRemoteNG - - - Katalog roboczy - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.pt-BR.resx b/mRemoteNG/Language/Language.pt-BR.resx deleted file mode 100644 index de44c454f..000000000 --- a/mRemoteNG/Language/Language.pt-BR.resx +++ /dev/null @@ -1,372 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Sobre - - - AddNodeFromXML falhou! - - - Permitir apenas uma única instância do aplicativo (É necessário reiniciar o mRemoteNG) - - - Sempre - - - Conectar sempre, mesmo se a autenticação falhar - - - Sempre mostrar a caixa de diálogo de seleção de painel ao abrir conexões - - - Sempre mostrar ícone da área de notificação - - - Me pergunte novamente mais tarde - - - Personalizar as configurações agora - - - Usar as configurações recomendadas - - - {0} pode verificar automaticamente as atualizações que podem fornecer novas funcionalidades e correções de bugs. É recomendável que você permita {0} verificar atualizações semanais. - - - Configurações de atualização automática - - - Aspecto - - - Salvar automaticamente a cada: - - - Versão atual - - - & Procurar... - - - & Cancelar - - - Alterar - - - & Fechar - - - Herança padrão - - - Propriedades padrões - - - Desconectar - - - Ícone - - - & Importar - - - Herança - - - Executar o PuTTY - - - & OK - - - Propriedades - - - & Scanear - - - & Parar - - - Testar Proxy - - - Não é possível iniciar a varredura de portas, formato IP incorreto! - - - Aparência - - - Conexão - - - Mostrar - - - Gateway - - - Diversos - - - Protocolo - - - Redirecionar - - - Falha na verificação! - - - Não mostre esta mensagem novamente. - - - Este servidor proxy requer autenticação - - - Use o caminho personalizado para o PuTTY: - - - Reconectar quando estiver pronto - - - Usar um servidor proxy para se conectar - - - Nome de usuário - - - Esperar para sair - - - Verificar novamente - - - Verificar se há atualizações e anúncios na inicialização - - - Verificar agora - - - Portas fechadas - - - Recolher todas as pastas - - - Argumentos - - - Nome do arquivo - - - Mensagem - - - btnIcon_Click falhou! - - - ShowHideGridItems falhou! - - - IconMenu_Click falhou! - - - Propriedade do Objeto de grade falhou! - - - SetHostStatus falhou! - - - pGrid_PopertyValueChanged falhou! - - - Config UI carregamento falhou! - - - Tem certeza que deseja fechar o painel, "{0}"? Todas as ligações ativas serão fechadas. - - - Tem certeza que deseja excluir a ferramenta externa, "{0}"? - - - Tem certeza que deseja excluir as ferramentas externas {0} selecionadas? - - - Tem certeza que deseja excluir a ligação, "{0}"? - - - Tem certeza que deseja excluir a pasta vazia, "{0}"? - - - Tem certeza que deseja excluir a pasta, "{0}"? Pastas ou ligações que ele contém também serão excluídas. - - - Você quer fechar todas as conexões abertas? - - - Tem certeza de que deseja redefinir os painéis para o layout padrão? - - - Conectar-se - - - Se conectar em modo fullscreen - - - Conectando... - - - Protocolo evento conectado - - - Conexão para "{0}" via "{1}" estabelecido pelo usuário "{2}" (Descrição: "{3}"; Campo usuário: "{4}") - - - Conexão falhou! - - - Erro no evento de protocolo - - - Abrir conexão falhou! - - - Não é possível abrir a conexão: nenhum nome de host especificado! - - - Conexões - - - Impossível definir porta padrão! - - - Não foi possível criar o backup do arquivo de conexões! - - - Arquivo de conexões "{0}" não pôde ser carregado! - - - Arquivo de conexões "{0}" não pôde ser carregado! Começando com o novo arquivo de conexões. - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.pt.resx b/mRemoteNG/Language/Language.pt.resx deleted file mode 100644 index 2485dcf38..000000000 --- a/mRemoteNG/Language/Language.pt.resx +++ /dev/null @@ -1,1557 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Sobre - - - AddNodeFromXML falhou! - - - Permitir apenas uma instância da aplicação (obriga a reiniciar o mRemoteNG) - - - Sempre - - - Ligar sempre, mesmo se a autenticação falhar - - - Mostrar sempre a caixa de diálogo de seleção do painel ao abrir ligações - - - Sempre Mostrar painel abas - - - Mostrar sempre o ícone da área de notificação - - - Perguntar mais tarde - - - Personalizar as configurações agora - - - Usar as definições recomendadas - - - {0} pode verificar automaticamente as atualizações que podem fornecer novas funcionalidades e correções de bugs. É recomendável que você permita {0} verificar atualizações semanais. - - - Configurações de atualização automática - - - Aspeto - - - Auto salvar a cada: - - - Versão atual - - - &Procurar... - - - &Cancelar - - - Alterar - - - &Fechar - - - Herança padrão - - - Propriedades padrão - - - Desligar - - - Ícone - - - &Importação - - - Herança - - - Executar o PuTTY - - - &OK - - - Propriedades - - - &Pesquisar - - - &Parar - - - Testar Proxy - - - Não é possível iniciar a procura de portas, formato de IP incorreto! - - - Aparência - - - Ligação - - - Ecrã - - - Gateway - - - Diversos - - - Protocolo - - - Redirecionar - - - Falha na verificação! - - - Tentar reconectar automaticamente quando desconectado do servidor (RDP && ICA somente) - - - Não mostrar esta mensagem novamente. - - - Este servidor proxy requer autenticação - - - Usar caminho personalizado PuTTY: - - - Voltar a ligar quando estiver pronto - - - Usar um servidor proxy para se ligar - - - Nome de utilizador - - - Esperar para sair - - - Verifique novamente - - - Verificar se há atualizações e anúncios no arranque - - - Verificar agora - - - Verificar a correta instalação de componentes na inicialização - - - Escolher painel antes de ligar - - - Portas fechadas - - - Recolher todas as pastas - - - Argumentos - - - Nome do arquivo - - - Mensagem - - - Impossível processar argumentos da linha de comando! - - - btnIcon_Click falhou! - - - ShowHideGridItems falhou! - - - IconMenu_Click falhou! - - - Propriedade do Objeto de grade falhou! - - - SetHostStatus falhou! - - - pGrid_PopertyValueChanged falhou! - - - Config UI carregamento falhado! - - - Tem certeza que deseja fechar o painel, "{0}"? Todas as ligações ativas serão fechadas. - - - Tem certeza que deseja excluir a ferramenta externa, "{0}"? - - - Tem certeza que deseja excluir as ferramentas externas {0} selecionadas? - - - Tem certeza que deseja excluir a ligação, "{0}"? - - - Tem certeza que deseja excluir a pasta vazia, "{0}"? - - - Tem certeza que deseja excluir a pasta, "{0}"? Pastas ou ligações que ele contém também serão excluídas. - - - Pretende fechar todas as ligações abertas? - - - Tem certeza de que deseja redefinir os painéis para seu layout padrão? - - - Ligar - - - Ligar em modo de tela cheia - - - A ligar... - - - Protocolo ligado - - - ligação como "{0}" via "{1}" estabelecido pelo utilizador "{2}" (Descrição: "{3}"; Campo de utilizador: "{4}") - - - Ligação falhada! - - - Erro no evento de protocolo - - - A abrir ligação falhada! - - - Não é possível abrir a ligação: Nome host não especificado! - - - Ligações - - - Impossível definir porta padrão! - - - Não foi possível criar backup de arquivo de ligações! - - - Arquivo de ligações "{0}" não pôde ser carregado! - - - Arquivo de ligações "{0}" não pôde ser carregado! A iniciar com o novo arquivo de ligações. - - - Impossível salvar arquivo de ligações como "{0}"! - - - Ligar em modo consola - - - Ligar (com opções) - - - Ligação para {0} por {1} fechada pelo utilizador {2}. - - - Evento de ligação fechado - - - Evento de fecho de ligação falhou! - - - Impossível criar novo arquivo de ligações! - - - Não foi possível encontrar o controlo ToolStrip em FilteredPropertyGrid. - - - Detetar - - - Não ligar se a autenticação falhar - - - Duplo clique no guia para fechar - - - Obter e instalar - - - Duplicar - - - Continuar sem senha? - - - Para Nome de utilizador, senha ou domínio vazios, usar: - - - Encriptar todo o arquivo de ligações - - - IP final - - - Porta final - - - AddExternalToolsToToolBar (frmMain) falhou. {0} - - - AddFolder (interface do usuário.Falha de Window.Tree). {0} - - - A versão de banse de dados {0} não é compatível com esta versão do {1}. - - - Impossível salvar lista de ligação. - - - Falha de descriptografia. {0} - - - Falha de descriptografia. {0} - - - Erros - - - O arquivo de inicialização de ligação não pôde ser carregado.{0}{0}{2}{0}{3}{0}{0}A fim de evitar perda de dados, {1} vai sair agora. - - - VerifyDatabaseVersion (Config.Connections.Save) falhou. {0} - - - Expandir todas as pastas - - - Experimental - - - Exportar - - - Todos os arquivos (*.*) - - - Arquivos de aplicação (*.exe) - - - mRemote arquivos CSV (.csv) - - - mRemote arquivos XML (*.XML) - - - Arquivos RDP (*.rdp) - - - Herdar {0} - - - Descrição das propriedades herdadas: {0} - - - Libertar - - - Ecrã completo - - - Geral - - - Ocorreu um erro ao carregar a entrada de ligação para "{0}" de "{1}". {2} - - - Ligação automática - - - Propriedades de ferramentas externas - - - Arquivos - - - Host - - - HTTP Falhou a ligação! - - - Impossível criar nova ligação HTTP! - - - Alteração da aba HTTP falhou! - - - Falhou configuração de props HTTP! - - - Identificar guias de ligação rápida, adicionando o prefixo "rápido:" - - - Importar do Active Directory - - - Importar de Port Scan - - - Informações - - - Libertação do Int App falhou! - - - Foco Int App falhou! - - - Int App Handle: {0} - - - Processo de matar Int App falhou! - - - Redimensionamento do Int App falhou! - - - ---Coisas IntApp-- - - - Int App título: {0} - - - Endereço: - - - Ao fechar ligações: - - - Nome a exibir - - - Domínio - - - Hostname: - - - Edição portátil - - - Para configurar as sessões PuTTY clique neste botão: - - - Máxima tempo de espera para PuTTY e ferramentas externas integradas: - - - Lançado sob a GNU General Public License (GPL) - - - segundos - - - Selecione um painel na lista abaixo ou clique em Novo para adicionar um novo. Clique em OK para continuar. - - - Estado do servidor: - - - Banco de dados: - - - Verificar: - - - Língua - - - (Detectar automaticamente) - - - {0} deve ser reiniciado antes que alterações à língua entrem em vigor. - - - Falhou carregamento do SQL! - - - Falhou carregamento do XML! - - - Arquivo local - - - Arquivo local inexistente! - - - Adicionar o Painel de Ligação - - - Verificar se há atualizações - - - Config - - - Painéis de ligações - - - Copiar - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - Excluir ferramenta externa... - - - Doar - - - Duplicar Aba - - - Sair - - - Barra de ferramentas externas - - - &Arquivo - - - &Ajuda - - - Ajuda mRemoteNG - - - Executar Ferramenta Externa - - - Novo arquivo de ligações - - - Nova ferramenta externa - - - Notificações - - - Copie todos - - - Apagar tudo - - - Abrir arquivo de ligações... - - - Opções - - - Varrer portas - - - Barra de ferramentas simples - - - Ligar novamente - - - Atualizar ecrã (VNC) - - - Renomear aba - - - Relatar um erro - - - Repôr o layout - - - Salvar arquivo de ligações - - - Salvar arquivo de ligações, como... - - - Enviar teclas especiais (VNC) - - - Visualizar texto - - - SmartSize (RDP/VNC) - - - Transferência de Ficheiro SSH - - - Iniciar chat (VNC) - - - Fórum de suporte - - - &Ferramentas - - - Transferência de arquivo (SSH) - - - &Vista - - - Somente ver (VNC) - - - Sítio - - - Minimizar para área de notificação - - - Mover para baixo - - - Mover para cima - - - Minhas atuais credenciais (informações de logon do Windows) - - - Nunca - - - Nova ligação - - - Nova pasta - - - Novo painel - - - Novo título - - - Não - - - Sem compactação - - - Nenhuma App externa especificada. - - - Nenhum - - - Normal - - - Não SmartSize - - - Nenhuma atualização disponível - - - Você está a tentar carregar um arquivo de ligações que foi criado usando uma versão muito inicial do mRemote, isso poderia resultar erro de execução. Se o erro acontecer, crie um novo arquivo de ligações! - - - Abrir nova aba à direita da guia selecionada - - - Portas abertas - - - Tema - - - &Excluir - - - &Novo - - - Nome do painel - - - Proteger com senha - - - Por favor, preencha todos os campos - - - Impossível carregar o painel PortScan! - - - Digite o nome do host ou o ip onde pretende ligar-se. - - - Alterne todas as opções de herança. - - - Selecione o nível de autenticação a usar nesta ligação. - - - Selecione como se deseja autenticar no servidor VNC. - - - Selecione se deseja usar a cache bitmap ou não. - - - Selecione a qualidade de cor a ser usada. - - - Selecione o valor de compressão a ser usado. - - - Colocar suas anotações ou descrição para o host aqui. - - - Selecione Sim se o tema do host remoto deve ser exibido. - - - Selecione Sim se o papel de parede do host remoto deve ser exibido. - - - Digite o seu domínio. - - - Selecione se deseja usar a composição de área de trabalho ou não. - - - Selecione se deseja utilizar a suavização de fonte ou não. - - - Selecione o modo de codificação a ser usado. - - - Selecione a ferramenta externa a ser iniciada. - - - Selecione uma ferramenta externa a ser iniciada após desligar do host remoto. - - - Selecione uma ferramenta externa para ser iniciado antes de estabelecida a ligação com o host remoto. - - - Escolha um ícone que será exibido quando ligado ao host. - - - Se você deseja usá-lo em uma ferramenta externa, digite o endereço MAC do host remoto. - - - Este é o nome que será exibido na árvore de ligações. - - - Define o painel em que a ligação será aberta. - - - Digite sua senha. - - - Insira a porta que o protocolo estará a escutar. - - - Escolha protocolo o mRemoteNG deve usar para se ligar ao host. - - - Selecione uma sessão PuTTY para ser usada na ligação. - - - Especifica o nome de domínio que um utilizador fornece para conectar para o servidor Gateway RD. - - - Especifica o nome do host do servidor Gateway de área de trabalho remota. - - - Especifica quando usar um servidor de Gateway de Desktop remoto (RD Gateway). - - - Especifica se para se identificar o gateway usa o mesmo nome de utilizador e senha. - - - Especifica o nome de domínio que um utilizador fornece para ligar para o servidor Gateway RD. - - - Selecione se as unidades de disco locais deve ser mostradas no host remoto. - - - Selecione se as combinações de teclas (por exemplo, Alt-Tab) devem ser redirecionadas para o host remoto. - - - Selecione se as portas locais (isto é. com, paralela) devem ser mostradas no host remoto. - - - Selecione se impressoras locais devem ser mostradas no host remoto. - - - Selecione se Smart Cards locais devem estar disponíveis no host remoto. - - - Selecione como o som remoto deve ser redirecionado. - - - Selecione um dos mecanismos de renderização disponíveis que serão usados para exibir o HTML. - - - Escolha a resolução ou o modo em que esta ligação será aberta. - - - Selecione o modo de SmartSize a ser usado. - - - ligar-se à sessão consola do host remoto. - - - Use o Credential Security Support Provider (CredSSP) para autenticação, se ele estiver disponível. - - - Insira qualquer informação que necessite aqui. - - - Digite seu nome de utilizador. - - - Se você deseja estabelecer uma ligação única de exibição para o host, selecione Sim. - - - Digite o endereço de proxy a ser usado. - - - Digite a sua senha para autenticar no proxy. - - - Digite a porta que do servidor proxy escuta. - - - Se você usar um proxy para ligações de VNC do túnel, selecione qual é o tipo. - - - Digite seu nome de utilizador para se autenticar no proxy. - - - HostName/IP - - - Todos - - - Autenticação de servidor - - - Modo de autenticação - - - Cache Bitmaps - - - Cores - - - Compressão - - - Descrição - - - Temas de ecrã - - - Papel de parede do ecrã - - - Composição do desktop - - - Suavização de fonte - - - Codificação - - - Ferramenta externa - - - Ferramenta externa após - - - Ferramenta externa antes - - - Endereço MAC - - - Nome - - - Painel - - - Senha - - - Porta - - - Sessão de puTTY - - - Domínio da gateway - - - Nome do host gateway - - - Senha de Gateway de área de trabalho remota - - - Usar o Gateway - - - Credenciais de gateway - - - Nome de utilizador do gateway - - - Unidades de disco - - - Combinações de teclas - - - Portas - - - Impressoras - - - Sons - - - Motor de renderização - - - Resolução - - - Modo de SmartSize - - - Use a sessão de Consola - - - Utilize o CredSSP - - - Campo de utilizador - - - Endereço proxy - - - Senha proxy - - - Porta proxy - - - Tipo de proxy - - - Nome de utilizador proxy - - - Evento de protocolo desconectado. Menssagem: {0} - - - Evento do Protocolo de desconexão falhou. {0} - - - Protocolo para importar - - - Falha no teste de proxy! - - - Teste de proxy bem sucedido! - - - Libertação do processo PuTTY falhado! - - - Impossível definir foco! - - - Putty handle: {0} - - - Falha em fechar o processo Putty! - - - Painel Handle: {0} - - - Falha no redimensionamento Putty! - - - Configurações do puTTY - - - Mostrar caixa de diálogo de configurações PuTTY na falha! - - - --Coisas PuTTY-- - - - Título PuTTY: {0} - - - Rápido: {0} - - - Ligação rápida - - - Falha a adicionar ligação rápida! - - - Criação ligação rápida falhou - - - &Avisar-me quando fechar ligações - - - Avisar-me apenas ao &sair do mRemoteNG - - - Avisar-me somente ao fechar ligações múltiplas - - - &Não avisar ao fechar ligações - - - RAW - - - RDP - - - 16777216 Cores (32 bits) - - - 256 Cores (8 bits) - - - 32768 Cores (15 bits) - - - 16777216 Cores (32 bits) - - - 65536 Cores (16 bits) - - - Impossível criar controlo RDP, por favor verifique os requisitos mRemoteNG. - - - Desativar o piscar do Cursor - - - Desativar a sombra do o Cursor - - - Desativar o arrastar completo da janela - - - Desabilitar as animações do Menu - - - RDP falhou desligar, tentando fechar! - - - Código de erro interno 1. - - - Código de erro interno 2. - - - Código de erro interno 3. Este não é um estado válido. - - - Código de erro interno 4. - - - Erro irrecuperável durante a ligação ao cliente. - - - GetError falhou (FatalErrors) - - - Ocorreu um erro de falta de memória. - - - Ocorreu um erro desconhecido. - - - Ocorreu um erro de criação da janela. - - - Erro de inicialização Winsock. - - - Ajustar ao painel - - - Foco de RDP falhou! - - - RD Gateway suportado. - - - Gateway de RD não suportado! - - - Contador de re-ligação RDP: - - - Falha no RDP SetAuthenticationLevel! - - - Falha no RDP SetUseConsoleSession! - - - Configuração do Interruptor de Console para RDC {0}. - - - Falha no RDP SetCredentials! - - - Falha no RDP SetEventHandlers! - - - Falha no RDP SetRDGateway! - - - Falha no RDP SetPerformanceFlags! - - - Falha no RDP SetPort! - - - Falha no RDP SetProps! - - - Redirecionamento RDP falhou! - - - Configuração de teclas de redirecionamento RDP falhou! - - - RDP SetResolution falhou! - - - Trazer para este computador - - - Não executar - - - Deixar no computador remoto - - - RDP ToggleFullscreen falhou! - - - RDP ToggleSmartSize falhou! - - - Reconectar as sessões anteriormente abertas na inicialização - - - Arquivo remoto - - - Remover todos - - - Renomear - - - Rlogin - - - Salvar - - - Salvar tudo - - - Você deseja salvar o arquivo atual de ligações antes de carregar outro? - - - Salvar as ligações à saída - - - Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png - - - Ecrã - - - Imagem do ecrã - - - Imagens do ecrã - - - Pesquisa - - - Enviar para... - - - Definir o hostname como nome quando criar ou renomear as ligações - - - Impossível salvar configurações ou libertar o ícone SysTray! - - - Mostrar dicas de ferramentas de descrição na árvore de ligação - - - Mostrar o caminho do arquivo completo de ligações no título da janela - - - Mostrar informações de logon no nome da guia - - - Mostrar protocolos no nome da guia - - - Clique simples abre ligação - - - Clique simples em ligação aberta alterna - - - Stocks 5 - - - Ordenar - - - Crescente (A-Z) - - - Decrescente (Z-A) - - - Para mais informação consulte ajuda - Introdução - configuração de SQL! - - - SQL Server - - - SSH versão 1 - - - SSH versão 2 - - - SSH falha de transferência de plano de fundo! - - - IP de início - - - Porta de início - - - Iniciar/Sair - - - Estado - - - Trocar para o painel de notificações: - - - Avançado - - - Abas && painéis - - - Atualizações - - - Telnet - - - A seguir: - - - Erro ({0}) - - - Informações ({0}) - - - Senha - - - Selecione o painel - - - Aviso ({0}) - - - Transferência - - - Tentar integrar - - - Repetidor Ultra VNC - - - Porta UltraVNC SingleClick: - - - Desmarcar as propriedades que não deseja salvar! - - - mRemoteNG requer uma atualização - - - mRemoteNG periodicamente pode se ligar ao site mRemoteNG para verificar se há atualizações e anúncios de produtos. - - - Seleção de atualização falhou! - - - Download completo! mRemoteNG agora irá parar e começar com a instalação. - - - Falha no download! - - - Download de atualização falhado! - - - Em cada {0} dias - - - Diário - - - Mensal - - - Semanal - - - Usar um nome diferente de utilizador e senha - - - Utilizador - - - Use o mesmo nome de utilizador e senha - - - Usar um smart card - - - Usar o SQL Server para carregar && salvar as ligações - - - Versão - - - VNC - - - Falhou a desconexão VNC! - - - Falha de atualização de ecrã VNC! - - - VNC SendSpecialKeys falhou! - - - Falhou configuração de eventos VNC! - - - Falhou configuração Props VNC! - - - VNC Toggle SmartSize falhou! - - - VNC Toggle ViewOnly falhou! - - - Avisar-me se a autenticação falhar - - - Avisos - - - Sim - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.resx b/mRemoteNG/Language/Language.resx deleted file mode 100644 index 80427b75e..000000000 --- a/mRemoteNG/Language/Language.resx +++ /dev/null @@ -1,2226 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - About - - - Active Directory - - - AddNodeFromXML failed! - - - Allow only a single instance of the application (mRemoteNG restart required) - - - Always - - - Always connect, even if authentication fails - - - Always show panel selection dialog when opening connections - - - Always show panel tabs - - - Always show notification area icon - - - Ask me again later - - - Customize the settings now - - - Use the recommended settings - - - {0} can automatically check for updates that may provide new features and bug fixes. It is recommended that you allow {0} to check for updates weekly. - - - Automatic update settings - - - Aspect - - - Auto save time in minutes (0 means disabled): - - - Latest version - - - &Browse... - - - &Cancel - - - Change - - - &Close - - - Default Inheritance - - - Default Properties - - - Disconnect - - - Icon - - - &Import - - - Inheritance - - - &Launch - - - Launch PuTTY - - - &OK - - - Properties - - - &Scan - - - &Stop - - - Test Proxy - - - Cannot start Port Scan, incorrect IP format! - - - Appearance - - - Connection - - - Display - - - Gateway - - - Miscellaneous - - - Protocol - - - Redirect - - - Check failed! - - - Automatically try to reconnect when disconnected from server (RDP && ICA only) - - - Do not show this message again. - - - This proxy server requires authentication - - - Use custom PuTTY path: - - - Reconnect when ready - - - Use a proxy server to connect - - - API User ID - - - Username - - - Wait for exit - - - Check Again - - - Check for updates at startup - - - Check now - - - Check proper installation of components at startup - - - Choose panel before connecting - - - Closed Ports - - - Collapse all folders - - - Arguments - - - Filename - - - Message - - - E&xit {0} - - - Couldn't parse command line args! - - - &Open a connection file - - - &Try again - - - {0} has detected the Lenovo Auto Scroll Utility running on this system. This utility is known to cause problems with {0}. It is recommended that you disable or uninstall it. - - - Compatibility problem detected - - - btnIcon_Click failed! - - - ShowHideGridItems failed! - - - IconMenu_Click failed! - - - Property Grid object failed! - - - SetHostStatus failed! - - - pGrid_PopertyValueChanged failed! - - - Config UI load failed! - - - Are you sure you want to close the panel, "{0}"? Any connections that it contains will also be closed. - - - Are you sure you want to delete the external tool, "{0}"? - - - Are you sure you want to delete the {0} selected external tools? - - - Are you sure you want to delete the connection, "{0}"? - - - Are you sure you want to delete the empty folder, "{0}"? - - - Are you sure you want to delete the folder, "{0}"? Any folders or connections that it contains will also be deleted. - - - Do you want to close all open connections? - - - Are you sure you want to reset the panels to their default layout? - - - Connect - - - Connect in fullscreen mode - - - Connecting... - - - Protocol Event Connected - - - Connection to "{0}" via "{1}" established by user "{2}" (Description: "{3}"; User Field: "{4}") - - - Connection failed! - - - A connection protocol error occurred. Host: "{1}"; Error code: "{2}"; Error Description: "{0}" - - - Opening connection failed! - - - Cannot open connection: No hostname specified! - - - Connections - - - Couldn't set default port! - - - Couldn't create backup of connections file! - - - Connections file "{0}" could not be loaded! - - - Connections file "{0}" could not be loaded! -Starting with new connections file. - - - Couldn't save connections file as "{0}"! - - - Connect without credentials - - - Connect to console session - - - Connect (with options) - - - Connection to {0} via {1} closed by user {2}. - - - Connection Event Closed - - - Connection Event Closed failed! - - - Couldn't create new connections file! - - - Could not find ToolStrip control in FilteredPropertyGrid. - - - Detect - - - Don't connect to console session - - - Don't connect if authentication fails - - - Double click on tab closes it - - - Download and Install - - - Duplicate - - - Do you want to continue with no password? - - - For empty Username, Password or Domain fields use: - - - Completely encrypt connection file - - - Last IP - - - Last Port - - - AddExternalToolsToToolBar (frmMain) failed. {0} - - - AddFolder (UI.Window.ConnectionTreeWindow) failed. {0} - - - The database version {0} is not compatible with this version of {1}. - - - The connection list could not be saved. - - - PuTTY could not be launched. - - - Decryption failed. {0} - - - Encryption failed. {0} - - - The Windows security setting, "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing", is enabled. - -See the Microsoft Support article at http://support.microsoft.com/kb/811833 for more information. - -{0} is not fully FIPS compliant. Click OK to proceed at your own discretion, or Cancel to Exit. - - - Errors - - - The startup connection file could not be loaded.{0}{0}{2}{0}{3}{0}{0}In order to prevent data loss, {1} will now exit. - - - VerifyDatabaseVersion (Config.Connections.Save) failed. {0} - - - Expand all folders - - - Experimental - - - Export - - - Export everything - - - Export File - - - Export Items - - - Export Properties - - - Export the currently selected connection - - - Export the currently selected folder - - - &Export to File... - - - New External Tool - - - File &Format: - - - All Files (*.*) - - - All importable files - - - Application Files (*.exe) - - - mRemote CSV Files (*.csv) - - - mRemote XML Files (*.xml) - - - PuTTY Connection Manager files - - - Remote Desktop Connection Manager files (*.rdg) - - - RDP Files (*.rdp) - - - Inherit {0} - - - Description of inherited property: {0} - - - Free - - - Fullscreen - - - General - - - An error occured while loading the connection entry for "{0}" from "{1}". {2} - - - Automatic Reconnect - - - External Tool Properties - - - Files - - - Host - - - HTTP - - - HTTP Connect Failed! - - - Couldn't create new HTTP Connection! - - - Changing HTTP Document Tile Failed! - - - Internet Explorer - - - HTTPS - - - Set HTTP Props failed! - - - Identify quick connect tabs by adding the prefix "Quick:" - - - Import from Active Directory - - - An error occurred while importing the file "{0}". - - - Import from &File... - - - Import from Port Scan - - - Informations - - - Dispose of Int App process failed! - - - Int App Focus Failed! - - - Int App Handle: {0} - - - Killing Int App Process failed! - - - Int App Resize failed! - - - --- IntApp Stuff --- - - - Int App Title: {0} - - - Address: - - - When closing connections: - - - Display Name - - - Domain - - - Hostname: - - - Portable Edition - - - To configure PuTTY sessions click this button: - - - Maximum PuTTY and integrated external tools wait time: - - - Released under the GNU General Public License (GPL) - - - Seconds - - - Select a panel from the list below or click New to add a new one. Click OK to continue. - - - Server status: - - - Database: - - - Verify: - - - Language - - - (Automatically Detect) - - - {0} must be restarted before changes to the language will take effect. - - - Load from SQL failed - - - The connection information could not be loaded from the SQL server. - - - Load From XML failed! - - - Local file - - - Local file does not exist! - - - Add Connection Panel - - - Check for Updates - - - Config - - - Connection Panels - - - Copy - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - Delete External Tool... - - - Donate - - - Duplicate Tab - - - Exit - - - External Tools Toolbar - - - &File - - - &Help - - - mRemoteNG Help - - - Launch External Tool - - - New Connection File - - - New External Tool - - - Notifications - - - Copy All - - - Delete All - - - Open Connection File... - - - Options - - - Port Scan - - - Quick Connect Toolbar - - - Reconnect - - - Refresh Screen (VNC) - - - Rename Tab - - - Report a Bug - - - Reset layout - - - Save Connection File - - - Save Connection File As... - - - Send Special Keys (VNC) - - - &Show Help Text - - - Show Text - - - SmartSize (RDP/VNC) - - - SSH File Transfer - - - Start Chat (VNC) - - - Support Forum - - - &Tools - - - Transfer File (SSH) - - - &View - - - View Only - - - Website - - - Minimize to notification area - - - Move down - - - Move up - - - mRemoteNG CSV - - - mRemoteNG XML - - - My current credentials (Windows logon information) - - - Never - - - New Connection - - - New Folder - - - New Panel - - - New Title - - - No - - - No сompression - - - No ext. app specified. - - - None - - - Normal - - - No SmartSize - - - No update available - - - You are trying to load a connection file that was created using an very early version of mRemote, this could result in an runtime error. -If you run into such an error, please create a new connection file! - - - Open new tab to the right of the currently selected tab - - - Open Ports - - - Testing... - - - Theme - - - &Delete - - - &New - - - Panel Name - - - Password protect - - - Both passwords must match. - - - The password must be at least 3 characters long. - - - Please fill all fields - - - Port scan complete. - - - Couldn't load PortScan panel! - - - Enter the hostname or ip you want to connect to. - - - Toggle all inheritance options. - - - Select which authentication level this connection should use. - - - Select how you want to authenticate against the VNC server. - - - Select whether to automatically resize the connection when the window is resized or when fullscreen mode is toggled. Requires RDC 8.0 or higher. - - - Select whether to use bitmap caching or not. - - - Select the color quality to be used. - - - Select the compression value to be used. - - - Put your notes or a description for the host here. - - - Select yes if the theme of the remote host should be displayed. - - - Select yes if the wallpaper of the remote host should be displayed. - - - Enter your domain. - - - Select whether to use desktop composition or not. - - - Select whether to use font smoothing or not. - - - Select the encoding mode to be used. - - - Select the external tool to be started. - - - Select a external tool to be started after the disconnection to the remote host. - - - Select a external tool to be started before the connection to the remote host is established. - - - Choose a icon that will be displayed when connected to the host. - - - Specifies the load balancing information for use by load balancing routers to choose the best server. - - - Enter the MAC address of the remote host if you wish to use it in an external tool. - - - This is the name that will be displayed in the connections tree. - - - Sets the panel in which the connection will open. - - - Enter your password. - - - Enter the port the selected protocol is listening on. - - - Choose the protocol mRemoteNG should use to connect to the host. - - - Select a PuTTY session to be used when connecting. - - - Specifies the domain name that a user provides to connect to the RD Gateway server. - - - Specifies the host name of the Remote Desktop Gateway server. - - - Specifies when to use a Remote Desktop Gateway (RD Gateway) server. - - - Specifies whether or not to log on to the gateway using the same username and password as the connection. - - - Specifies the user name that a user provides to connect to the RD Gateway server. - - - Select whether local disk drives should be shown on the remote host. - - - Select whether key combinations (e.g. Alt-Tab) should be redirected to the remote host. - - - Select whether local ports (ie. com, parallel) should be shown on the remote host. - - - Select whether local printers should be shown on the remote host. - - - Select whether the clipboard should be shared. - - - Select whether local smart cards should be available on the remote host. - - - Select how remote sound should be redirected. - - - Select whether the default audio input device on the remote machine should be redirected to this computer. - - - Select one of the available rendering engines that will be used to display HTML. - - - Choose the resolution or mode this connection will open in. - - - Select the SmartSize mode to be used. - - - Connect to the console session of the remote host. - - - Use the Credential Security Support Provider (CredSSP) for authentication if it is available. - - - Feel free to enter any information you need here. - - - Enter the ID of user data in external API (e.g. secret server). when used, leave username/password/domain fields empty - - - Enter your username. - - - If you want to establish a view only connection to the host select yes. - - - Enter the proxy address to be used. - - - Enter your password for authenticating against the proxy. - - - Enter the port the proxy server listens on. - - - If you use a proxy to tunnel VNC connections, select which type it is. - - - Enter your username for authenticating against the proxy. - - - Hostname/IP - - - All - - - Server Authentication - - - Authentication mode - - - Automatic resize - - - Cache Bitmaps - - - Colors - - - Compression - - - Description - - - Display Themes - - - Display Wallpaper - - - Desktop Composition - - - Font Smoothing - - - Encoding - - - External Tool - - - External Tool After - - - External Tool Before - - - Load Balance Info - - - MAC Address - - - Name - - - Panel - - - Password - - - Port - - - PuTTY Session - - - Gateway Domain - - - Gateway Hostname - - - Remote Desktop Gateway Password - - - Use Gateway - - - Gateway Credentials - - - Gateway Username - - - Disk Drives - - - Key Combinations - - - Ports - - - Printers - - - Clipboard - - - Sounds - - - Audio Capture - - - Rendering Engine - - - Resolution - - - SmartSize Mode - - - Use Console Session - - - Use CredSSP - - - User Field - - - Proxy Address - - - Proxy Password - - - Proxy Port - - - Proxy Type - - - Proxy Username - - - Protocol Event Disconnected. Host: "{1}"; Protocol: "{2}" Message: "{0}" - - - Protocol Event Disconnected failed. -{0} - - - Protocol to import - - - Proxy test failed! - - - Proxy test succeeded! - - - Dispose of Putty process failed! - - - Couldn't set focus! - - - Putty Handle: {0} - - - Killing Putty Process failed! - - - Panel Handle: {0} - - - Putty Resize Failed! - - - PuTTY Saved Sessions - - - PuTTY Settings - - - Show PuTTY Settings Dialog failed! - - - --- PuTTY Stuff --- - - - PuTTY Title: {0} - - - Quick: {0} - - - Quick Connect - - - Quick Connect Add Failed! - - - Creating quick connect failed - - - Warn me when closing connections - - - Warn me only when e&xiting mRemoteNG - - - Warn me only when closing &multiple connections - - - Do &not warn me when closing connections - - - RAW - - - RDP - - - 16777216 Colors (24-bit) - - - 256 Colours (8-bit) - - - 32768 Colors (15-bit) - - - 16777216 Colors (32-bit) - - - 65536 Colors (16-bit) - - - Couldn't create RDP control, please check mRemoteNG requirements. - - - Disable Cursor blinking - - - Disable Cursor Shadow - - - Disable Full Window drag - - - Disable Menu Animations - - - RDP Disconnect failed, trying to close! - - - Internal error code 1. - - - Internal error code 2. - - - Internal error code 3. This is not a valid state. - - - Internal error code 4. - - - An unrecoverable error has occurred during client connection. - - - GetError failed (FatalErrors) - - - An out-of-memory error has occurred. - - - An unknown error has occurred. - - - A window-creation error has occurred. - - - Winsock initialization error. - - - Fit To Panel - - - RDP Focus failed! - - - RDP Gateway is supported. - - - RDP Gateway is not supported! - - - RDP reconnection count: - - - RDP SetAuthenticationLevel failed! - - - RDP SetUseConsoleSession failed! - - - RDP Setting Console switch for RDC {0}. - - - RDP SetCredentials failed! - - - RDP SetEventHandlers failed! - - - RDP SetRDGateway failed! - - - RDP SetPerformanceFlags failed! - - - RDP SetPort failed! - - - RDP SetProps failed! - - - RDP Set Redirection Failed! - - - RDP Set Redirect Keys Failed! - - - RDP SetResolution failed! - - - Bring to this computer - - - Do not play - - - Leave at remote computer - - - RDP ToggleFullscreen failed! - - - RDP ToggleSmartSize failed! - - - Reconnect to previously opened sessions on startup - - - Remote file - - - Remove All - - - Rename - - - Rlogin - - - Save - - - Save All - - - Do you want to save the current connections file before loading another? - - - Daily - - - Connection Backup Frequency - - - Weekly - - - Maximum number of backups - - - Location of connection file backup - - - On Edit - - - On Exit - - - Never backup connections - - - Browse... - - - Backup - - - Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png - - - Screen - - - Screenshot - - - Screenshots - - - Search - - - Send To... - - - Set hostname like display name when creating or renaming connections - - - Couldn't save settings or dispose SysTray Icon! - - - Show description tooltips in connection tree - - - Show full connections file path in window title - - - Show logon information on tab names - - - Show protocols on tab names - - - Single click on connection opens it - - - Single click on opened connection in Connection Tree switches to opened Connection Tab - - - Socks 5 - - - Sort - - - Ascending (A-Z) - - - Descending (Z-A) - - - Please see Help - Getting started - SQL Configuration for more Info! - - - SQL Server - - - SSH version 1 - - - SSH version 2 - - - SSH background transfer failed! - - - SSH transfer failed. - - - First IP - - - First Port - - - Startup/Exit - - - Status - - - Switch to Notifications panel on: - - - Advanced - - - Tabs && Panels - - - Updates - - - Telnet - - - The following: - - - Error ({0}) - - - Information ({0}) - - - mRemoteNG password - - - mRemoteNG password for {0} - - - Select Panel - - - Warning ({0}) - - - Transfer - - - Try to integrate - - - Show On Toolbar - - - Ultra VNC Repeater - - - UltraVNC SingleClick port: - - - Uncheck the properties you want not to be saved! - - - mRemoteNG requires an update - - - mRemoteNG can periodically connect to the mRemoteNG website to check for updates. - - - The update information could not be downloaded. - - - Download complete! -mRemoteNG will now quit and begin with the installation. - - - The update could not be downloaded. - - - The update download could not be initiated. - - - Every {0} days - - - Daily - - - Monthly - - - Weekly - - - The change log could not be downloaded. - - - Use a different username and password - - - User - - - Use the same username and password - - - Use a smart card - - - Use SQL Server to load && save connections - - - Version - - - VNC - - - VNC disconnect failed! - - - VNC Refresh Screen Failed! - - - VNC SendSpecialKeys failed! - - - VNC Set Event Handlers failed! - - - VNC Set Props Failed! - - - VNC Toggle SmartSize Failed! - - - VNC Toggle ViewOnly Failed! - - - Warn me if authentication fails - - - Warnings - - - Yes - - - RDP Connection Timeout - - - This node is already in this folder. - - - Cannot drag node onto itself. - - - Cannot drag parent node onto child. - - - This node is not draggable. - - - Block Cipher Mode - - - Encryption Engine - - - Security - - - Key Derivation Function Iterations - - - Dynamic - - - High - - - Medium - - - Choose the Sound Quality provided by the protocol: Dynamic, Medium, High - - - Sound quality - - - Download Completed! - - - Download - - - The number of minutes for the RDP session to sit idle before automatically disconnecting (for no limit use 0) - - - Minutes to Idle - - - Add - - - Title - - - Are you sure you want to delete the credential record, {0}? - - - Select whether to receive an alert after the RDP session disconnects due to inactivity - - - Password must contain at least {0} of the following characters: {1} - - - Password must contain at least {0} lower case character(s) - - - Password must contain at least {0} number(s) - - - Password must contain at least {0} upper case character(s) - - - Password length must be between {0} and {1} - - - Choose a path for the mRemoteNG log file - - - Debug - - - Show these message types - - - Log file path - - - Log these message types - - - Choose path - - - Open file - - - Use default - - - Logging - - - Popups - - - Log to application directory - - - Assigned Credential - - - Credentials - - - Open a different file - - - Credential not available - - - Do you really want to delete the theme? - - - New theme name - - - Cannot create theme, name already present or special characters in the name - - - Type the new theme name - - - Warning: Restart is required to commit any theme configuration change. - - - Could not find external tool with name "{0}" - - - Create a New Connection File - - - The connection file could not be found. - - - Import an Existing File - - - Use a Custom File Path - - - Testing connection - - - Server '{0}' was not accessible. - - - Connection successful - - - Login failed for user '{0}'. - - - Database '{0}' not available. - - - Save connections after every edit - - - Filter search matches in connection tree - - - Test connection - - - Read only: - - - Use UTF8 encoding for RDP "Load Balance Info" property - - - Timeout [seconds] - - - Working directory: - - - Run elevated - - - Show on toolbar column - - - Working directory - - - Lock toolbar positions - - - Multi SSH toolbar - - - Import sub OUs - - - Advanced security options - - - mRemoteNG Options - - - Create an empty panel when mRemoteNG starts - - - Must Be Between 0 and 255 - - - Out Of Range - - - Delete - - - Reconnect All Connections - - - UltraVNC SingleClick - - - Disconnect Tabs To The Right - - - Disconnect All But This - - - Are you sure you want to close all connections except for "{0}"? - - - An error occurred while trying to reconnect to RDP host '{0}' - - - An error occurred while trying to change the connection resolution to host '{0}' - - - Stack trace - - - Exception Message - - - mRemoteNG Unhandled Exception - - - An unhandled exception has occurred - - - This exception will force mRemoteNG to close - - - Copy Hostname - - - Place search bar above connection tree - - - Track active connection in the connection tree - - - Always show connection tabs - - - Release Channel - - - Stable channel includes final releases only. -Preview channel includes Betas & Release Candidates. -Nightly Channel includes Alphas, Betas & Release Candidates. - - - Apply - - - Proxy - - - Multi SSH: - - - Press ENTER to send. Ctrl+C is sent immediately. - - - Show this connection in the favorites menu. - - - Favorite - - - Favorites - - - Clear search string - - - Connect in View Only mode - - - Do not trim spaces from usernames - - - Environment - - - Encrypting {0} entries using {1}/{2} and {3} iterations took {4} seconds. - - - Encryption Test - - - Test Settings - - - Sets the version of RDP to use when opening connections. - - - RDP Version - - - Use VM ID to connect to VM running on Hyper-V. - - - The ID of the Hyper-V virtual machine to connect to. - - - Use VM ID - - - VM ID - - - Could not create RDP client. RDP protocol version {0} is not supported on this machine. Please choose an older protocol version. - - - For connection through a SSH tunnel (jump host) specify SSH connection to be used to establish SSH tunnel. - - - SSH Tunnel - - - Specify here additional options to be used for SSH connection. See putty documentation for further details. - - - SSH Options - - - SSH Tunnel connection configuration problem. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. A connection with the name configured as SSH Tunnel and protocol SSH version 1 or SSH2 version 2 cannot be found in the connection tree. Clear SSH Tunnel configuration or specify existing SSH connection. - - - SSH tunnel configuration problem. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. Connection configured as SSH Tunnel found in tree, but protocol is not derived from putty. Make sure connection configured as SSH Tunnel is using SSH protocol. - - - SSH tunnel initialization problem. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. SSH connection could not be initialized. Check for any problems with the connection configured as SSH Tunnel. - - - SSH tunnel connection problem. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. SSH connection failed. Check for any problems with the connection configured as SSH Tunnel. - - - SSH tunnel connection failed. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. Putty process terminated. Check for any problems with the connection configured as SSH Tunnel. - - - SSH tunnel connection timed out. Connection to: "{0}" via SSH Tunnel: "{1}" not possible. Local tunnel port did not become available in time. Check for any problems with the connection configured as SSH Tunnel. - - - Start minimized - - - Set a password needed to encrypt the connection file with. You will be prompted to enter your passcode before starting mRemoteNG. - - - Connect to a Hyper-V host with enhanced mode enabled. - - - Use enhanced mode - - - Specifies the password of the Remote Desktop Gateway server. - - - Close to notification area - - - Windows - - - PowerShell - - - Changelog - - - Credits - - - License - - - Determines whether cursor flashes should be disabled. - - - Determines whether a mouse shadow should be visible. - - - Determines whether window content is displayed when you drag the window to a new location. - - - Determines whether menus and windows can be displayed with animation effects in the remote session. - - - Edge Chromium - - - Failed to contruct the URL to load - - - Show/Hide Menu Strip - - - The program to be started on the remote server upon connection. - - - Specifies the working directory of the alternate shell. - - - Alternate Shell - https://docs.microsoft.com/en-us/windows/win32/termserv/imstscsecuredsettings-startprogram - - - Alternate shell working directory - https://docs.microsoft.com/en-us/windows/win32/termserv/imstscsecuredsettings-workdir - - - TODO - - - TODO - - - Disk Drives - - - Smart Cards - - - Apply inheritance to children - - - Apply default inheritance - - - SmartCard - - - Remote Desktop Services - - - EC2 Instance Id - - - EC2 Region - - - use this instance id to fetch public ip from aws ec2 instance - - - fetch aws instance info from this region - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.ru.resx b/mRemoteNG/Language/Language.ru.resx deleted file mode 100644 index c268639f9..000000000 --- a/mRemoteNG/Language/Language.ru.resx +++ /dev/null @@ -1,1998 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - О программе - - - AddNodeFromXML не удалось! - - - Разрешить только один экземпляр приложения (требуется перезапуск mRemoteNG) - - - Всегда - - - Подключаться, даже если не прошел проверку - - - Всегда показывать диалог выбора панели при открытии подключения - - - Всегда показывать панель закладок - - - Всегда показывать значок в системном трее - - - Спросить позже - - - Настроить параметры сейчас - - - Использовать рекомендуемые параметры - - - {0} автоматически проверяет наличие обновлений с новыми возможностями и исправлениями ошибок. Рекомендуется разрешить {0} еженедельную проверку обновлений. - - - Параметры автоматического обновления - - - Вид - - - Автосохранение каждые: - - - Текущая версия - - - &Обзор... - - - &Отменить - - - Изменить - - - &Закрыть - - - Наследовать по умолчанию - - - Свойства по умолчанию - - - Отключиться - - - Значок - - - &Импорт - - - Наследование - - - Запуск PuTTY - - - &Да - - - Свойства - - - &Сканировать - - - &Стоп - - - Проверка прокси - - - Не удается запустить сканирование портов, неверный формат IP! - - - Внешний вид - - - Подключение - - - Вид - - - Шлюз - - - Разное - - - Протокол - - - Локальные ресурсы - - - Ошибка проверки! - - - Автоматически пытаться восстановить связь при отключении от сервера (только RDP и ICA) - - - Больше не показывать это сообщение. - - - Требуется авторизация - - - Использовать собственный путь к PuTTY: - - - Переподключиться, когда будет готово - - - Использовать прокси-сервер - - - Пользователь - - - Ждать выхода - - - Проверить - - - Проверять наличие обновлений при запуске - - - Проверить - - - При запуске проверять правильность установки компонентов - - - Выбрать панель перед подключением - - - Закрытые порты - - - Свернуть все папки - - - Аргументы - - - Имя файла - - - Сообщение - - - Невозможно разобрать аргументы командной строки! - - - {0} обнаружено что на этой системе работает утилита Lenovo Auto Scroll. Известно, что эта утилита вызывает проблемы с {0}. Рекомендуется отключить или удалить ее. - - - Обнаружена проблема совместимости - - - Ошибка btnIcon_Click! - - - Ошибка ShowHideGridItems! - - - Ошибка IconMenu_Click! - - - Ошибка свойства Grid opject! - - - Ошибка SetHostStatus! - - - Ошибка pGrid_PopertyValueChanged! - - - Ошибка загрузки Config UI! - - - Хотите закрыть панель "{0}"? Все ее подключения также будут закрыты. - - - Хотите удалить внешний инструмент, "{0}"? - - - Хотите удалить {0} выбранные внешние инструменты? - - - Хотите удалить подключение, "{0}"? - - - Хотите удалить пустую папку, "{0}"? - - - Хотите удалить папку "{0}"? Любые папки или подключения, которые она содержит также будут удалены. - - - Хотите закрыть все открытые подключения? - - - Вы действительно хотите сбросить панели в настройки по умолчанию? - - - Подключиться - - - Подключение в полноэкранном режиме - - - Подключение... - - - Журнал подключений - - - Подключение к системе "{0}" через "{1}" созданого пользователя "{2}" (Описание: "{3}"; Пользователь: "{4}") - - - Подключиться не удалось! - - - Журнал событий ErrorOccured - - - Открыть подключение не удалась! - - - Невозможно открыть подключение: имя хоста не указано! - - - Подключения - - - Не удается установить порт по умолчанию! - - - Не удалось создать резервную копию файла подключений! - - - Файл подключений "{0}" невозможно загрузить! - - - Файл подключений "{0}" невозможно загрузить! -Создайте новый файл подключений. - - - Невозможно сохранить файл в качестве подключения "{0}"! - - - Подключение к сеансу пользователя (Сеанс консоли) - - - Подключение (с параметрами) - - - Подключение к {0} по {1} закрыто пользователем {2}. - - - Подключение закрыто - - - Подключение закрыть не удалось! - - - Не удается создать новый файл подключений! - - - Не удалось найти элемент управления ToolStrip в FilteredPropertyGrid. - - - Обнаружение - - - Не подключать без проверки - - - Двойной щелчок для закрытия вкладки - - - Загрузка и установка - - - Дублировать - - - Хотите продолжить без пароля? - - - Использовать пустое имя пользователя пароль или домен: - - - Шифровать файл подключения - - - Конечный IP - - - Конечный порт - - - Ошибка добавления внешнего приложения на Панель (frmMain). {0} - - - Ошибка AddFolder (UI.Window.Tree). {0} - - - Версия базы данных {0} не совместима с этой версией {1}. - - - Невозможно сохранить список подключений. - - - Не удалось расшифровать. {0} - - - Не удалось зашифровать. {0} - - - Ошибки - - - Ошибка загрузки файла соединения.{0}{0}{2}{0}{3}{0}{0}Для предотвращения потери данных, {1} будет выполнен выход. - - - Ошибка VerifyDatabaseVersion (Config.Connections.Save). {0} - - - Раскрыть все папки - - - Экспериментально - - - Экспорт - - - Все файлы (*.*) - - - Файлы приложений (*. EXE) - - - mRemote CSV-файлы (*. CSV) - - - mRemote XML-файлы (*. XML) - - - RDP-файлы (*. RDP) - - - Наследовать {0} - - - Описание наследованного свойства: {0} - - - Свободный - - - Во весь экран - - - Главная - - - Ошибка при загрузке подключения "{0}" на "{1}". {2} - - - Автопереподключение - - - Свойства внешнего инструмента - - - Файлы - - - Хост - - - Ошибка HTTP подключения! - - - Не удается создать новое подключение HTTP! - - - Изменение HTTP документа не удалось! - - - Не удалось задать параметры HTTP! - - - Определить вкладки быстрых подключений, добавляя префикс «Quick:» - - - Импорт из Active Directory - - - Импорт из просканированных портов - - - Информация - - - Не удалось завершить процесс внутреннего приложения! - - - Внутренний инструмент: Ошибка получения фокуса! - - - Обработчик Внутр. инструментов: {0} - - - Не удалось завершить процесс внутреннего приложения! - - - Внутренний инструмент: Ошибка изменения размера! - - - --- Внутреннее приложение --- - - - Заголовок внешнего инструмента: {0} - - - Адрес: - - - При закрытии подключений: - - - Отображаемое имя: - - - Домен - - - Имя хоста: - - - Портативная версия - - - Нажмите на эту кнопку для настройки сессий PuTTY: - - - Максимальное время ожидание PuTTY и внешнего приложения: - - - Выпущено под лицензией GNU General Public License (GPL) - - - Секунд - - - Выберите панель из списка или нажмите кнопку Новая, чтобы создать новую. Нажмите кнопку OK, чтобы продолжить. - - - Состояние сервера: - - - База данных: - - - Проверка: - - - Язык - - - (Автоопределение) - - - {0} необходимо перезапустить, чтобы изменения языка вступили в силу. - - - Загрузить из SQL не удалось! - - - Загрузить из XML не удалось! - - - Локальный файл - - - Локальный файл не существует! - - - Добавить Панель подключения - - - Проверка наличия обновлений - - - Конфигурация - - - Панель подключений - - - Копировать - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - Удалить внешний инструмент... - - - Помочь проекту - - - Дублировать вкладку - - - Выход - - - Внешние инструменты - - - &Файл - - - &Справка - - - Справка mRemoteNG - - - Запуск внешних инструментов - - - Новый файл подключения - - - Новый внешний инструмент - - - Уведомления - - - Скопировать все - - - Удалить все - - - Открыть файл подключения... - - - Опции - - - Сканер портов - - - Панель Быстрое подключение - - - Переподключение - - - Обновить экран (VNC) - - - Переименовать закладку - - - Сообщить об ошибке - - - Сброс - - - Сохранить подключение - - - Сохранить подключение как... - - - Отправить спец. клавиши (VNC) - - - Показать текст справки - - - Показать текст - - - SmartSize (RDP/VNC) - - - Передача файлов по SSH - - - Начать чат (VNC) - - - Форум поддержки - - - &Инструменты - - - Передача файлов (SSH) - - - &Вид - - - Просмотр (VNC) - - - Веб-сайт - - - Минимизировать в системный трей - - - Вниз - - - Вверх - - - Мои текущие учетные данные (Windows учетные данные) - - - Никогда - - - Новое подключение - - - Новая папка - - - Новая панель - - - Новое название - - - Нет - - - Без сжатия - - - Не указано внешнее приложение. - - - ничто - - - Нормальный - - - SmartSize недоступен - - - Нет доступных обновлений - - - Вы пытаетесь загрузить файл подключения, созданного с помощью очень ранней версии mRemote, это может привести к ошибке выполнения. -Пожалуйста, создайте новый файл подключения! - - - Открытие новой вкладки справа от выбранной вкладки - - - Открытые порты - - - Тема - - - &Удалить - - - &Новая - - - Название группы - - - Защита паролем - - - Пожалуйста, заполните все поля - - - Не удалось загрузить панель Сканера портов! - - - Введите имя хоста или IP к которому вы хотите подключиться. - - - Переключить все наследуемые параметры. - - - Выберите используемый уровень авторизации. - - - Выберите способ авторизации на сервере VNC. - - - Выберите использовать или нет, кэширование графики. - - - Выберите качество цвета, которое будет использоваться. - - - Выберите значение сжатия, которое будет использоваться. - - - Введите здесь заметки или описания для подключения. - - - Выберите Да, если хотите использовать тему Рабочего стола на удаленном хоста. - - - Выберите Да, если хотите использовать обои Рабочего стола на удаленном хосте. - - - Введите имя домена. - - - Использование композиции Рабочего стола на удаленном хосте. - - - Использование сглаживания шрифтов. - - - Режим кодирования. - - - Внешний инструмент, который нужно запустить. - - - Внешний инструмент, который нужно запустить на удаленном компьютере после отключения. - - - Внешний инструмент, который нужно запустить на удаленном компьютере до подключения. - - - Значок, который будет отображаться при подключении к хосту. - - - Введите МАС-адрес удаленного хоста, если вы хотите использовать его во внешнем инструменте. - - - Это имя, которое будет отображаться в дереве подключений. - - - Установить панель, в которой будет открыто подключение. - - - Введите пароль. - - - Введите порт выбранного протокола. - - - Выберите протокол, который должен использоваться для подключения. - - - Выберите сессию PuTTY, которая будет использоваться при подключении. - - - Определите доменное имя, для подключения к шлюзу Служб терминалов. - - - Определите имя хоста шлюза Служб терминалов. - - - Укажите, когда использовать шлюз Служб терминалов. - - - Укажите, следует ли войти на шлюз, использующий то же имя пользователя и пароль подключения. - - - Укажите имя пользователя, которому разрешено подключаться к шлюзу Служб терминалов. - - - Укажите, будут ли доступны локальные диски на удаленном хосте. - - - Укажите, будут ли перенаправлены локальные комбинации клавиш (например, Alt-Tab) на удаленный хост. - - - Укажите, будут ли доступны локальные порты (т.е. COM, LPT) на удаленном хосте. - - - Укажите, будут ли локальные принтеры доступны на удаленном хосте. - - - Укажите, будут ли локальные смарт-карты доступны на удаленном хосте. - - - Укажите, будет ли перенаправлен удаленный звук на локальный компьютер. - - - Выберите один из доступных движков рендеринга, который будет использоваться для отображения HTML. - - - Выберите разрешение экрана в дюймах или режим отображения для этого подключения - - - Выберите SmartSize. - - - Подключение к текущему сеансу удаленного пользователя. - - - Использовать поставщика поддержки безопасности (CredSSP) для проверки подлинности учетных данных, если он доступен. - - - Введите любую информацию. - - - Введите имя пользователя. - - - Если вы хотите установить режим Просмотра - выберите Да. - - - Введите адрес прокси-сервера. - - - Введите пароль для авторизации на прокси-сервере. - - - Введите порт прокси-сервера. - - - Если вы используете прокси для туннелирования VNC подключений, выберите тип туннелирования. - - - Введите имя пользователя для авторизации на прокси-сервере. - - - Имя хоста / IP - - - Все - - - Авторизация - - - Режим авторизации - - - Кэш графики - - - Цвета - - - Сжатие - - - Описание - - - Показать темы - - - Показать обои - - - Композиция рабочего стола - - - Шрифты - - - Кодирование - - - Внешний инструмент - - - Внеш. Инстр. После - - - Внеш. Инстр. До - - - MAC-адрес - - - Имя - - - Имя вкладки - - - Пароль - - - Порт - - - Сессии PuTTY - - - Шлюз Домена - - - Хост Шлюза - - - Пароль шлюза Служб терминалов - - - Шлюз - - - Учетные данные шлюза - - - Имя пользователя шлюза - - - Диски - - - Комбинации клавиш - - - Порты - - - Принтеры - - - Звуки - - - Рендеринг - - - Размер экрана - - - SmartSize режим - - - Сеанс консоли - - - Использовать проверку подлинности CredSSP - - - Дополнительно - - - Адрес прокси - - - Пароль Прокси - - - Порт Прокси - - - Тип Прокси - - - Пользователь Прокси - - - Протокол событий Отключен. -Сообщение: -{0} - - - Протокол событий Отключение не удалось. -{0} - - - Протокол импорта - - - Проверка прокси - неудачна! - - - Проверка Прокси - удачна! - - - Завершить Putty - не удалось! - - - Не удается установить фокус! - - - Обработчик Putty: {0} - - - Убить процесс Putty не удалось! - - - Панель обработчиков: {0} - - - Ошибка изменения размера окна Putty! - - - Сохраненные сессии PuTTY - - - Настройки PuTTY - - - Показать настройки PuTTY не удалось! - - - --- PuTTY --- - - - Заголовок PuTTY: {0} - - - Быстрое: {0} - - - Быстрое подключение - - - Ошибка добавления Быстрого подключения! - - - Создать быстрое подключение не удалось - - - Предупреждать при закрытии подключений - - - Предупреждать меня только при выходе из mRemoteNG - - - Предупреждать меня только при закрытии нескольких подключений - - - Не предупреждать при закрытии подключений - - - RAW - - - RDP - - - 16777216 цв. (24-бит) - - - 256 цв. (8-бит) - - - 32768 цв. (15-бит) - - - 16777216 цв. (32-бит) - - - 65536 цв. (16-бит) - - - Не удается создать RDP подключение, пожалуйста, проверьте настройки mRemoteNG. - - - Отключить мигание курсора - - - Отключить тень курсора - - - Отключить отображение окна при перетаскивании - - - Отключить Анимацию - - - RDP не удалось отключить, попробуйте закрыть его! - - - Внутренняя ошибка: код 1. - - - Внутренняя ошибка: код 2. - - - Внутренняя ошибка: код 3. Это недопустимый режим. - - - Внутренняя ошибка: код 4. - - - Произошла неисправимая ошибка во время подключения клиента. - - - Невозможно получить GetError (Критическая ошибка) - - - Произошла ошибка из-за нехватки памяти. - - - Неизвестная ошибка. - - - При создании окна произошла ошибка. - - - Ошибка инициализации Winsock. - - - В окне - - - RDP: Ошибка получения фокуса! - - - Шлюз Служб терминалов поддерживается. - - - Шлюз Служб терминалов не поддерживается! - - - Количество переподключений RDP: - - - RDP: Установить уровень проверки подлинности не удалась! - - - RDP: Не удалось использовать консольную сессию! - - - Настройка переключения консолей для RDC {0}. - - - Ошибка установки учетных данных RDP! - - - Ошибка RDP SetEventHandlers! - - - Ошибка установки шлюза RDP! - - - Ошибка RDP SetPerformanceFlags! - - - Не удалось задать порт RDP! - - - Не удалось задать параметры RDP! - - - Установить перенаправление в RDP не удалось! - - - Установить перенаправление клавиш в RDP не удалось! - - - Ошибка установки разрешения RDP! - - - Передать на этот компьютер - - - Не воспроизводить - - - Оставить на удаленном компьютере - - - Не удалось переключить RDP в режим Fullscreen! - - - Не удалось переключить RDP в режим SmartSize! - - - При запуске подключаться к предыдущим сессиям - - - Удалённый файл - - - Удалить все - - - Переименовать - - - Rlogin - - - Сохранить - - - Сохранить все - - - Перед загрузкой нового подключения, хотите сохранить текущий файл подключения? - - - Сохранять подключения при выходе - - - Файл Graphics Interchange Format (GIF.) | *. GIF | Файл Joint Photographic Experts Group (JPEG.) | *. JPEG | Файл Joint Photographic Experts Group (JPG.) | *. JPG | Файл Portable Network Graphics (PNG). | *. PNG - - - Экран - - - Скриншот - - - Скриншоты - - - Поиск - - - Отправить... - - - Установить имя хоста, как отображаемое имя при создании новых подключений - - - Не удалось сохранить настройки, или разместить значок в системном трее! - - - Показывать подсказки в дереве подключений - - - Показывать в заголовке окна полный путь к файлу подключений - - - Показать сведения о входе в названии вкладок - - - Показывать протокол в названии вкладок - - - Один клик по подключению для его открытия - - - Один клик по открытому подключению переключается на него - - - Socks 5 - - - Сортировать - - - По возрастанию (A-Z) - - - По убыванию (Z-A) - - - Для дополнительной информации см. справку - Начало работы - конфигурация SQL! - - - SQL Server - - - SSH version 1 - - - SSH version 2 - - - Фоновая передача по SSH - не удалась! - - - SSH ошибка передачи. - - - Начальный IP - - - Начальный порт - - - Запуск / Выход - - - Статус - - - Переключится на панель уведомлений: - - - Дополнительно - - - Вкладки и панели - - - Обновления - - - Telnet - - - Установить вручную: - - - Ошибка ({0}) - - - Информация ({0}) - - - Пароль - - - Выбор Панели - - - Предупреждение ({0}) - - - Передача - - - Интеграция - - - Ultra VNC Repeater - - - Порт UltraVNC SingleClick: - - - Снимите свойства, которые не хотите сохранять! - - - Требуется обновление mRemoteNG - - - mRemoteNG может периодически подключаться к сайту mRemoteNG для проверки наличия обновлений. - - - Не удалось завершить проверку обновлений! - - - Загрузка завершена! -mRemoteNG сейчас прекратит работу и начнет процесс установки обновлений. - - - Не удалось завершить загрузку! - - - Не удалось скачать обновление! - - - Каждые {0} дней - - - Ежедневно - - - Ежемесячно - - - Еженедельно - - - Использовать другое имя пользователя и пароль - - - Пользователь - - - Использовать те же имя пользователя и пароль - - - Использовать смарт-карты - - - Использовать SQL Server для загрузки и сохранения подключений - - - Версия - - - VNC - - - Не удалось отключить VNC! - - - Не удалось обновить экран VNC! - - - Не удалось послать VNC спец. клавиши! - - - Не удалось установить обработчик событий VNC! - - - Не удалось задать параметры VNC! - - - Не удалось переключить VNC в SmartSize! - - - Не удалось переключить VNC в режим Просмотра! - - - Предупреждать, если не прошел проверку - - - Предупреждения - - - Да - - - Рабочий каталог: - - - &Запуск - - - Выполнить с повышенными правами - - - Отобразить на панели инструментов: - - - Отобразить на панели инструментов - - - Рабочий каталог - - - Экспорт в файл... - - - Импорт из &файла... - - - Закрепить позицию панели инструментов - - - Панель инструментов SSH - - - Назначенные учетные данные - - - Экспортировать все - - - Файл экспорта - - - Пункт импорта - - - Экспорт свойств - - - Экспорт выбранного соединения - - - Экспорт выбранной папки - - - Формат файла: - - - Импорт подразделений - - - Используйте кодировку UTF8 для свойства RDP "Информация о балансе нагрузки" - - - Время ожидания в секундах: - - - Активный каталог - - - В&ыход {0} - - - &Открыть файл подключения - - - &Попробуй еще раз - - - Подключение без учетных данных - - - Не подключайтесь к сеансу консоли - - - PuTTY не может быть запущен. - - - Новый внешний инструмент - - - Все импортируемые файлы - - - Файлы диспетчера соединений PuTTY - - - Файлы диспетчера подключений удаленного рабочего стола (* .rdg) - - - HTTP - - - Интернет Эксплорер - - - HTTPS - - - Произошла ошибка при импорте файла "{0}". - - - Не удалось загрузить информацию о соединении с SQL-сервера. - - - mRemoteNG CSV - - - mRemoteNG XML - - - Тестирование... - - - Оба пароля должны совпадать. - - - Пароль должен содержать не менее 3 символов. - - - Сканирование портов завершено. - - - Выберите, следует ли автоматически изменять размер соединения при изменении размера окна или при переключении полноэкранного режима. Требуется RDC 8.0 или выше. - - - Задает информацию о балансировке нагрузки для использования маршрутизаторами балансировки нагрузки для выбора лучшего сервера. - - - Автоматическое изменение размера - - - Информация о балансе нагрузки - - - Пароль для {0} - - - Журнал изменений не может быть загружен. - - - Время ожидания соединения RDP - - - Этот узел уже находится в этой папке. - - - Не удается перетащить узел на себя. - - - Не удается перетащить родительский узел на дочерний. - - - Этот узел не перетаскивается. - - - Режим блочного шифрования - - - Механизм шифрования - - - Безопасность - - - Инициирование функции вывода ключей - - - Динамический - - - Высокий - - - Cредний - - - Выберите Качество звука, предоставляемое протоколом: Динамический, Средний, Высокий - - - Качество звука - - - Скачивание завершено! - - - Скачать - - - Количество минут для сеанса RDP, чтобы сидеть без дела перед автоматическим отключением (для неограниченного использования 0) - - - Минуты в режим ожидания - - - Добавить - - - Заглавие - - - Вы действительно хотите удалить учетную запись, {0}? - - - Выберите, следует ли получать оповещение после отключения сеанса RDP из-за неактивности - - - Пароль должен содержать не менее {0} следующих символов: {1} - - - Пароль должен содержать не менее {0} символов нижнего регистра - - - Пароль должен содержать не менее {0} номер (а) - - - Пароль должен содержать не менее {0} символ верхнего регистра - - - Длина пароля должна быть между {0} и {1} - - - Выберите путь для файла журнала mRemoteNG - - - Отладка - - - Показывать эти типы сообщений - - - Путь к файлу журнала - - - Зарегистрируйте эти типы сообщений - - - Выберите путь - - - Открыть файл - - - Использовать по умолчанию - - - Логирование - - - Всплывающие окна - - - Войдите в каталог приложений - - - Полномочия - - - Открыть другой файл - - - Учетные данные недоступны - - - Вы действительно хотите удалить тему? - - - Новое название темы - - - Невозможно создать тему, имя уже присутствующее или специальные символы в названии - - - Введите новое название темы - - - Не удалось найти внешний инструмент с именем "{0}" - - - Создать новый файл подключения - - - Файл подключения не найден. - - - Импорт существующего файла - - - Использовать настраиваемый путь к файлу - - - Тестирование соединения - - - Сервер '{0}' не был доступен. - - - Соединение успешно - - - Ошибка входа для пользователя '{0}'. - - - База данных '{0}' недоступна. - - - Сохранять соединения после каждого редактирования - - - Фильтрация совпадений поиска в дереве соединений - - - Тестовое соединение - - - Только чтение: - - - Расширенные параметры безопасности - - - Параметры mRemoteNG - - - Создайте пустую панель при запуске mRemoteNG - - - Отключить вкладки справа - - - Хотите закрыть все подключения, кроме "{0}"? - - - Параметр безопасности Windows «Системная криптография: использовать FIPS-совместимые алгоритмы для шифрования, хеширования и подписывания» включен. - -См. Статью поддержки Microsoft по адресу http://support.microsoft.com/kb/811833 для получения дополнительной информации. - -{0} не является полностью FIPS совместимый. Нажмите OK, чтобы продолжить по своему усмотрению, или Отмена, чтобы выйти. - - - Укажите, будут ли буфер обмена должен использоваться совместно. - - - буфер обмена - - - Предупреждение: перезагрузка требуется для принятия каких-либо изменений конфигурации темы. - - - Должно быть от 0 до 255 - - - Вне зоны доступа - - - Удалять... - - - Переподключить все соединения - - - UltraVNC SingleClick - - - Отключите все Но этот - - - Произошла ошибка при попытке переподключиться к узлу RDP '{0}' - - - Произошла ошибка при попытке изменить разрешение соединения для размещения «{0}» - - - Трассировка стека - - - Сообщение исключения - - - mRemoteNG необработанное исключение - - - Произошло необработанное исключение - - - Это исключение заставит mRemoteNG закрыться - - - Копировать имя хоста - - - Разместите панель поиска над деревом соединений - - - Отслеживать активное соединение в дереве соединений - - - Всегда показывать вкладки подключения - - - Канал выпуска - - - Стабильный канал включает только финальные релизы. -Бета-канал включает в себя Betas и релиз кандидатов. -Канал разработки включает в себя Альф, Betas и релиз кандидатов. - - - Применить - - - Proxy - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.tr-TR.resx b/mRemoteNG/Language/Language.tr-TR.resx deleted file mode 100644 index a77970fb8..000000000 --- a/mRemoteNG/Language/Language.tr-TR.resx +++ /dev/null @@ -1,1631 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Hakkında - - - XML'den node ekleme başarısız! - - - Uygulamanın yalnızca bir örneğine izin ver (mRemoteNG yeniden başlatılmalı) - - - Daima - - - Kimlik doğrulama başarısız olsa da daima bağlan - - - Bağlantı açılırken panel seçme diyalogunu daima göster - - - Panel sekmesini daima göster - - - Bilgilendirme alanı simgelerini daima göster - - - Daha sonra tekrar sor - - - Ayarları şimdi özelleştir - - - Tavsiye edilen ayarları kullan - - - {0} yeni özellikler ve hata düzeltmelerinin bulunduğu güncelleştirmeleri otomatik olarak kontrol edebilir. Haftalık olarak güncelleştirmeleri kontrol etmesi için {0} 'ye izin vermeniz önerilir. - - - Otomatik güncelleştirme ayarları - - - Görünüş - - - Otomatik kaydet her: - - - Son sürüm - - - &Aç - - - &İptal - - - Değiştir - - - &Kapat - - - Varsayılan Devralma - - - Varsayılan Özellikler - - - Bağlantıyı kes - - - Simge - - - &İçe aktar - - - Devral - - - &Çalıştır - - - Putty'yi çalıştır - - - &Tamam - - - Özellikler - - - &Tara - - - &Dur - - - Bağlantı - - - Ağ geçidi - - - Protokol - - - Yönlendir - - - Kontrol başarısız! - - - Bu mesajı tekrar gösterme - - - Bu proxy sunucusu kimlik doğrulama gerektirir - - - Özel PuTTY yolu kullan: - - - Hazır olduğunda tekrar bağlan - - - Kullanıcı adı - - - Tekrar kontrol et - - - Şimdi kontrol et - - - Kapalı portlar - - - Evet - - - Güvenlik - - - Dinamik - - - Yüksek - - - Orta - - - Ses Kalitesi - - - İndirme Tamamlandı! - - - İndir - - - Sunucu bağlantısı kesildiğinde otomatik olarak yeniden bağlanmayı deneyin (yalnızca RDP && ICA) - - - Bağlanmak için proxy sunucusu kullan - - - Çıkış için bekleyin - - - Güncelleştirmeleri açılışta denetle - - - Başlangıçta bileşenlerin doğruluğunu kontrol edin - - - Argümanlar - - - Dosya adı - - - Mesaj - - - Ç&ıkış {0} - - - Komut satırı argümanları ayrıştırılamadı - - - &Bağlantı dosyası aç - - - &Tekrar deneyin - - - {0}, bu sistemde çalışan Lenovo Auto Scroll Utility algıladı. Bu yardımcı programın {0} ile ilgili sorunlara neden olduğu bilinmektedir. Devre dışı bırakmanız veya kaldırmanız önerilir. - - - Uyumluluk sorunu tespit edildi - - - btnIcon_Click başarısız! - - - ShowHideGridItems başarısız! - - - IconMenu_Click başarısız! - - - Özellik Izgara nesnesi başarısız oldu! - - - SetHostStatus başarısız! - - - pGrid_PopertyValueChanged başarısız! - - - Ayar arayüzü yükleme başarısız! - - - Panelini kapatmak istediğinizden emin misiniz, "{0}"? İçerdiği tüm bağlantılar da kapatılacaktır. - - - Harici aracı silmek istediğinizden emin misiniz, "{0}"? - - - Seçilen harici araçları {0} silmek istediğinizden emin misiniz? - - - Bağlantıyı silmek istediğinize emin misiniz, "{0}"? - - - Boş klasörü silmek istediğinize emin misiniz, "{0}"? - - - Bu klasörü silmek istediğinizden emin misiniz, "{0}"? İçerdiği klasörler veya bağlantılar da silinir. - - - Bütün açık bağlantılar kapatlsın mı? - - - Panelleri varsayılan yerleşimine sıfırlamak istediğinizden emin misiniz? - - - Bağlan - - - Tam ekran modunda bağlan - - - Bağlanıyor... - - - Protokol Event Bağlandı - - - "{2}" kullanıcısı tarafından kurulan "{1}" yoluyla "{0}" bağlantısı (Açıklama: "{3}"; Kullanıcı Alanı: "{4}") - - - Bağlantı başarısız! - - - Protokol Event Hata Gerçekleşti - - - Bağlantıyı açma başarısız! - - - -Bağlantı açılamıyor: Hostname belirtilmedi! - - - Bağlantılar - - - Varsayılan bağlantı noktası ayarlanamadı! - - - Bağlantılar dosyasının yedeğini oluşturulamadı! - - - "{0}" bağlantı dosyası yüklenemedi! - - - "{0}" bağlantı dosyası yüklenemedi! -Yeni bağlantılar dosyası ile başlanıyor. - - - Test Vekil Sunucu - - - Port taraması başlatılamadı, IP formatı geçersiz! - - - Görünüm - - - Ekran - - - Çeşitli - - - Şifreleme Motoru - - - Temel Türev Fonksiyon Yinelemeleri - - - Protokol tarafından sağlanan Ses Kalitesini seçin: Dinamik, Orta, Yüksek - - - Bağlanmadan önce paneli seç - - - Bütün klasörleri daralt - - - "{0}" bağlantı dosyası kaydedilemiyor! - - - Kimlik olmadan bağlan - - - Konsol oturumuna bağlan - - - Bağlan (Ayarları kullanarak) - - - {1} ile bağlanılan {0}, {2} tarafından kapatıldı. - - - Bağlantı kapatıldı - - - Bağlantı kapatılma başarısız! - - - Yeni bağlantı dosyası oluşturulamadı! - - - ToolStrip kontrolü FilteredPropertyGrid içinde bulunamadı. - - - Algıla - - - Konsol oturumuna bağlanma - - - Kimlik doğrulama başarısız olursa bağlanma - - - Sekmeyi çift tıklayarak kapatın - - - İndir ve Yükle - - - Çoğalt - - - Parola olmadan devam etmek istiyor musunuz? - - - Boş bırakılan Kullanıcı adı, Parola ve Domain için: - - - Bağlantı dosyası şifreleme - - - Son IP - - - Son Port - - - Araç çubuğuna harici araç ekleme (frmMain) başarısız. {0} - - - Klasör ekle ((UI.Window.ConnectionTreeWindow) başarısız. {0} - - - Veritabanı {0} sürümü, {1} sürümüyle uyumlu değil. - - - Bağlantı listesi kaydedilemedi. - - - PuTTY başlatılamadı. - - - Çözümleme başarısız. {0} - - - Şifreleme başarısız. {0} - - - Hatalar - - - Başlangıç bağlantı dosyası yüklenemedi. {0}{0}{2}{0}{3}{0}{0} veri kaybını önlemek için {1}'den şimdi çıkılacak. - - - Veritabanı sürümü doğrulaması (Config.Connections.Save) başarısız. {0} - - - Tüm klasörleri genişlet - - - Deneysel - - - Dışa aktar - - - Herşeyi dışa aktar - - - Dosyayı dışa aktar - - - Öğeleri dışa aktar - - - Seçenekleri dışa aktar - - - Seçili olan bağlantıları dışa aktar - - - Seçili olan klasörleri dışa aktar - - - &Dosyaya dışa atar... - - - Yeni harici araç - - - Dosya &Formatı: - - - Tüm Dosyalar (*.*) - - - Tüm alınabilir dosyalar - - - Uygulama Dosyaları (*.exe) - - - mRemote CSV Dosyaları (*.csv) - - - mRemote XML Dosyaları (*.xml) - - - PuTTY Bağlantı Yöneticisi dosyaları - - - Uzak Masaüstü Bğlantı Yöneticisi dosyaları (*.rdg) - - - RDP Dosyaları (*.rdp) - - - Miras {0} - - - Miras kalan özelliklerin açıklaması: {0} - - - Boş - - - Tam Ekran - - - Genel - - - "{1}" den "{0}" için bağlantı bilgileri alınırken bir hata oluştu. {2} - - - Otomatik Yeniden Bağlan - - - Harici Araç Özellikleri - - - Dosyalar - - - HTTP Bağlantısı Başarısız! - - - Yeni HTTP Bağlantısı oluşturulamadı! - - - HTTP Doküman Dosyasını Değiştirme Başarısız! - - - HTTP Prop'larını değiştirme başarısız! - - - Veritabanı: - - - Doğrula: - - - Dil - - - (Otomatik Algıla) - - - Dili değiştirmek için {0} yeniden başlatılmalıdır. - - - SQL'den yükleme başarısız! - - - Bağlantı bilgileri SQL sunucusundan yüklenemedi. - - - XML'den yükleme başarısız! - - - Yerel dosya - - - Yerel dosya yok! - - - Bağlantı Paneli Ekle - - - Güncelleştirmeleri Konrol Et - - - Ayar - - - Bağlantı Paneli - - - Kopyala - - - Harici Aracı Sil... - - - Bağış Yap - - - Sekmeyi Çoğalt - - - Çıkış - - - Harici Araçlar Araç çubuğu - - - &Dosya - - - &Yardım - - - mRemoteNG Yardım - - - Harici Aracı Çalıştır - - - Yeni Bağlantı Dosyası - - - Yeni Harici Araç - - - Bildirim - - - Hepsini Kopyala - - - Hepsini Sil - - - Bağlantı Dosyasını Aç - - - Ayarlar - - - Port Taraması - - - Hızlı Bağlantı Araç Çubuğu - - - Yeniden Bağlan - - - Ekranı Yenile (VNC) - - - Sekmeyi Yeniden Adlandır - - - Hata Raporla - - - Düzeni sıfırla - - - Bağlantı Dosyasını Kaydet - - - Bağlantı Dosyasını Farklı Kaydet - - - Özel Tuş Gönder (VNC) - - - &Yardım Metnini Görüntüle - - - Metni Görüntüle - - - Akıllı Boyutlandırma (RDP/VNC) - - - SSH Dosya Transferi - - - Sohbet'i Başlat (VNC) - - - Destek Forumu - - - &Araçlar - - - Dosya Transferi (SSH) - - - &Görünüm - - - Yalnızca Gör (VNC) - - - Web Sitesi - - - Bilgilendirme alanına küçült - - - Aşağı in - - - Yukarı çık - - - Şimdiki kimlik bilgilerim (Windows oturum açma bilgileri) - - - Asla - - - Yeni Bağlantı - - - Yeni Klasör - - - Yeni Panel - - - Yeni Başlık - - - Hayır - - - Sıkıştırmasız - - - Harici Uygulama belirtilmedi - - - Yok - - - Akıllı Boyutlandırma yok - - - Güncelleştirme yok - - - MRemote'un çok eski bir sürümü kullanılarak oluşturulmuş bir bağlantı dosyası yüklemeye çalışıyorsunuz, bu bir çalışma zamanı hatasına neden olabilir. -Böyle bir hatayla karşılaşırsanız, lütfen yeni bir bağlantı dosyası oluşturun! - - - Seçili sekmenin sağında yeni sekme açın - - - Açık Portlar - - - Test ediliyor... - - - Tema - - - &Sil - - - &Yeni - - - VNC Yalnızca Bak geçişi başarısız! - - - Kimlik doğrulama başarısız olduğunda beni uyar - - - Uyarılar - - - RDP Bağlantısı Zamanaşımı - - - Bu düğüm zaten bu klasörde. - - - Düğümü kendine sürükleyemezsiniz. - - - Üst düğüm alt öğeye sürüklenemez. - - - Bu düğüm sürüklenemez - - - Güncelleştirme karşıdan yüklemesi başlatılamadı. - - - Her {0} günde bir - - - Günlük - - - Aylık - - - Haftalık - - - Değişiklik günlüğü indirilemedi. - - - Faklı bir kullanıcı adı ve parola kullan - - - Kullanıcı - - - Aynı kullanıcı adı ve parolasını kullan - - - Smart Kart kullan - - - Sürüm - - - Hata ({0}) - - - Bilgi ({0}) - - - Parola - - - {0} için parola - - - Panel Seçin - - - Uyarı ({0}) - - - Bütünleştirmeyi deneyin - - - Kaydedilmesini istemediğiniz özelliklerin işaretini kaldırın! - - - MRemoteNG bir güncelleme gerektiriyor - - - MRemoteNG, düzenli olarak güncellemeleri kontrol etmek için mRemoteNG web sitesine bağlanabilir. - - - Güncelleştirme bilgileri indirilemedi. - - - İndirme tamamlandı! -MRemoteNG şimdi kapanacak ve kurulum başlayacak. - - - Güncelleme indirilemedi. - - - "Hızlı:" önekini ekleyerek hızlı bağlantı sekmelerini belirleyin - - - Active Directoy'den içe aktar - - - Dosya alınırken bir hata oluştu, "{0}". - - - &Dosyadan içe aktar... - - - Port Taramasından içe aktar - - - Bilgiler - - - Int App kaldırma işlemi başarısız! - - - Int App odaklaması başarısız! - - - Int App işleme: {0} - - - Int App durdurma başarısız! - - - Int App yeniden boyutlandırma başarız! - - - --- IntApp Ekibi --- - - - Int App Başlığı: {0} - - - Adres: - - - Bağlantı kapatılırken: - - - Görünen Ad - - - Taşınabilir Sürüm - - - PuTTY oturumlarını yapılandırmak için bu butona tıklayın: - - - -PuTTY ve harici araçlar için en fazla bekleme süresi: - - - GNU Genel Kamu Lisansı (GPL) kapsamında çıkarıldı - - - saniyeler - - - Aşağıdaki listeden bir panel seçin veya yeni bir panel eklemek için Yeni'yi tıklayın. Devam etmek için Tamam'ı tıklayın. - - - Sunucu Durumu: - - - Panel Adı - - - Parola koruması - - - Parolalar eşleşmelidir. - - - Parolama en az 3 karakter uzunluğunda olmalıdır. - - - Lütfen tüm alanları doldurun - - - Port taraması tamamlandı. - - - PortScan paneli yüklenemedi! - - - Bağlanmak istediğiniz ana makine adını veya ip'yi girin. - - - Tüm kalıtım seçeneklerini açın veya kapatın. - - - Bu bağlantının hangi kimlik doğrulama düzeyini kullanması gerektiğini seçin. - - - VNC sunucusuna nasıl kimlik doğrulama yapmak istediğinizi seçin. - - - Pencere yeniden boyutlandırıldığında veya tam ekran modu değiştirildiğinde pencereyi yeniden boyutlandırılmasını seçin. RDP 8.0 veya üstü gerektirir. - - - Bitmap önbellekleme kullanılıp kullanılmayacağını seçin. - - - Kullanılacak renk kalitesini seçin. - - - Kullanılacak sıkıştırma değerini seçin. - - - Host için notlarınızı veya açıklamanızı buraya yazın. - - - Uzak host teması görüntülenmesi gerekiyorsa evet'i seçin. - - - Uzak host duvar kağıdının görüntülenmesi gerekiyorsa evet'i seçin. - - - Alan adınızı girin. - - - Masaüstü kompozisyonunu kullanıp kullanmamayı seçin. - - - Yazı tipi yumuşatmayı kullanıp kullanmamayı seçin. - - - Kullanılacak kodlama modunu seçin. - - - Başlatılacak harici aracı seçin. - - - Uzak host bağlantısı kesildikten sonra başlatılacak harici bir aracı seçin. - - - Uzak host bağlantısı kurulmadan önce başlatılacak harici bir araç seçin. - - - Host bağlantısı kurulduğunda görüntülenecek bir simge seçin. - - - Yük dengeleyici, yönlendiriciler tarafından en iyi sunucuyu seçmek için kullanılacak yük dengeleme bilgilerini belirtir. - - - Harici bir araç içinde kullanmak isterseniz uzaktaki bilgisayarın MAC adresini girin. - - - Bu, bağlantı ağacında görüntülenecek addır. - - - Bağlantının açılacağı paneli ayarlar. - - - Parolanızı girin. - - - Seçilen protokolün dinlediği portu girin. - - - Baplantıları yüklemek ve kaydetmek için SQL Sunucusu kullanın - - - VNC bağlantı kesme başarısız! - - - VNC ekrar yenileme başarısız! - - - VNC Özel tuş gönderme başarısız! - - - VNC Olay İşleyicileri başarısız oldu! - - - VNC Seçenek ayarlama başarısız! - - - VNC Akıllı Boyut Değiştirme Başarısız! - - - Blok Şifre Modu - - - Host bağlantısı için mRemoteNG'nin kullanması gereken protokolü seçin. - - - Bağlanırken kullanılacak bir PuTTY oturumu seçin. - - - Bir kullanıcının RD Ağ Geçidi sunucusuna bağlanmak için sağladığı alan adını belirtir. - - - Uzak Masaüstü Ağ Geçidi sunucusunun host adını belirtir. - - - Uzak Masaüstü Ağ Geçidi (RD Ağ Geçidi) sunucusunun ne zaman kullanılacağını belirtir. - - - Bağlantı olarak aynı kullanıcı adı ve parolayı kullanarak ağ geçidinde oturum açıp açmayacağını belirtir. - - - Bir kullanıcının RD Ağ Geçidi sunucusuna bağlanmak için sağladığı kullanıcı adını belirtir. - - - Yerel disk sürücülerinin uzak host içinde gösterilip gösterilmeyeceğini seçin. - - - Tuş kombinasyonlarının (ör. Alt-Sekme) uzaktaki host'a yönlendirilip yönlendirilmeyeceğini seçin. - - - Uzak ana bilgisayarda yerel bağlantı noktalarının (yani com, paralel) gösterilip gösterilmeyeceğini seçin. - - - Uzak host'da yazıcıların gösterilip gösterilmeyeceğini seçin. - - - Yerel akıllı kartların uzaktaki bilgisayarda bulunup bulunmayacağını seçin. - - - Uzak sesin nasıl yönlendirileceğini seçin. - - - HTML'yi görüntülemek için kullanılacak kullanılabilir oluşturma motorlarından birini seçin. - - - Bu bağlantının açılacağı çözünürlüğü veya modu seçin. - - - Kullanılacak akıllı boyutlandırma modunu seçin. - - - Uzak host'un konsol oturumuna bağlanın. - - - Kimlik doğrulama için eğer kullanılabilirse, Kimlik Bilgisi Güvenliği Destek Sağlayıcısı'nı (CredSSP) kullanın. - - - İhtiyacınız olan bilgileri buraya girmekten çekinmeyin. - - - Kullanıcı adınızı yazın - - - Host'a yalnızca izlemek için bağlantı oluşturmak istiyorsanız evet'i seçin. - - - Kullanılacak proxy adresini girin. - - - Proxy ile kimlik doğrulamak için parolanızı girin. - - - Proxy sunucusunun dinlediği bağlantı noktasını girin. - - - VNC bağlantılarını tünellemek için bir proxy kullanırsanız, hangi tip olduğunu seçin. - - - Proxy ile kimlik doğrulamak için kullanıcı adınızı girin. - - - Hepsi - - - Sunucu Kimlik Doğrulama - - - Kimlik Doğrulama Modu - - - Otomatik Boyutlandır - - - Küçük Resimleri Önbelleğe Al - - - Renkler - - - Sıkıştırma - - - Açıklama - - - Temaları Göster - - - Duvar Kağıdını Göster - - - Masaüstü Bileşimi - - - Font Yumuşatma - - - Kodlama - - - Harici Araç - - - Harici Araç Sonrası - - - Harici Araç Öncesi - - - Yük Dengeleme Bilgisi - - - MAC Adresi - - - Ad - - - Parola - - - PuTTY Oturumu - - - Uzak Masaüstü Gateway Parolası - - - Gateway Kullan - - - Gateway Kimlik bilgileri - - - Gateway Kullanıcı Adı - - - Disk Sürücüleri - - - Tuş Kombinasyonları - - - Portlar - - - Yazıcılar - - - Sesler - - - Render Motoru - - - Çözünürlük - - - SmartSize Modu - - - Konsol Oturumunu Kullan - - - CredSSP Kullan - - - Kulanıcı Alanı - - - Proxy Adresi - - - Proxy Parolası - - - Proxy Portu - - - Proxy Tipi - - - Proxy Kullanıcı Adı - - - Protokol Bağlantısı Kesildi. -Mesaj: -{0} - - - Protokol Bağlantı kesme İşlemi Başarısız. -{0} - - - İçe alma protokolü - - - Proxy testi başarısız! - - - Proxy testi başarılı! - - - Putty işleminin kapatma başarısız oldu! - - - Odaklama ayarlanamadı! - - - Putty işlemini sonlandırma başarısız! - - - Putty yeniden boyutlandırma başarısız! - - - PuTTY kaydedilen oturumlar - - - PuTTY Ayarları - - - PuTTY Ayarları gösterilemedi! - - - --- PuTTY Ekibi --- - - - Putty Başlığı: {0} - - - Hızlı: {0} - - - Hızlı Bağlan - - - Hızlı Bağlantı Ekleme Başarısız! - - - Hızlı bağlantı oluşturma başarısız - - - &Bağlantılar kapatılırken beni uyar - - - Beni yalnızca mRemoteNG &kapatılırken uyar - - - Beni yalnızca birden &fazla bağlantı kapatılırken uyar - - - Bağlantılar kapatılırken beni uyarma - - - RDP kontrolü oluşturulamadı, lütfen mRemoteNG gereksinimlerini kontrol edin. - - - İmleci yanıp sönme özelliğini devre dışı bırak - - - İmleç Gölgesini Devre Dışı Bırak - - - Tam Pencere sürüklemeyi devre dışı bırak - - - Menü Animasyonlarını Devre Dışı Bırak - - - RDP bağlantısı kesilemedi, kapatmaya çalışılıyor! - - - Dahili hata kodu 1. - - - Dahili hata kodu 2. - - - Dahili hata kodu 3. Bu geçerli bir durum değil. - - - Dahili hata kodu 4. - - - İstemci bağlantısı sırasında kurtarılamayan bir hata oluştu. - - - Hata çağırma başarısız (Önemli Hatalar) - - - Bir bellek yetersiz hatası oluştu. - - - Bilinmeyen bir hata oluştu. - - - Bir pencere oluşturma hatası oluştu. - - - Winsock başlatma hatası. - - - Panele Sığdır - - - RDP Odaklama başarısız oldu! - - - RD Ağ Geçidi desteklenmektedir. - - - RD Ağ Geçidi desteklenmemektedir. - - - RDP yeniden bağlanma sayısı: - - - RDP Kimlik Doğrulama Düzeyi Ayarlanamadı! - - - RDP konsol oturumunu kullanma başarısız! - - - RDC {0} için Konsol anahtarını ayarlama. - - - RDP Kimlik bilgilerini ayarlama başarısız oldu! - - - RDP Olay İşleyicisi ayarlama başarısız oldu! - - - RDP RD Gateway ayarlama başarısız oldu! - - - RDP Performans ayarları başarısız oldu! - - - RDP Port ayarlama başarısız! - - - RDP Prob'ları ayarlama başarısız! - - - Rdp Yönlendirme ayarlaması Başarısız! - - - RDP Yönlendirme Anahtarlarını ayarlama başarısız! - - - RDP Çözünürlük ayarlama başarısız! - - - Bu bilgisayara getirin - - - Oynatma - - - Uzak bilgisayarda bırakın - - - RDP Tam Ekrana Geçiş başarısız! - - - RDP Akıllı Boyutlandırma başarısız! - - - Başlangıçta daha önce açılmış oturumlara yeniden bağlan - - - Uzak Dosya - - - Hepsini Sil - - - Yeniden Adlandır - - - Kaydet - - - Hepsini Kaydet - - - Başka bir yüklemeden önce geçerli bağlantı dosyasını kaydetmek istiyor musunuz? - - - Çıkışta bağlantıları kaydet - - - Ekran - - - Ekran Görüntüsü - - - Ekran Görüntüleri - - - Ara - - - Gönder... - - - Bağlantılar oluştururken veya yeniden adlandırırken ana bilgisayar adını görüntü adı gibi ayarla - - - Ayarlar kaydedilemiyor veya sistem tepsisi simgesi atılamıyor! - - - Bağlantı ağacında açıklama araç ipuçları göster - - - Pencere başlığında bağlantıların tam yolunu göster - - - Sekme adlarında oturum açma bilgilerini göster - - - Sekme adlarında protokolleri göster - - - Bağlantı tek tıklama ile açılır - - - Bağlantı Ağacı'nda açılan bağlantıyı tek tıklattığınızda Bağlantı Sekmesi açılır - - - Sırala - - - Artan (A-Z) - - - Azalan (Z-A) - - - Lütfen daha fazla bilgi için Yardım - Başlarken - SQL Yapılandırması bölümüne bakın! - - - SSH arkaplan trasferi başarısız! - - - SSH transferi başarısız. - - - Başlangıç IP - - - Başlangıç Port - - - Açılış/Çıkış - - - Durum - - - Şunlardan bildirimler paneline geçin: - - - Gelişmiş - - - Sekmeler && Paneller - - - Güncellemeler - - - Aşağıdaki: - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.uk.resx b/mRemoteNG/Language/Language.uk.resx deleted file mode 100644 index 4965fe742..000000000 --- a/mRemoteNG/Language/Language.uk.resx +++ /dev/null @@ -1,2005 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Про програму - - - AddNodeFromXML не вдалося! - - - Дозволити лише один екземпляр програми (необхіден перезапуск) - - - Завжди - - - Підключатися, навіть якщо не пройшов перевірку - - - Завжди показувати діалог вибору вкладки при відкритті з'єднання - - - Завжди показувати значок в системному треї - - - Запитати пізніше - - - Налаштувати параметри зараз - - - Використовувати рекомендовані параметри - - - {0} автоматично перевіряє наявність оновлень з новими можливостями і виправленням помилок. Рекомендуємо дозволити {0} щотижневу перевірку оновлень. - - - Параметри автоматичного оновлення - - - Вигляд - - - Автозбереження кожні (0 - вимкнено): - - - Остання версія - - - &Огляд… - - - &Скасувати - - - Змінити - - - &Закрити - - - Успадковувння по замовчуванню - - - Властивості по замовчуванню - - - Відключити - - - Значок - - - &Імпорт - - - Успадковування - - - Запустити PuTTY - - - &ОК - - - Властивості - - - &Сканувати - - - &Стоп - - - Перевірити проксі - - - Не вдається запустити сканування портів, невірний формат IP! - - - Зовнішній вигляд - - - З'єднання - - - Вигляд - - - Шлюз - - - Різне - - - Протокол - - - Локальні ресурси - - - Помилка перевірки! - - - Автоматично намагатися відновити зв'язок при відключенні від сервера (тільки RDP і ICA) - - - Більше не показувати це повідомлення. - - - Цей проксі-сервер вимагає аутентифікації - - - Використовувати власний шлях до PuTTY: - - - Перепідключитися, коли буде готово - - - Використовувати проксі-сервер для підключення - - - Користувач - - - Чекати виходу - - - Перевірити знову - - - Перевіряти наявність оновлень при запуску - - - Перевірити зараз - - - При запуску перевіряти правильність встановлення компонентів - - - Вибрати вкладку перед з'єднанням - - - Закриті порти - - - Згорнути всі папки - - - Аргументи - - - Файл - - - Повідомлення - - - Неможливо розібрати аргументи командного рядка! - - - Помилка btnIcon_Click! - - - Помилка ShowHideGridItems! - - - Помилка IconMenu_Click! - - - Помилка властивостей Grid object! - - - Помилка SetHostStatus! - - - Помилка pGrid_PopertyValueChanged! - - - Помилка завантаження Config UI! - - - Дійсно хочете закрити вкладку «{0}»? Всі її з'єднання також будуть закриті. - - - Хочете видалити зовнішній інструмент, «{0}»? - - - Хочете видалити {0} вибраних зовнішніх інструментів? - - - Хочете видалити з'єднання, «{0}»? - - - Хочете видалити порожню папку, «{0}»? - - - Хочете видалити папку «{0}»? Будь-які папки або з'єднання, які вона містить також будуть видалені. - - - Хочете закрити всі відкриті з'єднання? - - - Ви дійсно бажаєте скинути налаштування вкладок до значень по замовчуванню? - - - З'єднатися - - - З'єднатися в повноекранному режимі - - - З'єднання... - - - Протокол події підключено - - - Підключення до системи «{0}» через «{1}» створеного користувача «{2}» (Опис: «{3}»; Користувач: «{4}») - - - З'єднатися не вдалося! - - - Виникла помилка протоколу з'єднання. Хост «{1}»; Код помилки: «{2}»; Опис помилки: «{0}» - - - Відкрити з'єднання не вдалася! - - - Неможливо відкрити з'єднання: ім'я хоста не вказано! - - - З'єднання - - - Не вдається встановити порт за замовчуванням! - - - Не вдалося створити резервну копію файлу з'єднань! - - - Не можу завантажити файл з'єднань «{0}»! - - - Не можу завантажити файл з'єднань «{0}»! -Запускаюсь з новим файлом з'єднань. - - - Не вдалося зберегти файл з'єднань як «{0}»! - - - З'єднатися з консольним сеансом - - - З'єднатися (з параметрами) - - - З'єднання до {0} через {1} закрито користувачем {2}. - - - З'єднання закрито - - - З'єднання закрити не вдалося! - - - Не вдається створити новий файл з'єднань! - - - Виявлення - - - Не під'єднувати без перевірки - - - Подвійний клік для закриття вкладки - - - Завантажити і встановити - - - Дублювати - - - Бажаєте продовжити без пароля? - - - Використовувати пусте ім'я користувача, пароль або домен: - - - Повністю зашифрувати файл з'єднання - - - Кінцевий IP - - - Кінцевий порт - - - Помилка AddExternalToolsToToolBar (frmMain). {0} - - - Помилка AddFolder (UI.Window.Tree). {0} - - - Версія бази даних {0} не сумісна з цією версією {1}. - - - Неможливо зберегти список з'єднань. - - - Не вдалося розшифрувати. {0} - - - Не вдалося зашифрувати. {0} - - - Помилки - - - Файл з'єднання не може бути завантажений. {0}{0}{2}{0}{3}{0}{0} Для того, щоб запобігти втраті даних, {1} завершить роботу. - - - Помилка VerifyDatabaseVersion (Config.Connections.Save). {0} - - - Розкрити всі папки - - - Експериментально - - - Експорт - - - Всі файли (*.*) - - - Файли додатків (*.exe) - - - Файли mRemote CSV (*.csv) - - - Файли mRemote XML (*.xml) - - - Файли RDP (*.rdp) - - - Успадковувати {0} - - - Опис успадкованої властивості: {0} - - - На весь екран - - - Головна - - - Помилка при завантаженні з'єднання «{0}» на «{1}». {2} - - - Автоперепідключення - - - Властивості зовнішніх інструментів - - - Файли - - - Хост - - - Помилка HTTP з'єднання! - - - Не вдається створити нове HTTP з'єднання! - - - Не вдалося задати параметри HTTP! - - - Імпорт з Active Directory - - - Імпорт з просканованих портів - - - Інформація - - - Зовнішній інструмент: Помилка отримання фокусу! - - - Оброблювач подій Зовн. інструментів: {0} - - - Не вдалося завершити процес зовнішнього інструменту! - - - Зовнішній інструмент: Помилка зміни розміру! - - - Заголовок зовнішнього інструменту: {0} - - - Адреса: - - - Коротке ім'я - - - Домен - - - Ім'я хосту: - - - Портативна версія - - - Натисніть на цю кнопку для налаштування сесій PuTTY: - - - Максимальний час очікування PuTTY та зовнішніх інструментів: - - - Випущено під ліцензією GNU General Public License (GPL) - - - сек - - - Виберіть вкладку зі списку або натисніть кнопку Новий, щоб створити нову. - - - Стан сервера: - - - База даних: - - - Перевірка: - - - Мова - - - (Автовизначення) - - - {0} необхідно перезапустити, щоб налаштування мови вступили в силу. - - - Завантаження з SQL не вдалося! - - - Завантаження з XML не вдалося! - - - Локальний файл - - - Локальний файл не існує! - - - Додати панель з'єднання - - - Перевірка наявності оновлень - - - Конфігурація - - - Панель з'єднань - - - Копіювати - - - Ctrl+Alt+Del - - - Ctrl+Esc - - - Видалити зовнішній інструмент… - - - Пожертва - - - Дублювати вкладку - - - Вихід - - - Панель зовнішніх інструментів - - - &Файл - - - &Довідка - - - Довідка mRemoteNG - - - Запуск зовнішніх інструментів - - - Новий файл з'єднань - - - Новий зовнішній інструмент - - - Сповіщення - - - Відкрити файл з'єднань… - - - Параметри - - - Сканер портів - - - Панель швидкого з'єднання - - - Повторне з'єднання - - - Оновити екран (VNC) - - - Перейменувати вкладку - - - Повідомити про помилку - - - Скинути шаблон - - - Зберегти файл з'єднань - - - Зберегти файл з'єднань як… - - - Надіслати спец. клавіші (VNC) - - - Показати текст - - - Передача файлів по SSH - - - Почати чат (VNC) - - - Форум підтримки - - - &Інструменти - - - Передача файлів (SSH) - - - &Вигляд - - - Перегляд (VNC) - - - Веб-сайт - - - Мінімізувати в область сповіщень - - - Вниз - - - Вгору - - - Мої поточні облікові дані (Windows облікові дані) - - - Ніколи - - - Нове з'єднання - - - Нова папка - - - Нова панель - - - Нова назва - - - Ні - - - Без стискання - - - Не вказано зовнішній інструмент - - - Ні - - - Нормальний - - - Немає доступних оновлень - - - Ви намагаєтеся завантажити файл з'єднання, що створений за допомогою дуже ранніх версій mRemote, це може спричинити помилки виконання. -Будь ласка, створіть новий файл з'єднання! - - - Відкривати нову вкладку праворуч від вибраної вкладки - - - Відкриті порти - - - Тема - - - Назва панелі - - - Захист паролем - - - Будь ласка, заповніть всі поля - - - Не вдалося завантажити панель сканера портів! - - - Введіть ім'я хосту або IP до якого потрбіно підключитися. - - - Перемкнути усі варіанти успадкування. - - - Виберіть рівень аутентифікації, що має використовувати це з'єднання. - - - Виберіть спосіб авторизації на сервері VNC. - - - Виберіть, чи використовувати кешування растрових зображень. - - - Виберіть якість кольору, що буде використовуватися. - - - Виберіть значення стискання, яке буде використовуватися. - - - Помістіть сюди свої замітки або опис хоста. - - - Виберіть «Так», якщо хочете бачити тему робочого столу віддаленого хоста. - - - Виберіть «Так», якщо хочете бачити шпалери віддаленого хоста. - - - Введіть ім'я домену. - - - Чи використовувати композицію робочого столу на віддаленому хості. - - - Використання згладжування шрифтів. - - - Виберіть режим кодування, який буде використовуватися. - - - Виберіть зовнішній інструмент для запуску. - - - Виберіть зовнішній інструмент, який потрібно запустити після відключення від віддаленого хоста. - - - Виберіть зовнішній інструмент, який потрібно запустити до встановлення з'єднання з віддаленим хостом. - - - Виберіть піктограму, яка відображатиметься при підключенні до хоста. - - - Введіть МАС-адресу віддаленого хоста, якщо ви хочете використовувати його в зовнішньому інструменті. - - - Це ім'я буде відображатися в дереві з'єднань. - - - Визначає вкладку, в якій буде відкрито з'єднання. - - - Введіть пароль. - - - Введіть порт, на якому прослуховується вибраний протокол. - - - Виберіть протокол, який mRemoteNG повинен використовувати для з'єднання з хостом. - - - Виберіть сесію PuTTY, яка буде використовуватися під час з'єднання. - - - Вкажіть доменне ім'я, яке надає користувач для підключення до сервера шлюзу віддаленого робочого столу(RD Gateway). - - - Вкажіть ім'я хоста сервера шлюзу віддаленого робочого столу(RD Gateway). - - - Вкажіть, коли використовувати сервер шлюзу віддаленого робочого столу (RD Gateway). - - - Вкажіть, чи потрібно входити в шлюз, використовуючи те саме ім’я користувача й пароль, що і для з'єднання. - - - Вкажіть ім'я користувача, яке надає користувач для підключення до сервера шлюзу віддаленого робочого столу(RD Gateway). - - - Вкажіть, чи будуть доступні локальні диски на віддаленому хості. - - - Вкажіть, чи будуть перенаправлені локальні комбінації клавіш (наприклад, Alt+Tab) на віддалений хост. - - - Вкажіть, чи будуть доступні локальні порти (тобто COM, LPT) на віддаленому хості. - - - Вкажіть, чи локальні принтери будуть доступні на віддаленому хості. - - - Вкажіть, чи будуть локальні смарт-карти доступні на віддаленому хості. - - - Виберіть, як слід перенаправляти віддалений звук. - - - Виберіть один із доступних механізмів візуалізації, який використовуватиметься для відображення HTML. - - - Виберіть роздільну здатність або режим, у якому відкриється це з'єднання. - - - Виберіть, чи буде використовуватись режим SmartSize. - - - Підключитися до консольного сеансу віддаленого хоста. - - - Не соромтеся вводити тут інформацію, яка вам потрібна. - - - Введіть ім'я користувача. - - - Якщо ви хочете встановити підключення в режимі перегляду - виберіть «Так». - - - Введіть адресу проксі-сервера. - - - Введіть пароль для авторизації на проксі-сервері. - - - Введіть порт проксі-сервера. - - - Якщо ви використовуєте проксі для тунелювання VNC з'єднань, виберіть тип тунелювання. - - - Введіть ім'я користувача для авторизації на проксі-сервері. - - - Ім'я хоста / IP - - - Все - - - Аутентифікація сервера - - - Режим аутентифікації - - - Кеш графіки - - - Кольори - - - Стискання - - - Опис - - - Показати теми - - - Показати шпалери - - - Композиція робочого столу - - - Згладжування шрифту - - - Кодування - - - Зовнішній інструмент - - - Зовнішній інструмент після - - - Зовнішній інструмент до - - - MAC-адреса - - - Ім'я - - - Ім'я вкладки - - - Пароль - - - Порт - - - Сесія PuTTY - - - Шлюз домену - - - Хост шлюзу - - - Пароль шлюзу служб терміналів - - - Використовувати шлюз - - - Облікові дані шлюзу - - - Ім'я користувача шлюзу - - - Диски - - - Комбінації клавіш - - - Порти - - - Принтери - - - Звуки - - - Рушій візуалізації - - - Розширення екрану - - - Режим SmartSize - - - Використовувати консольну сесію - - - Користувацьке поле - - - Адреса проксі - - - Пароль проксі - - - Порт проксі - - - Тип проксі - - - Користувач проксі - - - Протокол подій: Відключено. Хост: «{1}»; Протокол: «{2}»; Повідомлення: «{0}» - - - Протокол подій: Помилка відключення. -{0} - - - Протокол імпорту - - - Перевірка проксі невдала! - - - Перевірка уроксі успішна! - - - Завершити роботу Putty - не вдалося! - - - Не вдається встановити фокус! - - - Оброблювач подій Putty: {0} - - - Вбити процес Putty не вдалося! - - - Вкладка оброблювача подій: {0} - - - Помилка зміни розміру вікна Putty! - - - Налаштування PuTTY - - - Показати налаштування PuTTY не вдалося! - - - Заголовок PuTTY: {0} - - - Швидке: {0} - - - Швидке з'єднання - - - Помилка додавання швидкого з'єднання! - - - Створити швидке з'єднання не вдалося - - - 16 млн. кольорів (24-біт) - - - 256 кольорів (8-біт) - - - 32 тис. кольорів (15-біт) - - - 16 млн. кольорів (32-біт) - - - 65 тис. кольорів (16-біт) - - - Неможливо створити управління RDP, перевірте вимоги mRemoteNG. - - - Вимкнути моргання курсору - - - Вимкнути тінь курсора - - - Вимкнути відображення вікна при перетягуванні - - - Вимкнути анімації меню - - - RDP не вдалося відключити, спробуйте закрити його! - - - Внутрішня помилка: код 1. - - - Внутрішня помилка: код 2. - - - Внутрішня помилка: код 3. Це неприпустимий стан. - - - Внутрішня помилка: код 4. - - - Сталася непоправна помилка під час з'єднання з клієнтом. - - - Сталася помилка через брак пам'яті. - - - Невідома помилка. - - - При створенні вікна сталася помилка. - - - Помилка ініціалізації Winsock. - - - Встановити на вкладку - - - RDP: помилка отримання фокусу! - - - RD Gateway підтримується. - - - RD Gateway не підтримується! - - - Кількість перепідключень RDP: - - - Помилка RDP SetAuthenticationLevel! - - - Помилка RDP SetUseConsoleSession! - - - Налаштування перемикання консолі для RDC {0}. - - - Помилка RDP SetCredentials! - - - Помилка RDP SetEventHandlers! - - - Помилка RDP SetRDGateway! - - - Помилка RDP SetPerformanceFlags! - - - Помилка RDP SetPort! - - - Помилка RDP SetProps! - - - Помилка RDP Set Redirection! - - - Помилка RDP Set Redirect Keys! - - - Помилка RDP SetResolution! - - - Передати на цей комп'ютер - - - Не відтворювати - - - Залишити на віддаленому комп'ютері - - - Помилка RDP ToggleFullscreen! - - - Помилка RDP ToggleSmartSize! - - - При запуску підключатися до попередніх сесій - - - Віддалений файл - - - Видалити все - - - Перейменувати - - - Зберегти - - - Зберегти все - - - Перед завантаженням нового файлу з'єднання, хочете зберегти поточний? - - - Зберігати з'єднання при виході - - - Файл Graphics Interchange Format (GIF.) | *. GIF | Файл Joint Photographic Experts Group (JPEG.) | *. JPEG | Файл Joint Photographic Experts Group (JPG.) | *. JPG | Файл Portable Network Graphics (PNG). | *. PNG - - - Екран - - - Скріншот - - - Скріншоти - - - Надіслати… - - - Встановити назву хоста, як ім'я відображення при створенні чи перейменуванні нових з'єднань - - - Не вдалося зберегти налаштування, або розмістити значок у системному треї! - - - Показувати підказки опису в дереві з'єднань - - - Показувати в заголовку вікна повний шлях до файлу з'єднань - - - Показати відомості про вхід у назві вкладок - - - Показувати протокол у назві вкладок - - - Одне натискання на з'єднання відкриває його - - - Один клік по відкритому з'єднанню переключається на нього - - - Сортувати - - - За зростанням (A-Z) - - - За спаданням (Z-A) - - - Для додаткової інформації дивись: Довідка - Початок роботи - Конфігурація SQL! - - - SSH версії 1 - - - SSH версії 2 - - - Фонова передача по SSH не вдалася! - - - Помилка передавання SSH. - - - Початковий IP - - - Початковий порт - - - Запуск / Вихід - - - Статус - - - Перемкнутись на панель сповіщень при: - - - Додатково - - - Вкладки та панелі - - - Оновлення - - - Наступне: - - - Помилка: ({0}) - - - Інформація: ({0}) - - - Пароль - - - Вибеніть панель - - - Попередження: ({0}) - - - Передати - - - Спробувати інтегрувати - - - Порт UltraVNC SingleClick: - - - Зніміть параметри, які не хочете зберігати! - - - mRemoteNG потребує оновлення - - - mRemoteNG може періодично підключатися до сайту mRemoteNG для перевірки наявності оновлень. - - - Не вдалося завантажити інформацію про оновлення. - - - Завантаження завершено! -mRemoteNG зараз припинить роботу і почне процес встановлення оновлення. - - - Не вдалося завантажити оновлення. - - - Не вдалося розпочати завантаження оновлення. - - - Кожні {0} дн. - - - Щодня - - - Щомісяця - - - Щотижня - - - Використовувати інше ім'я користувача і пароль - - - Користувач - - - Використовувати ті ж ім'я користувача і пароль - - - Використовувати смарт-карти - - - Використовувати SQL Server для завантаження і збереження з'єднань - - - Версія - - - Не вдалося відключити VNC! - - - Не вдалося оновити екран VNC! - - - Помилка VNC SendSpecialKeys! - - - Не вдалося встановити оброблювач подій VNC! - - - Не вдалося задати параметри VNC! - - - Не вдалося переключити VNC в SmartSize! - - - Не вдалося переключити VNC в режим перегляду! - - - Попередити мене, якщо аутентифікація не вдасться - - - Попередження - - - Так - - - Завжди показувати панель вкладок - - - &Запустити - - - &Вихід {0} - - - &Відкрити файл з'єднань - - - &Спробувати знову - - - {0} виявив запущену програму Lenovo Auto Scroll Utility. Ця програма створює проблеми з {0}. Рекомендується вимкнути або видалити її. - - - Виявлена проблема сумісності - - - З'єднатися без облікових даних - - - Не вдається знайти «ToolStrip control» у «FilteredPropertyGrid». - - - Не під'єднуватися до консольного сеансу - - - Неможливо запустити PuTTY. - - - Увімкнено налаштування безпеки Windows «System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing». - -Додаткову інформацію дивись у статті Microsoft Support на http://support.microsoft.com/kb/811833 - -{0} не повністю сумісний з FIPS. Натисніть ОК, щоб продовжити на власний розсуд, або Скасувати для виходу. - - - Експортувати все - - - Файл експорту - - - Експорт елементів - - - Параметри експорту - - - Експортувати вибране з'єднання - - - Експортувати вибрану папку - - - &Експорт у файл… - - - &Формат файлу: - - - Облікові дані - - - Новий зовнішній інструмент - - - Усі файли, які можна імпортувати - - - Файли PuTTY Connection Manager - - - Файли Remote Desktop Connection Manager (*.rdg) - - - Не вдається змінити заголовок HTTP документу! - - - Визначати вкладки швидкого підключення, додавши префікс «Quick» - - - Під час імпорту файлу «{0}» сталася помилка. - - - Імпорт з &файлу… - - - При закритті з'єднань: - - - Інформацію про з'єднання не вдалося завантажити з SQL сервера. - - - Копіювати все - - - Видалити все - - - &Показати текст довідки - - - Немає SmartSize - - - Тестування… - - - &Видалити - - - &Нова - - - Обидва паролі повинні збігатися. - - - Пароль повинен містити не менше 3 символів. - - - Сканування портів завершено. - - - Виберіть, чи слід автоматично змінювати розмір вікна з'єднання, коли змінюється розмір вікна програми, або коли програма перемикається в повноекранний режим. Потрібен RDC 8.0 або вище. - - - Визначає інформацію про балансування навантаження для використання маршрутизаторами балансування навантаження для вибору найкращого сервера. - - - Вкажіть, чи слід ділитися буфером обміну з віддаленим хостом. - - - Виберіть, чи слід перенаправляти пристрій аудіо введення за замовчуванням на віддаленій машині на цей комп'ютер. - - - Використовати Credential Security Support Provider (CredSSP) для аутентифікації, якщо він доступний. - - - Автоматична зміна розміру - - - Інформація про балансування - - - Буфер обміну - - - Захоплення аудіо - - - Використовувати CredSSP - - - Збережені сесії PuTTY - - - &Попередити мене при закритті з'єднань - - - Попередити мене лише при &виході з mRemoteNG - - - Попередити мене лише при закритті &декількох з'єднань - - - &Не попереджати мене при закритті з'єднань - - - Помилка GetError (FatalErrors) - - - Шукати - - - Пароль для: {0} - - - Показати на панелі інструментів - - - Не вдалося завантажити журнал змін. - - - Тайм-аут RDP з'єднання - - - Цей вузол вже в цій папці. - - - Неможливо перемістити вузол в себе. - - - Неможливо перетягнути батьківський вузол до дочірнього. - - - Цей вузол не перетягується. - - - Режим блочного шифру - - - Рушій шифрування - - - Безпека - - - Ітерації функції формування ключа(KDF) - - - Динамічна - - - Висока - - - Середня - - - Виберіть якість звуку: динамічна, Середня, Висока - - - Якість звуку - - - Завантаження завершено! - - - Завантажити - - - Скільки хвилин перебувати в режимі очікування перед автоматичним відключенням RDP сеансу (0 - без обмежень) - - - Хвилин простою - - - Додати - - - Заголовок - - - Дійсно хочете видалити обліковий запис: {0}? - - - Виберіть, чи отримувати попередження після відключення сеансу RDP через неактивність - - - Пароль повинен містити принаймні {0} таких символів: {1} - - - Пароль повинен містити принаймні {0} малі символи(ів) - - - Пароль повинен містити принаймні {0} номер(и) - - - Пароль повинен містити принаймні {0} великі символи(ів) - - - Довжина пароля повинна бути від {0} до {1} - - - Виберіть шлях для файлу журналу mRemoteNG - - - Відлагодження - - - Показувати ці повідомлення - - - Шлях до файлу журналу - - - Записувати в журнал ці типи повідомлень - - - Вибрати шлях - - - Відкрити файл - - - За замовчуванням - - - Ведення журналу - - - Виринаючі вікна - - - Записувати в каталог програми - - - Призначені облікові дані - - - Відкрти інший файл - - - Обліковий запис не доступний - - - Дійсно видалити цю тему? - - - Нова назва теми - - - Не вдається створити тему, таке ім'я вже існує, або присутні спеціальні символи - - - Введіть нову назву теми - - - Попередження: для зміни будь-якої конфігурації теми потрібен перезапуск. - - - Не вдалося знайти зовнішній інструмент із назвою «{0}» - - - Створити новий файл з'єднання - - - Не вдалося знайти файл з'єднання. - - - Імпортувати існуючий файл - - - Використовуйте спеціальний шлях до файлу - - - Перевіряємо з'єднання - - - Сервер «{0}» недоступний. - - - Підключення успішне - - - Не вдалося ввійти для користувача «{0}». - - - База даних «{0}» недоступна. - - - Зберігати з'єднання після кожного редагування - - - Фільтр збігів пошуку в дереві з'єднань - - - Тест з'єднання - - - Лише для читання: - - - Використовувати кодування UTF8 для властивості RDP "Інформація про балансування" - - - Тайм-аут [секунди] - - - Робочий каталог: - - - Запускати з вищими правами - - - Показати на панелі інструментів - - - Робочий каталог - - - Фіксувати позиції панелі інструментів - - - Панель Multi SSH - - - Імпорт дочірніх OU - - - Додаткові параметри безпеки - - - Параметри mRemoteNG - - - Створювати порожню вкладку, при запуску mRemoteNG - - - Має бути між 0 і 255 - - - Поза межами - - - Видалити… - - - Повторно підключити усі з'єднання - - - Відключити вкладки праворуч - - - Відключити все, окрім цієї вкладки - - - Ви дійсно хочете закрити всі з'єднання, окрім «{0}»? - - - Сталася помилка під час спроби знову підключитися до RDP хоста «{0}» - - - Сталася помилка під час спроби змінити роздільну здатність з'єднання на хості «{0}» - - - Повідомлення про виняток - - - Стався необроблений виняток - - - Цей виняток змусить mRemoteNG закритися - - - Скопіювати ім'я хоста - - - Розмістити рядок пошуку над деревом з'єднань - - - Відстежувати активне з'єднання у дереві з'єднань - - - Завжди показувати вкладки підключення - - - Канал оновлень - - - Канал «Stable» включає лише остаточні стабільні випуски. -Канал «Preview» включає Beta та Release Candidate. -Канал «Nightly» включає Alpha, Beta та Release Candidate версії. - - - Застосувати - - - Проксі - - - Натисніть ENTER для надсилання. Ctrl+C надсилається негайно. - - - Показати це з'єднання в меню обраних. - - - Улюблене - - - Улюблені - - - Очистити рядок пошуку - - - Підключіться в режимі лише для перегляду - - - Не обрізати пробіли в іменах користувачів - - - Середовище - - - Шифрування {0} записів за допомогою {1}/{2} та {3} ітерацій зайняло {4} секунд(и). - - - Тест шифрування - - - Тест налаштувань - - - Встановіть версію RDP, що буде використовуватись при відкритті з'єднань. - - - Версія RDP - - - Використовувати VM ID для підключення до VM, що працюють на Hyper-V. - - - ID віртуальної машини Hyper-V, до якогї потрібно підключитися. - - - Використовувати VM ID - - - Не вдалося створити RDP клієнт. Версія протоколу RDP {0} не підтримується на цій машині. Виберіть старішу версію протоколу. - - - Запускати згорнутим - - - Встановіть пароль, що необхідний для шифрування файлу з'єднань. Перед запуском mRemoteNG вам буде пропонуватись ввести цей пароль. - - - Підключатися до хоста Hyper-V із увімкненим розширеним режимом. - - - Використовувати розширений режим - - - Вказує пароль сервера Remote Desktop Gateway. - - - Закривати в область сповіщень - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.zh-CN.resx b/mRemoteNG/Language/Language.zh-CN.resx deleted file mode 100644 index b79ec3473..000000000 --- a/mRemoteNG/Language/Language.zh-CN.resx +++ /dev/null @@ -1,2083 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 关于 - - - 活动目录 - - - AddNodeFromXML 函数执行失败! - - - 仅允许应用程序以单实例运行(需要重新启动mRemoteNG) - - - 始终 - - - 始终连接,即使身份验证失败 - - - 在打开连接时总是显示面板选择对话框 - - - 始终显示标签面板 - - - 始终显示通知区域图标 - - - 稍后询问 - - - 自定义设置 - - - 使用建议设置 - - - {0} 可以自动检查更新,新版本提供新功能及错误修复。建议您允许 {0} 每周检查更新。 - - - 自动更新设置 - - - 方面 - - - 自动保存配置,每隔 - - - 当前版本 - - - 浏览(&B) - - - 取消(&C) - - - 更改 - - - 关闭(&C) - - - 默认继承 - - - 默认属性 - - - 断开连接 - - - 图标 - - - 导入(&I) - - - 继承 - - - 启动(&L) - - - 启动 PuTTY - - - 确定(&O) - - - 属性 - - - 扫描(&S) - - - 停止(&S) - - - 测试代理 - - - 无法启动端口扫描,IP 格式不正确! - - - 外观 - - - 连接 - - - 显示 - - - 网关 - - - 杂项 - - - 协议 - - - 重定向 - - - 检查失败! - - - 服务器连接断开时,自动重试连接(仅限 RDP 和 ICA) - - - 不再显示此消息。 - - - 此代理服务器要求进行身份验证 - - - 自定义 PuTTY 路径: - - - 准备完成时重新连接 - - - 使用代理服务器连接 - - - 用户名 - - - 等待退出 - - - 再次检查 - - - 启用时检查更新和网站公告。 - - - 现在检查 - - - 启用时检查组件安装是否正常。 - - - 连接前请选择面板 - - - 已关闭端口 - - - 折叠所有目录 - - - 参数 - - - 文件名 - - - 消息 - - - 退出{0}(&X) - - - 无法解析命令行参数! - - - 打开一个连接文件(&O) - - - 再试一次(&T) - - - {0} 检测到联想Auto Scroll程序在本机上运行。该程序程序明确会导致问题 {0} 的出现。建议您禁用或卸载该程序。 - - - 检测到系统存在兼容性问题 - - - btnIcon_Click 函数执行失败! - - - ShowHideGridItems 函数执行失败! - - - IconMenu_Click 函数执行失败! - - - 属性网格对象失败! - - - SetHostStatus 函数执行失败! - - - pGrid_PopertyValueChanged 函数执行失败! - - - 无法加载配置界面。 - - - 确实要关闭面板“{0}”?此面板所包含的所有连接将会断开。 - - - 确定要删除外部工具,"{0}"? - - - 确定要删除外部工具 {0} 吗? - - - 确定要删除连接,"{0}"? - - - 确定要删除空目录,"{0}"? - - - 确定要删除目录,"{0}"?目录下所有目录及连接都将被删除。 - - - 确认要关闭所有已打开的连接吗? - - - 确认要重置面板为默认布局吗? - - - 连接 - - - 在全屏模式下连接 - - - 正在连接... - - - 协议事件:已连接 - - - 通过{1}到主机{0}的连接,已被用户{2}打开(说明:“{3}”,自定义信息:“{4}”) - - - 连接失败! - - - 发生连接协议错误。主机:“{1}”;错误代码:“{2}”;错误说明:“{0}” - - - 连接建立失败! - - - 无法打开连接:未指定主机名! - - - 连接 - - - 无法设置默认端口! - - - 无法创建连接配置文件备份! - - - 无法载入连接配置文件“{0}”! - - - 无法载入连接配置文件“{0}”! -启用新建连接配置文件。 - - - 无法保存连接配置文件“{0}”! - - - 在没有凭据的情况下连接 - - - 连接到控制台会话 - - - 连接(选项) - - - 通过{1}到主机{0}的连接,已被用户{2}关闭。 - - - 连接事件关闭 - - - 连接事件关闭失败! - - - 无法新建连接配置文件! - - - 在 FilteredPropertyGrid 中找不到 ToolStrip 控件。 - - - 检测 - - - 不要连接到控制台会话 - - - 身份验证失败时取消连接 - - - 双击标签关闭 - - - 下载并安装 - - - 创建副本 - - - 确认不输入密码吗? - - - 对于空用户名、密码或域名使用: - - - 完全加密连接配置文件 - - - 终止 IP - - - 终止端口 - - - AddFolder (UI.Window.Tree) 函数执行失败。{0} - - - AddFolder (UI.Window.Tree) 函数执行失败。{0} - - - 数据库版本 {0} 与当前版本 {1} 不兼容。 - - - 无法保存连接列表。 - - - PuTTY 无法启动。 - - - 解密失败。{0} - - - 加密失败。{0} - - - Windows 安全设置中已启用"系统加密:使用 FIPS 兼容算法进行加密、散列和签名操作"。 - -请参阅 Microsoft 支持文章中的详细信息:http://support.microsoft.com/kb/811833 - -{0} 不完全符合FIPS标准。单击“确定”继续自己的决定,或单击“取消”退出。 - - - 错误 - - - 默认连接配置文件加载失败。{0}{0}{2}{0}{3}{0}{0}为避免数据丢失, {1} 即将退出。 - - - VerifyDatabaseVersion (Config.Connections.Save) 函数执行失败。{0} - - - 展开所有目录 - - - 实验 - - - 导出 - - - 导出所有内容 - - - 导出文件 - - - 导出项目 - - - 导出属性 - - - 导出当前选定的连接 - - - 导出当前选定的文件夹 - - - 导出到文件(&E)... - - - 新建外部工具 - - - 文件格式(&F): - - - 所有文件(*.*) - - - 所有可导入的文件 - - - 应用程序(*.exe) - - - mRemote CSV(*.csv) - - - mRemote XML(*.xml) - - - PuTTY 连接管理器文件 - - - 远程桌面连接管理器文件(*.rdg) - - - RDP 文件(*.rdp) - - - 继承 {0} - - - 继承属性的描述:{0} - - - 免费 - - - 全屏 - - - 常规 - - - 从 {1} 中加载连接项 {0} 时发生错误。{2} - - - 自动重试连接 - - - 外部工具属性 - - - 文件 - - - 主机 - - - HTTP - - - HTTP 连接失败! - - - 无法创建新的 HTTP 连接! - - - 更改HTTP文档标题失败! - - - Internet Explorer - - - HTTPS - - - 设置 HTTP 属性失败! - - - 通过添加前缀“快速:”来识别快速连接选项卡 - - - 导入 Active Directory - - - 导入文件“{0}”时发生错误。 - - - 从文件导入(&F)... - - - 导入端口扫描结果 - - - 信息 - - - 清除内部程序进程失败! - - - 内部程序焦点设置失败! - - - 内部程序句柄:{0} - - - 终止内部程序进程失败! - - - 内部程序大小调整失败! - - - --- 内部程序信息 --- - - - 内部程序标题:{0} - - - 地址: - - - 当关闭连接时: - - - 显示名称 - - - 域名 - - - 主机名: - - - 便携版本 - - - 请单击按钮,配置PuTTY会话: - - - Putty 超时时间: - - - 基于通用公共许可证(GPL)发布 - - - - - - 从下面的列表中选择一个面板或单击“新建”添加新面板。单击确定继续。 - - - 服务器状态: - - - 数据库: - - - 验证: - - - 语言 - - - (自动检查) - - - {0} 必须重新启动,对语言的更改才能生效。 - - - 从 SQL 加载配置失败! - - - 连接信息无法从 SQL 服务器加载。 - - - 从 XML 加载配置失败! - - - 本地文件 - - - 本地文件不存在! - - - 添加连接面板 - - - 检查更新 - - - 配置 - - - 连接面板 - - - 复制 - - - Ctrl+Alt+Del - - - Ctrl+Esc - - - 删除外部工具... - - - 捐赠 - - - 重复标签 - - - 退出 - - - 外部工具工具栏 - - - 文件(&F) - - - 帮助(&H) - - - mRemoteNG 帮助 - - - 启动外部工具 - - - 新建连接配置文件 - - - 新建外部工具 - - - 通知 - - - 复制全部 - - - 删除全部 - - - 打开连接配置文件… - - - 选项 - - - 端口扫描 - - - 快速连接工具栏 - - - 重新连接 - - - 刷新(VNC) - - - 重命名标签 - - - 报告问题 - - - 重置布局 - - - 保存连接配置文件 - - - 另存连接配置文件为… - - - 发送特殊键(VNC) - - - 显示帮助文本(&S) - - - 显示文本 - - - 窗口自适应(RDP/VNC) - - - SSH 文件传输 - - - 启动 Chat(VNC) - - - 支持论坛 - - - 工具(&T) - - - 传输文件(SSH) - - - 查看(&V) - - - 仅查看 - - - 网站 - - - 最小化到通知区域 - - - 下移 - - - 上移 - - - mRemoteNG CSV - - - mRemoteNG XML - - - 当前凭据(Windows登录信息) - - - 从不 - - - 新建连接 - - - 新建目录 - - - 新建面板 - - - 新标题 - - - 取消 - - - 无压缩 - - - 未指定外部应用程序。 - - - - - - 正常 - - - 禁用窗口自适应 - - - 无可用更新 - - - 您正在试图加载旧版mRemote连接配置文件,可能会导致出现运行时错误。 -如果您遇到此类错误,请创建新的连接配置文件! - - - 新建标签于当前标签右侧 - - - 打开端口 - - - 测试... - - - 主题 - - - 删除(&D) - - - 新建(&N) - - - 面板名称 - - - 密码保护 - - - 两个密码必须匹配。 - - - 密码必须至少有 3 个字符。 - - - 请填写所有字段 - - - 端口扫描完成。 - - - 无法载入端口扫描面板! - - - 请输入您要连接的主机名或 IP。 - - - 切换所有继承选项。 - - - 请选择此链接使用的身份验证级别: - - - 请选择 VNC 服务器的身份验证方式。 - - - 在调整窗口大小时或在切换全屏模式时选择是否自动调整连接大小。需要 RDC 8.0或更高版本。 - - - 请选择是否启用位图缓存功能。 - - - 请选择颜色质量。 - - - 请选择压缩值。 - - - 请在这里输入主机描述或备注。 - - - 如果要启用远程主机的主题,请选择“是”。 - - - 如果要启用远程主机的壁纸,请选择“是”。 - - - 请输入您的域名。 - - - 请选择是否启用桌面组合功能。 - - - 如果要启用字体平滑,请选择“是”。 - - - 请选择编码模式。 - - - 请选择要启动的外部工具。 - - - 请选择断开远程主机连接之后,要启动的外部工具。 - - - 请选择打开远程主机连接之前,要启动的外部工具。 - - - 请选择连接到主机时所要显示的图标。 - - - 指定负载均衡信息,供负载均衡路由器使用以选择最佳服务器。 - - - 请输入远程主机的MAC地址(如果您需要在外部工具中使用此项)。 - - - 这是在连接树中所显示的名称。 - - - 请设置连接所在面板。 - - - 请输入您的密码。 - - - 请输入所选协议对应的监听端口。 - - - 请选择 mRemoteNG 连接主机所使用的协议。 - - - 请选择连接时所使用的 PuTTY 会话。 - - - 请指定远程桌面网关服务器的域名。 - - - 请指定远程桌面网关服务器的主机名。 - - - 请指定远程桌面网关服务器的时间。 - - - 请在连接配置中指定是否使用相同的用户名或密码登录网关。 - - - 请指定连接远程桌面网关服务器的用户名。 - - - 请选择需要映射到远程主机的本地磁盘。 - - - 请选择需要重定向要远程主机上的按键组合(如Alt+Tab)。 - - - 请选择需要映射到远程主机上的本地端口(如COM口或并口)。 - - - 请选择需要映射到远程主机上的本地打印机。 - - - 选择是否应共享剪贴板。 - - - 请选择本地智能卡设备,以在远程主机上使用。 - - - 请选择远程主机声音的处理方式。 - - - 选择是否应将远程计算机上的默认音频输入设备重定向到此计算机。 - - - 请选择一个有效的渲染显示HTML的引擎。 - - - 请选择此连接的默认分辨率或模式。 - - - 选择并启用自适应窗口。 - - - 连接到远程主机的控制台会话。 - - - 如果可用,请使用凭证安全支持提供程序(CredSSP)进行身份验证。 - - - 请在此随意输入任何你所需的信息。 - - - 请输入您的用户名。 - - - 如需建立只读连接,请选择“是”。 - - - 请输入所使用的代理服务器地址。 - - - 请输入代理服务器的密码。 - - - 请输入代理服务器的端口。 - - - 如果您使用代理服务器建立VNC连接的隧道,请选择具体类型。 - - - 请输入代理服务器的用户名。 - - - 主机名/IP - - - 全部 - - - 服务器身份验证 - - - 身份验证模式 - - - 自动调整大小 - - - 位图缓存 - - - 色彩 - - - 压缩 - - - 说明 - - - 显示主题 - - - 显示壁纸 - - - 桌面组合 - - - 字体平滑 - - - 编码 - - - 外部工具 - - - 连接前启动外部工具: - - - 连接后启动外部工具 - - - 负载均衡信息 - - - MAC 地址 - - - 名称 - - - 面板 - - - 密码 - - - 端口 - - - PuTTY 会话 - - - 网关域名 - - - 网关主机名 - - - 远程桌面网关密码 - - - 使用网关 - - - 网关凭据 - - - 网关用户名 - - - 磁盘 - - - 组合键 - - - 端口 - - - 打印机 - - - 剪贴板 - - - 声音 - - - 音频捕获 - - - 渲染引擎 - - - 分辨率 - - - 自适应窗口模式 - - - 使用控制台会话。 - - - 使用CredSSP方式 - - - 自定义信息 - - - 代理服务器地址 - - - 代理服务器密码 - - - 代理服务器端口 - - - 代理服务器类型 - - - 代理服务器用户名 - - - 协议事件已断开连接。主机:“{1}”;协议:“{2}”消息:“{0}” - - - 协议事件:连接断开失败。 -{0} - - - 需要导入的协议 - - - 代理服务器测试失败! - - - 代理服务器测试成功! - - - 清除 Putty 进程失败! - - - 无法设置焦点 ! - - - Putty 句柄:{0} - - - Putty 进程终止失败! - - - 面板句柄:{0} - - - Putty 窗口大小调整失败! - - - PuTTY 会话已保存 - - - PuTTY 设置 - - - PuTTY 设置窗口显示失败! - - - --- PuTTY 信息 --- - - - PuTTY 标题:{0} - - - 快速:{0} - - - 快速连接 - - - 快速连接添加失败 ! - - - 快速连接创建失败! - - - 关闭连接时确认(&W) - - - 退出 mRemoteNG 时确认(&X) - - - 关闭多个连接时确认(&M) - - - 关闭连接时不需确认 - - - RAW - - - RDP - - - 24位色 - - - 256色 - - - 15位色 - - - 32位色 - - - 16位色 - - - 无法创建 RDP 控制,请检查 mRemoteNG 的安装需求是否满足。 - - - 禁用光标闪烁 - - - 禁用光标阴影 - - - 禁用全窗口拖动 - - - 禁用菜单动画功能 - - - RPD连接断开失败,正在尝试关闭! - - - 内部错误代码 1。 - - - 内部错误代码 2。 - - - 内部错误代码 3。无效状态。 - - - 内部错误代码 4。 - - - 客户端连接时,发生无法恢复的错误。 - - - GetError 函数失败(致命错误)! - - - 发生内存不足错误。 - - - 发生未知错误。 - - - 发生窗口创建错误。 - - - Winsock 初始化错误。 - - - 适合面板 - - - RDP 焦点失败! - - - 支持远程桌面网关。 - - - 不支持远程桌面网关。 - - - RDP 重新连接计数器: - - - RDP SetAuthenticationLevel 函数执行失败! - - - RDP 控制台会话设置失败! - - - 切换到远程桌面客户端 {0} 控制台会话。 - - - RDP 凭据设置失败! - - - RDP 事件句柄设置失败! - - - RDP 远程桌面网关设置失败! - - - RDP SetPerformanceFlags 函数执行失败! - - - RDP 端口设置失败! - - - RDP 属性设置失败! - - - RDP 重定向设置失败! - - - RDP 重定向键设置失败! - - - RDP 分辨率设置失败! - - - 带到这台计算机 - - - 不要播放 - - - 留在远程计算机 - - - RDP 全屏模式切换失败! - - - RDP 窗口自适应切换失败! - - - 启动时自动连接上次打开的会话 - - - 远程文件 - - - 全部移除 - - - 重命名 - - - Rlogin - - - 保存 - - - 全部保存 - - - 打开其它连接配置文件前,是否保存当前配置文件? - - - 退出时保存连接配置文件 - - - 图形交换格式文件 (.gif)|*.gif|联合图像专家组文件 (.jpeg)|*.jpeg|联合图像专家组文件 (.jpg)|*.jpg|便携式网络图形文件 (.png)|*.png - - - 屏幕 - - - 屏幕截图 - - - 屏幕截图 - - - 搜索 - - - 发送到… - - - 新建或重命名连接时,主机名自动设置为显示名称 - - - 无法保存配置或设置系统托盘图标! - - - 在连接树窗口中显示工具提示 - - - 在窗口标题中显示完整的连接配置文件路径 - - - 在标签名称中显示登录信息 - - - 在标签名称中显示通讯协议 - - - 单击打开连接 - - - 单击切换连接 - - - Socks 5 - - - 排序 - - - 升序(A至Z) - - - 降序(Z至A) - - - 请查看 帮助-入门-SQL配置 以获取更多信息。 - - - SQL 服务器 - - - SSH v1 - - - SSH v2 - - - SSH 后台传输失败! - - - SSH 传输失败。 - - - 起始 IP - - - 起始端口 - - - 启动/退出 - - - 状态 - - - 切换到通知面板: - - - 高级 - - - 标签&面板 - - - 升级 - - - Telnet - - - 以下: - - - 错误 ({0}) - - - 信息 ({0}) - - - mRemoteNG 密码 - - - {0} 的 mRemoteNG 密码 - - - 选择面板 - - - 警告 ({0}) - - - 传输 - - - 尝试进行集成 - - - 在工具栏上显示 - - - Ultra VNC Repeater - - - UltraVNC SingleClick 端口: - - - 请勾去您不想保存的属性! - - - mRemoteNG 需要更新 - - - mRemoteNG 会定期检查 mRemoteNG 网站更新和产品公告。 - - - 升级检查未完成! - - - 下载完成! -mRemoteNG 将退出并安装更新。 - - - 下载未完成! - - - 升级文件下载失败! - - - 每隔 {0} 天 - - - 每日 - - - 每月 - - - 每周 - - - 更改日志无法下载。 - - - 使用不同的用户名和密码 - - - 用户 - - - 使用相同的用户名和密码 - - - 使用智能卡 - - - 使用 SQL 服务器加载并保存连接配置 - - - 版本 - - - VNC - - - VNC 连接断开失败! - - - VNC 屏幕刷新失败! - - - VNC SendSpecialKeys 函数执行失败! - - - VNC 发送事件句柄失败! - - - 设置 VNC 属性失败! - - - VNC 窗口自适应切换失败! - - - VNC 查看模式切换失败! - - - 认证失败时弹出警告 - - - 警告 - - - 确定 - - - RDP 连接超时 - - - 此节点已在此文件夹中。 - - - 无法将节点拖到自身上。 - - - 无法将父节点拖放到子节点上。 - - - 该节点不可拖动。 - - - 分组密码模式 - - - 加密引擎 - - - 安全 - - - 关键推导函数迭代 - - - 动态 - - - - - - - - - 选择由协议提供的声音质量:动态,中,高 - - - 音质 - - - 下载完成! - - - 下载 - - - RDP 会话在自动断开连接之前闲置的分钟数(无限制使用 0) - - - 空闲等待分钟数 - - - 添加 - - - 标题 - - - 您确定要删除凭据记录 {0} 吗? - - - 选择是否在RDP会话由于不活动而断开连接后收到警报 - - - 密码必须至少包含 {0} 个以下所示字符:{1} - - - 密码必须至少包含 {0} 个小写字符 - - - 密码必须至少包含 {0} 个数字 - - - 密码必须至少包含 {0} 大写字符 - - - 密码长度必须介于 {0} 和 {1} 之间 - - - 为 mRemoteNG 日志文件选择一个路径 - - - 调试 - - - 显示这些消息类型 - - - 日志文件路径 - - - 记录这些消息类型 - - - 选择路径 - - - 打开文件 - - - 使用默认 - - - 记录 - - - 弹出窗口 - - - 登录到应用程序目录 - - - 分配凭据 - - - 凭据 - - - 打开一个不同的文件 - - - 凭据不可用 - - - 真的想删除主题吗? - - - 新主题名称 - - - 无法创建主题,名称已存在或名称中有特殊字符 - - - 输入新的主题名称 - - - 警告:提交任何主题配置更改都需要重新启动。 - - - 无法找到名称为“{0}”的外部工具 - - - 创建一个新的连接文件 - - - 无法找到连接文件。 - - - 导入现有文件 - - - 使用自定义文件路径 - - - 测试连接 - - - 服务器“{0}”无法访问。 - - - 连接成功 - - - 用户“{0}”登录失败。 - - - 数据库“{0}”不可用。 - - - 每次编辑后保存连接 - - - 在连接树中过滤搜索匹配 - - - 测试连接 - - - 只读: - - - 对 RDP“负载均衡信息”属性使用 UTF8 编码 - - - 超时 [秒] - - - 工作目录: - - - 运行已提升 - - - 显示在工具栏上 - - - 工作目录 - - - 锁定工具栏位置 - - - Multi SSH 工具栏 - - - 导入子 OU - - - 高级安全选项 - - - mRemoteNG 选项 - - - 在 mRemoteNG 启动时创建一个空面板 - - - 必须介于 0 和 255 之间 - - - 超出范围 - - - 删除 - - - 重新连接所有连接 - - - UltraVNC SingleClick - - - 断开右侧标签的连接 - - - 断开除此之外的所有连接 - - - 确定要关闭除“{0}”之外的所有连接吗? - - - 尝试重新连接到 RDP 主机 "{0}" 时出错 - - - 试图将连接解析更改为主机 "{0}" 时出错 - - - 堆栈跟踪 - - - 异常消息: - - - mRemoteNG 未处理的异常 - - - 出现未处理的异常情况。 - - - 此异常将强制 mRemoteNG 关闭 - - - 复制主机名 - - - 将搜索栏放在连接树上方 - - - 跟踪连接树中的活动连接 - - - 始终显示连接标签 - - - 发布通道 - - - 稳定通道仅包括最终版本(Release 版)。 -测试通道包括测试版(Beta 版)和发行版候选(RC 版)。 -开发通道包括 Alpha 版、(Beta 版)和发行版候选(RC 版)。 - - - 应用 - - - 代理 - - - Multi SSH: - - - 按 ENTER 发送。Ctrl+C 立即发送。 - - - 在收藏夹菜单中显示此连接。 - - - 收藏夹 - - - 收藏夹 - - - 清除搜索字符串 - - - 以仅查看模式连接 - - - 不要修剪用户名中的空格 - - - 环境 - - - 使用 {1}/{2} 和 {3} 迭代加密 {0} 条目花费了 {4} 秒。 - - - 加密测试 - - - 测试设置 - - - 设置打开连接时要使用的 RDP 版本。 - - - RDP 版本 - - - 使用 VM ID 连接到在 Hyper-V 上运行的 VM。 - - - 要连接到的 Hyper-V 虚拟机的 ID。 - - - 使用 VM ID - - - VM ID - - - 无法创建 RDP 客户端。此计算机上不支持 RDP 协议版本 {0}。请选择较旧的协议版本。 - - - 启动时最小化 - - - 设置加密连接文件所需的密码。在开始 mRemoteNG 之前,系统将提示您输入密码。 - - - 连接到启用了增强模式的 Hyper-V 主机。 - - - 使用增强模式 - - - 指定远程桌面网关服务器的密码。 - - - 靠近通知区域 - - - Windows - - - PowerShell - - \ No newline at end of file diff --git a/mRemoteNG/Language/Language.zh-TW.resx b/mRemoteNG/Language/Language.zh-TW.resx deleted file mode 100644 index 526929c31..000000000 --- a/mRemoteNG/Language/Language.zh-TW.resx +++ /dev/null @@ -1,1578 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 關於 - - - AddNodeFromXML 失敗! - - - 只允許單一應用程式執行個體 (需要重新啟動 mRemoteNG) - - - 始終 - - - 一律連線,即使驗證失敗 - - - 開啟連線時一律顯示面板選取對話方塊 - - - 一律顯示面板索引標籤 - - - 始終顯示通知區域圖示 - - - 稍後再次詢問我 - - - 立即自訂設定 - - - 使用建議的設定 - - - {0} 能自動檢查更新,其提供新的功能和和問題修正。建議允許 {0} 每星期檢查更新。 - - - 自動更新設定 - - - 比例 - - - 自動儲存間隔: - - - 目前版本 - - - 瀏覽(&B)... - - - 取消(&C) - - - 變更 - - - 關閉(&C) - - - 預設繼承 - - - 預設內容 - - - 停止中斷 - - - 圖示 - - - 匯入(&I) - - - 繼承 - - - 啟動 PuTTY - - - 確定(&O) - - - 內容 - - - 掃描(&S) - - - 停止(&S) - - - 測試 Proxy - - - 無法開始 Port Scan,IP 格式不正確! - - - 外觀 - - - 連線 - - - 顯示 - - - 閘道 - - - 雜項 - - - 協定 - - - 重新導向 - - - 檢查失敗! - - - 從伺服器中斷連線時自動嘗試重新連線 (僅限 RDP && ICA) - - - 不再顯示此訊息。 - - - 此 Proxy 伺服器需要驗證 - - - 使用自訂 PuTTY 路徑: - - - 就緒時重新連線 - - - 使用 Proxy 伺服器連線 - - - 使用者名稱 - - - 等待結束 - - - 再次檢查 - - - 啟動時檢查更新和發佈 - - - 立即檢查 - - - 啟動時檢查元件的正確安裝 - - - 連線前選擇面板 - - - 關閉的連接埠 - - - 折疊所有資料夾 - - - 引數 - - - 檔案名稱 - - - 訊息 - - - 無法分析命令列引數! - - - {0} 偵測到 Lenovo Auto Scroll Utility 執行在此系統。 此工具程式已知會造成 {0} 問題。 建議您將其停用或解除安裝。 - - - 偵測到相容問題 - - - btnIcon_Click 失敗! - - - ShowHideGridItems 失敗! - - - IconMenu_Click 失敗! - - - Property Grid 物件失敗! - - - SetHostStatus 失敗! - - - pGrid_PopertyValueChanged 失敗! - - - 組態 UI 載失敗! - - - 您確定要關閉關閉面板「{0}」嗎? 任何內含的連線也將關閉。 - - - 您確定要刪除外部工具「{0}」嗎? - - - 您確定要刪除選取的外部工具「{0}」嗎? - - - 您確定要刪除連線「{0}」嗎? - - - 您確定要刪除空的資料夾「{0}」嗎? - - - 您確定要刪除資料夾「{0}」嗎? 任何內含的資料夾或連線也將刪除。 - - - 您確定要關閉所有開啟連線嗎? - - - 您確定要重設面板為其預設配置嗎? - - - 連線 - - - 以全螢幕模式連線 - - - 正在連線... - - - Protocol Event 已連線 - - - 使用者「{2}」透過「{1}」發佈連線到「{0}」 (描述: 「{3}」,使用者欄位: 「{4}」) - - - 連線失敗! - - - 發生 Protocol Event 錯誤 - - - 開啟連線失敗! - - - 無法開啟連線: 未指定主機名稱! - - - 連線 - - - 無法設定預設連接埠! - - - 無法建立連線檔案備份! - - - 無法載入連線檔案「{0}」! - - - 無法載入連線檔案「{0}」! -開始新的連線檔案。 - - - 無法另存連線檔案為「{0}」! - - - 連線到 Console 工作站 - - - 連線 (含選項) - - - 使用者「{2}」關閉透過「{1}」連線到「{0}」。 - - - 連線事件已關閉 - - - 連線事件關閉失敗! - - - 無法建立連線檔案! - - - 無法在 FilteredPropertyGrid 找到 ToolStrip 控制。 - - - 偵測 - - - 如果驗證失敗則不連線 - - - 按兩下索引標籤關閉 - - - 下載並安裝 - - - 複製 - - - 您要以無密碼繼續嗎? - - - 針對空的使用者名稱、密碼或網域欄位使用: - - - 完整加密連線檔案 - - - 結束 IP - - - 結束連接埠 - - - AddExternalToolsToToolBar (frmMain) 失敗。 {0} - - - AddFolder (UI.Window.Tree) 失敗。 {0} - - - 資料庫版本 {0} 與 {1} 的此版本不相容。 - - - 無法儲存連線清單。 - - - 解密失敗。 {0} - - - 加密失敗。 {0} - - - 錯誤 - - - 無法載入啟動連線檔案。 {0}{0}{2}{0}{3}{0}{0} 為了避免資料遺失,{1} 將結束。 - - - VerifyDatabaseVersion (Config.Connections.Save) 失敗 {0} - - - 展開所有資料夾 - - - 實驗性 - - - 匯出 - - - 所有檔案 (*.*) - - - 應用程式檔案 (*.exe) - - - mRemote CSV 檔案 (*.csv) - - - mRemote XML 檔案 (*.xml) - - - RDP 檔案 (*.rdp) - - - 繼承 {0} - - - 繼承的內容描述 {0} - - - 任意 - - - 全螢幕 - - - 一般 - - - 從「{1}」載入「{0}」的連線項目時發生錯誤。 {2} - - - 自動重新連線 - - - 外部工具內容 - - - 檔案 - - - 主機 - - - HTTP 連線失敗! - - - 無法建立新連線! - - - 變更 HTTP Document Tile 失敗! - - - 設定 HTTP Props 失敗! - - - 加入字首「Quick:」以識別快速連線索引標籤 - - - 從 Active Directory 匯入 - - - 從 Port Scan 匯入 - - - 資訊 - - - Dispose of Int App 程序失敗! - - - Int App Focus 連線失敗! - - - Int App 處理: {0} - - - Killing Int App 程序失敗! - - - Int App 調整大小失敗! - - - --- IntApp Stuff --- - - - Int App 標題: {0} - - - 位址: - - - 關閉連線時: - - - 顯示名稱 - - - 網域 - - - 主機名稱: - - - 可攜版 - - - 若要組態 PuTTY 工作階段,按一下此按鈕: - - - PuTTY 和整合的外部工具的最大等待時間: - - - 根據 GNU General Public License (GPL) 發佈 - - - - - - 從以下清單選取面板或按一下 [新增] 以加入新的。 按一下 [確定] 繼續。 - - - 伺服器狀態: - - - 資料庫: - - - 驗證: - - - 語言 - - - (自動偵測) - - - {0} 必須重新啟動使變更語言生效。 - - - 從 SQL 載入連線失敗! - - - 從 XML 載入連線失敗! - - - 本機檔案 - - - 本機檔案不存在! - - - 加入連線面板 - - - 檢查更新 - - - 組態 - - - 連線面板 - - - 複製 - - - Ctrl-Alt-Del - - - Ctrl-Esc - - - 刪除外部工具... - - - 捐贈 - - - 複製索引標籤 - - - 結束 - - - 外部工具工具列 - - - 檔案(&F) - - - 說明(&H) - - - mRemoteNG 說明 - - - 啟動外部工具 - - - 新增連線檔案 - - - 新增外部工具 - - - 通知 - - - 全部複製 - - - 全部刪除 - - - 開啟連線檔案... - - - 選項 - - - 通訊埠掃描 - - - 快速連線工具列 - - - 重新連線 - - - 重新整理螢幕 (VNC) - - - 重新命名索引標籤 - - - 報告 Bug - - - 重設配置 - - - 儲存連線檔案 - - - 另儲連線檔案... - - - 傳送特殊鍵 (VNC) - - - 顯示說明文字(&S) - - - 顯示文字 - - - 智慧大小 (RDP/VNC) - - - SSH 檔案傳輸 - - - 開始聊天 (VNC) - - - 支援討論區 - - - 工具(&T) - - - 傳輸檔案 (SSH) - - - 檢視(&V) - - - 只有檢視 (VNC) - - - 網站 - - - 最小化到通知區域 - - - 下移 - - - 上移 - - - 我的目前認證 (Windows 登入資訊) - - - 永不 - - - 新增連線 - - - 新增資料夾 - - - 新增面板 - - - 新增標題 - - - - - - 不壓縮 - - - 不結束指定 App。 - - - - - - 標準 - - - 不智慧大小 - - - 沒有可用更新 - - - 您嘗試載入的連線設定檔是使用非常早期的 mRemote 版本所建立,這會造成執行階段錯誤。 -如有類似錯誤,請建立新的連線檔案! - - - 在目前選取的索引標籤右側開啟新的索引標籤 - - - 開啟連接埠 - - - 主題 - - - 刪除(&D) - - - 新增(&N) - - - 面板名稱 - - - 密碼保護 - - - 請填入所有欄位 - - - 無法載入 PortScan 面板! - - - 輸入您要連線的主機名稱或 IP。 - - - 切換所有的繼承選項。 - - - 選取此連線所用的驗證等級。 - - - 選取針對 VNC 伺服器的驗證方式。 - - - 選取是否使用點陣圖快取。 - - - 選取使用的色彩品質。 - - - 選取使用的壓縮值。 - - - 在此輸入主機的備註或描述。 - - - 選取是否顯示遠端主機的佈景主題。 - - - 選取是否顯示遠端主機的底色圖案。 - - - 請輸入網域。 - - - 選取是否使用桌面佈景。 - - - 選取是否使用平滑字型。 - - - 選取使用的編碼模式。 - - - 選取啟動的外部工具。 - - - 選取在中斷遠端主機連線後啟動的外部工具。 - - - 選取在中斷遠端主機連線前啟動的外部工具。 - - - 選擇連線到主機時顯示的圖示。 - - - 輸入遠端主機的 MAC 位址,如果您希望在外部工具中使用。 - - - 顯示在連線樹中的名稱。 - - - 設定開啟連線的面板。 - - - 請輸入密碼。 - - - 輸入選取協定的接聽連接埠。 - - - 選擇連線到主機時 mRemoteNG 使用的協定。 - - - 選取連線時所用的 PuTTY 工作階段。 - - - 指定使用者提供連線到 RD Gateway 伺服器的網域名稱。 - - - 指定 Remote Desktop Gateway 伺服器的主機名稱。 - - - 指定何時使用 Remote Desktop Gateway (RD Gateway) 伺服器。 - - - 指定是否使用與連線相同的使用者名稱和密碼登入到 Gateway。 - - - 指定使用者提供連線到 RD Gateway 伺服器的使用者名稱。 - - - 選取是否在遠端主機對應本機磁碟機。 - - - 選取是否重新導向按鍵組合 (例如 Alt-Tab) 到遠端主機。 - - - 選取是否在遠端主機顯示本機連接埠 (例如 序列埠、並列埠)。 - - - 選取是否在遠端主機顯示本機印表機。 - - - 選取是否在遠端主機可以使用本機智慧卡。 - - - 選取如何重新導向音訊。 - - - 選取可用的轉譯引擎之一用來顯示 HTML。 - - - 顯示此連線將開啟的解析度或模式。 - - - 選取使用 SmartSize 模式。 - - - 連線到遠端主機的 Console 工作階段。 - - - 驗證使用 Credential Security Support Provider (CredSSP),如果可用。 - - - 在此任意輸入您需要的資訊。 - - - 輸入使用者名稱。 - - - 如果您要建立只有檢視的連線到主機,選取是。 - - - 請輸入使用的 Proxy 位址。 - - - 輸入針對 Proxy 伺服器的驗證密碼。 - - - 輸入 Proxy 伺服器接聽的連接埠。 - - - 如果您要使用 Proxy 開啟 VNC 連線通道,請選取其類型。 - - - 輸入針對 Proxy 伺服器的驗證使用者名稱。 - - - 主機名稱/IP - - - 所有 - - - 伺服器驗證 - - - 驗證模式 - - - 快取點陣圖 - - - 色彩 - - - 壓縮 - - - 描述 - - - 顯示佈景主題 - - - 顯示底色圖案 - - - 桌面壓縮 - - - 字型平滑 - - - 編碼 - - - 外部工具 - - - 外部工具之後 - - - 外部工具之前 - - - MAC 位址 - - - 名稱 - - - 面板 - - - 密碼 - - - 連接埠 - - - PuTTY 工作階段 - - - 閘道網域 - - - 閘道主機名稱 - - - 遠端桌面閘道密碼 - - - 使用閘道 - - - 閘道認證 - - - 閘道使用者名稱 - - - 磁碟機 - - - 按鍵組合 - - - 連接埠 - - - 印表機 - - - 音訊 - - - 轉譯引擎 - - - 解析度 - - - 智慧大小模式 - - - 使用 Console 工作階段 - - - 使用 CredSSP - - - 使用者欄位 - - - Proxy 位址 - - - Proxy 密碼 - - - Proxy 連接埠 - - - Proxy 類型 - - - Proxy 使用者名稱 - - - Protocol Event 已中斷連線。 -訊息: -{0} - - - Protocol Event 中斷連線失敗。 -{0} - - - 匯入協定 - - - Proxy 測試失敗! - - - Proxy 測試成功! - - - Dispose of Putty process 失敗! - - - 無法設定焦點! - - - Putty Handle: {0} - - - Killing Putty Process 失敗! - - - 面板處理: {0} - - - Putty Resize 失敗! - - - PuTTY 儲存的工作階段 - - - PuTTY 設定 - - - 顯示 PuTTY 設定對話方塊失敗! - - - --- PuTTY Stuff --- - - - PuTTY 標題: {0} - - - 快速: {0} - - - 快速連線 - - - Quick Connect Add 失敗! - - - Creating quick connect 失敗 - - - 關閉連線時警告(&W) - - - 只在結束 mRemoteNG 時警告我(&X) - - - 只在關閉多重連線時警告我(&M) - - - 關閉連線時不警告我(&N) - - - RAW - - - RDP - - - 16777216 色 (24 位元) - - - 256 色 (8 位元) - - - 32768 色 (15 位元) - - - 16777216 色 (32 位元) - - - 65536 色 (16 位元) - - - 無法建立 RDP 控制,請檢查 mRemoteNG 需求。 - - - 停用游標閃爍 - - - 停用游標陰影 - - - 停用完整視窗拖曳 - - - 停用功能表動畫 - - - RDP 中斷連線失敗,正在嘗試關閉! - - - 內部錯誤碼 1。 - - - 內部錯誤碼 2。 - - - 內部錯誤碼 3。 狀態無效。 - - - 內部錯誤碼 4。 - - - 用戶端連線期間發生無法復原錯誤。 - - - GetError 失敗 (FatalErrors) - - - 發生記憶體不足錯誤。 - - - 發生不明錯誤。 - - - 發生視窗內容錯誤。 - - - Winsock 初始化錯誤。 - - - 符合面板 - - - RDP Focus 失敗! - - - 支援 RD Gateway。 - - - 不支援 RD Gateway! - - - RDP 重新連線次數: - - - RDP SetAuthenticationLevel 失敗! - - - RDP SetUseConsoleSession 失敗! - - - 設定 RDC {0} 的 Console 開關。 - - - RDP SetCredentials 失敗! - - - RDP SetEventHandlers 失敗! - - - RDP SetRDGateway 失敗! - - - RDP SetPerformanceFlags 失敗! - - - RDP SetPort 失敗! - - - RDP SetProps 失敗! - - - RDP Set Redirection 失敗! - - - RDP Set Redirect Keys 失敗! - - - RDP SetResolution 失敗! - - - 送到此電腦 - - - 不播放 - - - 留在遠端電腦 - - - RDP ToggleFullscreen 失敗! - - - RDP ToggleSmartSize 失敗! - - - 啟動時重新連線到先前開啟的工作階段 - - - 遠端檔案 - - - 全部移除 - - - 重新命名 - - - Rlogin - - - 儲存 - - - 全部儲存 - - - 您要在載入另一個之前先儲存目前的連線檔案嗎? - - - 結束時儲存連線 - - - Graphics Interchange Format 檔案 (.gif)|*.gif|Joint Photographic Experts Group 檔案 (.jpeg)|*.jpeg|Joint Photographic Experts Group 檔案 (.jpg)|*.jpg|Portable Network Graphics 檔案 (.png)|*.png - - - 螢幕 - - - 快照 - - - 快照 - - - 搜尋 - - - 傳送到... - - - 設定建立或重新命名連線時主機名稱如顯示名稱 - - - 無法儲存設定或部署 SysTray 圖示! - - - 在連線樹顯示描述工具提示 - - - 在視窗標題顯示完整連線檔案路徑 - - - 在索引標籤名稱顯示登入資訊 - - - 在索引標籤名稱顯示協定 - - - 按一下在連線開啟 - - - 按一下切換到開啟的連線 - - - Socks 5 - - - 排序 - - - 遞增 (A-Z) - - - 遞減 (Z-A) - - - 更多資訊請查看說明 - 入門 - SQL 組態! - - - SQL 伺服器 - - - SSH 版本 1 - - - SSH 版本 2 - - - SSH 背景傳輸失敗! - - - SSH 傳輸失敗。 - - - 開始 IP - - - 開始連接埠 - - - 啟動/結束 - - - 狀態 - - - 切換到通知面板: - - - 進階 - - - 索引標籤 && 面板 - - - 更新 - - - Telnet - - - 以下: - - - 錯誤 ({0}) - - - 資訊 ({0}) - - - 密碼 - - - 選取面板 - - - 警告 ({0}) - - - 傳輸 - - - 嘗試整合 - - - Ultra VNC Repeater - - - UltraVNC SingleClick 連接埠: - - - 取消勾選您不要儲存的內容! - - - mRemoteNG 需要更新 - - - mRemoteNG 能定期連線到 mRemoteNG 網站檢查更新和產品發佈。 - - - 檢查更新完整性失敗! - - - 下載完成! -mRemoteNG 將立即結束並開始安裝。 - - - 下載完成失敗! - - - 下載更新失敗! - - - 每隔 {0} 天 - - - 每天 - - - 每月 - - - 每星期 - - - 使用不同的使用者名稱和密碼 - - - 使用者 - - - 使用相同的使用者名稱和密碼 - - - 使用智慧卡 - - - 使用 SQL Server 載入 && 儲存連線 - - - 版本 - - - VNC - - - VNC 中斷連線失敗! - - - VNC 重新整理畫面失敗! - - - VNC SendSpecialKeys 失敗! - - - VNC Set Event Handlers 失敗! - - - VNC Set Props 失敗! - - - VNC Toggle SmartSize 失敗! - - - VNC Toggle ViewOnly 失敗! - - - 如果驗證失敗警告我 - - - 警告 - - - - - \ No newline at end of file diff --git a/mRemoteNG/Messages/IMessage.cs b/mRemoteNG/Messages/IMessage.cs deleted file mode 100644 index 9728e4750..000000000 --- a/mRemoteNG/Messages/IMessage.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace mRemoteNG.Messages -{ - public interface IMessage - { - MessageClass Class { get; set; } - - string Text { get; set; } - - DateTime Date { get; set; } - - bool OnlyLog { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/Message.cs b/mRemoteNG/Messages/Message.cs deleted file mode 100644 index 5888e579d..000000000 --- a/mRemoteNG/Messages/Message.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace mRemoteNG.Messages -{ - public class Message : IMessage - { - public MessageClass Class { get; set; } - public string Text { get; set; } - public DateTime Date { get; set; } - public bool OnlyLog { get; set; } - - public Message(MessageClass messageClass, string messageText, bool onlyLog = false) - { - Class = messageClass; - Text = messageText; - Date = DateTime.Now; - OnlyLog = onlyLog; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageClassEnum.cs b/mRemoteNG/Messages/MessageClassEnum.cs deleted file mode 100644 index 7606e1ffd..000000000 --- a/mRemoteNG/Messages/MessageClassEnum.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace mRemoteNG.Messages -{ - public enum MessageClass - { - DebugMsg = 0, - InformationMsg = 1, - WarningMsg = 2, - ErrorMsg = 3, - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageCollector.cs b/mRemoteNG/Messages/MessageCollector.cs deleted file mode 100644 index 9a89be74b..000000000 --- a/mRemoteNG/Messages/MessageCollector.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Linq; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Messages -{ - public class MessageCollector : INotifyCollectionChanged - { - private readonly IList _messageList; - - public IEnumerable Messages => _messageList; - - public MessageCollector() - { - _messageList = new List(); - } - - public void AddMessage(MessageClass messageClass, string messageText, bool onlyLog = false) - { - var message = new Message(messageClass, messageText, onlyLog); - AddMessage(message); - } - - public void AddMessage(IMessage message) - { - AddMessages(new[] {message}); - } - - public void AddMessages(IEnumerable messages) - { - var newMessages = new List(); - foreach (var message in messages) - { - if (_messageList.Contains(message)) continue; - _messageList.Add(message); - newMessages.Add(message); - } - - if (newMessages.Any()) - RaiseCollectionChangedEvent(NotifyCollectionChangedAction.Add, newMessages); - } - - public void AddExceptionMessage(string message, - Exception ex, - MessageClass msgClass = MessageClass.ErrorMsg, - bool logOnly = true) - { - AddMessage(msgClass, message + Environment.NewLine + Tools.MiscTools.GetExceptionMessageRecursive(ex), - logOnly); - } - - public void AddExceptionStackTrace(string message, - Exception ex, - MessageClass msgClass = MessageClass.ErrorMsg, - bool logOnly = true) - { - AddMessage(msgClass, message + Environment.NewLine + ex.Message + Environment.NewLine + ex.StackTrace, - logOnly); - } - - public void ClearMessages() - { - _messageList.Clear(); - } - - public event NotifyCollectionChangedEventHandler CollectionChanged; - - private void RaiseCollectionChangedEvent(NotifyCollectionChangedAction action, IList items) - { - CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(action, items)); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageFilteringOptions/IMessageTypeFilteringOptions.cs b/mRemoteNG/Messages/MessageFilteringOptions/IMessageTypeFilteringOptions.cs deleted file mode 100644 index 1bf6fa42e..000000000 --- a/mRemoteNG/Messages/MessageFilteringOptions/IMessageTypeFilteringOptions.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace mRemoteNG.Messages.MessageFilteringOptions -{ - public interface IMessageTypeFilteringOptions - { - bool AllowDebugMessages { get; set; } - bool AllowInfoMessages { get; set; } - bool AllowWarningMessages { get; set; } - bool AllowErrorMessages { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageFilteringOptions/LogMessageTypeFilteringOptions.cs b/mRemoteNG/Messages/MessageFilteringOptions/LogMessageTypeFilteringOptions.cs deleted file mode 100644 index 915568ecb..000000000 --- a/mRemoteNG/Messages/MessageFilteringOptions/LogMessageTypeFilteringOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using mRemoteNG.Properties; - -namespace mRemoteNG.Messages.MessageFilteringOptions -{ - public class LogMessageTypeFilteringOptions : IMessageTypeFilteringOptions - { - public bool AllowDebugMessages - { - get => Settings.Default.TextLogMessageWriterWriteDebugMsgs; - set => Settings.Default.TextLogMessageWriterWriteDebugMsgs = value; - } - - public bool AllowInfoMessages - { - get => Settings.Default.TextLogMessageWriterWriteInfoMsgs; - set => Settings.Default.TextLogMessageWriterWriteInfoMsgs = value; - } - - public bool AllowWarningMessages - { - get => Settings.Default.TextLogMessageWriterWriteWarningMsgs; - set => Settings.Default.TextLogMessageWriterWriteWarningMsgs = value; - } - - public bool AllowErrorMessages - { - get => Settings.Default.TextLogMessageWriterWriteErrorMsgs; - set => Settings.Default.TextLogMessageWriterWriteErrorMsgs = value; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageFilteringOptions/NotificationPanelMessageFilteringOptions.cs b/mRemoteNG/Messages/MessageFilteringOptions/NotificationPanelMessageFilteringOptions.cs deleted file mode 100644 index 21c22bc10..000000000 --- a/mRemoteNG/Messages/MessageFilteringOptions/NotificationPanelMessageFilteringOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using mRemoteNG.Properties; - -namespace mRemoteNG.Messages.MessageFilteringOptions -{ - public class NotificationPanelMessageFilteringOptions : IMessageTypeFilteringOptions - { - public bool AllowDebugMessages - { - get => Settings.Default.NotificationPanelWriterWriteDebugMsgs; - set => Settings.Default.NotificationPanelWriterWriteDebugMsgs = value; - } - - public bool AllowInfoMessages - { - get => Settings.Default.NotificationPanelWriterWriteInfoMsgs; - set => Settings.Default.NotificationPanelWriterWriteInfoMsgs = value; - } - - public bool AllowWarningMessages - { - get => Settings.Default.NotificationPanelWriterWriteWarningMsgs; - set => Settings.Default.NotificationPanelWriterWriteWarningMsgs = value; - } - - public bool AllowErrorMessages - { - get => Settings.Default.NotificationPanelWriterWriteErrorMsgs; - set => Settings.Default.NotificationPanelWriterWriteErrorMsgs = value; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageFilteringOptions/NotificationPanelSwitchOnMessageFilteringOptions.cs b/mRemoteNG/Messages/MessageFilteringOptions/NotificationPanelSwitchOnMessageFilteringOptions.cs deleted file mode 100644 index debbbee6c..000000000 --- a/mRemoteNG/Messages/MessageFilteringOptions/NotificationPanelSwitchOnMessageFilteringOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using mRemoteNG.Properties; - -namespace mRemoteNG.Messages.MessageFilteringOptions -{ - public class NotificationPanelSwitchOnMessageFilteringOptions : IMessageTypeFilteringOptions - { - public bool AllowDebugMessages - { - get => false; - set { } - } - - public bool AllowInfoMessages - { - get => Settings.Default.SwitchToMCOnInformation; - set => Settings.Default.SwitchToMCOnInformation = value; - } - - public bool AllowWarningMessages - { - get => Settings.Default.SwitchToMCOnWarning; - set => Settings.Default.SwitchToMCOnWarning = value; - } - - public bool AllowErrorMessages - { - get => Settings.Default.SwitchToMCOnError; - set => Settings.Default.SwitchToMCOnError = value; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageFilteringOptions/PopupMessageFilteringOptions.cs b/mRemoteNG/Messages/MessageFilteringOptions/PopupMessageFilteringOptions.cs deleted file mode 100644 index 55786a689..000000000 --- a/mRemoteNG/Messages/MessageFilteringOptions/PopupMessageFilteringOptions.cs +++ /dev/null @@ -1,31 +0,0 @@ -using mRemoteNG.Properties; - -namespace mRemoteNG.Messages.MessageFilteringOptions -{ - public class PopupMessageFilteringOptions : IMessageTypeFilteringOptions - { - public bool AllowDebugMessages - { - get => Settings.Default.PopupMessageWriterWriteDebugMsgs; - set => Settings.Default.PopupMessageWriterWriteDebugMsgs = value; - } - - public bool AllowInfoMessages - { - get => Settings.Default.PopupMessageWriterWriteInfoMsgs; - set => Settings.Default.PopupMessageWriterWriteInfoMsgs = value; - } - - public bool AllowWarningMessages - { - get => Settings.Default.PopupMessageWriterWriteWarningMsgs; - set => Settings.Default.PopupMessageWriterWriteWarningMsgs = value; - } - - public bool AllowErrorMessages - { - get => Settings.Default.PopupMessageWriterWriteErrorMsgs; - set => Settings.Default.PopupMessageWriterWriteErrorMsgs = value; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageWriters/DebugConsoleMessageWriter.cs b/mRemoteNG/Messages/MessageWriters/DebugConsoleMessageWriter.cs deleted file mode 100644 index c168e39f8..000000000 --- a/mRemoteNG/Messages/MessageWriters/DebugConsoleMessageWriter.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Diagnostics; - -namespace mRemoteNG.Messages.MessageWriters -{ - public class DebugConsoleMessageWriter : IMessageWriter - { - public void Write(IMessage message) - { - var textToPrint = $"{message.Class}: {message.Text}"; - Debug.Print(textToPrint); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageWriters/IMessageWriter.cs b/mRemoteNG/Messages/MessageWriters/IMessageWriter.cs deleted file mode 100644 index c396a1a28..000000000 --- a/mRemoteNG/Messages/MessageWriters/IMessageWriter.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Messages.MessageWriters -{ - public interface IMessageWriter - { - void Write(IMessage message); - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageWriters/NotificationPanelMessageWriter.cs b/mRemoteNG/Messages/MessageWriters/NotificationPanelMessageWriter.cs deleted file mode 100644 index 0a4df2be1..000000000 --- a/mRemoteNG/Messages/MessageWriters/NotificationPanelMessageWriter.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.UI; -using mRemoteNG.UI.Window; - -namespace mRemoteNG.Messages.MessageWriters -{ - public class NotificationPanelMessageWriter : IMessageWriter - { - private readonly ErrorAndInfoWindow _messageWindow; - - public NotificationPanelMessageWriter(ErrorAndInfoWindow messageWindow) - { - if (messageWindow == null) - throw new ArgumentNullException(nameof(messageWindow)); - - _messageWindow = messageWindow; - } - - public void Write(IMessage message) - { - var lvItem = new NotificationMessageListViewItem(message); - AddToList(lvItem); - } - - private void AddToList(ListViewItem lvItem) - { - if (_messageWindow.lvErrorCollector.InvokeRequired) - _messageWindow.lvErrorCollector.Invoke((MethodInvoker)(() => AddToList(lvItem))); - else - { - _messageWindow.lvErrorCollector.Items.Insert(0, lvItem); - if (_messageWindow.lvErrorCollector.Items.Count > 0) - _messageWindow.pbError.Visible = true; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageWriters/PopupMessageWriter.cs b/mRemoteNG/Messages/MessageWriters/PopupMessageWriter.cs deleted file mode 100644 index 9b1c147e8..000000000 --- a/mRemoteNG/Messages/MessageWriters/PopupMessageWriter.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Messages.MessageWriters -{ - public class PopupMessageWriter : IMessageWriter - { - public void Write(IMessage message) - { - switch (message.Class) - { - case MessageClass.DebugMsg: - MessageBox.Show(message.Text, string.Format(Language.TitleInformation, message.Date), - MessageBoxButtons.OK, MessageBoxIcon.Information); - break; - case MessageClass.InformationMsg: - MessageBox.Show(message.Text, string.Format(Language.TitleInformation, message.Date), - MessageBoxButtons.OK, MessageBoxIcon.Information); - break; - case MessageClass.WarningMsg: - MessageBox.Show(message.Text, string.Format(Language.TitleWarning, message.Date), - MessageBoxButtons.OK, MessageBoxIcon.Warning); - break; - case MessageClass.ErrorMsg: - MessageBox.Show(message.Text, string.Format(Language.TitleError, message.Date), - MessageBoxButtons.OK, MessageBoxIcon.Error); - break; - default: - throw new ArgumentOutOfRangeException(); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/MessageWriters/TextLogMessageWriter.cs b/mRemoteNG/Messages/MessageWriters/TextLogMessageWriter.cs deleted file mode 100644 index 634cbc4d2..000000000 --- a/mRemoteNG/Messages/MessageWriters/TextLogMessageWriter.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using mRemoteNG.App; - -namespace mRemoteNG.Messages.MessageWriters -{ - public class TextLogMessageWriter : IMessageWriter - { - private readonly Logger _logger; - - public TextLogMessageWriter(Logger logger) - { - if (logger == null) - throw new ArgumentNullException(nameof(logger)); - - _logger = logger; - } - - public void Write(IMessage message) - { - switch (message.Class) - { - case MessageClass.InformationMsg: - _logger.Log.Info(message.Text); - break; - case MessageClass.DebugMsg: - _logger.Log.Debug(message.Text); - break; - case MessageClass.WarningMsg: - _logger.Log.Warn(message.Text); - break; - case MessageClass.ErrorMsg: - _logger.Log.Error(message.Text); - break; - default: - throw new ArgumentOutOfRangeException(); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/WriterDecorators/MessageFocusDecorator.cs b/mRemoteNG/Messages/WriterDecorators/MessageFocusDecorator.cs deleted file mode 100644 index 73c6bf4d3..000000000 --- a/mRemoteNG/Messages/WriterDecorators/MessageFocusDecorator.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Threading.Tasks; -using System.Windows.Forms; -using mRemoteNG.Messages.MessageFilteringOptions; -using mRemoteNG.Messages.MessageWriters; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Window; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.Messages.WriterDecorators -{ - public class MessageFocusDecorator : IMessageWriter - { - private readonly IMessageTypeFilteringOptions _filter; - private readonly IMessageWriter _decoratedWriter; - private readonly ErrorAndInfoWindow _messageWindow; - private readonly FrmMain _frmMain = FrmMain.Default; - - public MessageFocusDecorator(ErrorAndInfoWindow messageWindow, - IMessageTypeFilteringOptions filter, - IMessageWriter decoratedWriter) - { - _filter = filter ?? throw new ArgumentNullException(nameof(filter)); - _messageWindow = messageWindow ?? throw new ArgumentNullException(nameof(messageWindow)); - _decoratedWriter = decoratedWriter ?? throw new ArgumentNullException(nameof(decoratedWriter)); - } - - public async void Write(IMessage message) - { - _decoratedWriter.Write(message); - - if (WeShouldFocusNotificationPanel(message)) - await SwitchToMessageAsync(); - } - - private bool WeShouldFocusNotificationPanel(IMessage message) - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (message.Class) - { - case MessageClass.InformationMsg: - if (_filter.AllowInfoMessages) - return true; - break; - case MessageClass.WarningMsg: - if (_filter.AllowWarningMessages) return true; - break; - case MessageClass.ErrorMsg: - if (_filter.AllowErrorMessages) return true; - break; - } - - return false; - } - - private async Task SwitchToMessageAsync() - { - await Task - .Delay(TimeSpan.FromMilliseconds(300)) - .ContinueWith(task => SwitchToMessage()); - } - - private void SwitchToMessage() - { - if (_messageWindow.InvokeRequired) - { - _frmMain.Invoke((MethodInvoker)SwitchToMessage); - return; - } - - // do not attempt to focus the notification panel if it is in an inconsistent state - if (_messageWindow.DockState == DockState.Unknown) - return; - - _messageWindow.PreviousActiveForm = (DockContent)_frmMain.pnlDock.ActiveContent; - - // Show the notifications panel solution: - // https://stackoverflow.com/questions/13843604/calling-up-dockpanel-suites-autohidden-dockcontent-programmatically - if (AutoHideEnabled(_messageWindow)) - _frmMain.pnlDock.ActiveAutoHideContent = _messageWindow; - else - _messageWindow.Show(_frmMain.pnlDock); - - _messageWindow.lvErrorCollector.Focus(); - _messageWindow.lvErrorCollector.SelectedItems.Clear(); - _messageWindow.lvErrorCollector.Items[0].Selected = true; - _messageWindow.lvErrorCollector.FocusedItem = _messageWindow.lvErrorCollector.Items[0]; - } - - private bool AutoHideEnabled(DockContent content) - { - return content.DockState == DockState.DockBottomAutoHide || - content.DockState == DockState.DockTopAutoHide || - content.DockState == DockState.DockLeftAutoHide || - content.DockState == DockState.DockRightAutoHide; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/WriterDecorators/MessageTypeFilterDecorator.cs b/mRemoteNG/Messages/WriterDecorators/MessageTypeFilterDecorator.cs deleted file mode 100644 index 2419a3b9a..000000000 --- a/mRemoteNG/Messages/WriterDecorators/MessageTypeFilterDecorator.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using mRemoteNG.Messages.MessageFilteringOptions; -using mRemoteNG.Messages.MessageWriters; - -namespace mRemoteNG.Messages.WriterDecorators -{ - public class MessageTypeFilterDecorator : IMessageWriter - { - private readonly IMessageTypeFilteringOptions _filter; - private readonly IMessageWriter _decoratedWriter; - - public MessageTypeFilterDecorator(IMessageTypeFilteringOptions filter, IMessageWriter decoratedWriter) - { - if (filter == null) - throw new ArgumentNullException(nameof(filter)); - if (decoratedWriter == null) - throw new ArgumentNullException(nameof(decoratedWriter)); - - _filter = filter; - _decoratedWriter = decoratedWriter; - } - - public void Write(IMessage message) - { - if (WeShouldWrite(message)) - _decoratedWriter.Write(message); - } - - private bool WeShouldWrite(IMessage message) - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (message.Class) - { - case MessageClass.InformationMsg: - if (_filter.AllowInfoMessages) return true; - break; - case MessageClass.WarningMsg: - if (_filter.AllowWarningMessages) return true; - break; - case MessageClass.ErrorMsg: - if (_filter.AllowErrorMessages) return true; - break; - case MessageClass.DebugMsg: - if (_filter.AllowDebugMessages) return true; - break; - } - - return false; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Messages/WriterDecorators/OnlyLogMessageFilterDecorator.cs b/mRemoteNG/Messages/WriterDecorators/OnlyLogMessageFilterDecorator.cs deleted file mode 100644 index 8f2c07357..000000000 --- a/mRemoteNG/Messages/WriterDecorators/OnlyLogMessageFilterDecorator.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using mRemoteNG.Messages.MessageWriters; - -namespace mRemoteNG.Messages.WriterDecorators -{ - public class OnlyLogMessageFilter : IMessageWriter - { - private readonly IMessageWriter _decoratedWriter; - - public OnlyLogMessageFilter(IMessageWriter decoratedWriter) - { - if (decoratedWriter == null) - throw new ArgumentNullException(nameof(decoratedWriter)); - - _decoratedWriter = decoratedWriter; - } - - public void Write(IMessage message) - { - if (message.OnlyLog) return; - _decoratedWriter.Write(message); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Properties/Resources.Designer.cs b/mRemoteNG/Properties/Resources.Designer.cs deleted file mode 100644 index 20f3b7c1b..000000000 --- a/mRemoteNG/Properties/Resources.Designer.cs +++ /dev/null @@ -1,810 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace mRemoteNG.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mRemoteNG.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Add_16x { - get { - object obj = ResourceManager.GetObject("Add_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap AddFolder_16x { - get { - object obj = ResourceManager.GetObject("AddFolder_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap AddItem_16x { - get { - object obj = ResourceManager.GetObject("AddItem_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap AppearanceEditor_16x { - get { - object obj = ResourceManager.GetObject("AppearanceEditor_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap ASPWebSite_16x { - get { - object obj = ResourceManager.GetObject("ASPWebSite_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap DocumentsFolder_16x - { - get { - object obj = ResourceManager.GetObject("DocumentsFolder_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Close_16x { - get { - object obj = ResourceManager.GetObject("Close_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap CloseSolution_16x { - get { - object obj = ResourceManager.GetObject("CloseSolution_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap CollapseAll_16x { - get { - object obj = ResourceManager.GetObject("CollapseAll_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap ConnectedOverlay { - get { - object obj = ResourceManager.GetObject("ConnectedOverlay", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Console_16x { - get { - object obj = ResourceManager.GetObject("Console_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Copy_16x { - get { - object obj = ResourceManager.GetObject("Copy_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Diagram_16x { - get { - object obj = ResourceManager.GetObject("Diagram_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Disconnect_16x { - get { - object obj = ResourceManager.GetObject("Disconnect_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Document_16x { - get { - object obj = ResourceManager.GetObject("Document_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap ExpandAll_16x { - get { - object obj = ResourceManager.GetObject("ExpandAll_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap ExpandDown_16x { - get { - object obj = ResourceManager.GetObject("ExpandDown_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Export_16x { - get { - object obj = ResourceManager.GetObject("Export_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap ExtendedProperty_16x { - get { - object obj = ResourceManager.GetObject("ExtendedProperty_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap F1Help_16x { - get { - object obj = ResourceManager.GetObject("F1Help_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Favorite_16x { - get { - object obj = ResourceManager.GetObject("Favorite_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap FolderClosed_16x { - get { - object obj = ResourceManager.GetObject("FolderClosed_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap FullScreen_16x { - get { - object obj = ResourceManager.GetObject("FullScreen_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap GlyphDown_16x { - get { - object obj = ResourceManager.GetObject("GlyphDown_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap GlyphLeft_16x { - get { - object obj = ResourceManager.GetObject("GlyphLeft_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap GlyphRight_16x { - get { - object obj = ResourceManager.GetObject("GlyphRight_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap GlyphUp_16x { - get { - object obj = ResourceManager.GetObject("GlyphUp_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Header_dark { - get { - object obj = ResourceManager.GetObject("Header_dark", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap HostStatus_Check { - get { - object obj = ResourceManager.GetObject("HostStatus_Check", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap HostStatus_Off { - get { - object obj = ResourceManager.GetObject("HostStatus_Off", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap HostStatus_On { - get { - object obj = ResourceManager.GetObject("HostStatus_On", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap InsertPanel_16x { - get { - object obj = ResourceManager.GetObject("InsertPanel_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Key_16x { - get { - object obj = ResourceManager.GetObject("Key_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Loading_Spinner { - get { - object obj = ResourceManager.GetObject("Loading_Spinner", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Lock_16x { - get { - object obj = ResourceManager.GetObject("Lock_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap LogError_16x { - get { - object obj = ResourceManager.GetObject("LogError_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap LogWarning_16x { - get { - object obj = ResourceManager.GetObject("LogWarning_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Message_16x { - get { - object obj = ResourceManager.GetObject("Message_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Monitor_16x { - get { - object obj = ResourceManager.GetObject("Monitor_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). - /// - internal static System.Drawing.Icon mRemoteNG_Icon { - get { - object obj = ResourceManager.GetObject("mRemoteNG_Icon", resourceCulture); - return ((System.Drawing.Icon)(obj)); - } - } - - /// - /// Looks up a localized string similar to <Application xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> - /// <VisualElements - /// BackgroundColor='#343A40' - /// ShowNameOnSquare150x150Logo='on' - /// ForegroundText='light' - /// Square150x150Logo='VisualElements_150.png' - /// Square70x70Logo='VisualElements_70.png' /> - ///</Application>. - /// - internal static string mRemoteNG_VisualElementsManifest { - get { - return ResourceManager.GetString("mRemoteNG_VisualElementsManifest", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap NewFile_16x { - get { - object obj = ResourceManager.GetObject("NewFile_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap OpenFile_16x { - get { - object obj = ResourceManager.GetObject("OpenFile_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Panel_16x { - get { - object obj = ResourceManager.GetObject("Panel_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Property_16x { - get { - object obj = ResourceManager.GetObject("Property_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap PuttyConfig { - get { - object obj = ResourceManager.GetObject("PuttyConfig", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap PuttySessions { - get { - object obj = ResourceManager.GetObject("PuttySessions", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Refresh_16x { - get { - object obj = ResourceManager.GetObject("Refresh_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Remove_16x { - get { - object obj = ResourceManager.GetObject("Remove_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Rename_16x { - get { - object obj = ResourceManager.GetObject("Rename_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Resize_16x { - get { - object obj = ResourceManager.GetObject("Resize_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Run_16x { - get { - object obj = ResourceManager.GetObject("Run_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap RunUpdate_16x { - get { - object obj = ResourceManager.GetObject("RunUpdate_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Save_16x { - get { - object obj = ResourceManager.GetObject("Save_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Schema_16x { - get { - object obj = ResourceManager.GetObject("Schema_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap SchemaObjectProperty_16x { - get { - object obj = ResourceManager.GetObject("SchemaObjectProperty_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Search_16x { - get { - object obj = ResourceManager.GetObject("Search_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap SearchAndApps_16x { - get { - object obj = ResourceManager.GetObject("SearchAndApps_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Settings_16x { - get { - object obj = ResourceManager.GetObject("Settings_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap SortAscending_16x { - get { - object obj = ResourceManager.GetObject("SortAscending_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap SortDescending_16x { - get { - object obj = ResourceManager.GetObject("SortDescending_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap SQLDatabase_16x { - get { - object obj = ResourceManager.GetObject("SQLDatabase_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap StartupProject_16x { - get { - object obj = ResourceManager.GetObject("StartupProject_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap StatusInformation_16x { - get { - object obj = ResourceManager.GetObject("StatusInformation_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Stop_16x { - get { - object obj = ResourceManager.GetObject("Stop_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap SyncArrow_16x { - get { - object obj = ResourceManager.GetObject("SyncArrow_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Tab_16x { - get { - object obj = ResourceManager.GetObject("Tab_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap Test_16x { - get { - object obj = ResourceManager.GetObject("Test_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap ToggleOfficeKeyboardScheme_16x { - get { - object obj = ResourceManager.GetObject("ToggleOfficeKeyboardScheme_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap UIAboutBox_16x { - get { - object obj = ResourceManager.GetObject("UIAboutBox_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap UniqueKeyError_16x { - get { - object obj = ResourceManager.GetObject("UniqueKeyError_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap ViewDownBySchema_16x { - get { - object obj = ResourceManager.GetObject("ViewDownBySchema_16x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap VisualElements_150 { - get { - object obj = ResourceManager.GetObject("VisualElements_150", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap VisualElements_70 { - get { - object obj = ResourceManager.GetObject("VisualElements_70", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/mRemoteNG/Properties/Resources.resx b/mRemoteNG/Properties/Resources.resx deleted file mode 100644 index 697396b15..000000000 --- a/mRemoteNG/Properties/Resources.resx +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\ConnectedOverlay.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\mRemoteNG.VisualElementsManifest.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\VisualElements_150.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\VisualElements_70.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Loading_Spinner.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\AddFolder_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\CloseSolution_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\CollapseAll_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Copy_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Diagram_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Disconnect_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Document_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ExpandAll_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ExpandDown_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\F1Help_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Favorite_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\FolderClosed_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\FullScreen_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\GlyphDown_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\GlyphLeft_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\GlyphRight_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\GlyphUp_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Header_dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\HostStatus_Check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\HostStatus_Off.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\HostStatus_On.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Message_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\NewFile_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\PuttyConfig.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\PuttySessions.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Refresh_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Rename_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\RunUpdate_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Save_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Search_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Settings_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\SortAscending_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\SortDescending_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Test_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ToggleOfficeKeyboardScheme_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\UIAboutBox_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\AddItem_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ASPWebSite_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\OpenFile_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Console_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\SearchAndApps_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\InsertPanel_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Panel_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Run_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Stop_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Close_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Add_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Monitor_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Remove_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Resize_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\LogError_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\LogWarning_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\SchemaObjectProperty_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Schema_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\StatusInformation_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\SyncArrow_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\UniqueKeyError_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ViewDownBySchema_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\mRemoteNG_Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Key_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\SQLDatabase_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Tab_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\AppearanceEditor_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Export_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Lock_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\StartupProject_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\ExtendedProperty_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\Property_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\DocumentsFolder_16x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/mRemoteNG/Properties/Settings.Designer.cs b/mRemoteNG/Properties/Settings.Designer.cs deleted file mode 100644 index 0761bdf3f..000000000 --- a/mRemoteNG/Properties/Settings.Designer.cs +++ /dev/null @@ -1,3278 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace mRemoteNG.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] - public global::System.Drawing.Point MainFormLocation { - get { - return ((global::System.Drawing.Point)(this["MainFormLocation"])); - } - set { - this["MainFormLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] - public global::System.Drawing.Size MainFormSize { - get { - return ((global::System.Drawing.Size)(this["MainFormSize"])); - } - set { - this["MainFormSize"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Normal")] - public global::System.Windows.Forms.FormWindowState MainFormState { - get { - return ((global::System.Windows.Forms.FormWindowState)(this["MainFormState"])); - } - set { - this["MainFormState"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool MainFormKiosk { - get { - return ((bool)(this["MainFormKiosk"])); - } - set { - this["MainFormKiosk"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool DoUpgrade { - get { - return ((bool)(this["DoUpgrade"])); - } - set { - this["DoUpgrade"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string CustomPuttyPath { - get { - return ((string)(this["CustomPuttyPath"])); - } - set { - this["CustomPuttyPath"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool SwitchToMCOnInformation { - get { - return ((bool)(this["SwitchToMCOnInformation"])); - } - set { - this["SwitchToMCOnInformation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool SwitchToMCOnWarning { - get { - return ((bool)(this["SwitchToMCOnWarning"])); - } - set { - this["SwitchToMCOnWarning"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool SwitchToMCOnError { - get { - return ((bool)(this["SwitchToMCOnError"])); - } - set { - this["SwitchToMCOnError"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool LoadConsFromCustomLocation { - get { - return ((bool)(this["LoadConsFromCustomLocation"])); - } - set { - this["LoadConsFromCustomLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string CustomConsPath { - get { - return ((string)(this["CustomConsPath"])); - } - set { - this["CustomConsPath"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool SaveConsOnExit { - get { - return ((bool)(this["SaveConsOnExit"])); - } - set { - this["SaveConsOnExit"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool CheckForUpdatesOnStartup { - get { - return ((bool)(this["CheckForUpdatesOnStartup"])); - } - set { - this["CheckForUpdatesOnStartup"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ShowDescriptionTooltipsInTree { - get { - return ((bool)(this["ShowDescriptionTooltipsInTree"])); - } - set { - this["ShowDescriptionTooltipsInTree"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ShowSystemTrayIcon { - get { - return ((bool)(this["ShowSystemTrayIcon"])); - } - set { - this["ShowSystemTrayIcon"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool OpenTabsRightOfSelected { - get { - return ((bool)(this["OpenTabsRightOfSelected"])); - } - set { - this["OpenTabsRightOfSelected"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ShowLogonInfoOnTabs { - get { - return ((bool)(this["ShowLogonInfoOnTabs"])); - } - set { - this["ShowLogonInfoOnTabs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool SingleClickOnConnectionOpensIt { - get { - return ((bool)(this["SingleClickOnConnectionOpensIt"])); - } - set { - this["SingleClickOnConnectionOpensIt"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("noinfo")] - public string EmptyCredentials { - get { - return ((string)(this["EmptyCredentials"])); - } - set { - this["EmptyCredentials"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string DefaultUsername { - get { - return ((string)(this["DefaultUsername"])); - } - set { - this["DefaultUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string DefaultPassword { - get { - return ((string)(this["DefaultPassword"])); - } - set { - this["DefaultPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string DefaultDomain { - get { - return ((string)(this["DefaultDomain"])); - } - set { - this["DefaultDomain"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UseCustomPuttyPath { - get { - return ((bool)(this["UseCustomPuttyPath"])); - } - set { - this["UseCustomPuttyPath"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool FirstStart { - get { - return ((bool)(this["FirstStart"])); - } - set { - this["FirstStart"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ShowProtocolOnTabs { - get { - return ((bool)(this["ShowProtocolOnTabs"])); - } - set { - this["ShowProtocolOnTabs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ResetPanels { - get { - return ((bool)(this["ResetPanels"])); - } - set { - this["ResetPanels"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UpdateUseProxy { - get { - return ((bool)(this["UpdateUseProxy"])); - } - set { - this["UpdateUseProxy"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string UpdateProxyAddress { - get { - return ((string)(this["UpdateProxyAddress"])); - } - set { - this["UpdateProxyAddress"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("80")] - public int UpdateProxyPort { - get { - return ((int)(this["UpdateProxyPort"])); - } - set { - this["UpdateProxyPort"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UpdateProxyUseAuthentication { - get { - return ((bool)(this["UpdateProxyUseAuthentication"])); - } - set { - this["UpdateProxyUseAuthentication"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string UpdateProxyAuthUser { - get { - return ((string)(this["UpdateProxyAuthUser"])); - } - set { - this["UpdateProxyAuthUser"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string UpdateProxyAuthPass { - get { - return ((string)(this["UpdateProxyAuthPass"])); - } - set { - this["UpdateProxyAuthPass"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultDescription { - get { - return ((string)(this["ConDefaultDescription"])); - } - set { - this["ConDefaultDescription"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("RDP")] - public string ConDefaultProtocol { - get { - return ((string)(this["ConDefaultProtocol"])); - } - set { - this["ConDefaultProtocol"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("eu-central-1")] - public string ConDefaultEC2Region { - get { - return ((string)(this["ConDefaultEC2Region"])); - } - set { - this["ConDefaultEC2Region"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Default Settings")] - public string ConDefaultPuttySession { - get { - return ((string)(this["ConDefaultPuttySession"])); - } - set { - this["ConDefaultPuttySession"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultUseConsoleSession { - get { - return ((bool)(this["ConDefaultUseConsoleSession"])); - } - set { - this["ConDefaultUseConsoleSession"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("FitToWindow")] - public string ConDefaultResolution { - get { - return ((string)(this["ConDefaultResolution"])); - } - set { - this["ConDefaultResolution"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Colors16Bit")] - public string ConDefaultColors { - get { - return ((string)(this["ConDefaultColors"])); - } - set { - this["ConDefaultColors"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultCacheBitmaps { - get { - return ((bool)(this["ConDefaultCacheBitmaps"])); - } - set { - this["ConDefaultCacheBitmaps"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultDisplayWallpaper { - get { - return ((bool)(this["ConDefaultDisplayWallpaper"])); - } - set { - this["ConDefaultDisplayWallpaper"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultDisplayThemes { - get { - return ((bool)(this["ConDefaultDisplayThemes"])); - } - set { - this["ConDefaultDisplayThemes"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultRedirectKeys { - get { - return ((bool)(this["ConDefaultRedirectKeys"])); - } - set { - this["ConDefaultRedirectKeys"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultRedirectDiskDrives { - get { - return ((bool)(this["ConDefaultRedirectDiskDrives"])); - } - set { - this["ConDefaultRedirectDiskDrives"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultRedirectPrinters { - get { - return ((bool)(this["ConDefaultRedirectPrinters"])); - } - set { - this["ConDefaultRedirectPrinters"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultRedirectClipboard { - get { - return ((bool)(this["ConDefaultRedirectClipboard"])); - } - set { - this["ConDefaultRedirectClipboard"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultRedirectPorts { - get { - return ((bool)(this["ConDefaultRedirectPorts"])); - } - set { - this["ConDefaultRedirectPorts"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultRedirectSmartCards { - get { - return ((bool)(this["ConDefaultRedirectSmartCards"])); - } - set { - this["ConDefaultRedirectSmartCards"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("DoNotPlay")] - public string ConDefaultRedirectSound { - get { - return ((string)(this["ConDefaultRedirectSound"])); - } - set { - this["ConDefaultRedirectSound"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultRedirectAudioCapture { - get { - return ((bool)(this["ConDefaultRedirectAudioCapture"])); - } - set { - this["ConDefaultRedirectAudioCapture"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("2")] - public int MaxPuttyWaitTime { - get { - return ((int)(this["MaxPuttyWaitTime"])); - } - set { - this["MaxPuttyWaitTime"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool SingleInstance { - get { - return ((bool)(this["SingleInstance"])); - } - set { - this["SingleInstance"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool OpenConsFromLastSession { - get { - return ((bool)(this["OpenConsFromLastSession"])); - } - set { - this["OpenConsFromLastSession"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool NoReconnect { - get { - return ((bool)(this["NoReconnect"])); - } - set { - this["NoReconnect"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int AutoSaveEveryMinutes { - get { - return ((int)(this["AutoSaveEveryMinutes"])); - } - set { - this["AutoSaveEveryMinutes"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ExtAppsTBVisible { - get { - return ((bool)(this["ExtAppsTBVisible"])); - } - set { - this["ExtAppsTBVisible"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool ExtAppsTBShowText { - get { - return ((bool)(this["ExtAppsTBShowText"])); - } - set { - this["ExtAppsTBShowText"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] - public global::System.Drawing.Point ExtAppsTBLocation { - get { - return ((global::System.Drawing.Point)(this["ExtAppsTBLocation"])); - } - set { - this["ExtAppsTBLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Bottom")] - public string ExtAppsTBParentDock { - get { - return ((string)(this["ExtAppsTBParentDock"])); - } - set { - this["ExtAppsTBParentDock"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool QuickyTBVisible { - get { - return ((bool)(this["QuickyTBVisible"])); - } - set { - this["QuickyTBVisible"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("3, 24")] - public global::System.Drawing.Point QuickyTBLocation { - get { - return ((global::System.Drawing.Point)(this["QuickyTBLocation"])); - } - set { - this["QuickyTBLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Top")] - public string QuickyTBParentDock { - get { - return ((string)(this["QuickyTBParentDock"])); - } - set { - this["QuickyTBParentDock"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ResetToolbars { - get { - return ((bool)(this["ResetToolbars"])); - } - set { - this["ResetToolbars"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UseSQLServer { - get { - return ((bool)(this["UseSQLServer"])); - } - set { - this["UseSQLServer"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string SQLHost { - get { - return ((string)(this["SQLHost"])); - } - set { - this["SQLHost"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string SQLUser { - get { - return ((string)(this["SQLUser"])); - } - set { - this["SQLUser"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string SQLPass { - get { - return ((string)(this["SQLPass"])); - } - set { - this["SQLPass"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultCacheBitmaps { - get { - return ((bool)(this["InhDefaultCacheBitmaps"])); - } - set { - this["InhDefaultCacheBitmaps"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultColors { - get { - return ((bool)(this["InhDefaultColors"])); - } - set { - this["InhDefaultColors"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultDescription { - get { - return ((bool)(this["InhDefaultDescription"])); - } - set { - this["InhDefaultDescription"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultDisplayThemes { - get { - return ((bool)(this["InhDefaultDisplayThemes"])); - } - set { - this["InhDefaultDisplayThemes"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultDisplayWallpaper { - get { - return ((bool)(this["InhDefaultDisplayWallpaper"])); - } - set { - this["InhDefaultDisplayWallpaper"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultDomain { - get { - return ((bool)(this["InhDefaultDomain"])); - } - set { - this["InhDefaultDomain"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultIcon { - get { - return ((bool)(this["InhDefaultIcon"])); - } - set { - this["InhDefaultIcon"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultPassword { - get { - return ((bool)(this["InhDefaultPassword"])); - } - set { - this["InhDefaultPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultPort { - get { - return ((bool)(this["InhDefaultPort"])); - } - set { - this["InhDefaultPort"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultProtocol { - get { - return ((bool)(this["InhDefaultProtocol"])); - } - set { - this["InhDefaultProtocol"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultPuttySession { - get { - return ((bool)(this["InhDefaultPuttySession"])); - } - set { - this["InhDefaultPuttySession"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRedirectDiskDrives { - get { - return ((bool)(this["InhDefaultRedirectDiskDrives"])); - } - set { - this["InhDefaultRedirectDiskDrives"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRedirectKeys { - get { - return ((bool)(this["InhDefaultRedirectKeys"])); - } - set { - this["InhDefaultRedirectKeys"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRedirectPorts { - get { - return ((bool)(this["InhDefaultRedirectPorts"])); - } - set { - this["InhDefaultRedirectPorts"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRedirectPrinters { - get { - return ((bool)(this["InhDefaultRedirectPrinters"])); - } - set { - this["InhDefaultRedirectPrinters"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRedirectClipboard { - get { - return ((bool)(this["InhDefaultRedirectClipboard"])); - } - set { - this["InhDefaultRedirectClipboard"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRedirectSmartCards { - get { - return ((bool)(this["InhDefaultRedirectSmartCards"])); - } - set { - this["InhDefaultRedirectSmartCards"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRedirectSound { - get { - return ((bool)(this["InhDefaultRedirectSound"])); - } - set { - this["InhDefaultRedirectSound"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRedirectAudioCapture { - get { - return ((bool)(this["InhDefaultRedirectAudioCapture"])); - } - set { - this["InhDefaultRedirectAudioCapture"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultResolution { - get { - return ((bool)(this["InhDefaultResolution"])); - } - set { - this["InhDefaultResolution"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultUseConsoleSession { - get { - return ((bool)(this["InhDefaultUseConsoleSession"])); - } - set { - this["InhDefaultUseConsoleSession"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultUsername { - get { - return ((bool)(this["InhDefaultUsername"])); - } - set { - this["InhDefaultUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultPanel { - get { - return ((bool)(this["InhDefaultPanel"])); - } - set { - this["InhDefaultPanel"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultPreExtApp { - get { - return ((string)(this["ConDefaultPreExtApp"])); - } - set { - this["ConDefaultPreExtApp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultPostExtApp { - get { - return ((string)(this["ConDefaultPostExtApp"])); - } - set { - this["ConDefaultPostExtApp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultPreExtApp { - get { - return ((bool)(this["InhDefaultPreExtApp"])); - } - set { - this["InhDefaultPreExtApp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultPostExtApp { - get { - return ((bool)(this["InhDefaultPostExtApp"])); - } - set { - this["InhDefaultPostExtApp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool SetHostnameLikeDisplayName { - get { - return ((bool)(this["SetHostnameLikeDisplayName"])); - } - set { - this["SetHostnameLikeDisplayName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool DoubleClickOnTabClosesIt { - get { - return ((bool)(this["DoubleClickOnTabClosesIt"])); - } - set { - this["DoubleClickOnTabClosesIt"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ReconnectOnDisconnect { - get { - return ((bool)(this["ReconnectOnDisconnect"])); - } - set { - this["ReconnectOnDisconnect"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool AlwaysShowPanelSelectionDlg { - get { - return ((bool)(this["AlwaysShowPanelSelectionDlg"])); - } - set { - this["AlwaysShowPanelSelectionDlg"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("AuthVNC")] - public string ConDefaultVNCAuthMode { - get { - return ((string)(this["ConDefaultVNCAuthMode"])); - } - set { - this["ConDefaultVNCAuthMode"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("ColNormal")] - public string ConDefaultVNCColors { - get { - return ((string)(this["ConDefaultVNCColors"])); - } - set { - this["ConDefaultVNCColors"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("SmartSAspect")] - public string ConDefaultVNCSmartSizeMode { - get { - return ((string)(this["ConDefaultVNCSmartSizeMode"])); - } - set { - this["ConDefaultVNCSmartSizeMode"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultVNCViewOnly { - get { - return ((bool)(this["ConDefaultVNCViewOnly"])); - } - set { - this["ConDefaultVNCViewOnly"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("CompNone")] - public string ConDefaultVNCCompression { - get { - return ((string)(this["ConDefaultVNCCompression"])); - } - set { - this["ConDefaultVNCCompression"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("EncHextile")] - public string ConDefaultVNCEncoding { - get { - return ((string)(this["ConDefaultVNCEncoding"])); - } - set { - this["ConDefaultVNCEncoding"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultVNCProxyIP { - get { - return ((string)(this["ConDefaultVNCProxyIP"])); - } - set { - this["ConDefaultVNCProxyIP"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultVNCProxyPassword { - get { - return ((string)(this["ConDefaultVNCProxyPassword"])); - } - set { - this["ConDefaultVNCProxyPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int ConDefaultVNCProxyPort { - get { - return ((int)(this["ConDefaultVNCProxyPort"])); - } - set { - this["ConDefaultVNCProxyPort"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("ProxyNone")] - public string ConDefaultVNCProxyType { - get { - return ((string)(this["ConDefaultVNCProxyType"])); - } - set { - this["ConDefaultVNCProxyType"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultVNCProxyUsername { - get { - return ((string)(this["ConDefaultVNCProxyUsername"])); - } - set { - this["ConDefaultVNCProxyUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCAuthMode { - get { - return ((bool)(this["InhDefaultVNCAuthMode"])); - } - set { - this["InhDefaultVNCAuthMode"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCColors { - get { - return ((bool)(this["InhDefaultVNCColors"])); - } - set { - this["InhDefaultVNCColors"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCSmartSizeMode { - get { - return ((bool)(this["InhDefaultVNCSmartSizeMode"])); - } - set { - this["InhDefaultVNCSmartSizeMode"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCViewOnly { - get { - return ((bool)(this["InhDefaultVNCViewOnly"])); - } - set { - this["InhDefaultVNCViewOnly"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCCompression { - get { - return ((bool)(this["InhDefaultVNCCompression"])); - } - set { - this["InhDefaultVNCCompression"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCEncoding { - get { - return ((bool)(this["InhDefaultVNCEncoding"])); - } - set { - this["InhDefaultVNCEncoding"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCProxyIP { - get { - return ((bool)(this["InhDefaultVNCProxyIP"])); - } - set { - this["InhDefaultVNCProxyIP"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCProxyPassword { - get { - return ((bool)(this["InhDefaultVNCProxyPassword"])); - } - set { - this["InhDefaultVNCProxyPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCProxyPort { - get { - return ((bool)(this["InhDefaultVNCProxyPort"])); - } - set { - this["InhDefaultVNCProxyPort"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCProxyType { - get { - return ((bool)(this["InhDefaultVNCProxyType"])); - } - set { - this["InhDefaultVNCProxyType"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVNCProxyUsername { - get { - return ((bool)(this["InhDefaultVNCProxyUsername"])); - } - set { - this["InhDefaultVNCProxyUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool MinimizeToTray { - get { - return ((bool)(this["MinimizeToTray"])); - } - set { - this["MinimizeToTray"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool SingleClickSwitchesToOpenConnection { - get { - return ((bool)(this["SingleClickSwitchesToOpenConnection"])); - } - set { - this["SingleClickSwitchesToOpenConnection"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("NoAuth")] - public string ConDefaultRDPAuthenticationLevel { - get { - return ((string)(this["ConDefaultRDPAuthenticationLevel"])); - } - set { - this["ConDefaultRDPAuthenticationLevel"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDPAuthenticationLevel { - get { - return ((bool)(this["InhDefaultRDPAuthenticationLevel"])); - } - set { - this["InhDefaultRDPAuthenticationLevel"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("5500")] - public int UVNCSCPort { - get { - return ((int)(this["UVNCSCPort"])); - } - set { - this["UVNCSCPort"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string XULRunnerPath { - get { - return ((string)(this["XULRunnerPath"])); - } - set { - this["XULRunnerPath"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRenderingEngine { - get { - return ((bool)(this["InhDefaultRenderingEngine"])); - } - set { - this["InhDefaultRenderingEngine"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultMacAddress { - get { - return ((string)(this["ConDefaultMacAddress"])); - } - set { - this["ConDefaultMacAddress"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultMacAddress { - get { - return ((bool)(this["InhDefaultMacAddress"])); - } - set { - this["InhDefaultMacAddress"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool EncryptCompleteConnectionsFile { - get { - return ((bool)(this["EncryptCompleteConnectionsFile"])); - } - set { - this["EncryptCompleteConnectionsFile"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultUserField { - get { - return ((string)(this["ConDefaultUserField"])); - } - set { - this["ConDefaultUserField"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultUserField { - get { - return ((bool)(this["InhDefaultUserField"])); - } - set { - this["InhDefaultUserField"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultExtApp { - get { - return ((string)(this["ConDefaultExtApp"])); - } - set { - this["ConDefaultExtApp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultExtApp { - get { - return ((bool)(this["InhDefaultExtApp"])); - } - set { - this["InhDefaultExtApp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool CheckForUpdatesAsked { - get { - return ((bool)(this["CheckForUpdatesAsked"])); - } - set { - this["CheckForUpdatesAsked"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("14")] - public int CheckForUpdatesFrequencyDays { - get { - return ((int)(this["CheckForUpdatesFrequencyDays"])); - } - set { - this["CheckForUpdatesFrequencyDays"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("1980-01-01")] - public global::System.DateTime CheckForUpdatesLastCheck { - get { - return ((global::System.DateTime)(this["CheckForUpdatesLastCheck"])); - } - set { - this["CheckForUpdatesLastCheck"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UpdatePending { - get { - return ((bool)(this["UpdatePending"])); - } - set { - this["UpdatePending"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Never")] - public string ConDefaultRDGatewayUsageMethod { - get { - return ((string)(this["ConDefaultRDGatewayUsageMethod"])); - } - set { - this["ConDefaultRDGatewayUsageMethod"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Yes")] - public string ConDefaultRDGatewayUseConnectionCredentials { - get { - return ((string)(this["ConDefaultRDGatewayUseConnectionCredentials"])); - } - set { - this["ConDefaultRDGatewayUseConnectionCredentials"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("mRemoteNG")] - public string ConDefaultIcon { - get { - return ((string)(this["ConDefaultIcon"])); - } - set { - this["ConDefaultIcon"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDGatewayUsageMethod { - get { - return ((bool)(this["InhDefaultRDGatewayUsageMethod"])); - } - set { - this["InhDefaultRDGatewayUsageMethod"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDGatewayHostname { - get { - return ((bool)(this["InhDefaultRDGatewayHostname"])); - } - set { - this["InhDefaultRDGatewayHostname"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDGatewayUsername { - get { - return ((bool)(this["InhDefaultRDGatewayUsername"])); - } - set { - this["InhDefaultRDGatewayUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDGatewayPassword { - get { - return ((bool)(this["InhDefaultRDGatewayPassword"])); - } - set { - this["InhDefaultRDGatewayPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDGatewayDomain { - get { - return ((bool)(this["InhDefaultRDGatewayDomain"])); - } - set { - this["InhDefaultRDGatewayDomain"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDGatewayUseConnectionCredentials { - get { - return ((bool)(this["InhDefaultRDGatewayUseConnectionCredentials"])); - } - set { - this["InhDefaultRDGatewayUseConnectionCredentials"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("5")] - public int RdpReconnectionCount { - get { - return ((int)(this["RdpReconnectionCount"])); - } - set { - this["RdpReconnectionCount"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string OverrideUICulture { - get { - return ((string)(this["OverrideUICulture"])); - } - set { - this["OverrideUICulture"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultRDGatewayHostname { - get { - return ((string)(this["ConDefaultRDGatewayHostname"])); - } - set { - this["ConDefaultRDGatewayHostname"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultRDGatewayUsername { - get { - return ((string)(this["ConDefaultRDGatewayUsername"])); - } - set { - this["ConDefaultRDGatewayUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultRDGatewayPassword { - get { - return ((string)(this["ConDefaultRDGatewayPassword"])); - } - set { - this["ConDefaultRDGatewayPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultRDGatewayDomain { - get { - return ((string)(this["ConDefaultRDGatewayDomain"])); - } - set { - this["ConDefaultRDGatewayDomain"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultEnableFontSmoothing { - get { - return ((bool)(this["ConDefaultEnableFontSmoothing"])); - } - set { - this["ConDefaultEnableFontSmoothing"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultEnableFontSmoothing { - get { - return ((bool)(this["InhDefaultEnableFontSmoothing"])); - } - set { - this["InhDefaultEnableFontSmoothing"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultEnableDesktopComposition { - get { - return ((bool)(this["ConDefaultEnableDesktopComposition"])); - } - set { - this["ConDefaultEnableDesktopComposition"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultEnableDesktopComposition { - get { - return ((bool)(this["InhDefaultEnableDesktopComposition"])); - } - set { - this["InhDefaultEnableDesktopComposition"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultDisableFullWindowDrag { - get { - return ((bool)(this["InhDefaultDisableFullWindowDrag"])); - } - set { - this["InhDefaultDisableFullWindowDrag"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultDisableMenuAnimations { - get { - return ((bool)(this["InhDefaultDisableMenuAnimations"])); - } - set { - this["InhDefaultDisableMenuAnimations"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultDisableCursorShadow { - get { - return ((bool)(this["InhDefaultDisableCursorShadow"])); - } - set { - this["InhDefaultDisableCursorShadow"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultDisableCursorBlinking { - get { - return ((bool)(this["InhDefaultDisableCursorBlinking"])); - } - set { - this["InhDefaultDisableCursorBlinking"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("4")] - public int ConfirmCloseConnection { - get { - return ((int)(this["ConfirmCloseConnection"])); - } - set { - this["ConfirmCloseConnection"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Drawing.Size MainFormRestoreSize { - get { - return ((global::System.Drawing.Size)(this["MainFormRestoreSize"])); - } - set { - this["MainFormRestoreSize"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - public global::System.Drawing.Point MainFormRestoreLocation { - get { - return ((global::System.Drawing.Point)(this["MainFormRestoreLocation"])); - } - set { - this["MainFormRestoreLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("mRemoteNG")] - public string SQLDatabaseName { - get { - return ((string)(this["SQLDatabaseName"])); - } - set { - this["SQLDatabaseName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("10")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int BackupFileKeepCount { - get { - return ((int)(this["BackupFileKeepCount"])); - } - set { - this["BackupFileKeepCount"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("{0}.{1:yyyyMMdd-HHmmssffff}.backup")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string BackupFileNameFormat { - get { - return ((string)(this["BackupFileNameFormat"])); - } - set { - this["BackupFileNameFormat"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultUseCredSsp { - get { - return ((bool)(this["InhDefaultUseCredSsp"])); - } - set { - this["InhDefaultUseCredSsp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool ConDefaultUseCredSsp { - get { - return ((bool)(this["ConDefaultUseCredSsp"])); - } - set { - this["ConDefaultUseCredSsp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultUseVmId { - get { - return ((bool)(this["ConDefaultUseVmId"])); - } - set { - this["ConDefaultUseVmId"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool AlwaysShowPanelTabs { - get { - return ((bool)(this["AlwaysShowPanelTabs"])); - } - set { - this["AlwaysShowPanelTabs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool IdentifyQuickConnectTabs { - get { - return ((bool)(this["IdentifyQuickConnectTabs"])); - } - set { - this["IdentifyQuickConnectTabs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("release")] - public string UpdateChannel { - get { - return ((string)(this["UpdateChannel"])); - } - set { - this["UpdateChannel"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ThemeName { - get { - return ((string)(this["ThemeName"])); - } - set { - this["ThemeName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool ShowConfigHelpText { - get { - return ((bool)(this["ShowConfigHelpText"])); - } - set { - this["ShowConfigHelpText"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string PuttySavedSessionsName { - get { - return ((string)(this["PuttySavedSessionsName"])); - } - set { - this["PuttySavedSessionsName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string PuttySavedSessionsPanel { - get { - return ((string)(this["PuttySavedSessionsPanel"])); - } - set { - this["PuttySavedSessionsPanel"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool CompatibilityWarnLenovoAutoScrollUtility { - get { - return ((bool)(this["CompatibilityWarnLenovoAutoScrollUtility"])); - } - set { - this["CompatibilityWarnLenovoAutoScrollUtility"] = value; - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("https://mremoteng.org/")] - public string UpdateAddress { - get { - return ((string)(this["UpdateAddress"])); - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultLoadBalanceInfo { - get { - return ((string)(this["ConDefaultLoadBalanceInfo"])); - } - set { - this["ConDefaultLoadBalanceInfo"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool ConDefaultAutomaticResize { - get { - return ((bool)(this["ConDefaultAutomaticResize"])); - } - set { - this["ConDefaultAutomaticResize"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultLoadBalanceInfo { - get { - return ((bool)(this["InhDefaultLoadBalanceInfo"])); - } - set { - this["InhDefaultLoadBalanceInfo"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultAutomaticResize { - get { - return ((bool)(this["InhDefaultAutomaticResize"])); - } - set { - this["InhDefaultAutomaticResize"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("RDP")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string QuickConnectProtocol { - get { - return ((string)(this["QuickConnectProtocol"])); - } - set { - this["QuickConnectProtocol"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("9/9, 33/8")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string KeysPreviousTab { - get { - return ((string)(this["KeysPreviousTab"])); - } - set { - this["KeysPreviousTab"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("9/8, 34/8")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string KeysNextTab { - get { - return ((string)(this["KeysNextTab"])); - } - set { - this["KeysNextTab"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ShowCompleteConsPathInTitle { - get { - return ((bool)(this["ShowCompleteConsPathInTitle"])); - } - set { - this["ShowCompleteConsPathInTitle"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("20")] - public int ConRDPOverallConnectionTimeout { - get { - return ((int)(this["ConRDPOverallConnectionTimeout"])); - } - set { - this["ConRDPOverallConnectionTimeout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("AES")] - public global::mRemoteNG.Security.BlockCipherEngines EncryptionEngine { - get { - return ((global::mRemoteNG.Security.BlockCipherEngines)(this["EncryptionEngine"])); - } - set { - this["EncryptionEngine"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("GCM")] - public global::mRemoteNG.Security.BlockCipherModes EncryptionBlockCipherMode { - get { - return ((global::mRemoteNG.Security.BlockCipherModes)(this["EncryptionBlockCipherMode"])); - } - set { - this["EncryptionBlockCipherMode"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("10000")] - public int EncryptionKeyDerivationIterations { - get { - return ((int)(this["EncryptionKeyDerivationIterations"])); - } - set { - this["EncryptionKeyDerivationIterations"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Dynamic")] - public string ConDefaultSoundQuality { - get { - return ((string)(this["ConDefaultSoundQuality"])); - } - set { - this["ConDefaultSoundQuality"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultSoundQuality { - get { - return ((bool)(this["InhDefaultSoundQuality"])); - } - set { - this["InhDefaultSoundQuality"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int ConDefaultRDPMinutesToIdleTimeout { - get { - return ((int)(this["ConDefaultRDPMinutesToIdleTimeout"])); - } - set { - this["ConDefaultRDPMinutesToIdleTimeout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDPMinutesToIdleTimeout { - get { - return ((bool)(this["InhDefaultRDPMinutesToIdleTimeout"])); - } - set { - this["InhDefaultRDPMinutesToIdleTimeout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultRDPAlertIdleTimeout { - get { - return ((bool)(this["ConDefaultRDPAlertIdleTimeout"])); - } - set { - this["ConDefaultRDPAlertIdleTimeout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRDPAlertIdleTimeout { - get { - return ((bool)(this["InhDefaultRDPAlertIdleTimeout"])); - } - set { - this["InhDefaultRDPAlertIdleTimeout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultCredentialRecord { - get { - return ((bool)(this["InhDefaultCredentialRecord"])); - } - set { - this["InhDefaultCredentialRecord"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("00000000-0000-0000-0000-000000000000")] - public global::System.Guid ConDefaultCredentialRecord { - get { - return ((global::System.Guid)(this["ConDefaultCredentialRecord"])); - } - set { - this["ConDefaultCredentialRecord"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string LogFilePath { - get { - return ((string)(this["LogFilePath"])); - } - set { - this["LogFilePath"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool TextLogMessageWriterWriteDebugMsgs { - get { - return ((bool)(this["TextLogMessageWriterWriteDebugMsgs"])); - } - set { - this["TextLogMessageWriterWriteDebugMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool TextLogMessageWriterWriteInfoMsgs { - get { - return ((bool)(this["TextLogMessageWriterWriteInfoMsgs"])); - } - set { - this["TextLogMessageWriterWriteInfoMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool TextLogMessageWriterWriteWarningMsgs { - get { - return ((bool)(this["TextLogMessageWriterWriteWarningMsgs"])); - } - set { - this["TextLogMessageWriterWriteWarningMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool TextLogMessageWriterWriteErrorMsgs { - get { - return ((bool)(this["TextLogMessageWriterWriteErrorMsgs"])); - } - set { - this["TextLogMessageWriterWriteErrorMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool NotificationPanelWriterWriteDebugMsgs { - get { - return ((bool)(this["NotificationPanelWriterWriteDebugMsgs"])); - } - set { - this["NotificationPanelWriterWriteDebugMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool NotificationPanelWriterWriteInfoMsgs { - get { - return ((bool)(this["NotificationPanelWriterWriteInfoMsgs"])); - } - set { - this["NotificationPanelWriterWriteInfoMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool NotificationPanelWriterWriteWarningMsgs { - get { - return ((bool)(this["NotificationPanelWriterWriteWarningMsgs"])); - } - set { - this["NotificationPanelWriterWriteWarningMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool NotificationPanelWriterWriteErrorMsgs { - get { - return ((bool)(this["NotificationPanelWriterWriteErrorMsgs"])); - } - set { - this["NotificationPanelWriterWriteErrorMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool PopupMessageWriterWriteDebugMsgs { - get { - return ((bool)(this["PopupMessageWriterWriteDebugMsgs"])); - } - set { - this["PopupMessageWriterWriteDebugMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool PopupMessageWriterWriteInfoMsgs { - get { - return ((bool)(this["PopupMessageWriterWriteInfoMsgs"])); - } - set { - this["PopupMessageWriterWriteInfoMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool PopupMessageWriterWriteWarningMsgs { - get { - return ((bool)(this["PopupMessageWriterWriteWarningMsgs"])); - } - set { - this["PopupMessageWriterWriteWarningMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool PopupMessageWriterWriteErrorMsgs { - get { - return ((bool)(this["PopupMessageWriterWriteErrorMsgs"])); - } - set { - this["PopupMessageWriterWriteErrorMsgs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool LogToApplicationDirectory { - get { - return ((bool)(this["LogToApplicationDirectory"])); - } - set { - this["LogToApplicationDirectory"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool PromptUnlockCredReposOnStartup { - get { - return ((bool)(this["PromptUnlockCredReposOnStartup"])); - } - set { - this["PromptUnlockCredReposOnStartup"] = value; - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("cs-CZ,de,el,en,en-US,es-AR,es,fr,hu,it,lt,ja-JP,ko-KR,nb-NO,nl,pt,pt-BR,pl,ru,uk," + - "tr-TR,zh-CN,zh-TW")] - public string SupportedUICultures { - get { - return ((string)(this["SupportedUICultures"])); - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool ThemingActive { - get { - return ((bool)(this["ThemingActive"])); - } - set { - this["ThemingActive"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultUsername { - get { - return ((string)(this["ConDefaultUsername"])); - } - set { - this["ConDefaultUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultPassword { - get { - return ((string)(this["ConDefaultPassword"])); - } - set { - this["ConDefaultPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultDomain { - get { - return ((string)(this["ConDefaultDomain"])); - } - set { - this["ConDefaultDomain"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("General")] - public string ConDefaultPanel { - get { - return ((string)(this["ConDefaultPanel"])); - } - set { - this["ConDefaultPanel"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool SaveConnectionsAfterEveryEdit { - get { - return ((bool)(this["SaveConnectionsAfterEveryEdit"])); - } - set { - this["SaveConnectionsAfterEveryEdit"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool UseFilterSearch { - get { - return ((bool)(this["UseFilterSearch"])); - } - set { - this["UseFilterSearch"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool SQLReadOnly { - get { - return ((bool)(this["SQLReadOnly"])); - } - set { - this["SQLReadOnly"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool LockToolbars { - get { - return ((bool)(this["LockToolbars"])); - } - set { - this["LockToolbars"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool RdpLoadBalanceInfoUseUtf8 { - get { - return ((bool)(this["RdpLoadBalanceInfoUseUtf8"])); - } - set { - this["RdpLoadBalanceInfoUseUtf8"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] - public global::System.Drawing.Point MultiSshToolbarLocation { - get { - return ((global::System.Drawing.Point)(this["MultiSshToolbarLocation"])); - } - set { - this["MultiSshToolbarLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string MultiSshToolbarParentDock { - get { - return ((string)(this["MultiSshToolbarParentDock"])); - } - set { - this["MultiSshToolbarParentDock"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool MultiSshToolbarVisible { - get { - return ((bool)(this["MultiSshToolbarVisible"])); - } - set { - this["MultiSshToolbarVisible"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool CreateEmptyPanelOnStartUp { - get { - return ((bool)(this["CreateEmptyPanelOnStartUp"])); - } - set { - this["CreateEmptyPanelOnStartUp"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("General")] - public string StartUpPanelName { - get { - return ((string)(this["StartUpPanelName"])); - } - set { - this["StartUpPanelName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool TrackActiveConnectionInConnectionTree { - get { - return ((bool)(this["TrackActiveConnectionInConnectionTree"])); - } - set { - this["TrackActiveConnectionInConnectionTree"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool PlaceSearchBarAboveConnectionTree { - get { - return ((bool)(this["PlaceSearchBarAboveConnectionTree"])); - } - set { - this["PlaceSearchBarAboveConnectionTree"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - public bool AlwaysShowConnectionTabs { - get { - return ((bool)(this["AlwaysShowConnectionTabs"])); - } - set { - this["AlwaysShowConnectionTabs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool OverrideFIPSCheck { - get { - return ((bool)(this["OverrideFIPSCheck"])); - } - set { - this["OverrideFIPSCheck"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultFavorite { - get { - return ((bool)(this["ConDefaultFavorite"])); - } - set { - this["ConDefaultFavorite"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultFavorite { - get { - return ((bool)(this["InhDefaultFavorite"])); - } - set { - this["InhDefaultFavorite"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("mssql")] - public string SQLServerType { - get { - return ((string)(this["SQLServerType"])); - } - set { - this["SQLServerType"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool DoNotTrimUsername { - get { - return ((bool)(this["DoNotTrimUsername"])); - } - set { - this["DoNotTrimUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultVmId { - get { - return ((string)(this["ConDefaultVmId"])); - } - set { - this["ConDefaultVmId"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultVmId { - get { - return ((bool)(this["InhDefaultVmId"])); - } - set { - this["InhDefaultVmId"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultUseVmId { - get { - return ((bool)(this["InhDefaultUseVmId"])); - } - set { - this["InhDefaultUseVmId"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - public int SaveConnectionsFrequency { - get { - return ((int)(this["SaveConnectionsFrequency"])); - } - set { - this["SaveConnectionsFrequency"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Highest")] - public string ConDefaultRdpVersion { - get { - return ((string)(this["ConDefaultRdpVersion"])); - } - set { - this["ConDefaultRdpVersion"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultRdpVersion { - get { - return ((bool)(this["InhDefaultRdpVersion"])); - } - set { - this["InhDefaultRdpVersion"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultSSHTunnelConnectionName { - get { - return ((bool)(this["InhDefaultSSHTunnelConnectionName"])); - } - set { - this["InhDefaultSSHTunnelConnectionName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultSSHTunnelConnectionName { - get { - return ((string)(this["ConDefaultSSHTunnelConnectionName"])); - } - set { - this["ConDefaultSSHTunnelConnectionName"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultSSHOptions { - get { - return ((bool)(this["InhDefaultSSHOptions"])); - } - set { - this["InhDefaultSSHOptions"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultSSHOptions { - get { - return ((string)(this["ConDefaultSSHOptions"])); - } - set { - this["ConDefaultSSHOptions"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool StartMinimized { - get { - return ((bool)(this["StartMinimized"])); - } - set { - this["StartMinimized"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultUseEnhancedMode { - get { - return ((bool)(this["ConDefaultUseEnhancedMode"])); - } - set { - this["ConDefaultUseEnhancedMode"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool InhDefaultUseEnhancedMode { - get { - return ((bool)(this["InhDefaultUseEnhancedMode"])); - } - set { - this["InhDefaultUseEnhancedMode"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool CloseToTray { - get { - return ((bool)(this["CloseToTray"])); - } - set { - this["CloseToTray"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool StartupComponentsCheck { - get { - return ((bool)(this["StartupComponentsCheck"])); - } - set { - this["StartupComponentsCheck"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultDisableFullWindowDrag { - get { - return ((bool)(this["ConDefaultDisableFullWindowDrag"])); - } - set { - this["ConDefaultDisableFullWindowDrag"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultDisableMenuAnimations { - get { - return ((bool)(this["ConDefaultDisableMenuAnimations"])); - } - set { - this["ConDefaultDisableMenuAnimations"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultDisableCursorShadow { - get { - return ((bool)(this["ConDefaultDisableCursorShadow"])); - } - set { - this["ConDefaultDisableCursorShadow"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ConDefaultDisableCursorBlinking { - get { - return ((bool)(this["ConDefaultDisableCursorBlinking"])); - } - set { - this["ConDefaultDisableCursorBlinking"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultStartProgram { - get { - return ((string)(this["ConDefaultStartProgram"])); - } - set { - this["ConDefaultStartProgram"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultStartProgramWorkDir { - get { - return ((string)(this["ConDefaultStartProgramWorkDir"])); - } - set { - this["ConDefaultStartProgramWorkDir"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("EncrBasic")] - public string ConDefaultICAEncryptionStrength { - get { - return ((string)(this["ConDefaultICAEncryptionStrength"])); - } - set { - this["ConDefaultICAEncryptionStrength"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public string InhDefaultICAEncryptionStrength { - get { - return ((string)(this["InhDefaultICAEncryptionStrength"])); - } - set { - this["InhDefaultICAEncryptionStrength"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool StartFullScreen { - get { - return ((bool)(this["StartFullScreen"])); - } - set { - this["StartFullScreen"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ViewMenuMessages { - get { - return ((bool)(this["ViewMenuMessages"])); - } - set { - this["ViewMenuMessages"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ViewMenuQuickConnect { - get { - return ((bool)(this["ViewMenuQuickConnect"])); - } - set { - this["ViewMenuQuickConnect"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ViewMenuExternalTools { - get { - return ((bool)(this["ViewMenuExternalTools"])); - } - set { - this["ViewMenuExternalTools"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool ViewMenuMultiSSH { - get { - return ((bool)(this["ViewMenuMultiSSH"])); - } - set { - this["ViewMenuMultiSSH"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("EdgeChromium")] - public string ConDefaultRenderingEngine { - get { - return ((string)(this["ConDefaultRenderingEngine"])); - } - set { - this["ConDefaultRenderingEngine"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string OpeningCommand { - get { - return ((string)(this["OpeningCommand"])); - } - set { - this["OpeningCommand"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("dev")] - public string CurrentUpdateChannelType { - get { - return ((string)(this["CurrentUpdateChannelType"])); - } - set { - this["CurrentUpdateChannelType"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultRDPStartProgram { - get { - return ((string)(this["ConDefaultRDPStartProgram"])); - } - set { - this["ConDefaultRDPStartProgram"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string ConDefaultRDPStartProgramWorkDir { - get { - return ((string)(this["ConDefaultRDPStartProgramWorkDir"])); - } - set { - this["ConDefaultRDPStartProgramWorkDir"] = value; - } - } - } -} diff --git a/mRemoteNG/Properties/Settings.settings b/mRemoteNG/Properties/Settings.settings deleted file mode 100644 index 4e642cf65..000000000 --- a/mRemoteNG/Properties/Settings.settings +++ /dev/null @@ -1,819 +0,0 @@ - - - - - - 0, 0 - - - 0, 0 - - - Normal - - - False - - - True - - - - - - True - - - True - - - True - - - False - - - - - - True - - - True - - - False - - - False - - - True - - - False - - - False - - - noinfo - - - - - - - - - - - - False - - - True - - - False - - - False - - - False - - - - - - 80 - - - False - - - - - - - - - - - - RDP - - - eu-central-1 - - - Default Settings - - - False - - - FitToWindow - - - Colors16Bit - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - DoNotPlay - - - False - - - 2 - - - False - - - False - - - False - - - 0 - - - False - - - True - - - 0, 0 - - - Bottom - - - True - - - 3, 24 - - - Top - - - False - - - False - - - - - - - - - - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - - - - - - - False - - - False - - - False - - - True - - - False - - - False - - - AuthVNC - - - ColNormal - - - SmartSAspect - - - False - - - CompNone - - - EncHextile - - - - - - - - - 0 - - - ProxyNone - - - - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - NoAuth - - - False - - - 5500 - - - - - - False - - - - - - False - - - False - - - - - - False - - - - - - False - - - False - - - 14 - - - 1980-01-01 - - - False - - - Never - - - Yes - - - mRemoteNG - - - False - - - False - - - False - - - False - - - False - - - False - - - 5 - - - - - - - - - - - - - - - - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - 4 - - - - - - - - - mRemoteNG - - - 10 - - - {0}.{1:yyyyMMdd-HHmmssffff}.backup - - - False - - - True - - - False - - - False - - - False - - - release - - - - - - True - - - - - - - - - True - - - https://mremoteng.org/ - - - - - - True - - - False - - - False - - - RDP - - - 9/9, 33/8 - - - 9/8, 34/8 - - - False - - - 20 - - - AES - - - GCM - - - 10000 - - - Dynamic - - - False - - - 0 - - - False - - - False - - - False - - - False - - - 00000000-0000-0000-0000-000000000000 - - - - - - False - - - True - - - True - - - True - - - False - - - False - - - True - - - True - - - False - - - False - - - False - - - False - - - True - - - True - - - cs-CZ,de,el,en,en-US,es-AR,es,fr,hu,it,lt,ja-JP,ko-KR,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW - - - True - - - - - - - - - - - - General - - - True - - - False - - - False - - - False - - - False - - - 0, 0 - - - - - - False - - - False - - - General - - - False - - - True - - - True - - - False - - - False - - - False - - - mssql - - - False - - - - - - False - - - False - - - 0 - - - Highest - - - False - - - False - - - - - - False - - - - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - False - - - - - - - - - EncrBasic - - - False - - - False - - - False - - - False - - - False - - - False - - - EdgeChromium - - - - - - dev - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Properties/app.manifest b/mRemoteNG/Properties/app.manifest deleted file mode 100644 index 1869411d8..000000000 --- a/mRemoteNG/Properties/app.manifest +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - \ No newline at end of file diff --git a/mRemoteNG/PuTTYNG.exe b/mRemoteNG/PuTTYNG.exe deleted file mode 100644 index ccde81652..000000000 Binary files a/mRemoteNG/PuTTYNG.exe and /dev/null differ diff --git a/mRemoteNG/References/VncSharp.dll b/mRemoteNG/References/VncSharp.dll deleted file mode 100644 index ab7ce8157..000000000 Binary files a/mRemoteNG/References/VncSharp.dll and /dev/null differ diff --git a/mRemoteNG/Resources/ASPWebSite_16x.png b/mRemoteNG/Resources/ASPWebSite_16x.png deleted file mode 100644 index fe2cbbbec..000000000 Binary files a/mRemoteNG/Resources/ASPWebSite_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/AddFolder_16x.png b/mRemoteNG/Resources/AddFolder_16x.png deleted file mode 100644 index fd61978a9..000000000 Binary files a/mRemoteNG/Resources/AddFolder_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/AddItem_16x.png b/mRemoteNG/Resources/AddItem_16x.png deleted file mode 100644 index 1721ccbf9..000000000 Binary files a/mRemoteNG/Resources/AddItem_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Add_16x.png b/mRemoteNG/Resources/Add_16x.png deleted file mode 100644 index 7754d65e5..000000000 Binary files a/mRemoteNG/Resources/Add_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/AppearanceEditor_16x.png b/mRemoteNG/Resources/AppearanceEditor_16x.png deleted file mode 100644 index 86c59f7ff..000000000 Binary files a/mRemoteNG/Resources/AppearanceEditor_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/CloseSolution_16x.png b/mRemoteNG/Resources/CloseSolution_16x.png deleted file mode 100644 index 41ff45a94..000000000 Binary files a/mRemoteNG/Resources/CloseSolution_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Close_16x.png b/mRemoteNG/Resources/Close_16x.png deleted file mode 100644 index 6760c5a4b..000000000 Binary files a/mRemoteNG/Resources/Close_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/CollapseAll_16x.png b/mRemoteNG/Resources/CollapseAll_16x.png deleted file mode 100644 index 315b1764c..000000000 Binary files a/mRemoteNG/Resources/CollapseAll_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/ConnectedOverlay.png b/mRemoteNG/Resources/ConnectedOverlay.png deleted file mode 100644 index 4baac4bbd..000000000 Binary files a/mRemoteNG/Resources/ConnectedOverlay.png and /dev/null differ diff --git a/mRemoteNG/Resources/Console_16x.png b/mRemoteNG/Resources/Console_16x.png deleted file mode 100644 index d6a022c88..000000000 Binary files a/mRemoteNG/Resources/Console_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Copy_16x.png b/mRemoteNG/Resources/Copy_16x.png deleted file mode 100644 index e06a04214..000000000 Binary files a/mRemoteNG/Resources/Copy_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Diagram_16x.png b/mRemoteNG/Resources/Diagram_16x.png deleted file mode 100644 index f4822ecbe..000000000 Binary files a/mRemoteNG/Resources/Diagram_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Disconnect_16x.png b/mRemoteNG/Resources/Disconnect_16x.png deleted file mode 100644 index 31a6de9e6..000000000 Binary files a/mRemoteNG/Resources/Disconnect_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Document_16x.png b/mRemoteNG/Resources/Document_16x.png deleted file mode 100644 index 576043566..000000000 Binary files a/mRemoteNG/Resources/Document_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/DocumentsFolder_16x.png b/mRemoteNG/Resources/DocumentsFolder_16x.png deleted file mode 100644 index 859569652..000000000 Binary files a/mRemoteNG/Resources/DocumentsFolder_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/ExpandAll_16x.png b/mRemoteNG/Resources/ExpandAll_16x.png deleted file mode 100644 index 7fe3a9ce0..000000000 Binary files a/mRemoteNG/Resources/ExpandAll_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/ExpandDown_16x.png b/mRemoteNG/Resources/ExpandDown_16x.png deleted file mode 100644 index 3521c9cf5..000000000 Binary files a/mRemoteNG/Resources/ExpandDown_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Export_16x.png b/mRemoteNG/Resources/Export_16x.png deleted file mode 100644 index ace97e20f..000000000 Binary files a/mRemoteNG/Resources/Export_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/ExtendedProperty_16x.png b/mRemoteNG/Resources/ExtendedProperty_16x.png deleted file mode 100644 index 1b3adb395..000000000 Binary files a/mRemoteNG/Resources/ExtendedProperty_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/F1Help_16x.png b/mRemoteNG/Resources/F1Help_16x.png deleted file mode 100644 index f38f04d3e..000000000 Binary files a/mRemoteNG/Resources/F1Help_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Favorite_16x.png b/mRemoteNG/Resources/Favorite_16x.png deleted file mode 100644 index c75b5845e..000000000 Binary files a/mRemoteNG/Resources/Favorite_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/FolderClosed_16x.png b/mRemoteNG/Resources/FolderClosed_16x.png deleted file mode 100644 index b82d94f17..000000000 Binary files a/mRemoteNG/Resources/FolderClosed_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/FullScreen_16x.png b/mRemoteNG/Resources/FullScreen_16x.png deleted file mode 100644 index bc21cb28e..000000000 Binary files a/mRemoteNG/Resources/FullScreen_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/GlyphDown_16x.png b/mRemoteNG/Resources/GlyphDown_16x.png deleted file mode 100644 index 9e51e3f76..000000000 Binary files a/mRemoteNG/Resources/GlyphDown_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/GlyphLeft_16x.png b/mRemoteNG/Resources/GlyphLeft_16x.png deleted file mode 100644 index 0a095ad71..000000000 Binary files a/mRemoteNG/Resources/GlyphLeft_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/GlyphRight_16x.png b/mRemoteNG/Resources/GlyphRight_16x.png deleted file mode 100644 index e6e3f0e56..000000000 Binary files a/mRemoteNG/Resources/GlyphRight_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/GlyphUp_16x.png b/mRemoteNG/Resources/GlyphUp_16x.png deleted file mode 100644 index 27f9ab916..000000000 Binary files a/mRemoteNG/Resources/GlyphUp_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Header_dark.png b/mRemoteNG/Resources/Header_dark.png deleted file mode 100644 index 7cbd122ed..000000000 Binary files a/mRemoteNG/Resources/Header_dark.png and /dev/null differ diff --git a/mRemoteNG/Resources/HostStatus_Check.png b/mRemoteNG/Resources/HostStatus_Check.png deleted file mode 100644 index 45948e48e..000000000 Binary files a/mRemoteNG/Resources/HostStatus_Check.png and /dev/null differ diff --git a/mRemoteNG/Resources/HostStatus_Off.png b/mRemoteNG/Resources/HostStatus_Off.png deleted file mode 100644 index d6d807db7..000000000 Binary files a/mRemoteNG/Resources/HostStatus_Off.png and /dev/null differ diff --git a/mRemoteNG/Resources/HostStatus_On.png b/mRemoteNG/Resources/HostStatus_On.png deleted file mode 100644 index 76bebdf7b..000000000 Binary files a/mRemoteNG/Resources/HostStatus_On.png and /dev/null differ diff --git a/mRemoteNG/Resources/ImageConverter.cs b/mRemoteNG/Resources/ImageConverter.cs deleted file mode 100644 index b4d9811fe..000000000 --- a/mRemoteNG/Resources/ImageConverter.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Drawing; - -namespace mRemoteNG.Resources -{ - class ImageConverter - { - /// - /// Draws an Icon from a Bitmap - /// - /// - /// - internal static Icon GetImageAsIcon(Bitmap bitmap) - { - var icon = Icon.FromHandle(bitmap.GetHicon()); - - return icon; - } - } -} diff --git a/mRemoteNG/Resources/InsertPanel_16x.png b/mRemoteNG/Resources/InsertPanel_16x.png deleted file mode 100644 index 4f9f4e296..000000000 Binary files a/mRemoteNG/Resources/InsertPanel_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Key_16x.png b/mRemoteNG/Resources/Key_16x.png deleted file mode 100644 index 258480fa2..000000000 Binary files a/mRemoteNG/Resources/Key_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Loading_Spinner.gif b/mRemoteNG/Resources/Loading_Spinner.gif deleted file mode 100644 index 9596a88e4..000000000 Binary files a/mRemoteNG/Resources/Loading_Spinner.gif and /dev/null differ diff --git a/mRemoteNG/Resources/Lock_16x.png b/mRemoteNG/Resources/Lock_16x.png deleted file mode 100644 index f41aeeb4c..000000000 Binary files a/mRemoteNG/Resources/Lock_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/LogError_16x.png b/mRemoteNG/Resources/LogError_16x.png deleted file mode 100644 index 907f1f613..000000000 Binary files a/mRemoteNG/Resources/LogError_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/LogWarning_16x.png b/mRemoteNG/Resources/LogWarning_16x.png deleted file mode 100644 index c857c19dd..000000000 Binary files a/mRemoteNG/Resources/LogWarning_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Message_16x.png b/mRemoteNG/Resources/Message_16x.png deleted file mode 100644 index 7d06b1995..000000000 Binary files a/mRemoteNG/Resources/Message_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Monitor_16x.png b/mRemoteNG/Resources/Monitor_16x.png deleted file mode 100644 index 98b9a820c..000000000 Binary files a/mRemoteNG/Resources/Monitor_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/NewFile_16x.png b/mRemoteNG/Resources/NewFile_16x.png deleted file mode 100644 index 12354ce14..000000000 Binary files a/mRemoteNG/Resources/NewFile_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/OpenFile_16x.png b/mRemoteNG/Resources/OpenFile_16x.png deleted file mode 100644 index a791a6aba..000000000 Binary files a/mRemoteNG/Resources/OpenFile_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Panel_16x.png b/mRemoteNG/Resources/Panel_16x.png deleted file mode 100644 index 5c87bed24..000000000 Binary files a/mRemoteNG/Resources/Panel_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Property_16x.png b/mRemoteNG/Resources/Property_16x.png deleted file mode 100644 index 4abd1a4a4..000000000 Binary files a/mRemoteNG/Resources/Property_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/PuttyConfig.png b/mRemoteNG/Resources/PuttyConfig.png deleted file mode 100644 index 142084601..000000000 Binary files a/mRemoteNG/Resources/PuttyConfig.png and /dev/null differ diff --git a/mRemoteNG/Resources/PuttySessions.png b/mRemoteNG/Resources/PuttySessions.png deleted file mode 100644 index d3407e276..000000000 Binary files a/mRemoteNG/Resources/PuttySessions.png and /dev/null differ diff --git a/mRemoteNG/Resources/Refresh_16x.png b/mRemoteNG/Resources/Refresh_16x.png deleted file mode 100644 index 23ffe551e..000000000 Binary files a/mRemoteNG/Resources/Refresh_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Remove_16x.png b/mRemoteNG/Resources/Remove_16x.png deleted file mode 100644 index 3adee77dd..000000000 Binary files a/mRemoteNG/Resources/Remove_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Rename_16x.png b/mRemoteNG/Resources/Rename_16x.png deleted file mode 100644 index 496d33b62..000000000 Binary files a/mRemoteNG/Resources/Rename_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Resize_16x.png b/mRemoteNG/Resources/Resize_16x.png deleted file mode 100644 index 3ae7b38b6..000000000 Binary files a/mRemoteNG/Resources/Resize_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/RunUpdate_16x.png b/mRemoteNG/Resources/RunUpdate_16x.png deleted file mode 100644 index b464f0c0e..000000000 Binary files a/mRemoteNG/Resources/RunUpdate_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Run_16x.png b/mRemoteNG/Resources/Run_16x.png deleted file mode 100644 index a5634bcab..000000000 Binary files a/mRemoteNG/Resources/Run_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/SQLDatabase_16x.png b/mRemoteNG/Resources/SQLDatabase_16x.png deleted file mode 100644 index 7bc21aaa0..000000000 Binary files a/mRemoteNG/Resources/SQLDatabase_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Save_16x.png b/mRemoteNG/Resources/Save_16x.png deleted file mode 100644 index 34a3c5b70..000000000 Binary files a/mRemoteNG/Resources/Save_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/SchemaObjectProperty_16x.png b/mRemoteNG/Resources/SchemaObjectProperty_16x.png deleted file mode 100644 index 0cdd20ca2..000000000 Binary files a/mRemoteNG/Resources/SchemaObjectProperty_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Schema_16x.png b/mRemoteNG/Resources/Schema_16x.png deleted file mode 100644 index bbfc742b1..000000000 Binary files a/mRemoteNG/Resources/Schema_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/SearchAndApps_16x.png b/mRemoteNG/Resources/SearchAndApps_16x.png deleted file mode 100644 index a7b27a8a0..000000000 Binary files a/mRemoteNG/Resources/SearchAndApps_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Search_16x.png b/mRemoteNG/Resources/Search_16x.png deleted file mode 100644 index 06da21465..000000000 Binary files a/mRemoteNG/Resources/Search_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Settings_16x.png b/mRemoteNG/Resources/Settings_16x.png deleted file mode 100644 index 2e2a83d99..000000000 Binary files a/mRemoteNG/Resources/Settings_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/SortAscending_16x.png b/mRemoteNG/Resources/SortAscending_16x.png deleted file mode 100644 index f065b4858..000000000 Binary files a/mRemoteNG/Resources/SortAscending_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/SortDescending_16x.png b/mRemoteNG/Resources/SortDescending_16x.png deleted file mode 100644 index ee70e3660..000000000 Binary files a/mRemoteNG/Resources/SortDescending_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/StartupProject_16x.png b/mRemoteNG/Resources/StartupProject_16x.png deleted file mode 100644 index 6791f811e..000000000 Binary files a/mRemoteNG/Resources/StartupProject_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/StatusInformation_16x.png b/mRemoteNG/Resources/StatusInformation_16x.png deleted file mode 100644 index 3acae84a2..000000000 Binary files a/mRemoteNG/Resources/StatusInformation_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Stop_16x.png b/mRemoteNG/Resources/Stop_16x.png deleted file mode 100644 index 2ab785e31..000000000 Binary files a/mRemoteNG/Resources/Stop_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/SyncArrow_16x.png b/mRemoteNG/Resources/SyncArrow_16x.png deleted file mode 100644 index 556402ca7..000000000 Binary files a/mRemoteNG/Resources/SyncArrow_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Tab_16x.png b/mRemoteNG/Resources/Tab_16x.png deleted file mode 100644 index 7d9d55292..000000000 Binary files a/mRemoteNG/Resources/Tab_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/Test_16x.png b/mRemoteNG/Resources/Test_16x.png deleted file mode 100644 index 90454b2d0..000000000 Binary files a/mRemoteNG/Resources/Test_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/ToggleOfficeKeyboardScheme_16x.png b/mRemoteNG/Resources/ToggleOfficeKeyboardScheme_16x.png deleted file mode 100644 index 08abf0f84..000000000 Binary files a/mRemoteNG/Resources/ToggleOfficeKeyboardScheme_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/UIAboutBox_16x.png b/mRemoteNG/Resources/UIAboutBox_16x.png deleted file mode 100644 index 2eb45a08e..000000000 Binary files a/mRemoteNG/Resources/UIAboutBox_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/UniqueKeyError_16x.png b/mRemoteNG/Resources/UniqueKeyError_16x.png deleted file mode 100644 index 4fab4c313..000000000 Binary files a/mRemoteNG/Resources/UniqueKeyError_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/ViewDownBySchema_16x.png b/mRemoteNG/Resources/ViewDownBySchema_16x.png deleted file mode 100644 index c468fc8bc..000000000 Binary files a/mRemoteNG/Resources/ViewDownBySchema_16x.png and /dev/null differ diff --git a/mRemoteNG/Resources/mRemoteNG_Icon.ico b/mRemoteNG/Resources/mRemoteNG_Icon.ico deleted file mode 100644 index 1c750daf4..000000000 Binary files a/mRemoteNG/Resources/mRemoteNG_Icon.ico and /dev/null differ diff --git a/mRemoteNG/Schemas/mremoteng_confcons_v2_5.xsd b/mRemoteNG/Schemas/mremoteng_confcons_v2_5.xsd deleted file mode 100644 index 2364b621e..000000000 --- a/mRemoteNG/Schemas/mremoteng_confcons_v2_5.xsd +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Schemas/mremoteng_confcons_v2_6.xsd b/mRemoteNG/Schemas/mremoteng_confcons_v2_6.xsd deleted file mode 100644 index f472fec32..000000000 --- a/mRemoteNG/Schemas/mremoteng_confcons_v2_6.xsd +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd b/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd deleted file mode 100644 index 7305756bd..000000000 --- a/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Schemas/mremoteng_credrepo_list_v1_0.xsd b/mRemoteNG/Schemas/mremoteng_credrepo_list_v1_0.xsd deleted file mode 100644 index 76a4750a4..000000000 --- a/mRemoteNG/Schemas/mremoteng_credrepo_list_v1_0.xsd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Schemas/mremoteng_creds_v1_0.xsd b/mRemoteNG/Schemas/mremoteng_creds_v1_0.xsd deleted file mode 100644 index 13e176f2c..000000000 --- a/mRemoteNG/Schemas/mremoteng_creds_v1_0.xsd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Security/Authentication/IAuthenticator.cs b/mRemoteNG/Security/Authentication/IAuthenticator.cs deleted file mode 100644 index 68e349ad2..000000000 --- a/mRemoteNG/Security/Authentication/IAuthenticator.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Security; - -namespace mRemoteNG.Security.Authentication -{ - public interface IAuthenticator - { - bool Authenticate(SecureString password); - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/Authentication/PasswordAuthenticator.cs b/mRemoteNG/Security/Authentication/PasswordAuthenticator.cs deleted file mode 100644 index 8c105cd71..000000000 --- a/mRemoteNG/Security/Authentication/PasswordAuthenticator.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Linq; -using System.Security; -using mRemoteNG.Tools; - -namespace mRemoteNG.Security.Authentication -{ - public class PasswordAuthenticator : IAuthenticator - { - private readonly ICryptographyProvider _cryptographyProvider; - private readonly string _cipherText; - private readonly Func> _authenticationRequestor; - - public int MaxAttempts { get; set; } = 3; - public SecureString LastAuthenticatedPassword { get; private set; } - - public PasswordAuthenticator(ICryptographyProvider cryptographyProvider, - string cipherText, - Func> authenticationRequestor) - { - _cryptographyProvider = cryptographyProvider.ThrowIfNull(nameof(cryptographyProvider)); - _cipherText = cipherText.ThrowIfNullOrEmpty(nameof(cipherText)); - _authenticationRequestor = authenticationRequestor.ThrowIfNull(nameof(authenticationRequestor)); - } - - public bool Authenticate(SecureString password) - { - var authenticated = false; - var attempts = 0; - while (!authenticated && attempts < MaxAttempts) - { - try - { - _cryptographyProvider.Decrypt(_cipherText, password); - authenticated = true; - LastAuthenticatedPassword = password; - } - catch - { - var providedPassword = _authenticationRequestor(); - if (!providedPassword.Any()) - return false; - - password = providedPassword.First(); - if (password == null || password.Length == 0) break; - } - - attempts++; - } - - return authenticated; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/BlockCipherEngines.cs b/mRemoteNG/Security/BlockCipherEngines.cs deleted file mode 100644 index 45f89d013..000000000 --- a/mRemoteNG/Security/BlockCipherEngines.cs +++ /dev/null @@ -1,11 +0,0 @@ -// ReSharper disable InconsistentNaming - -namespace mRemoteNG.Security -{ - public enum BlockCipherEngines - { - AES, - Twofish, - Serpent - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/BlockCipherModes.cs b/mRemoteNG/Security/BlockCipherModes.cs deleted file mode 100644 index cb1cfd27d..000000000 --- a/mRemoteNG/Security/BlockCipherModes.cs +++ /dev/null @@ -1,11 +0,0 @@ -// ReSharper disable InconsistentNaming - -namespace mRemoteNG.Security -{ - public enum BlockCipherModes - { - GCM, - CCM, - EAX - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/EncryptedSecureString.cs b/mRemoteNG/Security/EncryptedSecureString.cs deleted file mode 100644 index 1bf59ea97..000000000 --- a/mRemoteNG/Security/EncryptedSecureString.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Security; -using mRemoteNG.Security.SymmetricEncryption; -using Org.BouncyCastle.Security; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Security -{ - public class EncryptedSecureString : IDisposable - { - private static SecureString _machineKey; - private SecureString _secureString; - private readonly ICryptographyProvider _cryptographyProvider; - - private static SecureString MachineKey - { - get { return _machineKey ?? (_machineKey = GenerateNewMachineKey(32)); } - } - - public EncryptedSecureString() - { - _secureString = new SecureString(); - _cryptographyProvider = new AeadCryptographyProvider(); - } - - public EncryptedSecureString(ICryptographyProvider cryptographyProvider) - { - _secureString = new SecureString(); - _cryptographyProvider = cryptographyProvider; - } - - public string GetClearTextValue() - { - var encryptedText = _secureString.ConvertToUnsecureString(); - var clearText = _cryptographyProvider.Decrypt(encryptedText, MachineKey); - return clearText; - } - - public void SetValue(string value) - { - var cipherText = _cryptographyProvider.Encrypt(value, MachineKey); - _secureString = cipherText.ConvertToSecureString(); - } - - private static SecureString GenerateNewMachineKey(int keySize) - { - var random = new SecureRandom(); - random.SetSeed(random.GenerateSeed(128)); - - var machineKeyString = ""; - for (var x = 0; x < keySize; x++) - { - machineKeyString += (char)random.Next(33, 126); - } - - return machineKeyString.ConvertToSecureString(); - } - - private void Dispose(bool disposing) - { - if (!disposing) return; - - _machineKey?.Dispose(); - _secureString?.Dispose(); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/EncryptionException.cs b/mRemoteNG/Security/EncryptionException.cs deleted file mode 100644 index a2be53896..000000000 --- a/mRemoteNG/Security/EncryptionException.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; - - -namespace mRemoteNG.Security -{ - [Serializable] - public class EncryptionException : Org.BouncyCastle.Security.EncryptionException - { - public EncryptionException(string message) : base(message) - { - } - - public EncryptionException(string message, Exception exception) : base(message, exception) - { - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/Factories/CryptoProviderFactory.cs b/mRemoteNG/Security/Factories/CryptoProviderFactory.cs deleted file mode 100644 index 4dfd9bdbd..000000000 --- a/mRemoteNG/Security/Factories/CryptoProviderFactory.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using mRemoteNG.Security.SymmetricEncryption; -using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.Engines; -using Org.BouncyCastle.Crypto.Modes; - -namespace mRemoteNG.Security.Factories -{ - public class CryptoProviderFactory : ICryptoProviderFactory - { - private readonly IAeadBlockCipher _aeadBlockCipher; - - public CryptoProviderFactory(BlockCipherEngines engine, BlockCipherModes mode) - { - var cipherEngine = ChooseBlockCipherEngine(engine); - _aeadBlockCipher = ChooseBlockCipherMode(mode, cipherEngine); - } - - public ICryptographyProvider Build() - { - return new AeadCryptographyProvider(_aeadBlockCipher); - } - - private IBlockCipher ChooseBlockCipherEngine(BlockCipherEngines engine) - { - switch (engine) - { - case BlockCipherEngines.AES: - return new AesEngine(); - case BlockCipherEngines.Twofish: - return new TwofishEngine(); - case BlockCipherEngines.Serpent: - return new SerpentEngine(); - default: - throw new ArgumentOutOfRangeException(nameof(engine), engine, null); - } - } - - private IAeadBlockCipher ChooseBlockCipherMode(BlockCipherModes mode, IBlockCipher blockCipher) - { - switch (mode) - { - case BlockCipherModes.GCM: - return new GcmBlockCipher(blockCipher); - case BlockCipherModes.CCM: - return new CcmBlockCipher(blockCipher); - case BlockCipherModes.EAX: - return new EaxBlockCipher(blockCipher); - default: - throw new ArgumentOutOfRangeException(nameof(mode), mode, null); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/Factories/CryptoProviderFactoryFromSettings.cs b/mRemoteNG/Security/Factories/CryptoProviderFactoryFromSettings.cs deleted file mode 100644 index 1f63d1327..000000000 --- a/mRemoteNG/Security/Factories/CryptoProviderFactoryFromSettings.cs +++ /dev/null @@ -1,16 +0,0 @@ -using mRemoteNG.Properties; - -namespace mRemoteNG.Security.Factories -{ - public class CryptoProviderFactoryFromSettings : ICryptoProviderFactory - { - public ICryptographyProvider Build() - { - var provider = - new CryptoProviderFactory(Settings.Default.EncryptionEngine, Settings.Default.EncryptionBlockCipherMode) - .Build(); - provider.KeyDerivationIterations = Settings.Default.EncryptionKeyDerivationIterations; - return provider; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/Factories/CryptoProviderFactoryFromXml.cs b/mRemoteNG/Security/Factories/CryptoProviderFactoryFromXml.cs deleted file mode 100644 index 6d4d5d559..000000000 --- a/mRemoteNG/Security/Factories/CryptoProviderFactoryFromXml.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Xml.Linq; -using mRemoteNG.Security.SymmetricEncryption; - -namespace mRemoteNG.Security.Factories -{ - public class CryptoProviderFactoryFromXml : ICryptoProviderFactory - { - private readonly XElement _element; - - public CryptoProviderFactoryFromXml(XElement element) - { - if (element == null) - throw new ArgumentNullException(nameof(element)); - - _element = element; - } - - public ICryptographyProvider Build() - { - ICryptographyProvider cryptoProvider; - try - { - var engine = (BlockCipherEngines)Enum.Parse(typeof(BlockCipherEngines), - _element?.Attribute("EncryptionEngine")?.Value ?? ""); - var mode = (BlockCipherModes)Enum.Parse(typeof(BlockCipherModes), - _element?.Attribute("BlockCipherMode")?.Value ?? ""); - cryptoProvider = new CryptoProviderFactory(engine, mode).Build(); - - var keyDerivationIterations = int.Parse(_element?.Attribute("KdfIterations")?.Value ?? ""); - cryptoProvider.KeyDerivationIterations = keyDerivationIterations; - } - catch (Exception) - { - return new LegacyRijndaelCryptographyProvider(); - } - - return cryptoProvider; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/Factories/LegacyInsecureCryptoProviderFactory.cs b/mRemoteNG/Security/Factories/LegacyInsecureCryptoProviderFactory.cs deleted file mode 100644 index fc87cccbd..000000000 --- a/mRemoteNG/Security/Factories/LegacyInsecureCryptoProviderFactory.cs +++ /dev/null @@ -1,12 +0,0 @@ -using mRemoteNG.Security.SymmetricEncryption; - -namespace mRemoteNG.Security.Factories -{ - public class LegacyInsecureCryptoProviderFactory : ICryptoProviderFactory - { - public ICryptographyProvider Build() - { - return new LegacyRijndaelCryptographyProvider(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/ICryptoProviderFactory.cs b/mRemoteNG/Security/ICryptoProviderFactory.cs deleted file mode 100644 index c08ae8946..000000000 --- a/mRemoteNG/Security/ICryptoProviderFactory.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Security -{ - public interface ICryptoProviderFactory - { - ICryptographyProvider Build(); - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/ICryptographyProvider.cs b/mRemoteNG/Security/ICryptographyProvider.cs deleted file mode 100644 index f22dcb18e..000000000 --- a/mRemoteNG/Security/ICryptographyProvider.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Security; - -namespace mRemoteNG.Security -{ - public interface ICryptographyProvider - { - int BlockSizeInBytes { get; } - - BlockCipherEngines CipherEngine { get; } - - BlockCipherModes CipherMode { get; } - - int KeyDerivationIterations { get; set; } - - string Encrypt(string plainText, SecureString encryptionKey); - - string Decrypt(string cipherText, SecureString decryptionKey); - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/IKeyProvider.cs b/mRemoteNG/Security/IKeyProvider.cs deleted file mode 100644 index 425351113..000000000 --- a/mRemoteNG/Security/IKeyProvider.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Security; -using mRemoteNG.Tools; - -namespace mRemoteNG.Security -{ - public interface IKeyProvider - { - Optional GetKey(); - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/KeyDerivation/IKeyDerivationFunction.cs b/mRemoteNG/Security/KeyDerivation/IKeyDerivationFunction.cs deleted file mode 100644 index ee3c77705..000000000 --- a/mRemoteNG/Security/KeyDerivation/IKeyDerivationFunction.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Security.KeyDerivation -{ - public interface IKeyDerivationFunction - { - byte[] DeriveKey(string password, byte[] salt); - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/KeyDerivation/Pkcs5S2KeyGenerator.cs b/mRemoteNG/Security/KeyDerivation/Pkcs5S2KeyGenerator.cs deleted file mode 100644 index c34bfc3e5..000000000 --- a/mRemoteNG/Security/KeyDerivation/Pkcs5S2KeyGenerator.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.Generators; -using Org.BouncyCastle.Crypto.Parameters; - - -namespace mRemoteNG.Security.KeyDerivation -{ - public class Pkcs5S2KeyGenerator : IKeyDerivationFunction - { - private readonly int _iterations; - private readonly int _keyBitSize; - - public Pkcs5S2KeyGenerator(int keyBitSize = 256, int iterations = 1000) - { - if (iterations < 1000) - throw new ArgumentOutOfRangeException($"Minimum value of {nameof(iterations)} is 1000"); - if (keyBitSize < 0) - throw new ArgumentOutOfRangeException($"{nameof(keyBitSize)} must be positive"); - _keyBitSize = keyBitSize; - _iterations = iterations; - } - - public byte[] DeriveKey(string password, byte[] salt) - { - var passwordInBytes = PbeParametersGenerator.Pkcs5PasswordToBytes(password.ToCharArray()); - - var keyGenerator = new Pkcs5S2ParametersGenerator(); - keyGenerator.Init(passwordInBytes, salt, _iterations); - - var keyParameter = (KeyParameter)keyGenerator.GenerateDerivedMacParameters(_keyBitSize); - var keyBytes = keyParameter.GetKey(); - return keyBytes; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/PasswordCreation/IPasswordConstraint.cs b/mRemoteNG/Security/PasswordCreation/IPasswordConstraint.cs deleted file mode 100644 index 6e1b19d4f..000000000 --- a/mRemoteNG/Security/PasswordCreation/IPasswordConstraint.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Security; - - -namespace mRemoteNG.Security.PasswordCreation -{ - public interface IPasswordConstraint - { - string ConstraintHint { get; } - - bool Validate(SecureString password); - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/PasswordCreation/PasswordIncludesLowerCaseConstraint.cs b/mRemoteNG/Security/PasswordCreation/PasswordIncludesLowerCaseConstraint.cs deleted file mode 100644 index e1f769782..000000000 --- a/mRemoteNG/Security/PasswordCreation/PasswordIncludesLowerCaseConstraint.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Security; -using System.Text.RegularExpressions; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Security.PasswordCreation -{ - public class PasswordIncludesLowerCaseConstraint : IPasswordConstraint - { - private readonly int _minimumCount; - - public string ConstraintHint { get; } - - public PasswordIncludesLowerCaseConstraint(int minimumCount = 1) - { - if (minimumCount < 0) - throw new ArgumentException($"{nameof(minimumCount)} must be a positive value"); - - _minimumCount = minimumCount; - ConstraintHint = string.Format(Language.PasswordContainsLowerCaseConstraintHint, _minimumCount); - } - - public bool Validate(SecureString password) - { - var regex = new Regex(@"[a-z]"); - return regex.Matches(password.ConvertToUnsecureString()).Count >= _minimumCount; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/PasswordCreation/PasswordIncludesNumbersConstraint.cs b/mRemoteNG/Security/PasswordCreation/PasswordIncludesNumbersConstraint.cs deleted file mode 100644 index f3ddee22c..000000000 --- a/mRemoteNG/Security/PasswordCreation/PasswordIncludesNumbersConstraint.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Security; -using System.Text.RegularExpressions; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Security.PasswordCreation -{ - public class PasswordIncludesNumbersConstraint : IPasswordConstraint - { - private readonly int _minimumCount; - - public string ConstraintHint { get; } - - public PasswordIncludesNumbersConstraint(int minimumCount = 1) - { - if (minimumCount < 0) - throw new ArgumentException($"{nameof(minimumCount)} must be a positive value"); - - _minimumCount = minimumCount; - ConstraintHint = string.Format(Language.PasswordContainsNumbersConstraint, _minimumCount); - } - - public bool Validate(SecureString password) - { - var regex = new Regex(@"\d"); - return regex.Matches(password.ConvertToUnsecureString()).Count >= _minimumCount; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/PasswordCreation/PasswordIncludesSpecialCharactersConstraint.cs b/mRemoteNG/Security/PasswordCreation/PasswordIncludesSpecialCharactersConstraint.cs deleted file mode 100644 index ea8161318..000000000 --- a/mRemoteNG/Security/PasswordCreation/PasswordIncludesSpecialCharactersConstraint.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Security; -using System.Text.RegularExpressions; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Security.PasswordCreation -{ - public class PasswordIncludesSpecialCharactersConstraint : IPasswordConstraint - { - private readonly int _minimumCount; - - public IEnumerable SpecialCharacters { get; } = new[] {'!', '@', '#', '$', '%', '^', '&', '*'}; - - public string ConstraintHint { get; } - - public PasswordIncludesSpecialCharactersConstraint(int minimumCount = 1) - { - if (minimumCount < 0) - throw new ArgumentException($"{nameof(minimumCount)} must be a positive value"); - - _minimumCount = minimumCount; - } - - public PasswordIncludesSpecialCharactersConstraint(IEnumerable specialCharacters, int minimumCount = 1) - : this(minimumCount) - { - if (specialCharacters == null) - throw new ArgumentNullException(nameof(specialCharacters)); - - SpecialCharacters = specialCharacters; - ConstraintHint = string.Format(Language.PasswordConstainsSpecialCharactersConstraintHint, _minimumCount, - string.Concat(SpecialCharacters)); - } - - public bool Validate(SecureString password) - { - var regex = new Regex($"[{string.Concat(SpecialCharacters)}]"); - return regex.Matches(password.ConvertToUnsecureString()).Count >= _minimumCount; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/PasswordCreation/PasswordIncludesUpperCaseConstraint.cs b/mRemoteNG/Security/PasswordCreation/PasswordIncludesUpperCaseConstraint.cs deleted file mode 100644 index 0e45c71d7..000000000 --- a/mRemoteNG/Security/PasswordCreation/PasswordIncludesUpperCaseConstraint.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Security; -using System.Text.RegularExpressions; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Security.PasswordCreation -{ - public class PasswordIncludesUpperCaseConstraint : IPasswordConstraint - { - private readonly int _minimumCount; - - public string ConstraintHint { get; } - - public PasswordIncludesUpperCaseConstraint(int minimumCount = 1) - { - if (minimumCount < 0) - throw new ArgumentException($"{nameof(minimumCount)} must be a positive value"); - - _minimumCount = minimumCount; - ConstraintHint = string.Format(Language.PasswordContainsUpperCaseConstraintHint, _minimumCount); - } - - public bool Validate(SecureString password) - { - var regex = new Regex(@"[A-Z]"); - return regex.Matches(password.ConvertToUnsecureString()).Count >= _minimumCount; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/PasswordCreation/PasswordLengthConstraint.cs b/mRemoteNG/Security/PasswordCreation/PasswordLengthConstraint.cs deleted file mode 100644 index d5196aabd..000000000 --- a/mRemoteNG/Security/PasswordCreation/PasswordLengthConstraint.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Security; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Security.PasswordCreation -{ - public class PasswordLengthConstraint : IPasswordConstraint - { - private readonly int _minLength; - private readonly int _maxLength; - - public string ConstraintHint { get; } - - public PasswordLengthConstraint(int minimumLength, int maxLength = int.MaxValue) - { - if (minimumLength < 0) - throw new ArgumentException($"{nameof(minimumLength)} must be a positive value."); - if (maxLength <= 0) - throw new ArgumentException($"{nameof(maxLength)} must be a positive, non-zero value."); - if (maxLength < minimumLength) - throw new ArgumentException( - $"{nameof(maxLength)} must be greater than or equal to {nameof(minimumLength)}."); - - _minLength = minimumLength; - _maxLength = maxLength; - ConstraintHint = string.Format(Language.PasswordLengthConstraintHint, _minLength, _maxLength); - } - - public bool Validate(SecureString password) - { - if (password.Length < _minLength) - return false; - if (password.Length > _maxLength) - return false; - - return true; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/RandomGenerator.cs b/mRemoteNG/Security/RandomGenerator.cs deleted file mode 100644 index 7687080a8..000000000 --- a/mRemoteNG/Security/RandomGenerator.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Text; -using Org.BouncyCastle.Security; - -namespace mRemoteNG.Security -{ - public class RandomGenerator - { - public static string RandomString(int length) - { - if (length < 0) - throw new ArgumentException($"{nameof(length)} must be a positive integer"); - - var randomGen = new SecureRandom(); - var stringBuilder = new StringBuilder(); - const string availableChars = - @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`~!@#$%^&*()-_=+|[]{};:',./<>?"; - for (var x = 0; x < length; x++) - { - var randomIndex = randomGen.Next(availableChars.Length - 1); - stringBuilder.Append(availableChars[randomIndex]); - } - - return stringBuilder.ToString(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/SaveFilter.cs b/mRemoteNG/Security/SaveFilter.cs deleted file mode 100644 index db3a086fa..000000000 --- a/mRemoteNG/Security/SaveFilter.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace mRemoteNG.Security -{ - public class SaveFilter - { - public SaveFilter(bool disableEverything = false) - { - if (disableEverything) return; - SaveUsername = true; - SavePassword = true; - SaveDomain = true; - SaveCredentialId = true; - SaveInheritance = true; - } - - public bool SaveUsername { get; set; } - - public bool SavePassword { get; set; } - - public bool SaveDomain { get; set; } - - public bool SaveCredentialId { get; set; } - - public bool SaveInheritance { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/SecureStringExtensions.cs b/mRemoteNG/Security/SecureStringExtensions.cs deleted file mode 100644 index 122aee244..000000000 --- a/mRemoteNG/Security/SecureStringExtensions.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Security; -using System.Text.RegularExpressions; - -namespace mRemoteNG.Security -{ - public static class SecureStringExtensions - { - /// - /// Method to marshall a SecureString out of protected memory into a standard String object that is required by most other functions. - /// Code initially taken from Fabio Pintos - /// Source: https://blogs.msdn.microsoft.com/fpintos/2009/06/12/how-to-properly-convert-securestring-to-string/ - /// - /// - /// - public static string ConvertToUnsecureString(this SecureString securePassword) - { - if (securePassword == null) - throw new ArgumentNullException(nameof(securePassword)); - - var unmanagedString = IntPtr.Zero; - try - { - unmanagedString = Marshal.SecureStringToGlobalAllocUnicode(securePassword); - return Marshal.PtrToStringUni(unmanagedString); - } - finally - { - Marshal.ZeroFreeGlobalAllocUnicode(unmanagedString); - } - } - - public static SecureString ConvertToSecureString(this string unsecuredPassword) - { - if (unsecuredPassword == null) - throw new ArgumentNullException(nameof(unsecuredPassword)); - - var secureString = new SecureString(); - foreach (var character in unsecuredPassword.ToCharArray()) - secureString.AppendChar(character); - // ReSharper disable once RedundantAssignment - unsecuredPassword = null; - return secureString; - } - - public static bool IsBase64String(this string s) - { - s = s.Trim(); - return (s.Length % 4 == 0) && Regex.IsMatch(s, @"^[a-zA-Z0-9\+/]*={0,3}$", RegexOptions.None); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/SymmetricEncryption/AeadCryptographyProvider.cs b/mRemoteNG/Security/SymmetricEncryption/AeadCryptographyProvider.cs deleted file mode 100644 index b3f4c64c9..000000000 --- a/mRemoteNG/Security/SymmetricEncryption/AeadCryptographyProvider.cs +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Initial work: - * This work (Modern Encryption of a String C#, by James Tuley), - * identified by James Tuley, is free of known copyright restrictions. - * https://gist.github.com/4336842 - * http://creativecommons.org/publicdomain/mark/1.0/ - */ - -using System; -using System.IO; -using System.Security; -using System.Text; -using mRemoteNG.Security.KeyDerivation; -using Org.BouncyCastle.Crypto; -using Org.BouncyCastle.Crypto.Engines; -using Org.BouncyCastle.Crypto.Modes; -using Org.BouncyCastle.Crypto.Parameters; -using Org.BouncyCastle.Security; -using mRemoteNG.Resources.Language; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Security.SymmetricEncryption -{ - public class AeadCryptographyProvider : ICryptographyProvider - { - private readonly IAeadBlockCipher _aeadBlockCipher; - private readonly Encoding _encoding; - private readonly SecureRandom _random = new SecureRandom(); - - //Preconfigured Encryption Parameters - protected virtual int NonceBitSize { get; set; } = 128; - protected virtual int MacBitSize { get; set; } = 128; - protected virtual int KeyBitSize { get; set; } = 256; - - //Preconfigured Password Key Derivation Parameters - protected virtual int SaltBitSize { get; set; } = 128; - public virtual int KeyDerivationIterations { get; set; } = 1000; - protected virtual int MinPasswordLength { get; set; } = 1; - - - public int BlockSizeInBytes - { - get { return _aeadBlockCipher.GetBlockSize(); } - } - - public BlockCipherEngines CipherEngine - { - get - { - var cipherEngine = _aeadBlockCipher.AlgorithmName.Split('/')[0]; - return (BlockCipherEngines)Enum.Parse(typeof(BlockCipherEngines), cipherEngine); - } - } - - public BlockCipherModes CipherMode - { - get - { - var cipherMode = _aeadBlockCipher.AlgorithmName.Split('/')[1]; - return (BlockCipherModes)Enum.Parse(typeof(BlockCipherModes), cipherMode); - } - } - - public AeadCryptographyProvider() - { - _aeadBlockCipher = new GcmBlockCipher(new AesEngine()); - _encoding = Encoding.UTF8; - } - - public AeadCryptographyProvider(Encoding encoding) - { - _aeadBlockCipher = new GcmBlockCipher(new AesEngine()); - _encoding = encoding; - } - - public AeadCryptographyProvider(IAeadBlockCipher aeadBlockCipher) - { - _aeadBlockCipher = aeadBlockCipher; - _encoding = Encoding.UTF8; - SetNonceForCcm(); - } - - public AeadCryptographyProvider(IAeadBlockCipher aeadBlockCipher, Encoding encoding) - { - _aeadBlockCipher = aeadBlockCipher; - _encoding = encoding; - SetNonceForCcm(); - } - - private void SetNonceForCcm() - { - var ccm = _aeadBlockCipher as CcmBlockCipher; - if (ccm != null) - NonceBitSize = 88; - } - - public string Encrypt(string plainText, SecureString encryptionKey) - { - var encryptedText = SimpleEncryptWithPassword(plainText, encryptionKey.ConvertToUnsecureString()); - return encryptedText; - } - - private string SimpleEncryptWithPassword(string secretMessage, string password, byte[] nonSecretPayload = null) - { - if (string.IsNullOrEmpty(secretMessage)) - return ""; //throw new ArgumentException(@"Secret Message Required!", nameof(secretMessage)); - - var plainText = _encoding.GetBytes(secretMessage); - var cipherText = SimpleEncryptWithPassword(plainText, password, nonSecretPayload); - return Convert.ToBase64String(cipherText); - } - - private byte[] SimpleEncryptWithPassword(byte[] secretMessage, string password, byte[] nonSecretPayload = null) - { - nonSecretPayload = nonSecretPayload ?? new byte[] { }; - - //User Error Checks - if (string.IsNullOrWhiteSpace(password) || password.Length < MinPasswordLength) - throw new ArgumentException($"Must have a password of at least {MinPasswordLength} characters!", - nameof(password)); - - if (secretMessage == null || secretMessage.Length == 0) - throw new ArgumentException(@"Secret Message Required!", nameof(secretMessage)); - - //Use Random Salt to minimize pre-generated weak password attacks. - var salt = GenerateSalt(); - - //Generate Key - var keyDerivationFunction = new Pkcs5S2KeyGenerator(KeyBitSize, KeyDerivationIterations); - var key = keyDerivationFunction.DeriveKey(password, salt); - - //Create Full Non Secret Payload - var payload = new byte[salt.Length + nonSecretPayload.Length]; - Array.Copy(nonSecretPayload, payload, nonSecretPayload.Length); - Array.Copy(salt, 0, payload, nonSecretPayload.Length, salt.Length); - - return SimpleEncrypt(secretMessage, key, payload); - } - - private byte[] SimpleEncrypt(byte[] secretMessage, byte[] key, byte[] nonSecretPayload = null) - { - //User Error Checks - if (key == null || key.Length != KeyBitSize / 8) - throw new ArgumentException($"Key needs to be {KeyBitSize} bit!", nameof(key)); - - if (secretMessage == null || secretMessage.Length == 0) - throw new ArgumentException(@"Secret Message Required!", nameof(secretMessage)); - - //Non-secret Payload Optional - nonSecretPayload = nonSecretPayload ?? new byte[] { }; - - //Using random nonce large enough not to repeat - var nonce = new byte[NonceBitSize / 8]; - _random.NextBytes(nonce, 0, nonce.Length); - - var parameters = new AeadParameters(new KeyParameter(key), MacBitSize, nonce, nonSecretPayload); - _aeadBlockCipher.Init(true, parameters); - - //Generate Cipher Text With Auth Tag - var cipherText = new byte[_aeadBlockCipher.GetOutputSize(secretMessage.Length)]; - var len = _aeadBlockCipher.ProcessBytes(secretMessage, 0, secretMessage.Length, cipherText, 0); - _aeadBlockCipher.DoFinal(cipherText, len); - - //Assemble Message - var combinedStream = new MemoryStream(); - using (var binaryWriter = new BinaryWriter(combinedStream)) - { - //Prepend Authenticated Payload - binaryWriter.Write(nonSecretPayload); - //Prepend Nonce - binaryWriter.Write(nonce); - //Write Cipher Text - binaryWriter.Write(cipherText); - } - - return combinedStream.ToArray(); - } - - - public string Decrypt(string cipherText, SecureString decryptionKey) - { - var decryptedText = SimpleDecryptWithPassword(cipherText, decryptionKey); - return decryptedText; - } - - private string SimpleDecryptWithPassword(string encryptedMessage, - SecureString decryptionKey, - int nonSecretPayloadLength = 0) - { - if (string.IsNullOrWhiteSpace(encryptedMessage)) - return ""; //throw new ArgumentException(@"Encrypted Message Required!", nameof(encryptedMessage)); - - var cipherText = Convert.FromBase64String(encryptedMessage); - var plainText = SimpleDecryptWithPassword(cipherText, decryptionKey.ConvertToUnsecureString(), - nonSecretPayloadLength); - return plainText == null ? null : _encoding.GetString(plainText); - } - - private byte[] SimpleDecryptWithPassword(byte[] encryptedMessage, - string password, - int nonSecretPayloadLength = 0) - { - //User Error Checks - if (string.IsNullOrWhiteSpace(password) || password.Length < MinPasswordLength) - throw new ArgumentException($"Must have a password of at least {MinPasswordLength} characters!", - nameof(password)); - - if (encryptedMessage == null || encryptedMessage.Length == 0) - throw new ArgumentException(@"Encrypted Message Required!", nameof(encryptedMessage)); - - //Grab Salt from Payload - var salt = new byte[SaltBitSize / 8]; - Array.Copy(encryptedMessage, nonSecretPayloadLength, salt, 0, salt.Length); - - //Generate Key - var keyDerivationFunction = new Pkcs5S2KeyGenerator(KeyBitSize, KeyDerivationIterations); - var key = keyDerivationFunction.DeriveKey(password, salt); - - return SimpleDecrypt(encryptedMessage, key, salt.Length + nonSecretPayloadLength); - } - - private byte[] SimpleDecrypt(byte[] encryptedMessage, byte[] key, int nonSecretPayloadLength = 0) - { - //User Error Checks - if (key == null || key.Length != KeyBitSize / 8) - throw new ArgumentException($"Key needs to be {KeyBitSize} bit!", nameof(key)); - - if (encryptedMessage == null || encryptedMessage.Length == 0) - throw new ArgumentException(@"Encrypted Message Required!", nameof(encryptedMessage)); - - var cipherStream = new MemoryStream(encryptedMessage); - using (var cipherReader = new BinaryReader(cipherStream)) - { - //Grab Payload - var nonSecretPayload = cipherReader.ReadBytes(nonSecretPayloadLength); - - //Grab Nonce - var nonce = cipherReader.ReadBytes(NonceBitSize / 8); - - var parameters = new AeadParameters(new KeyParameter(key), MacBitSize, nonce, nonSecretPayload); - _aeadBlockCipher.Init(false, parameters); - - //Decrypt Cipher Text - var cipherText = - cipherReader.ReadBytes(encryptedMessage.Length - nonSecretPayloadLength - nonce.Length); - var plainText = new byte[_aeadBlockCipher.GetOutputSize(cipherText.Length)]; - - try - { - var len = _aeadBlockCipher.ProcessBytes(cipherText, 0, cipherText.Length, plainText, 0); - _aeadBlockCipher.DoFinal(plainText, len); - } - catch (InvalidCipherTextException e) - { - throw new EncryptionException(Language.ErrorDecryptionFailed, e); - } - - return plainText; - } - } - - private byte[] GenerateSalt() - { - var salt = new byte[SaltBitSize / 8]; - _random.NextBytes(salt); - return salt; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Security/SymmetricEncryption/LegacyRijndaelCryptographyProvider.cs b/mRemoteNG/Security/SymmetricEncryption/LegacyRijndaelCryptographyProvider.cs deleted file mode 100644 index 212d21835..000000000 --- a/mRemoteNG/Security/SymmetricEncryption/LegacyRijndaelCryptographyProvider.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.IO; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Security.SymmetricEncryption -{ - public class LegacyRijndaelCryptographyProvider : ICryptographyProvider - { - public int BlockSizeInBytes { get; } - - public BlockCipherEngines CipherEngine { get; } - - public BlockCipherModes CipherMode { get; } - public int KeyDerivationIterations { get; set; } - - public LegacyRijndaelCryptographyProvider() - { - BlockSizeInBytes = 16; - } - - public string Encrypt(string strToEncrypt, SecureString strSecret) - { - if (string.IsNullOrWhiteSpace(strToEncrypt) || strSecret.Length == 0) - return strToEncrypt; - - try - { - using var aes = Aes.Create(); - aes.BlockSize = BlockSizeInBytes * 8; - - using (var md5 = MD5.Create()) - { - var key = md5.ComputeHash(Encoding.UTF8.GetBytes(strSecret.ConvertToUnsecureString())); - aes.Key = key; - aes.GenerateIV(); - } - - using var ms = new MemoryStream(); - ms.Write(aes.IV, 0, BlockSizeInBytes); - - using var cs = new CryptoStream(ms, aes.CreateEncryptor(), CryptoStreamMode.Write); - var data = Encoding.UTF8.GetBytes(strToEncrypt); - - cs.Write(data, 0, data.Length); - cs.FlushFinalBlock(); - - var encdata = ms.ToArray(); - - return Convert.ToBase64String(encdata); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - string.Format(Language.ErrorEncryptionFailed, ex.Message)); - } - - return strToEncrypt; - } - - public string Decrypt(string ciphertextBase64, SecureString password) - { - if (string.IsNullOrEmpty(ciphertextBase64) || password.Length == 0) - return ciphertextBase64; - - try - { - using var aes = Aes.Create(); - aes.BlockSize = BlockSizeInBytes * 8; - - using (var md5 = MD5.Create()) - { - var key = md5.ComputeHash(Encoding.UTF8.GetBytes(password.ConvertToUnsecureString())); - aes.Key = key; - } - - var ciphertext = Convert.FromBase64String(ciphertextBase64); - - using var ms = new MemoryStream(ciphertext); - - var iv = new byte[BlockSizeInBytes]; - ms.Read(iv, 0, iv.Length); - aes.IV = iv; - - using var cryptoStream = new CryptoStream(ms, aes.CreateDecryptor(), CryptoStreamMode.Read); - using var streamReader = new StreamReader(cryptoStream, Encoding.UTF8, true); - var plaintext = streamReader.ReadToEnd(); - - return plaintext; - } - catch (Exception ex) - { - //Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, string.Format(Language.ErrorDecryptionFailed, ex.Message)); - throw new EncryptionException(Language.ErrorDecryptionFailed, ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Themes/ColorMapTheme.Designer.cs b/mRemoteNG/Themes/ColorMapTheme.Designer.cs deleted file mode 100644 index 8a023f373..000000000 --- a/mRemoteNG/Themes/ColorMapTheme.Designer.cs +++ /dev/null @@ -1,846 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace mRemoteNG { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class ColorMapTheme { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal ColorMapTheme() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mRemoteNG.Themes.ColorMapTheme", typeof(ColorMapTheme).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='Button']/Background/@Source. - /// - internal static string Button_Background { - get { - return ResourceManager.GetString("Button_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonBorder']/Background/@Source. - /// - internal static string Button_Border { - get { - return ResourceManager.GetString("Button_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonDisabled']/Background/@Source. - /// - internal static string Button_Disabled_Background { - get { - return ResourceManager.GetString("Button_Disabled_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonBorderDisabled']/Background/@Source. - /// - internal static string Button_Disabled_Border { - get { - return ResourceManager.GetString("Button_Disabled_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonDisabled']/Foreground/@Source. - /// - internal static string Button_Disabled_Foreground { - get { - return ResourceManager.GetString("Button_Disabled_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='Button']/Foreground/@Source. - /// - internal static string Button_Foreground { - get { - return ResourceManager.GetString("Button_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonHover']/Background/@Source. - /// - internal static string Button_Hover_Background { - get { - return ResourceManager.GetString("Button_Hover_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonBorderHover']/Background/@Source. - /// - internal static string Button_Hover_Border { - get { - return ResourceManager.GetString("Button_Hover_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonHover']/Foreground/@Source. - /// - internal static string Button_Hover_Foreground { - get { - return ResourceManager.GetString("Button_Hover_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonPressed']/Background/@Source. - /// - internal static string Button_Pressed_Background { - get { - return ResourceManager.GetString("Button_Pressed_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonBorderPressed']/Background/@Source. - /// - internal static string Button_Pressed_Border { - get { - return ResourceManager.GetString("Button_Pressed_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonPressed']/Foreground/@Source. - /// - internal static string Button_Pressed_Foreground { - get { - return ResourceManager.GetString("Button_Pressed_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBackground']/Background/@Source. - /// - internal static string CheckBox_Background { - get { - return ResourceManager.GetString("CheckBox_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBorder']/Background/@Source. - /// - internal static string CheckBox_Border { - get { - return ResourceManager.GetString("CheckBox_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBorderDisabled']/Background/@Source. - /// - internal static string CheckBox_Border_Disabled { - get { - return ResourceManager.GetString("CheckBox_Border_Disabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBorderHover']/Background/@Source. - /// - internal static string CheckBox_Border_Hover { - get { - return ResourceManager.GetString("CheckBox_Border_Hover", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBorderPressed']/Background/@Source. - /// - internal static string CheckBox_Border_Pressed { - get { - return ResourceManager.GetString("CheckBox_Border_Pressed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxGlyph']/Background/@Source. - /// - internal static string CheckBox_Glyph { - get { - return ResourceManager.GetString("CheckBox_Glyph", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxGlyphDisabled']/Background/@Source. - /// - internal static string CheckBox_Glyph_Disabled { - get { - return ResourceManager.GetString("CheckBox_Glyph_Disabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxText']/Background/@Source. - /// - internal static string CheckBox_Text { - get { - return ResourceManager.GetString("CheckBox_Text", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxTextDisabled']/Background/@Source. - /// - internal static string CheckBox_Text_Disabled { - get { - return ResourceManager.GetString("CheckBox_Text_Disabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBox']/Background/@Source. - /// - internal static string ComboBox_Background { - get { - return ResourceManager.GetString("ComboBox_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxBorder']/Background/@Source. - /// - internal static string ComboBox_Border { - get { - return ResourceManager.GetString("ComboBox_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButton']/Background/@Source. - /// - internal static string ComboBox_Button_Background { - get { - return ResourceManager.GetString("ComboBox_Button_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonBorder']/Background/@Source. - /// - internal static string ComboBox_Button_Border { - get { - return ResourceManager.GetString("ComboBox_Button_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButton']/Foreground/@Source. - /// - internal static string ComboBox_Button_Foreground { - get { - return ResourceManager.GetString("ComboBox_Button_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonMouseOver']/Background/@Source. - /// - internal static string ComboBox_Button_MouseOver_Background { - get { - return ResourceManager.GetString("ComboBox_Button_MouseOver_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonMouseOverBorder']/Background/@Source. - /// - internal static string ComboBox_Button_MouseOver_Border { - get { - return ResourceManager.GetString("ComboBox_Button_MouseOver_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonMouseOver']/Foreground/@Source. - /// - internal static string ComboBox_Button_MouseOver_Foreground { - get { - return ResourceManager.GetString("ComboBox_Button_MouseOver_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonPressed']/Background/@Source. - /// - internal static string ComboBox_Button_Pressed_Background { - get { - return ResourceManager.GetString("ComboBox_Button_Pressed_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonPressed']/Foreground/@Source. - /// - internal static string ComboBox_Button_Pressed_Foreground { - get { - return ResourceManager.GetString("ComboBox_Button_Pressed_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxDisabled']/Background/@Source. - /// - internal static string ComboBox_Disabled_Background { - get { - return ResourceManager.GetString("ComboBox_Disabled_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxDisabled']/Foreground/@Source. - /// - internal static string ComboBox_Disabled_Foreground { - get { - return ResourceManager.GetString("ComboBox_Disabled_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBox']/Foreground/@Source. - /// - internal static string ComboBox_Foreground { - get { - return ResourceManager.GetString("ComboBox_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxMouseOverBorder']/Background/@Source. - /// - internal static string ComboBox_MouseOver_Border { - get { - return ResourceManager.GetString("ComboBox_MouseOver_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxPopUpBorder']/ComboBoxPopUp/@Source. - /// - internal static string ComboBox_PopUp { - get { - return ResourceManager.GetString("ComboBox_PopUp", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxPopUpBorder']/Background/@Source. - /// - internal static string ComboBox_PopUp_Border { - get { - return ResourceManager.GetString("ComboBox_PopUp_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Environment']/Color[@Name='CommandShelfHighlightGradientBegin']/Background/@Source. - /// - internal static string CommandBarMenuDefault_Background { - get { - return ResourceManager.GetString("CommandBarMenuDefault_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Environment']/Color[@Name='CommandBarTextActive']/Background/@Source. - /// - internal static string CommandBarMenuDefault_Foreground { - get { - return ResourceManager.GetString("CommandBarMenuDefault_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='Dialog']/Background/@Source. - /// - internal static string Dialog_Background { - get { - return ResourceManager.GetString("Dialog_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='Dialog']/Foreground/@Source. - /// - internal static string Dialog_Foreground { - get { - return ResourceManager.GetString("Dialog_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Text Editor Text Marker Items']/Color[@Name='compiler error']/Background/@Source. - /// - internal static string ErrorText_Background { - get { - return ResourceManager.GetString("ErrorText_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Text Editor Text Marker Items']/Color[@Name='compiler error']/Foreground/@Source. - /// - internal static string ErrorText_Foreground { - get { - return ResourceManager.GetString("ErrorText_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabActiveBackground']/Background/@Source. - /// - internal static string GroupBox_Backgorund { - get { - return ResourceManager.GetString("GroupBox_Backgorund", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabInactiveBackground']/Background/@Source. - /// - internal static string GroupBox_Disabled_Background { - get { - return ResourceManager.GetString("GroupBox_Disabled_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabInactiveText']/Background/@Source. - /// - internal static string GroupBox_Disabled_Foreground { - get { - return ResourceManager.GetString("GroupBox_Disabled_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabInactiveBorder']/Background/@Source. - /// - internal static string GroupBox_Disabled_Line { - get { - return ResourceManager.GetString("GroupBox_Disabled_Line", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabActiveText']/Background/@Source. - /// - internal static string GroupBox_Foreground { - get { - return ResourceManager.GetString("GroupBox_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabActiveBorder']/Background/@Source. - /// - internal static string GroupBox_Line { - get { - return ResourceManager.GetString("GroupBox_Line", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListBackground']/Background/@Source. - /// - internal static string List_Background { - get { - return ResourceManager.GetString("List_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListHeader']/Background/@Source. - /// - internal static string List_Header_Background { - get { - return ResourceManager.GetString("List_Header_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListHeader']/Foreground/@Source. - /// - internal static string List_Header_Foreground { - get { - return ResourceManager.GetString("List_Header_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItem']/Background/@Source. - /// - internal static string List_Item_Background { - get { - return ResourceManager.GetString("List_Item_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemBorder']/Background/@Source. - /// - internal static string List_Item_Border { - get { - return ResourceManager.GetString("List_Item_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemDisabled']/Background/@Source. - /// - internal static string List_Item_Disabled_Background { - get { - return ResourceManager.GetString("List_Item_Disabled_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemDisabledBorder']/Background/@Source. - /// - internal static string List_Item_Disabled_Border { - get { - return ResourceManager.GetString("List_Item_Disabled_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemDisabled']/Foreground/@Source. - /// - internal static string List_Item_Disabled_Foreground { - get { - return ResourceManager.GetString("List_Item_Disabled_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItem']/Foreground/@Source. - /// - internal static string List_Item_Foreground { - get { - return ResourceManager.GetString("List_Item_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemSelected']/Background/@Source. - /// - internal static string List_Item_Selected_Background { - get { - return ResourceManager.GetString("List_Item_Selected_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemSelectedBorder']/Background/@Source. - /// - internal static string List_Item_Selected_Border { - get { - return ResourceManager.GetString("List_Item_Selected_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemSelected']/Foreground/@Source. - /// - internal static string List_Item_Selected_Foreground { - get { - return ResourceManager.GetString("List_Item_Selected_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='ProgressBar']/Color[@Name='Background']/Background/@Source. - /// - internal static string ProgressBar_Background { - get { - return ResourceManager.GetString("ProgressBar_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='ProgressBar']/Color[@Name='IndicatorFill']/Background/@Source. - /// - internal static string ProgressBar_Fill { - get { - return ResourceManager.GetString("ProgressBar_Fill", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='ProgressBar']/Color[@Name='IndicatorFillCritical']/Background/@Source. - /// - internal static string ProgressBar_Fill_Critical { - get { - return ResourceManager.GetString("ProgressBar_Fill_Critical", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='ProgressBar']/Color[@Name='IndicatorFillWarning']/Background/@Source. - /// - internal static string ProgressBar_Fill_Warning { - get { - return ResourceManager.GetString("ProgressBar_Fill_Warning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabBackground']/Background/@Source. - /// - internal static string Tab_Background { - get { - return ResourceManager.GetString("Tab_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabItem']/Background/@Source. - /// - internal static string Tab_Item_Background { - get { - return ResourceManager.GetString("Tab_Item_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabItemDisabled']/Background/@Source. - /// - internal static string Tab_Item_Disabled_Background { - get { - return ResourceManager.GetString("Tab_Item_Disabled_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabItemDisabled']/Foreground/@Source. - /// - internal static string Tab_Item_Disabled_Foreground { - get { - return ResourceManager.GetString("Tab_Item_Disabled_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabItem']/Foreground/@Source. - /// - internal static string Tab_Item_Foreground { - get { - return ResourceManager.GetString("Tab_Item_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBackground']/Background/@Source. - /// - internal static string TextBox_Background { - get { - return ResourceManager.GetString("TextBox_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBorder']/Background/@Source. - /// - internal static string TextBox_Border { - get { - return ResourceManager.GetString("TextBox_Border", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBorderDisabled']/Background/@Source. - /// - internal static string TextBox_Border_Disabled { - get { - return ResourceManager.GetString("TextBox_Border_Disabled", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBorderFocused']/Background/@Source. - /// - internal static string TextBox_Border_Focused { - get { - return ResourceManager.GetString("TextBox_Border_Focused", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBackgroundDisabled']/Background/@Source. - /// - internal static string TextBox_Disabled_Background { - get { - return ResourceManager.GetString("TextBox_Disabled_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxTextDisabled']/Background/@Source. - /// - internal static string TextBox_Disabled_Foreground { - get { - return ResourceManager.GetString("TextBox_Disabled_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBackgroundFocused']/Background/@Source. - /// - internal static string TextBox_Focused_Background { - get { - return ResourceManager.GetString("TextBox_Focused_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxTextFocused']/Background/@Source. - /// - internal static string TextBox_Focused_Foreground { - get { - return ResourceManager.GetString("TextBox_Focused_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxText']/Background/@Source. - /// - internal static string TextBox_Foreground { - get { - return ResourceManager.GetString("TextBox_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='TreeView']/Color[@Name='Background']/Background/@Source. - /// - internal static string TreeView_Background { - get { - return ResourceManager.GetString("TreeView_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='TreeView']/Color[@Name='Background']/Foreground/@Source. - /// - internal static string TreeView_Foreground { - get { - return ResourceManager.GetString("TreeView_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='TreeView']/Color[@Name='SelectedItemActive']/Background/@Source. - /// - internal static string Treeview_SelectedItem_Active_Background { - get { - return ResourceManager.GetString("Treeview_SelectedItem_Active_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='TreeView']/Color[@Name='SelectedItemActive']/Foreground/@Source. - /// - internal static string Treeview_SelectedItem_Active_Foreground { - get { - return ResourceManager.GetString("Treeview_SelectedItem_Active_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='TreeView']/Color[@Name='SelectedItemInactive']/Background/@Source. - /// - internal static string Treeview_SelectedItem_Inactive_Background { - get { - return ResourceManager.GetString("Treeview_SelectedItem_Inactive_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='TreeView']/Color[@Name='SelectedItemInactive']/Foreground/@Source. - /// - internal static string Treeview_SelectedItem_Inactive_Foreground { - get { - return ResourceManager.GetString("Treeview_SelectedItem_Inactive_Foreground", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Text Editor Text Marker Items']/Color[@Name='compiler warning']/Background/@Source. - /// - internal static string WarningText_Background { - get { - return ResourceManager.GetString("WarningText_Background", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to /Themes/Theme/Category[@Name='Text Editor Text Marker Items']/Color[@Name='compiler warning']/Foreground/@Source. - /// - internal static string WarningText_Foreground { - get { - return ResourceManager.GetString("WarningText_Foreground", resourceCulture); - } - } - } -} diff --git a/mRemoteNG/Themes/ColorMapTheme.resx b/mRemoteNG/Themes/ColorMapTheme.resx deleted file mode 100644 index b75b9117d..000000000 --- a/mRemoteNG/Themes/ColorMapTheme.resx +++ /dev/null @@ -1,383 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='Button']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonBorderDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonDisabled']/Foreground/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='Button']/Foreground/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonHover']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonBorderHover']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonHover']/Foreground/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonPressed']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonBorderPressed']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='ButtonPressed']/Foreground/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBackground']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBorderDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBorderHover']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxBorderPressed']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxGlyph']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxGlyphDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxText']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='CheckBoxTextDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBox']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButton']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButton']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonMouseOver']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonMouseOverBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonMouseOver']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonPressed']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxButtonPressed']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxDisabled']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBox']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxMouseOverBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxPopUpBorder']/ComboBoxPopUp/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ComboBoxPopUpBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Environment']/Color[@Name='CommandShelfHighlightGradientBegin']/Background/@Source - Taken from themevs2012 in dockpanelsuite to default in NG - - - /Themes/Theme/Category[@Name='Environment']/Color[@Name='CommandBarTextActive']/Background/@Source - Taken from themevs2012 in dockpanelsuite to default in - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='Dialog']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='Dialog']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Text Editor Text Marker Items']/Color[@Name='compiler error']/Background/@Source - - - /Themes/Theme/Category[@Name='Text Editor Text Marker Items']/Color[@Name='compiler error']/Foreground/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabActiveBackground']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabInactiveBackground']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabInactiveText']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabInactiveBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabActiveText']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='InnerTabActiveBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListBackground']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListHeader']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListHeader']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItem']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemDisabledBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemDisabled']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItem']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemSelected']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemSelectedBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='ListItemSelected']/Foreground/@Source - - - /Themes/Theme/Category[@Name='ProgressBar']/Color[@Name='Background']/Background/@Source - - - /Themes/Theme/Category[@Name='ProgressBar']/Color[@Name='IndicatorFill']/Background/@Source - - - /Themes/Theme/Category[@Name='ProgressBar']/Color[@Name='IndicatorFillCritical']/Background/@Source - - - /Themes/Theme/Category[@Name='ProgressBar']/Color[@Name='IndicatorFillWarning']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabBackground']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabItem']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabItemDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabItemDisabled']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Cider']/Color[@Name='TabItem']/Foreground/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBackground']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBorder']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBorderDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBorderFocused']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBackgroundDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxTextDisabled']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxBackgroundFocused']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxTextFocused']/Background/@Source - - - /Themes/Theme/Category[@Name='CommonControls']/Color[@Name='TextBoxText']/Background/@Source - - - /Themes/Theme/Category[@Name='TreeView']/Color[@Name='Background']/Background/@Source - - - /Themes/Theme/Category[@Name='TreeView']/Color[@Name='Background']/Foreground/@Source - - - /Themes/Theme/Category[@Name='TreeView']/Color[@Name='SelectedItemActive']/Background/@Source - - - /Themes/Theme/Category[@Name='TreeView']/Color[@Name='SelectedItemActive']/Foreground/@Source - - - /Themes/Theme/Category[@Name='TreeView']/Color[@Name='SelectedItemInactive']/Background/@Source - - - /Themes/Theme/Category[@Name='TreeView']/Color[@Name='SelectedItemInactive']/Foreground/@Source - - - /Themes/Theme/Category[@Name='Text Editor Text Marker Items']/Color[@Name='compiler warning']/Background/@Source - - - /Themes/Theme/Category[@Name='Text Editor Text Marker Items']/Color[@Name='compiler warning']/Foreground/@Source - - \ No newline at end of file diff --git a/mRemoteNG/Themes/ExtendedColorPalette.cs b/mRemoteNG/Themes/ExtendedColorPalette.cs deleted file mode 100644 index f8bbe1d70..000000000 --- a/mRemoteNG/Themes/ExtendedColorPalette.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System.Collections.Generic; -using System.Drawing; - -namespace mRemoteNG.Themes -{ - /// - /// Class used for the UI to display the color tables,as the Dictionary value keys cannot be directly replaced - /// - public class PseudoKeyColor - { - public PseudoKeyColor(string _key, Color _value) - { - Key = _key; - Value = _value; - } - - public string Key { get; set; } - - public Color Value { get; set; } - } - - - /// - /// Holds the color of a palette that are not included in the dockpanelsuite definition - /// - public class ExtendedColorPalette - { - #region Private Variables - - //Collection for color values that are not loaded by dock panels (list, buttons,panel content, etc) - - #endregion - - #region Constructors - - public ExtendedColorPalette() - { - ExtColorPalette = new Dictionary(); - DefaultColorPalette = - new Dictionary(); // If this is the default palette, it will not have a default-default palette - } - - #endregion - - #region Public Methods - - // Set the default theme, that theme should contain all color values used by the application - public void setDefault(ExtendedColorPalette inPalettte) - { - DefaultColorPalette = inPalettte.ExtColorPalette; - } - - #endregion - - /// - /// Obtains a color from the extended palette, if not present obtains it from the default palette, in the extreme case it uses Pink as a signal that a color is missing - /// - /// - /// - public Color getColor(string colorKey) - { - var retColor = ExtColorPalette.ContainsKey(colorKey) ? ExtColorPalette[colorKey] : Color.Empty; - //Invisible colors are not good, might indicate missing color from the palette as is represented by 00000000 - if (retColor != Color.Empty && retColor.A != 0) return retColor; - if (DefaultColorPalette != null) - { - retColor = DefaultColorPalette.ContainsKey(colorKey) ? DefaultColorPalette[colorKey] : Color.Empty; - } - - //why are we here?, just avoid a crash - if (retColor == Color.Empty) - { - //Fail to pink , because why not - retColor = Color.Pink; - } - - return retColor; - } - - /// - /// Add a color to the extended palette - /// - /// - /// - public void addColor(string colorKey, Color inColor) - { - ExtColorPalette.Add(colorKey, inColor); - } - - - /// - /// Replace the value of a color in the palette - /// - /// - /// - public void replaceColor(string colorKey, Color inColor) - { - ExtColorPalette[colorKey] = inColor; - } - - public Dictionary DefaultColorPalette { get; set; } - - - public Dictionary ExtColorPalette { get; set; } - } -} \ No newline at end of file diff --git a/mRemoteNG/Themes/MremoteNGPaletteManipulator.cs b/mRemoteNG/Themes/MremoteNGPaletteManipulator.cs deleted file mode 100644 index 13a8e1c13..000000000 --- a/mRemoteNG/Themes/MremoteNGPaletteManipulator.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System.Collections; -using System.Drawing; -using System.Globalization; -using System.IO; -using System.Xml; -using mRemoteNG.Themes; - -namespace mRemoteNG.Themes -{ - //Class to extract the rest of the required theme colors for MremoteNG from the vstheme file - public class MremoteNGPaletteManipulator - { - private XmlDocument _xml; - private ExtendedColorPalette _defaultPalette; - - - //warning, defaultpalette should always contain all the values, because when is loaded there is no default palette (parameter is null - public MremoteNGPaletteManipulator(byte[] file, ExtendedColorPalette defaultPalette = null) - { - _xml = new XmlDocument(); - _xml.LoadXml(new StreamReader(new MemoryStream(file)).ReadToEnd()); - _defaultPalette = defaultPalette ?? new ExtendedColorPalette(); - } - - - //Load the colors for the mRemoteNG own components as Dockpanel only have a menus and docks palette - public ExtendedColorPalette getColors() - { - var newPalette = new ExtendedColorPalette(); - newPalette.setDefault(_defaultPalette); - var resourceSet = ColorMapTheme.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true); - // - foreach (DictionaryEntry entry in resourceSet) - { - var colorName = entry.Key.ToString(); - var xmlQueryPath = entry.Value.ToString(); - if (_xml.DocumentElement == null) continue; - var colorNodeList = _xml.DocumentElement.FirstChild.SelectNodes(xmlQueryPath); - var color = colorNodeList != null && colorNodeList.Count > 0 ? colorNodeList[0].Value : null; - if (color != null) - { - newPalette.addColor(colorName, ColorTranslator.FromHtml($"#{color}")); - } - } - - return newPalette; - } - - - /// - /// Takes a palette from memory and update the xml elements in disk - /// - /// - /// - public byte[] mergePalette(ExtendedColorPalette colorPalette) - { - var resourceSet = ColorMapTheme.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true); - - foreach (DictionaryEntry entry in resourceSet) - { - var colorName = entry.Key.ToString(); - var xmlQueryPath = entry.Value.ToString(); - var colorNodeList = _xml.DocumentElement?.FirstChild.SelectNodes(xmlQueryPath); - if (colorNodeList == null || colorNodeList.Count <= 0) continue; - var paletteColor = colorPalette.getColor(colorName); - colorNodeList[0].Value = $"FF{paletteColor.R:X2}{paletteColor.G:X2}{paletteColor.B:X2}"; - } - - var ms = new MemoryStream(); - _xml.Save(ms); - var bytes = ms.ToArray(); - - return bytes; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Themes/MremoteNGThemeBase.cs b/mRemoteNG/Themes/MremoteNGThemeBase.cs deleted file mode 100644 index bebbf3258..000000000 --- a/mRemoteNG/Themes/MremoteNGThemeBase.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace mRemoteNG.Themes -{ - using System.Drawing; - using UI.Tabs; - using WeifenLuo.WinFormsUI.Docking; - using WeifenLuo.WinFormsUI.ThemeVS2015; - - - /// - /// Visual Studio 2015 Light theme. - /// - public class MremoteNGThemeBase : VS2015ThemeBase - { - public MremoteNGThemeBase(byte[] themeResource) - : base(themeResource) - { - Measures.SplitterSize = 3; - Measures.AutoHideSplitterSize = 3; - Measures.DockPadding = 2; - ShowAutoHideContentOnHover = false; - } - } - - public class MremoteDockPaneStripFactory : DockPanelExtender.IDockPaneStripFactory - { - public DockPaneStripBase CreateDockPaneStrip(DockPane pane) - { - return new DockPaneStripNG(pane); - } - } - - public class MremoteFloatWindowFactory : DockPanelExtender.IFloatWindowFactory - { - public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane, Rectangle bounds) - { - var activeDocumentBounds = (dockPanel?.ActiveDocument as ConnectionTab)?.Bounds; - - return new FloatWindowNG(dockPanel, pane, activeDocumentBounds ?? bounds); - } - - public FloatWindow CreateFloatWindow(DockPanel dockPanel, DockPane pane) - { - return new FloatWindowNG(dockPanel, pane); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Themes/ThemeInfo.cs b/mRemoteNG/Themes/ThemeInfo.cs deleted file mode 100644 index eb0f2445e..000000000 --- a/mRemoteNG/Themes/ThemeInfo.cs +++ /dev/null @@ -1,175 +0,0 @@ -using System; -using System.ComponentModel; -using System.Linq; -using WeifenLuo.WinFormsUI.Docking; - - -namespace mRemoteNG.Themes -{ - /// - /// - /// Container class for all the color and style elements to define a theme - /// - public class ThemeInfo : ICloneable - { - #region Private Variables - - private string _name; - private ThemeBase _theme; - private string _URI; - private VisualStudioToolStripExtender.VsVersion _version; - private ExtendedColorPalette _extendedPalette; - - #endregion - - #region Constructors - - public ThemeInfo(string themeName, - ThemeBase inTheme, - string inURI, - VisualStudioToolStripExtender.VsVersion inVersion, - ExtendedColorPalette inExtendedPalette) - { - _name = themeName; - _theme = inTheme; - _URI = inURI; - _version = inVersion; - _extendedPalette = inExtendedPalette; - IsThemeBase = false; - IsExtendable = false; - - if (_extendedPalette != null) - IsExtended = true; - - setCustomExtenders(); - } - - public ThemeInfo(string themeName, - ThemeBase inTheme, - string inURI, - VisualStudioToolStripExtender.VsVersion inVersion) - { - _name = themeName; - _theme = inTheme; - _URI = inURI; - _version = inVersion; - IsThemeBase = false; - IsExtendable = false; - IsExtended = false; - setCustomExtenders(); - } - - #endregion - - #region Public Methods - - public object Clone() - { - var extPalette = new ExtendedColorPalette - { - ExtColorPalette = - _extendedPalette.ExtColorPalette.ToDictionary(entry => entry.Key, entry => entry.Value), - DefaultColorPalette = _extendedPalette.DefaultColorPalette - }; - var clonedObj = new ThemeInfo(_name, _theme, _URI, _version, extPalette) - { - IsExtendable = IsExtendable, - IsThemeBase = IsThemeBase - }; - - return clonedObj; - } - - #endregion - - - #region Properties - - [Browsable(false)] - public string Name - { - get => _name; - set - { - if (string.Equals(_name, value, StringComparison.InvariantCulture)) - { - return; - } - - _name = value; - } - } - - public ThemeBase Theme - { - get => _theme; - set - { - if (value != null && _theme == value) - { - return; - } - - _theme = value; - setCustomExtenders(); - } - } - - public string URI - { - get => _URI; - set - { - if (value != null && _URI == value) - { - return; - } - - _URI = value; - } - } - - public VisualStudioToolStripExtender.VsVersion Version - { - get => _version; - set - { - if (Equals(_version, value)) - { - return; - } - - _version = value; - } - } - - public ExtendedColorPalette ExtendedPalette - { - get => _extendedPalette; - set - { - if (_extendedPalette != null && _extendedPalette == value) - { - return; - } - - _extendedPalette = value; - } - } - - public bool IsThemeBase { get; set; } - - public bool IsExtendable { get; set; } - - public bool IsExtended { get; private set; } - - #endregion - - //Custom extenders for mremote customizations in DPS - private void setCustomExtenders() - { - _theme.Extender.DockPaneStripFactory = new MremoteDockPaneStripFactory(); - _theme.Extender.FloatWindowFactory = new MremoteFloatWindowFactory(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Themes/ThemeManager.cs b/mRemoteNG/Themes/ThemeManager.cs deleted file mode 100644 index 4edbdaaa4..000000000 --- a/mRemoteNG/Themes/ThemeManager.cs +++ /dev/null @@ -1,351 +0,0 @@ -using mRemoteNG.App; -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Linq; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.Themes -{ - /// - /// Main class of the theming component. Centralizes creation, loading and deletion of themes - /// Implemented as a singleton - /// - public class ThemeManager - { - #region Private Variables - - private ThemeInfo _activeTheme; - private Hashtable themes; - private bool _themeActive; - private static ThemeManager themeInstance; - private readonly string themePath = App.Info.SettingsFileInfo.ThemeFolder; - - #endregion - - #region Constructors - - private ThemeManager() - { - LoadThemes(); - SetActive(); - _themeActive = true; - } - - private void SetActive() - { - if (themes[Settings.Default.ThemeName] != null) - ActiveTheme = (ThemeInfo)themes[Settings.Default.ThemeName]; - else - { - ActiveTheme = DefaultTheme; - if (string.IsNullOrEmpty(Settings.Default.ThemeName)) return; - - //too early for logging to be enabled... - Debug.WriteLine("Detected invalid Theme in settings file. Resetting to default."); - // if we got here, then there's an invalid theme name in use, so just empty it out... - Settings.Default.ThemeName = ""; - Settings.Default.Save(); - } - } - - #endregion - - #region Public Methods - - public static ThemeManager getInstance() - { - return themeInstance ?? (themeInstance = new ThemeManager()); - } - - - public ThemeInfo getTheme(string themeName) - { - if (themes[themeName] != null) - return (ThemeInfo)themes[themeName]; - return null; - } - - private bool ThemeDirExists() - { - //Load the files in theme folder first, to include vstheme light as default - if (themePath == null) return false; - try - { - //In install mode first time is necessary to copy the themes folder - if (!Directory.Exists(themePath)) - { - Directory.CreateDirectory(themePath); - } - - var orig = new DirectoryInfo(App.Info.SettingsFileInfo.InstalledThemeFolder); - var files = orig.GetFiles(); - foreach (var file in files) - { - if (!File.Exists(Path.Combine(themePath, file.Name))) - file.CopyTo(Path.Combine(themePath, file.Name), true); - } - - return Directory.Exists(themePath); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Error loading theme directory", ex); - } - - return false; - } - - private ThemeInfo LoadDefaultTheme() - { - try - { - if (ThemeDirExists()) - { - var defaultThemeURL = $"{themePath}\\vs2015light.vstheme"; - - if (!File.Exists($"{themePath}\\vs2015light.vstheme")) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "Could not find default theme file.", - true); - return null; - } - - //First we load the default base theme, its vs2015lightNG - //the true "default" in DockPanelSuite built-in VS2015LightTheme named "vs2015Light" - //hence the *NG suffix for this one... - var defaultTheme = ThemeSerializer.LoadFromXmlFile(defaultThemeURL); - defaultTheme.Name = $"{defaultTheme.Name}NG"; - return defaultTheme; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Error loading default theme", ex); - } - - return null; - } - - //The manager precharges all the themes at once - public List LoadThemes() - { - if (themes != null) return themes.Values.OfType().ToList(); - themes = new Hashtable(); - - if (themePath == null) return themes.Values.OfType().ToList(); - try - { - //Check that theme folder exist before trying to load themes - if (ThemeDirExists()) - { - var themeFiles = Directory.GetFiles(themePath, "*.vstheme"); - - //First we load the default base theme, its vs2015lightNG - var defaultTheme = LoadDefaultTheme(); - themes.Add(defaultTheme.Name, defaultTheme); - //Then the rest - foreach (var themeFile in themeFiles) - { - // Skip the default theme here, since it will get loaded again without the *NG below... - if (themeFile.Contains("vs2015light.vstheme")) continue; - //filter default one - var extTheme = ThemeSerializer.LoadFromXmlFile(themeFile, defaultTheme); - if (extTheme.Theme == null || themes.ContainsKey(extTheme.Name)) continue; - - if (extTheme.Name.Equals("darcula") || extTheme.Name.Equals("vs2015blue") || - extTheme.Name.Equals("vs2015dark")) - extTheme.Name = $"{extTheme.Name}NG"; - - themes.Add(extTheme.Name, extTheme); - } - - //Load the embedded themes, extended palettes are taken from the vs2015 themes, trying to match the color theme - - // 2012 - var vs2012Light = new ThemeInfo("vs2012Light", new VS2012LightTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2012, - ((ThemeInfo)themes["vs2015lightNG"]).ExtendedPalette); - themes.Add(vs2012Light.Name, vs2012Light); - var vs2012Dark = new ThemeInfo("vs2012Dark", new VS2012DarkTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2012, - ((ThemeInfo)themes["vs2015darkNG"]).ExtendedPalette); - themes.Add(vs2012Dark.Name, vs2012Dark); - var vs2012Blue = new ThemeInfo("vs2012Blue", new VS2012BlueTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2012, - ((ThemeInfo)themes["vs2015blueNG"]).ExtendedPalette); - themes.Add(vs2012Blue.Name, vs2012Blue); - - // 2013 - var vs2013Light = new ThemeInfo("vs2013Light", new VS2013LightTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2013, - ((ThemeInfo)themes["vs2015lightNG"]).ExtendedPalette); - themes.Add(vs2013Light.Name, vs2013Light); - var vs2013Dark = new ThemeInfo("vs2013Dark", new VS2013DarkTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2013, - ((ThemeInfo)themes["vs2015darkNG"]).ExtendedPalette); - themes.Add(vs2013Dark.Name, vs2013Dark); - var vs2013Blue = new ThemeInfo("vs2013Blue", new VS2013BlueTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2013, - ((ThemeInfo)themes["vs2015blueNG"]).ExtendedPalette); - themes.Add(vs2013Blue.Name, vs2013Blue); - - // 2015 - var vs2015Light = new ThemeInfo("vs2015Light", new VS2015LightTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2015, - ((ThemeInfo)themes["vs2015lightNG"]).ExtendedPalette); - themes.Add(vs2015Light.Name, vs2015Light); - var vs2015Dark = new ThemeInfo("vs2015Dark", new VS2015DarkTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2015, - ((ThemeInfo)themes["vs2015darkNG"]).ExtendedPalette); - themes.Add(vs2015Dark.Name, vs2015Dark); - var vs2015Blue = new ThemeInfo("vs2015Blue", new VS2015BlueTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2015, - ((ThemeInfo)themes["vs2015blueNG"]).ExtendedPalette); - themes.Add(vs2015Blue.Name, vs2015Blue); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Error loading themes", ex); - } - - return themes.Values.OfType().ToList(); - } - - /// - /// Add a new theme based on an existing one by cloning and renaming, the theme is saved to disk - /// - /// - /// - /// - public ThemeInfo addTheme(ThemeInfo baseTheme, string newThemeName) - { - if (themes.Contains(newThemeName)) return null; - var modifiedTheme = (ThemeInfo)baseTheme.Clone(); - modifiedTheme.Name = newThemeName; - modifiedTheme.IsExtendable = true; - modifiedTheme.IsThemeBase = false; - ThemeSerializer.SaveToXmlFile(modifiedTheme, baseTheme); - themes.Add(newThemeName, modifiedTheme); - return modifiedTheme; - } - - //Delete a theme from memory and disk - public void deleteTheme(ThemeInfo themeToDelete) - { - if (!themes.Contains(themeToDelete.Name)) return; - if (ActiveTheme == themeToDelete) - ActiveTheme = DefaultTheme; - themes.Remove(themeToDelete.Name); - ThemeSerializer.DeleteFile(themeToDelete); - } - - //Synchronize the theme XML values from memory to disk - public void updateTheme(ThemeInfo themeToUpdate) - { - ThemeSerializer.UpdateThemeXMLValues(themeToUpdate); - } - - //refresh the ui controls to reflect a theme change - public void refreshUI() - { - NotifyThemeChanged(this, new PropertyChangedEventArgs("")); - } - - //Verify if theme name is repeated or if the name is a valid file name - public bool isThemeNameOk(string name) - { - if (themes.Contains(name)) - return false; - var badChars = Path.GetInvalidFileNameChars(); - return name.IndexOfAny(badChars) == -1; - } - - #endregion - - #region Events - - public delegate void ThemeChangedEventHandler(); - - private ThemeChangedEventHandler ThemeChangedEvent; - - public event ThemeChangedEventHandler ThemeChanged - { - add => ThemeChangedEvent = (ThemeChangedEventHandler)Delegate.Combine(ThemeChangedEvent, value); - remove => ThemeChangedEvent = (ThemeChangedEventHandler)Delegate.Remove(ThemeChangedEvent, value); - } - - // ReSharper disable once UnusedParameter.Local - private void NotifyThemeChanged(object sender, PropertyChangedEventArgs e) - { - if (e.PropertyName == "Name") - { - return; - } - - ThemeChangedEvent?.Invoke(); - } - - #endregion - - #region Properties - - public bool ThemingActive - { - get => _themeActive; - set - { - if (themes.Count == 0) return; - _themeActive = value; - Settings.Default.ThemingActive = value; - NotifyThemeChanged(this, new PropertyChangedEventArgs("")); - } - } - - public ThemeInfo DefaultTheme => - themes != null && ThemesCount > 0 - ? (ThemeInfo)themes["vs2015Light"] - : new ThemeInfo("vs2015Light", new VS2015LightTheme(), "", - VisualStudioToolStripExtender.VsVersion.Vs2015); - - public ThemeInfo ActiveTheme - { - // default if themes are not enabled - get => ThemingActive == false ? DefaultTheme : _activeTheme; - set - { - // You can only enable theming if there are themes loaded - // Default accordingly... - if (value == null) - { - var changed = !Settings.Default.ThemeName.Equals(DefaultTheme.Name); - - Settings.Default.ThemeName = DefaultTheme.Name; - _activeTheme = DefaultTheme; - - if (changed) - NotifyThemeChanged(this, new PropertyChangedEventArgs("theme")); - - Settings.Default.Save(); - return; - } - - _activeTheme = value; - Settings.Default.ThemeName = value.Name; - NotifyThemeChanged(this, new PropertyChangedEventArgs("theme")); - } - } - - public bool ActiveAndExtended => ThemingActive && ActiveTheme.IsExtended; - - public int ThemesCount => themes.Count; - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Themes/ThemeSerializer.cs b/mRemoteNG/Themes/ThemeSerializer.cs deleted file mode 100644 index 345407086..000000000 --- a/mRemoteNG/Themes/ThemeSerializer.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System.IO; -using WeifenLuo.WinFormsUI.Docking; -using System.Linq; - -namespace mRemoteNG.Themes -{ - public static class ThemeSerializer - { - /// - /// Save the theme to file, name property is used as filename - /// The baseTheme is used as a template, by copy that file and rewrite the extpalette values - /// - /// - /// - public static void SaveToXmlFile(ThemeInfo themeToSave, ThemeInfo baseTheme) - { - var oldURI = baseTheme.URI; - var directoryName = Path.GetDirectoryName(oldURI); - var toSaveURI = directoryName + Path.DirectorySeparatorChar + themeToSave.Name + ".vstheme"; - File.Copy(baseTheme.URI, toSaveURI); - themeToSave.URI = toSaveURI; - } - - public static void DeleteFile(ThemeInfo themeToDelete) - { - File.Delete(themeToDelete.URI); - } - - /// - /// Takes a theme in memory and update the color values that the user might have changed - /// - /// - public static void UpdateThemeXMLValues(ThemeInfo themeToUpdate) - { - var bytesIn = File.ReadAllBytes(themeToUpdate.URI); - var manipulator = new MremoteNGPaletteManipulator(bytesIn, themeToUpdate.ExtendedPalette); - var bytesOut = manipulator.mergePalette(themeToUpdate.ExtendedPalette); - File.WriteAllBytes(themeToUpdate.URI, bytesOut); - } - - /// - /// Load a theme form an xml file - /// - /// - /// - /// - public static ThemeInfo LoadFromXmlFile(string filename, ThemeInfo defaultTheme = null) - { - var bytes = File.ReadAllBytes(filename); - //Load the dockpanel part - var themeBaseLoad = new MremoteNGThemeBase(bytes); - //Load the mremote part - //Cause we cannot default the theme for the default theme - var extColorLoader = new MremoteNGPaletteManipulator(bytes, defaultTheme?.ExtendedPalette); - var loadedTheme = new ThemeInfo(Path.GetFileNameWithoutExtension(filename), themeBaseLoad, filename, - VisualStudioToolStripExtender.VsVersion.Vs2015, extColorLoader.getColors()); - if (new[] {"darcula", "vs2015blue", "vs2015dark", "vs2015light"}.Contains( - Path - .GetFileNameWithoutExtension(filename)) - ) - { - loadedTheme.IsThemeBase = true; - } - - loadedTheme.IsExtendable = true; - return loadedTheme; - } - - /* - private static string EncodeColorName(Color color) - { - // best/simplest answer to converting to hex: http://stackoverflow.com/questions/12078942/how-to-convert-from-argb-to-hex-aarrggbb - return color.IsNamedColor ? color.Name : $"{color.A:X2}{color.R:X2}{color.G:X2}{color.B:X2}"; - } - - private static Color DecodeColorName(string name) - { - var regex = new System.Text.RegularExpressions.Regex("^[0-9a-fA-F]{8}$"); - return regex.Match(name).Success ? Color.FromArgb(Convert.ToInt32(name, 16)) : Color.FromName(name); - } - */ - } -} \ No newline at end of file diff --git a/mRemoteNG/Themes/darcula.vstheme b/mRemoteNG/Themes/darcula.vstheme deleted file mode 100644 index cd40e78bb..000000000 --- a/mRemoteNG/Themes/darcula.vstheme +++ /dev/null @@ -1,10233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Themes/vs2015blue.vstheme b/mRemoteNG/Themes/vs2015blue.vstheme deleted file mode 100644 index 5519df87f..000000000 --- a/mRemoteNG/Themes/vs2015blue.vstheme +++ /dev/null @@ -1,7733 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Themes/vs2015dark.vstheme b/mRemoteNG/Themes/vs2015dark.vstheme deleted file mode 100644 index 76bbd120a..000000000 --- a/mRemoteNG/Themes/vs2015dark.vstheme +++ /dev/null @@ -1,7729 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Themes/vs2015light.vstheme b/mRemoteNG/Themes/vs2015light.vstheme deleted file mode 100644 index 3c89ba73f..000000000 --- a/mRemoteNG/Themes/vs2015light.vstheme +++ /dev/null @@ -1,7760 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/Tools/ADhelper.cs b/mRemoteNG/Tools/ADhelper.cs deleted file mode 100644 index 88387b8e6..000000000 --- a/mRemoteNG/Tools/ADhelper.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections; -using System.DirectoryServices; -using System.Runtime.InteropServices; - -namespace mRemoteNG.Tools -{ - public class AdHelper - { - private DirectoryEntry _dEntry; - - public AdHelper(string domain) - { - Children = new Hashtable(); - Domain = domain; - } - - public Hashtable Children { get; } - - private string Domain { get; } - - public void GetChildEntries(string adPath = "") - { - _dEntry = adPath.Length <= 0 - ? Domain.Length <= 0 ? new DirectoryEntry() : new DirectoryEntry("LDAP://" + Domain) - : new DirectoryEntry(adPath); - try - { - foreach (DirectoryEntry child in _dEntry.Children) - Children.Add(child.Name, child.Path); - } - catch (COMException ex) - { - if (ex.Message.ToLower().Equals("the server is not operational")) - throw new Exception("Could not find AD Server", ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/Attributes/AttributeUsedInAllProtocolsExcept.cs b/mRemoteNG/Tools/Attributes/AttributeUsedInAllProtocolsExcept.cs deleted file mode 100644 index 917f50798..000000000 --- a/mRemoteNG/Tools/Attributes/AttributeUsedInAllProtocolsExcept.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Linq; -using mRemoteNG.Connection.Protocol; - -namespace mRemoteNG.Tools.Attributes -{ - public class AttributeUsedInAllProtocolsExcept : AttributeUsedInProtocol - { - public AttributeUsedInAllProtocolsExcept(params ProtocolType[] exceptions) - : base(Enum - .GetValues(typeof(ProtocolType)) - .Cast() - .Except(exceptions) - .ToArray()) - { - } - } -} diff --git a/mRemoteNG/Tools/Attributes/AttributeUsedInProtocol.cs b/mRemoteNG/Tools/Attributes/AttributeUsedInProtocol.cs deleted file mode 100644 index d40af7cb6..000000000 --- a/mRemoteNG/Tools/Attributes/AttributeUsedInProtocol.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using mRemoteNG.Connection.Protocol; - -namespace mRemoteNG.Tools.Attributes -{ - [AttributeUsage(AttributeTargets.Property)] - public class AttributeUsedInProtocol : Attribute - { - public ProtocolType[] SupportedProtocolTypes { get; } - - public AttributeUsedInProtocol(params ProtocolType[] supportedProtocolTypes) - { - SupportedProtocolTypes = supportedProtocolTypes; - } - } -} diff --git a/mRemoteNG/Tools/Authenticode.cs b/mRemoteNG/Tools/Authenticode.cs deleted file mode 100644 index 0a29a56fb..000000000 --- a/mRemoteNG/Tools/Authenticode.cs +++ /dev/null @@ -1,298 +0,0 @@ -#if !PORTABLE -using System; -using System.Windows.Forms; -using System.IO; -using System.Security.Cryptography.X509Certificates; -using System.Runtime.InteropServices; -using System.Security.Cryptography; -using System.Reflection; -using System.ComponentModel; -// ReSharper disable UnusedMember.Local -// ReSharper disable NotAccessedField.Local -// ReSharper disable UnusedAutoPropertyAccessor.Local -#pragma warning disable 414 -#pragma warning disable 169 - - -namespace mRemoteNG.Tools -{ - public class Authenticode - { - #region Public Methods - public Authenticode(string filePath) - { - FilePath = filePath; - } - - public StatusValue Verify() - { - var trustFileInfoPointer = default(IntPtr); - var trustDataPointer = default(IntPtr); - try - { - var fileInfo = new FileInfo(FilePath); - if (!fileInfo.Exists) - { - Status = StatusValue.FileNotExist; - return Status; - } - if (fileInfo.Length == 0) - { - Status = StatusValue.FileEmpty; - return Status; - } - - if (RequireThumbprintMatch) - { - if (string.IsNullOrEmpty(ThumbprintToMatch)) - { - Status = StatusValue.NoThumbprintToMatch; - return Status; - } - - var certificate2 = new X509Certificate2(X509Certificate.CreateFromSignedFile(FilePath)); - _thumbprint = certificate2.Thumbprint; - if (_thumbprint != ThumbprintToMatch) - { - Status = StatusValue.ThumbprintNotMatch; - return Status; - } - } - - var trustFileInfo = new NativeMethods.WINTRUST_FILE_INFO {pcwszFilePath = FilePath}; - trustFileInfoPointer = Marshal.AllocCoTaskMem(Marshal.SizeOf(trustFileInfo)); - Marshal.StructureToPtr(trustFileInfo, trustFileInfoPointer, false); - - var trustData = new NativeMethods.WINTRUST_DATA - { - dwUIChoice = (uint) Display, - fdwRevocationChecks = NativeMethods.WTD_REVOKE_WHOLECHAIN, - dwUnionChoice = NativeMethods.WTD_CHOICE_FILE, - pFile = trustFileInfoPointer, - dwStateAction = NativeMethods.WTD_STATEACTION_IGNORE, - dwProvFlags = NativeMethods.WTD_DISABLE_MD2_MD4, - dwUIContext = (uint) DisplayContext - }; - trustDataPointer = Marshal.AllocCoTaskMem(Marshal.SizeOf(trustData)); - Marshal.StructureToPtr(trustData, trustDataPointer, false); - - var windowHandle = DisplayParentForm?.Handle ?? IntPtr.Zero; - - _trustProviderErrorCode = - NativeMethods.WinVerifyTrust(windowHandle, NativeMethods.WINTRUST_ACTION_GENERIC_VERIFY_V2, trustDataPointer); - // ReSharper disable once SwitchStatementMissingSomeCases - switch (_trustProviderErrorCode) - { - case NativeMethods.TRUST_E_NOSIGNATURE: - Status = StatusValue.NoSignature; - break; - case NativeMethods.TRUST_E_SUBJECT_NOT_TRUSTED: - break; - - } - if (_trustProviderErrorCode != 0) - { - Status = StatusValue.TrustProviderError; - return Status; - } - - Status = StatusValue.Verified; - return Status; - } - catch (Exception ex) - { - - if (ex is CryptographicException) - { - var hResultProperty = - ex.GetType().GetProperty("HResult", BindingFlags.NonPublic | BindingFlags.Instance); - if (hResultProperty != null) - { - var hResult = Convert.ToInt32(hResultProperty.GetValue(ex, null)); - if (hResult == NativeMethods.CRYPT_E_NO_MATCH) - { - Status = StatusValue.NoSignature; - return Status; - } - } - } - - // other exception, or hResultProperty is null or is not CRYPT_E_NO_MATCH - Status = StatusValue.UnhandledException; - Exception = ex; - return Status; - } - finally - { - if (trustDataPointer != IntPtr.Zero) - { - Marshal.FreeCoTaskMem(trustDataPointer); - } - if (trustFileInfoPointer != IntPtr.Zero) - { - Marshal.FreeCoTaskMem(trustFileInfoPointer); - } - } - } - #endregion - - #region Public Properties - - private DisplayValue Display { get; set; } = DisplayValue.None; - - private DisplayContextValue DisplayContext {get; set;} - private Form DisplayParentForm {get; set;} - internal Exception Exception {get; private set;} - private string FilePath {get; set;} - internal bool RequireThumbprintMatch { get; set;} - - internal StatusValue Status { get; private set; } - - public string GetStatusMessage() - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (Status) - { - case StatusValue.Verified: - return "The file was verified successfully."; - case StatusValue.FileNotExist: - return "The specified file does not exist."; - case StatusValue.FileEmpty: - return "The specified file is empty."; - case StatusValue.NoSignature: - return "The specified file is not digitally signed."; - case StatusValue.NoThumbprintToMatch: - return "A thumbprint match is required but no thumbprint to match against was specified."; - case StatusValue.ThumbprintNotMatch: - /* (char)0x2260 == the "not equal to" symbol (which I cannot print in here without changing the encoding of the file) - * Fancy... - * - * "<>" is fiarly cryptic for non-programers - * So is "!=" - * "=/=" gets the job done, no? - * What about plain old English (or localized value): X is not equal to Y? - * :P - */ - return $"The thumbprint does not match. {_thumbprint} {(char) 0x2260} {ThumbprintToMatch}."; - case StatusValue.TrustProviderError: - var ex = new Win32Exception(_trustProviderErrorCode); - return $"The trust provider returned an error. {ex.Message}"; - case StatusValue.UnhandledException: - return $"An unhandled exception occurred. {Exception.Message}"; - default: - return "The status is unknown."; - } - } - - private string _thumbprint; - - internal string ThumbprintToMatch { get; set;} - - private int _trustProviderErrorCode; - - #endregion - - #region Public Enums - - private enum DisplayValue : uint - { - Unknown = 0, - All = NativeMethods.WTD_UI_ALL, - None = NativeMethods.WTD_UI_NONE, - NoBad = NativeMethods.WTD_UI_NOBAD, - NoGood = NativeMethods.WTD_UI_NOGOOD - } - - private enum DisplayContextValue : uint - { - Execute = NativeMethods.WTD_UICONTEXT_EXECUTE, - Install = NativeMethods.WTD_UICONTEXT_INSTALL - } - - public enum StatusValue - { - Unknown = 0, - Verified, - FileNotExist, - FileEmpty, - NoSignature, - NoThumbprintToMatch, - ThumbprintNotMatch, - TrustProviderError, - UnhandledException - } - #endregion - - #region Protected Classes - - private static class NativeMethods - { - // ReSharper disable InconsistentNaming - [DllImport("wintrust.dll", CharSet = CharSet.Auto, SetLastError = false)] - public static extern int WinVerifyTrust([In()]IntPtr hWnd, [In(), MarshalAs(UnmanagedType.LPStruct)]Guid pgActionOID, [In()]IntPtr pWVTData); - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public class WINTRUST_DATA - { - public WINTRUST_DATA() - { - cbStruct = (uint)Marshal.SizeOf(typeof(WINTRUST_DATA)); - } - - private uint cbStruct; - public IntPtr pPolicyCallbackData; - public IntPtr pSIPClientData; - public uint dwUIChoice; - public uint fdwRevocationChecks; - public uint dwUnionChoice; - public IntPtr pFile; - public uint dwStateAction; - public IntPtr hWVTStateData; - public IntPtr pwszURLReference; - public uint dwProvFlags; - public uint dwUIContext; - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - public class WINTRUST_FILE_INFO - { - public WINTRUST_FILE_INFO() - { - cbStruct = (uint)Marshal.SizeOf(typeof(WINTRUST_FILE_INFO)); - } - - private uint cbStruct; - [MarshalAs(UnmanagedType.LPTStr)]public string pcwszFilePath; - public IntPtr hFile; - public IntPtr pgKnownSubject; - } - - public const int CRYPT_E_NO_MATCH = unchecked ((int) 0x80092009); - - public const int TRUST_E_SUBJECT_NOT_TRUSTED = unchecked ((int) 0x800B0004); - public const int TRUST_E_NOSIGNATURE = unchecked ((int) 0x800B0100); - - public static readonly Guid WINTRUST_ACTION_GENERIC_VERIFY_V2 = - new Guid("{00AAC56B-CD44-11d0-8CC2-00C04FC295EE}"); - - public const uint WTD_CHOICE_FILE = 1; - public const uint WTD_DISABLE_MD2_MD4 = 0x2000; - public const uint WTD_REVOKE_WHOLECHAIN = 1; - - public const uint WTD_STATEACTION_IGNORE = 0x0; - public const uint WTD_STATEACTION_VERIFY = 0x1; - public const uint WTD_STATEACTION_CLOSE = 0x2; - - public const uint WTD_UI_ALL = 1; - public const uint WTD_UI_NONE = 2; - public const uint WTD_UI_NOBAD = 3; - public const uint WTD_UI_NOGOOD = 4; - - public const uint WTD_UICONTEXT_EXECUTE = 0; - public const uint WTD_UICONTEXT_INSTALL = 1; - // ReSharper restore InconsistentNaming - } - #endregion - } -} -#endif \ No newline at end of file diff --git a/mRemoteNG/Tools/Clipboard/IClipboard.cs b/mRemoteNG/Tools/Clipboard/IClipboard.cs deleted file mode 100644 index 6c1ea105f..000000000 --- a/mRemoteNG/Tools/Clipboard/IClipboard.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace mRemoteNG.Tools.Clipboard -{ - /// - /// An abstraction of an operating system clipboard where - /// data can be placed on and taken off the clipboard. - /// - public interface IClipboard - { - string GetText(); - void SetText(string text); - } -} diff --git a/mRemoteNG/Tools/Clipboard/WindowsClipboard.cs b/mRemoteNG/Tools/Clipboard/WindowsClipboard.cs deleted file mode 100644 index 00fdefe04..000000000 --- a/mRemoteNG/Tools/Clipboard/WindowsClipboard.cs +++ /dev/null @@ -1,14 +0,0 @@ -using WinClipboard = System.Windows.Forms.Clipboard; - -namespace mRemoteNG.Tools.Clipboard -{ - /// - /// Represents the Windows system clipboard - /// - public class WindowsClipboard : IClipboard - { - public string GetText() => WinClipboard.GetText(); - - public void SetText(string text) => WinClipboard.SetText(text); - } -} diff --git a/mRemoteNG/Tools/Cmdline/CmdArgumentsInterpreter.cs b/mRemoteNG/Tools/Cmdline/CmdArgumentsInterpreter.cs deleted file mode 100644 index da69f37b5..000000000 --- a/mRemoteNG/Tools/Cmdline/CmdArgumentsInterpreter.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.Text.RegularExpressions; -using mRemoteNG.App; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Tools.Cmdline -{ - // - //* Arguments class: application arguments interpreter - //* - //* Authors: R. LOPES - //* Contributors: R. LOPES - //* Created: 25 October 2002 - //* Modified: 28 October 2002 - //* - //* Version: 1.0 - // - public class CmdArgumentsInterpreter - { - private readonly StringDictionary _parameters; - - // Retrieve a parameter value if it exists - public string this[string param] => (_parameters[param]); - - public CmdArgumentsInterpreter(IEnumerable args) - { - _parameters = new StringDictionary(); - var spliter = new Regex("^-{1,2}|^/|=|:", RegexOptions.IgnoreCase | RegexOptions.Compiled); - var remover = new Regex("^[\'\"]?(.*?)[\'\"]?$", RegexOptions.IgnoreCase | RegexOptions.Compiled); - string parameter = null; - - // Valid parameters forms: - // {-,/,--}param{ ,=,:}((",')value(",')) - // Examples: -param1 value1 --param2 /param3:"Test-:-work" /param4=happy -param5 '--=nice=--' - - try - { - foreach (var txt in args) - { - // Look for new parameters (-,/ or --) and a possible enclosed value (=,:) - var Parts = spliter.Split(txt, 3); - switch (Parts.Length) - { - case 1: - // Found a value (for the last parameter found (space separator)) - if (parameter != null) - { - if (!_parameters.ContainsKey(parameter)) - { - Parts[0] = remover.Replace(Parts[0], "$1"); - _parameters.Add(parameter, Parts[0]); - } - - parameter = null; - } - - // else Error: no parameter waiting for a value (skipped) - break; - case 2: - // Found just a parameter - // The last parameter is still waiting. With no value, set it to true. - if (parameter != null) - { - if (!_parameters.ContainsKey(parameter)) - { - _parameters.Add(parameter, "true"); - } - } - - parameter = Parts[1]; - break; - case 3: - // Parameter with enclosed value - // The last parameter is still waiting. With no value, set it to true. - if (parameter != null) - { - if (!_parameters.ContainsKey(parameter)) - { - _parameters.Add(parameter, "true"); - } - } - - parameter = Parts[1]; - // Remove possible enclosing characters (",') - if (!_parameters.ContainsKey(parameter)) - { - Parts[2] = remover.Replace(Parts[2], "$1"); - _parameters.Add(parameter, Parts[2]); - } - - parameter = null; - break; - } - } - - // In case a parameter is still waiting - if (parameter == null) return; - if (!_parameters.ContainsKey(parameter)) - _parameters.Add(parameter, "true"); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("Creating new Args failed", ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/Cmdline/CommandLineArguments.cs b/mRemoteNG/Tools/Cmdline/CommandLineArguments.cs deleted file mode 100644 index 43d5589e4..000000000 --- a/mRemoteNG/Tools/Cmdline/CommandLineArguments.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; - -namespace mRemoteNG.Tools.Cmdline -{ - // Adapted from http://qntm.org/cmd - public class CommandLineArguments - { - protected List Arguments = new List(); - - public bool EscapeForShell { get; set; } - - #region Public Methods - - public void Add(string argument, bool forceQuotes = false) - { - Arguments.Add(new Argument(argument, false, forceQuotes)); - } - - public void Add(params string[] argumentArray) - { - foreach (var argument in argumentArray) - { - Add(argument); - } - } - - public void AddFileName(string fileName, bool forceQuotes = false) - { - Arguments.Add(new Argument(fileName, true, forceQuotes)); - } - - public override string ToString() - { - var argList = Arguments.Select(argument => ProcessArgument(argument, EscapeForShell)); - return string.Join(" ", argList.ToArray()); - } - - public static string PrefixFileName(string argument) - { - if (string.IsNullOrEmpty(argument)) - return argument; - - if (argument.StartsWith("-")) - argument = ".\\" + argument; - - return argument; - } - - public static string EscapeBackslashes(string argument) - { - if (string.IsNullOrEmpty(argument)) - { - return argument; - } - - // Sequence of backslashes followed by a double quote: - // double up all the backslashes and escape the double quote - return Regex.Replace(argument, "(\\\\*)\"", "$1$1\\\""); - } - - public static string EscapeBackslashesForTrailingQuote(string argument) - { - if (string.IsNullOrEmpty(argument)) - { - return argument; - } - - // Sequence of backslashes followed by the end of the string - // (which will become a double quote): - // double up all the backslashes - return Regex.Replace(argument, "(\\\\*)$", "$1$1"); - } - - public static string QuoteArgument(string argument, bool forceQuotes = false) - { - if (!forceQuotes && !string.IsNullOrEmpty(argument) && !argument.Contains(" ")) - { - return argument; - } - - return "\"" + EscapeBackslashesForTrailingQuote(argument) + "\""; - } - - public static string EscapeShellMetacharacters(string argument) - { - return string.IsNullOrEmpty(argument) ? argument : Regex.Replace(argument, "([()%!^\"<>&|])", "^$1"); - } - - #endregion - - #region Protected Methods - - protected static string ProcessArgument(Argument argument, bool escapeForShell = false) - { - var text = argument.Text; - - if (argument.IsFileName) - { - text = PrefixFileName(text); - } - - text = EscapeBackslashes(text); - text = QuoteArgument(text, argument.ForceQuotes); - if (escapeForShell) - { - text = EscapeShellMetacharacters(text); - } - - return text; - } - - #endregion - - #region Protected Classes - - protected class Argument - { - public Argument(string text, bool isFileName = false, bool forceQuotes = false) - { - Text = text; - IsFileName = isFileName; - ForceQuotes = forceQuotes; - } - - public string Text { get; set; } - public bool IsFileName { get; set; } - public bool ForceQuotes { get; set; } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/Cmdline/StartupArgumentsInterpreter.cs b/mRemoteNG/Tools/Cmdline/StartupArgumentsInterpreter.cs deleted file mode 100644 index f2cfc1e5c..000000000 --- a/mRemoteNG/Tools/Cmdline/StartupArgumentsInterpreter.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.IO; -using System.Windows.Forms; -using mRemoteNG.App.Info; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Tools.Cmdline -{ - public class StartupArgumentsInterpreter - { - private readonly MessageCollector _messageCollector; - - public StartupArgumentsInterpreter(MessageCollector messageCollector) - { - if (messageCollector == null) - throw new ArgumentNullException(nameof(messageCollector)); - - _messageCollector = messageCollector; - } - - public void ParseArguments(IEnumerable cmdlineArgs) - { - //if (!cmdlineArgs.Any()) return; - _messageCollector.AddMessage(MessageClass.DebugMsg, "Parsing cmdline arguments"); - - try - { - var args = new CmdArgumentsInterpreter(cmdlineArgs); - - ParseResetPositionArg(args); - ParseResetPanelsArg(args); - ParseResetToolbarArg(args); - ParseNoReconnectArg(args); - ParseCustomConnectionPathArg(args); - } - catch (Exception ex) - { - _messageCollector.AddExceptionMessage(Language.CommandLineArgsCouldNotBeParsed, ex, logOnly: false); - } - } - - private void ParseResetPositionArg(CmdArgumentsInterpreter args) - { - if (args["resetpos"] == null && args["rp"] == null && args["reset"] == null) return; - _messageCollector.AddMessage(MessageClass.DebugMsg, "Cmdline arg: Resetting window positions."); - Settings.Default.MainFormKiosk = false; - var newWidth = 900; - var newHeight = 600; - var newX = Screen.PrimaryScreen.WorkingArea.Width / 2 - newWidth / 2; - var newY = Screen.PrimaryScreen.WorkingArea.Height / 2 - newHeight / 2; - Settings.Default.MainFormLocation = new Point(newX, newY); - Settings.Default.MainFormSize = new Size(newWidth, newHeight); - Settings.Default.MainFormState = FormWindowState.Normal; - } - - private void ParseResetPanelsArg(CmdArgumentsInterpreter args) - { - if (args["resetpanels"] == null && args["rpnl"] == null && args["reset"] == null) return; - _messageCollector.AddMessage(MessageClass.DebugMsg, "Cmdline arg: Resetting panels"); - Settings.Default.ResetPanels = true; - } - - private void ParseResetToolbarArg(CmdArgumentsInterpreter args) - { - if (args["resettoolbar"] == null && args["rtbr"] == null && args["reset"] == null) return; - _messageCollector.AddMessage(MessageClass.DebugMsg, "Cmdline arg: Resetting toolbar position"); - Settings.Default.ResetToolbars = true; - } - - private void ParseNoReconnectArg(CmdArgumentsInterpreter args) - { - if (args["noreconnect"] == null && args["norc"] == null) return; - _messageCollector.AddMessage(MessageClass.DebugMsg, - "Cmdline arg: Disabling reconnection to previously connected hosts"); - Settings.Default.NoReconnect = true; - } - - private void ParseCustomConnectionPathArg(CmdArgumentsInterpreter args) - { - var consParam = ""; - if (args["cons"] != null) - consParam = "cons"; - if (args["c"] != null) - consParam = "c"; - - if (string.IsNullOrEmpty(consParam)) return; - _messageCollector.AddMessage(MessageClass.DebugMsg, "Cmdline arg: loading connections from a custom path"); - if (File.Exists(args[consParam]) == false) - { - if (File.Exists(Path.Combine(GeneralAppInfo.HomePath, args[consParam]))) - { - Settings.Default.LoadConsFromCustomLocation = true; - Settings.Default.CustomConsPath = Path.Combine(GeneralAppInfo.HomePath, args[consParam]); - return; - } - - if (!File.Exists(Path.Combine(ConnectionsFileInfo.DefaultConnectionsPath, args[consParam]))) return; - Settings.Default.LoadConsFromCustomLocation = true; - Settings.Default.CustomConsPath = - Path.Combine(ConnectionsFileInfo.DefaultConnectionsPath, args[consParam]); - } - else - { - Settings.Default.LoadConsFromCustomLocation = true; - Settings.Default.CustomConsPath = args[consParam]; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ConnectionsTreeToMenuItemsConverter.cs b/mRemoteNG/Tools/ConnectionsTreeToMenuItemsConverter.cs deleted file mode 100644 index 109d19952..000000000 --- a/mRemoteNG/Tools/ConnectionsTreeToMenuItemsConverter.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree; - - -namespace mRemoteNG.Tools -{ - public class ConnectionsTreeToMenuItemsConverter - { - public MouseEventHandler MouseUpEventHandler { get; set; } - - - public IEnumerable CreateToolStripDropDownItems(ConnectionTreeModel connectionTreeModel) - { - var rootNodes = connectionTreeModel.RootNodes; - return CreateToolStripDropDownItems(rootNodes); - } - - public IEnumerable CreateToolStripDropDownItems(IEnumerable nodes) - { - var dropDownList = new List(); - try - { - dropDownList.AddRange(nodes.Select(CreateMenuItem)); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("frmMain.AddNodeToMenu() failed", ex); - } - - return dropDownList; - } - - private void AddSubMenuNodes(IEnumerable nodes, ToolStripDropDownItem toolStripMenuItem) - { - foreach (var connectionInfo in nodes) - { - var newItem = CreateMenuItem(connectionInfo); - toolStripMenuItem.DropDownItems.Add(newItem); - } - } - - private ToolStripDropDownItem CreateMenuItem(ConnectionInfo node) - { - var menuItem = new ToolStripMenuItem - { - Text = node.Name, - Tag = node - }; - - var nodeAsContainer = node as ContainerInfo; - if (nodeAsContainer != null) - { - menuItem.Image = Properties.Resources.FolderClosed_16x; - menuItem.Tag = nodeAsContainer; - AddSubMenuNodes(nodeAsContainer.Children, menuItem); - } - else if (node.GetTreeNodeType() == TreeNodeType.PuttySession) - { - menuItem.Image = Properties.Resources.PuttySessions; - menuItem.Tag = node; - } - else if (node.GetTreeNodeType() == TreeNodeType.Connection) - { - menuItem.Image = node.OpenConnections.Count > 0 ? Properties.Resources.Run_16x : Properties.Resources.Stop_16x; - menuItem.Tag = node; - } - - menuItem.MouseUp += MouseUpEventHandler; - return menuItem; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/CustomCollections/CollectionUpdatedEventArgs.cs b/mRemoteNG/Tools/CustomCollections/CollectionUpdatedEventArgs.cs deleted file mode 100644 index e561ef623..000000000 --- a/mRemoteNG/Tools/CustomCollections/CollectionUpdatedEventArgs.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace mRemoteNG.Tools.CustomCollections -{ - public class CollectionUpdatedEventArgs : EventArgs - { - public IEnumerable ChangedItems { get; } - public ActionType Action { get; } - - public CollectionUpdatedEventArgs(ActionType action, IEnumerable changedItems) - { - if (changedItems == null) - throw new ArgumentNullException(nameof(changedItems)); - - Action = action; - ChangedItems = changedItems; - } - } - - public enum ActionType - { - Added, - Removed, - Updated - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/CustomCollections/FullyObservableCollection.cs b/mRemoteNG/Tools/CustomCollections/FullyObservableCollection.cs deleted file mode 100644 index c1b44ce4c..000000000 --- a/mRemoteNG/Tools/CustomCollections/FullyObservableCollection.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; - -namespace mRemoteNG.Tools.CustomCollections -{ - public class FullyObservableCollection : IFullyNotifiableList - where T : INotifyPropertyChanged - { - private readonly IList _list = new List(); - private bool _eventsAllowed; - - public int Count => _list.Count; - public bool IsReadOnly => _list.IsReadOnly; - - public T this[int index] - { - get => _list[index]; - set => _list[index] = value; - } - - public FullyObservableCollection() - { - } - - public FullyObservableCollection(IEnumerable items) - { - AddRange(items); - } - - public void Add(T item) - { - _list.Add(item); - SubscribeToChildEvents(item); - if (_eventsAllowed) - RaiseCollectionChangedEvent(ActionType.Added, new[] {item}); - } - - /// - /// Adds a range of items to the collection. - /// Only raises a single event - /// after all new items are added. - /// - /// - public void AddRange(IEnumerable items) - { - var itemsAsList = items.ToList(); - _eventsAllowed = false; - - foreach (var item in itemsAsList) - Add(item); - - _eventsAllowed = true; - RaiseCollectionChangedEvent(ActionType.Added, itemsAsList); - } - - public void Insert(int index, T item) - { - _list.Insert(index, item); - SubscribeToChildEvents(item); - RaiseCollectionChangedEvent(ActionType.Added, new[] {item}); - } - - public bool Remove(T item) - { - var worked = _list.Remove(item); - if (!worked) return worked; - UnsubscribeFromChildEvents(item); - RaiseCollectionChangedEvent(ActionType.Removed, new[] {item}); - return worked; - } - - public void RemoveAt(int index) - { - var item = _list[index]; - _list.RemoveAt(index); - UnsubscribeFromChildEvents(item); - RaiseCollectionChangedEvent(ActionType.Removed, new[] {item}); - } - - public void Clear() - { - var oldItems = _list.ToArray(); - _list.Clear(); - foreach (var item in oldItems) - UnsubscribeFromChildEvents(item); - RaiseCollectionChangedEvent(ActionType.Removed, oldItems); - } - - private void SubscribeToChildEvents(INotifyPropertyChanged item) - { - item.PropertyChanged += ItemOnPropertyChanged; - } - - private void UnsubscribeFromChildEvents(INotifyPropertyChanged item) - { - item.PropertyChanged -= ItemOnPropertyChanged; - } - - private void ItemOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs) - { - if (sender is T) - RaiseCollectionChangedEvent(ActionType.Updated, new[] {(T)sender}); - } - - public event EventHandler> CollectionUpdated; - - private void RaiseCollectionChangedEvent(ActionType action, IEnumerable changedItems) - { - CollectionUpdated?.Invoke(this, new CollectionUpdatedEventArgs(action, changedItems)); - } - - #region Forwarded method calls - - public int IndexOf(T item) => _list.IndexOf(item); - public IEnumerator GetEnumerator() => _list.GetEnumerator(); - IEnumerator IEnumerable.GetEnumerator() => _list.GetEnumerator(); - public bool Contains(T item) => _list.Contains(item); - public void CopyTo(T[] array, int arrayIndex) => _list.CopyTo(array, arrayIndex); - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/CustomCollections/IFullyNotifiableList.cs b/mRemoteNG/Tools/CustomCollections/IFullyNotifiableList.cs deleted file mode 100644 index 34d897359..000000000 --- a/mRemoteNG/Tools/CustomCollections/IFullyNotifiableList.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; - -namespace mRemoteNG.Tools.CustomCollections -{ - public interface IFullyNotifiableList : IList, INotifyCollectionUpdated - where T : INotifyPropertyChanged - { - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/CustomCollections/INotifyCollectionUpdated.cs b/mRemoteNG/Tools/CustomCollections/INotifyCollectionUpdated.cs deleted file mode 100644 index 34ded2220..000000000 --- a/mRemoteNG/Tools/CustomCollections/INotifyCollectionUpdated.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace mRemoteNG.Tools.CustomCollections -{ - public interface INotifyCollectionUpdated - { - event EventHandler> CollectionUpdated; - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/DisposableAction.cs b/mRemoteNG/Tools/DisposableAction.cs deleted file mode 100644 index 19f2f86b2..000000000 --- a/mRemoteNG/Tools/DisposableAction.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; - -namespace mRemoteNG.Tools -{ - /// - /// Represents an action that will be executed when the - /// method is called. Useful for creating Using blocks around logical start/end - /// actions. - /// - public class DisposableAction : IDisposable - { - private bool _isDisposed; - private readonly Action _disposeAction; - - /// - /// - /// - /// - /// An that should be performed immediately - /// when this object is initialized. It should return quickly. - /// - /// - /// An to be executed when this object is disposed. - /// - public DisposableAction(Action initializeAction, Action disposeAction) - { - initializeAction(); - _disposeAction = disposeAction; - } - - public void Dispose() - { - Dispose(true); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposing || _isDisposed) - return; - - _isDisposed = true; - _disposeAction(); - } - } -} diff --git a/mRemoteNG/Tools/DisposableOptional.cs b/mRemoteNG/Tools/DisposableOptional.cs deleted file mode 100644 index 371c83b76..000000000 --- a/mRemoteNG/Tools/DisposableOptional.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Linq; - -namespace mRemoteNG.Tools -{ - public class DisposableOptional : Optional, IDisposable - where T : IDisposable - { - public DisposableOptional(T value) - : base(value) - { - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - private void Dispose(bool disposing) - { - if (!disposing || !this.Any()) - return; - - this.First().Dispose(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/EnumWindows.cs b/mRemoteNG/Tools/EnumWindows.cs deleted file mode 100644 index d550fe130..000000000 --- a/mRemoteNG/Tools/EnumWindows.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Collections.Generic; -using System; -using System.Runtime.InteropServices; - -namespace mRemoteNG.Tools -{ - public class EnumWindows - { - public List EnumWindows_Renamed() - { - var handleList = new List(); - - HandleLists.Add(handleList); - var handleIndex = (IntPtr)HandleLists.IndexOf(handleList); - NativeMethods.EnumWindows(EnumCallback, handleIndex); - HandleLists.Remove(handleList); - - return handleList; - } - - public List EnumChildWindows(IntPtr hWndParent) - { - var handleList = new List(); - - HandleLists.Add(handleList); - var handleIndex = (IntPtr)HandleLists.IndexOf(handleList); - NativeMethods.EnumChildWindows(hWndParent, EnumCallback, handleIndex); - HandleLists.Remove(handleList); - - return handleList; - } - - private readonly List> HandleLists = new List>(); - - private bool EnumCallback(int hwnd, int lParam) - { - HandleLists[lParam].Add((IntPtr)hwnd); - return true; - } - - // ReSharper disable ClassNeverInstantiated.Local - private class NativeMethods - { - // ReSharper restore ClassNeverInstantiated.Local - - public delegate bool EnumWindowsProc(int hwnd, int lParam); - - [DllImport("user32", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] - public static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam); - - [DllImport("user32", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)] - public static extern bool EnumChildWindows(IntPtr hWndParent, EnumWindowsProc lpEnumFunc, IntPtr lParam); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/Extensions.cs b/mRemoteNG/Tools/Extensions.cs deleted file mode 100644 index 8f13b29ab..000000000 --- a/mRemoteNG/Tools/Extensions.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace mRemoteNG.Tools -{ - public static class Extensions - { - public static Optional Maybe(this T value) - { - return new Optional(value); - } - - public static Optional MaybeParse(this T value, Func parseFunc) - { - try - { - return new Optional(parseFunc(value)); - } - catch - { - return new Optional(); - } - } - - /// - /// Throws an if the given value is - /// null. Otherwise, return the value. - /// - /// - /// - /// - /// The name of the argument - /// - public static T ThrowIfNull(this T value, string argName) - { - if (value == null) - throw new ArgumentNullException(argName); - return value; - } - - /// - /// Throws an if the value - /// is null or an empty string. Otherwise, returns the value. - /// - /// - /// - public static string ThrowIfNullOrEmpty(this string value, string argName) - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentException("Value cannot be null or empty", argName); - return value; - } - - /// - /// Perform an action for each item in the given collection. The item - /// is the pass along the processing chain. - /// - /// - /// - /// - /// - public static IEnumerable ForEach(this IEnumerable collection, Action action) - { - collection = collection.ToList(); - - foreach (var item in collection) - action(item); - - return collection; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ExternalTool.cs b/mRemoteNG/Tools/ExternalTool.cs deleted file mode 100644 index 7133a9d99..000000000 --- a/mRemoteNG/Tools/ExternalTool.cs +++ /dev/null @@ -1,212 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Drawing; -using System.IO; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Messages; -using mRemoteNG.Resources.Language; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Tools -{ - public class ExternalTool : INotifyPropertyChanged - { - private string _displayName; - private string _fileName; - private bool _waitForExit; - private string _arguments; - private string _workingDir; - private bool _tryIntegrate; - private bool _showOnToolbar = true; - private bool _runElevated; - - #region Public Properties - - public string DisplayName - { - get => _displayName; - set => SetField(ref _displayName, value, nameof(DisplayName)); - } - - public string FileName - { - get => _fileName; - set => SetField(ref _fileName, value, nameof(FileName)); - } - - public bool WaitForExit - { - get => _waitForExit; - set - { - // WaitForExit cannot be turned on when TryIntegrate is true - if (TryIntegrate) - return; - SetField(ref _waitForExit, value, nameof(WaitForExit)); - } - } - - public string Arguments - { - get => _arguments; - set => SetField(ref _arguments, value, nameof(Arguments)); - } - - public string WorkingDir - { - get => _workingDir; - set => SetField(ref _workingDir, value, nameof(WorkingDir)); - } - - public bool TryIntegrate - { - get => _tryIntegrate; - set - { - // WaitForExit cannot be turned on when TryIntegrate is true - if (value) - WaitForExit = false; - SetField(ref _tryIntegrate, value, nameof(TryIntegrate)); - } - } - - public bool ShowOnToolbar - { - get => _showOnToolbar; - set => SetField(ref _showOnToolbar, value, nameof(ShowOnToolbar)); - } - - public bool RunElevated - { - get => _runElevated; - set => SetField(ref _runElevated, value, nameof(RunElevated)); - } - - public ConnectionInfo ConnectionInfo { get; set; } - - public Icon Icon => File.Exists(FileName) ? MiscTools.GetIconFromFile(FileName) : Properties.Resources.mRemoteNG_Icon; - - public Image Image => Icon?.ToBitmap() ?? Properties.Resources.mRemoteNG_Icon.ToBitmap(); - - #endregion - - public ExternalTool(string displayName = "", - string fileName = "", - string arguments = "", - string workingDir = "", - bool runElevated = false) - { - DisplayName = displayName; - FileName = fileName; - Arguments = arguments; - WorkingDir = workingDir; - RunElevated = runElevated; - } - - public void Start(ConnectionInfo startConnectionInfo = null) - { - try - { - if (string.IsNullOrEmpty(FileName)) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "ExternalApp.Start() failed: FileName cannot be blank."); - return; - } - - ConnectionInfo = startConnectionInfo; - if (startConnectionInfo is ContainerInfo container) - { - container.Children.ForEach(Start); - return; - } - - if (TryIntegrate) - StartIntegrated(); - else - StartExternalProcess(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("ExternalApp.Start() failed.", ex); - } - } - - private void StartExternalProcess() - { - var process = new Process(); - SetProcessProperties(process, ConnectionInfo); - process.Start(); - - if (WaitForExit) - { - process.WaitForExit(); - } - } - - private void SetProcessProperties(Process process, ConnectionInfo startConnectionInfo) - { - var argParser = new ExternalToolArgumentParser(startConnectionInfo); - process.StartInfo.UseShellExecute = true; - process.StartInfo.FileName = argParser.ParseArguments(FileName); - process.StartInfo.Arguments = argParser.ParseArguments(Arguments); - if (WorkingDir != "") process.StartInfo.WorkingDirectory = argParser.ParseArguments(WorkingDir); - if (RunElevated) process.StartInfo.Verb = "runas"; - } - - private void StartIntegrated() - { - try - { - var newConnectionInfo = BuildConnectionInfoForIntegratedApp(); - Runtime.ConnectionInitiator.OpenConnection(newConnectionInfo); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("ExternalApp.StartIntegrated() failed.", ex); - } - } - - private ConnectionInfo BuildConnectionInfoForIntegratedApp() - { - var newConnectionInfo = GetAppropriateInstanceOfConnectionInfo(); - SetConnectionInfoFields(newConnectionInfo); - return newConnectionInfo; - } - - private ConnectionInfo GetAppropriateInstanceOfConnectionInfo() - { - var newConnectionInfo = ConnectionInfo == null ? new ConnectionInfo() : ConnectionInfo.Clone(); - return newConnectionInfo; - } - - private void SetConnectionInfoFields(ConnectionInfo newConnectionInfo) - { - newConnectionInfo.Protocol = ProtocolType.IntApp; - newConnectionInfo.ExtApp = DisplayName; - newConnectionInfo.Name = DisplayName; - newConnectionInfo.Panel = Language._Tools; - } - - public event PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChangedEvent(object sender, string propertyName) - { - PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); - } - - protected bool SetField(ref T field, T value, string propertyName) - { - if (EqualityComparer.Default.Equals(field, value)) return false; - field = value; - RaisePropertyChangedEvent(this, propertyName); - return true; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ExternalToolArgumentParser.cs b/mRemoteNG/Tools/ExternalToolArgumentParser.cs deleted file mode 100644 index 88f83a45d..000000000 --- a/mRemoteNG/Tools/ExternalToolArgumentParser.cs +++ /dev/null @@ -1,263 +0,0 @@ -using System; -using System.Collections.Generic; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Properties; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools.Cmdline; - -namespace mRemoteNG.Tools -{ - public class ExternalToolArgumentParser - { - private readonly ConnectionInfo _connectionInfo; - - public ExternalToolArgumentParser(ConnectionInfo connectionInfo) - { - _connectionInfo = connectionInfo; - } - - public string ParseArguments(string input) - { - var replacements = BuildReplacementList(input); - var result = PerformReplacements(input, replacements); - return result; - } - - private List BuildReplacementList(string input) - { - var index = 0; - var replacements = new List(); - do - { - var tokenStart = input.IndexOf("%", index, StringComparison.InvariantCulture); - if (tokenStart == -1) - break; - - var tokenEnd = input.IndexOf("%", tokenStart + 1, StringComparison.InvariantCulture); - if (tokenEnd == -1) - break; - - var tokenLength = tokenEnd - tokenStart + 1; - var variableNameStart = tokenStart + 1; - var variableNameLength = tokenLength - 2; - var isEnvironmentVariable = false; - var variableName = ""; - - if (tokenStart > 0) - { - var tokenStartPrefix = input.Substring(tokenStart - 1, 1).ToCharArray()[0]; - var tokenEndPrefix = input.Substring(tokenEnd - 1, 1).ToCharArray()[0]; - - if (tokenStartPrefix == '\\' && tokenEndPrefix == '\\') - { - isEnvironmentVariable = true; - - // Add the first backslash to the token - tokenStart--; - tokenLength++; - - // Remove the last backslash from the name - variableNameLength--; - } - else if (tokenStartPrefix == '^' && tokenEndPrefix == '^') - { - // Add the first caret to the token - tokenStart--; - tokenLength++; - - // Remove the last caret from the name - variableNameLength--; - - variableName = input.Substring(variableNameStart, variableNameLength); - replacements.Add(new Replacement(tokenStart, tokenLength, $"%{variableName}%")); - - index = tokenEnd; - continue; - } - } - - var token = input.Substring(tokenStart, tokenLength); - - var escape = DetermineEscapeType(token); - - if (escape != EscapeType.All) - { - // Remove the escape character from the name - variableNameStart++; - variableNameLength--; - } - - if (variableNameLength == 0) - { - index = tokenEnd; - continue; - } - - variableName = input.Substring(variableNameStart, variableNameLength); - - var replacementValue = token; - if (!isEnvironmentVariable) - { - replacementValue = GetVariableReplacement(variableName, token); - } - - var haveReplacement = false; - - if (replacementValue != token) - { - haveReplacement = true; - } - else - { - replacementValue = Environment.GetEnvironmentVariable(variableName); - if (replacementValue != null) - haveReplacement = true; - } - - if (haveReplacement) - { - var trailing = tokenEnd + 2 <= input.Length - ? input.Substring(tokenEnd + 1, 1).ToCharArray()[0] - : '\0'; - - if (escape == EscapeType.All) - { - replacementValue = CommandLineArguments.EscapeBackslashes(replacementValue); - if (trailing == '\'') - replacementValue = CommandLineArguments.EscapeBackslashesForTrailingQuote(replacementValue); - } - - if (escape == EscapeType.All || escape == EscapeType.ShellMetacharacters) - replacementValue = CommandLineArguments.EscapeShellMetacharacters(replacementValue); - - replacements.Add(new Replacement(tokenStart, tokenLength, replacementValue)); - index = tokenEnd + 1; - } - else - { - index = tokenEnd; - } - } while (true); - - return replacements; - } - - private EscapeType DetermineEscapeType(string token) - { - var escape = EscapeType.All; - var prefix = token[1]; - switch (prefix) - { - case '-': - escape = EscapeType.ShellMetacharacters; - break; - case '!': - escape = EscapeType.None; - break; - } - - return escape; - } - - private string GetVariableReplacement(string variable, string original) - { - var replacement = ""; - if (_connectionInfo == null) return replacement; - switch (variable.ToLowerInvariant()) - { - case "name": - replacement = _connectionInfo.Name; - break; - case "hostname": - replacement = _connectionInfo.Hostname; - break; - case "port": - replacement = Convert.ToString(_connectionInfo.Port); - break; - case "username": - replacement = _connectionInfo.Username; - if (string.IsNullOrEmpty(replacement)) - if (Settings.Default.EmptyCredentials == "windows") - replacement = Environment.UserName; - else if (Settings.Default.EmptyCredentials == "custom") - replacement = Settings.Default.DefaultUsername; - break; - case "password": - replacement = _connectionInfo.Password; - if (string.IsNullOrEmpty(replacement) && Settings.Default.EmptyCredentials == "custom") - replacement = new LegacyRijndaelCryptographyProvider() - .Decrypt(Convert.ToString(Settings.Default.DefaultPassword), - Runtime.EncryptionKey); - break; - case "domain": - replacement = _connectionInfo.Domain; - if (string.IsNullOrEmpty(replacement)) - if (Settings.Default.EmptyCredentials == "windows") - replacement = Environment.UserDomainName; - else if (Settings.Default.EmptyCredentials == "custom") - replacement = Settings.Default.DefaultDomain; - break; - case "description": - replacement = _connectionInfo.Description; - break; - case "macaddress": - replacement = _connectionInfo.MacAddress; - break; - case "userfield": - replacement = _connectionInfo.UserField; - break; - default: - return original; - } - - return replacement; - } - - private string PerformReplacements(string input, List replacements) - { - int index; - var result = input; - - for (index = result.Length; index >= 0; index--) - { - foreach (var replacement in replacements) - { - if (replacement.Start != index) - { - continue; - } - - var before = result.Substring(0, replacement.Start); - var after = result.Substring(replacement.Start + replacement.Length); - result = before + replacement.Value + after; - } - } - - return result; - } - - private enum EscapeType - { - All, - ShellMetacharacters, - None - } - - private struct Replacement - { - public int Start { get; } - - public int Length { get; } - - public string Value { get; } - - public Replacement(int start, int length, string value) - { - Start = start; - Length = length; - Value = value; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ExternalToolsService.cs b/mRemoteNG/Tools/ExternalToolsService.cs deleted file mode 100644 index 5957da98c..000000000 --- a/mRemoteNG/Tools/ExternalToolsService.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Linq; -using mRemoteNG.Tools.CustomCollections; - -namespace mRemoteNG.Tools -{ - public class ExternalToolsService - { - public FullyObservableCollection ExternalTools { get; set; } = - new FullyObservableCollection(); - - public ExternalTool GetExtAppByName(string name) - { - return ExternalTools.FirstOrDefault(extA => extA.DisplayName == name); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ExternalToolsTypeConverter.cs b/mRemoteNG/Tools/ExternalToolsTypeConverter.cs deleted file mode 100644 index 4b1378e8d..000000000 --- a/mRemoteNG/Tools/ExternalToolsTypeConverter.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; - -namespace mRemoteNG.Tools -{ - public class ExternalToolsTypeConverter : StringConverter - { - public static string[] ExternalTools - { - get - { - var externalToolList = new List(); - - // Add a blank entry to signify that no external tool is selected - externalToolList.Add(string.Empty); - - foreach (var externalTool in App.Runtime.ExternalToolsService.ExternalTools) - { - externalToolList.Add(externalTool.DisplayName); - } - - return externalToolList.ToArray(); - } - } - - public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) - { - return new StandardValuesCollection(ExternalTools); - } - - public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context) - { - return true; - } - - public override bool GetStandardValuesSupported(ITypeDescriptorContext context) - { - return true; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/IeBrowserEmulation.cs b/mRemoteNG/Tools/IeBrowserEmulation.cs deleted file mode 100644 index 8e89d2c01..000000000 --- a/mRemoteNG/Tools/IeBrowserEmulation.cs +++ /dev/null @@ -1,253 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Security.AccessControl; -using Microsoft.Win32; -using mRemoteNG.App; - -namespace mRemoteNG.Tools -{ - public class IeBrowserEmulation - { - // found this here: - // http://www.neowin.net/forum/topic/1077469-vbnet-webbrowser-control-does-not-load-javascript/#comment-596755046 - - private static void SetBrowserFeatureControlKey(string feature, string appName, uint value) - { - if (Environment.Is64BitOperatingSystem) - { - using (var key = Registry.CurrentUser.CreateSubKey( - string - .Concat("Software\\Wow6432Node\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", - feature), - RegistryKeyPermissionCheck.ReadWriteSubTree)) - { - key?.SetValue(appName, value, RegistryValueKind.DWord); - } - } - - - using (var key = Registry.CurrentUser.CreateSubKey( - string - .Concat("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", - feature), - RegistryKeyPermissionCheck.ReadWriteSubTree)) - { - key?.SetValue(appName, value, RegistryValueKind.DWord); - } - } - -#if PORTABLE - private static void DeleteBrowserFeatureControlKey(string feature, string appName) - { - if (Environment.Is64BitOperatingSystem) - { - using (var key = Registry.CurrentUser.OpenSubKey( - string - .Concat("Software\\Wow6432Node\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", - feature), - RegistryKeyPermissionCheck.ReadWriteSubTree)) - { - if (key?.GetValueNames().Contains(appName) ?? false) - key.DeleteValue(appName); - } - } - - - using (var key = Registry.CurrentUser.CreateSubKey( - string - .Concat("Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\", - feature), - RegistryKeyPermissionCheck.ReadWriteSubTree)) - { - if (key?.GetValueNames().Contains(appName) ?? false) - key.DeleteValue(appName); - } - } -#endif - - private static void SetBrowserFeatureControl() - { - // http://msdn.microsoft.com/en-us/library/ee330720(v=vs.85).aspx - - // FeatureControl settings are per-process - var fileName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName); - - // make sure the control is not running inside Visual Studio Designer - if (string.Compare(fileName, "devenv.exe", StringComparison.OrdinalIgnoreCase) == 0 || - string.Compare(fileName, "XDesProc.exe", StringComparison.OrdinalIgnoreCase) == 0) - { - return; - } - - SetBrowserFeatureControlKey("FEATURE_BROWSER_EMULATION", fileName, GetBrowserEmulationMode()); - // Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. - SetBrowserFeatureControlKey("FEATURE_AJAX_CONNECTIONEVENTS", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_ENABLE_CLIPCHILDREN_OPTIMIZATION", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_MANAGE_SCRIPT_CIRCULAR_REFS", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_DOMSTORAGE", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_GPU_RENDERING", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI", fileName, 0); - SetBrowserFeatureControlKey("FEATURE_DISABLE_LEGACY_COMPRESSION", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_LOCALMACHINE_LOCKDOWN", fileName, 0); - SetBrowserFeatureControlKey("FEATURE_BLOCK_LMZ_OBJECT", fileName, 0); - SetBrowserFeatureControlKey("FEATURE_BLOCK_LMZ_SCRIPT", fileName, 0); - SetBrowserFeatureControlKey("FEATURE_DISABLE_NAVIGATION_SOUNDS", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_SCRIPTURL_MITIGATION", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_SPELLCHECKING", fileName, 0); - SetBrowserFeatureControlKey("FEATURE_STATUS_BAR_THROTTLING", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_TABBED_BROWSING", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_VALIDATE_NAVIGATE_URL", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_WEBOC_DOCUMENT_ZOOM", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_WEBOC_POPUPMANAGEMENT", fileName, 0); - SetBrowserFeatureControlKey("FEATURE_WEBOC_MOVESIZECHILD", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_ADDON_MANAGEMENT", fileName, 0); - SetBrowserFeatureControlKey("FEATURE_WEBSOCKET", fileName, 1); - SetBrowserFeatureControlKey("FEATURE_WINDOW_RESTRICTIONS", fileName, 0); - SetBrowserFeatureControlKey("FEATURE_XMLHTTP", fileName, 1); - } - -#if PORTABLE - private static void DeleteBrowserFeatureControl() - { - // http://msdn.microsoft.com/en-us/library/ee330720(v=vs.85).aspx - - // FeatureControl settings are per-process - var fileName = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName); - - // make sure the control is not running inside Visual Studio Designer - if (string.Compare(fileName, "devenv.exe", StringComparison.OrdinalIgnoreCase) == 0 || - string.Compare(fileName, "XDesProc.exe", StringComparison.OrdinalIgnoreCase) == 0) - { - return; - } - - DeleteBrowserFeatureControlKey("FEATURE_BROWSER_EMULATION", fileName); - // Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. - DeleteBrowserFeatureControlKey("FEATURE_AJAX_CONNECTIONEVENTS", fileName); - DeleteBrowserFeatureControlKey("FEATURE_ENABLE_CLIPCHILDREN_OPTIMIZATION", fileName); - DeleteBrowserFeatureControlKey("FEATURE_MANAGE_SCRIPT_CIRCULAR_REFS", fileName); - DeleteBrowserFeatureControlKey("FEATURE_DOMSTORAGE", fileName); - DeleteBrowserFeatureControlKey("FEATURE_GPU_RENDERING", fileName); - DeleteBrowserFeatureControlKey("FEATURE_IVIEWOBJECTDRAW_DMLT9_WITH_GDI", fileName); - DeleteBrowserFeatureControlKey("FEATURE_DISABLE_LEGACY_COMPRESSION", fileName); - DeleteBrowserFeatureControlKey("FEATURE_LOCALMACHINE_LOCKDOWN", fileName); - DeleteBrowserFeatureControlKey("FEATURE_BLOCK_LMZ_OBJECT", fileName); - DeleteBrowserFeatureControlKey("FEATURE_BLOCK_LMZ_SCRIPT", fileName); - DeleteBrowserFeatureControlKey("FEATURE_DISABLE_NAVIGATION_SOUNDS", fileName); - DeleteBrowserFeatureControlKey("FEATURE_SCRIPTURL_MITIGATION", fileName); - DeleteBrowserFeatureControlKey("FEATURE_SPELLCHECKING", fileName); - DeleteBrowserFeatureControlKey("FEATURE_STATUS_BAR_THROTTLING", fileName); - DeleteBrowserFeatureControlKey("FEATURE_TABBED_BROWSING", fileName); - DeleteBrowserFeatureControlKey("FEATURE_VALIDATE_NAVIGATE_URL", fileName); - DeleteBrowserFeatureControlKey("FEATURE_WEBOC_DOCUMENT_ZOOM", fileName); - DeleteBrowserFeatureControlKey("FEATURE_WEBOC_POPUPMANAGEMENT", fileName); - DeleteBrowserFeatureControlKey("FEATURE_WEBOC_MOVESIZECHILD", fileName); - DeleteBrowserFeatureControlKey("FEATURE_ADDON_MANAGEMENT", fileName); - DeleteBrowserFeatureControlKey("FEATURE_WEBSOCKET", fileName); - DeleteBrowserFeatureControlKey("FEATURE_WINDOW_RESTRICTIONS", fileName); - DeleteBrowserFeatureControlKey("FEATURE_XMLHTTP", fileName); - } -#endif - - private static uint GetBrowserEmulationMode() - { - // https://msdn.microsoft.com/en-us/library/ee330730%28v=vs.85%29.aspx - - var browserVersion = 9; - // default to IE9. - - using (var ieKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Internet Explorer", - RegistryKeyPermissionCheck.ReadSubTree, - RegistryRights.QueryValues)) - { - if (ieKey != null) - { - var version = ieKey.GetValue("svcVersion"); - if (null == version) - { - version = ieKey.GetValue("Version"); - if (version == null) - { - throw new ApplicationException("Microsoft Internet Explorer is required!"); - } - } - - int.TryParse(version.ToString().Split('.')[0], out browserVersion); - } - } - - uint mode; - - switch (browserVersion) - { - // https://support.microsoft.com/en-us/lifecycle#gp/Microsoft-Internet-Explorer - // IE 7 & 8 are basically not supported any more... -#if OLD_BROWSERS - // Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control. - case 7: - mode = 7000; - break; - - // Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8 - case 8: - mode = 8000; - break; -#endif - // Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9. - case 9: - mode = 9000; - break; - - // Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10. - case 10: - mode = 10000; - break; - - // IE11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 edge mode. Default value for IE11. - case 11: - mode = 11000; - break; - - default: - // use IE9 mode by default - mode = 9000; - break; - } - - return mode; - } - - public static void Register() - { - try - { - SetBrowserFeatureControl(); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionMessage("IeBrowserEmulation.Register() failed.", ex); - } - } - - - public static void Unregister() - { -#if PORTABLE - try - { - DeleteBrowserFeatureControl(); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionMessage("IeBrowserEmulation.Unregister() failed.", ex); - } -#endif - } - - private IeBrowserEmulation() - { - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/MiscTools.cs b/mRemoteNG/Tools/MiscTools.cs deleted file mode 100644 index 2e0f508ab..000000000 --- a/mRemoteNG/Tools/MiscTools.cs +++ /dev/null @@ -1,245 +0,0 @@ -using System; -using System.ComponentModel; -using System.Data.SqlTypes; -using System.Drawing; -using System.Drawing.Imaging; -using System.Globalization; -using System.IO; -using System.Security; -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.UI.Forms; -using MySql.Data.Types; -using mRemoteNG.Resources.Language; -using static System.String; - -namespace mRemoteNG.Tools -{ - public static class MiscTools - { - public static Icon GetIconFromFile(string FileName) - { - try - { - return File.Exists(FileName) == false ? null : Icon.ExtractAssociatedIcon(FileName); - } - catch (ArgumentException AEx) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "GetIconFromFile failed (Tools.Misc) - using default icon" + - Environment.NewLine + AEx.Message, - true); - return Properties.Resources.mRemoteNG_Icon; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "GetIconFromFile failed (Tools.Misc)" + Environment.NewLine + - ex.Message, true); - return null; - } - } - - public static Optional PasswordDialog(string passwordName = null, bool verify = true) - { - var splash = FrmSplashScreen.getInstance(); - if (!splash.IsDisposed && splash.Visible) - splash.Close(); - - var passwordForm = new FrmPassword(passwordName, verify); - return passwordForm.GetKey(); - } - - public static string LeadingZero(string Number) - { - if (Convert.ToInt32(Number) < 10) - { - return "0" + Number; - } - - return Number; - } - - - public static string DBDate(DateTime Dt) - { - switch (Settings.Default.SQLServerType) - { - case "mysql": - return Dt.ToString("yyyy/MM/dd HH:mm:ss"); - case "mssql": - default: - return Dt.ToString("yyyyMMdd HH:mm:ss"); - } - } - - public static Type DBTimeStampType() - { - switch (Settings.Default.SQLServerType) - { - case "mysql": - return typeof(MySqlDateTime); - case "mssql": - default: - return typeof(SqlDateTime); - } - } - - public static object DBTimeStampNow() - { - switch (Settings.Default.SQLServerType) - { - case "mysql": - return new MySqlDateTime(DateTime.Now); - case "mssql": - default: - return DateTime.Now; - } - } - - public static string PrepareValueForDB(string Text) - { - return Text.Replace("\'", "\'\'"); - } - - public static string GetExceptionMessageRecursive(Exception ex) - { - return GetExceptionMessageRecursive(ex, Environment.NewLine); - } - - private static string GetExceptionMessageRecursive(Exception ex, string separator) - { - var message = ex.Message; - if (ex.InnerException == null) return message; - var innerMessage = GetExceptionMessageRecursive(ex.InnerException, separator); - message = Join(separator, message, innerMessage); - return message; - } - - - public static Image TakeScreenshot(UI.Tabs.ConnectionTab sender) - { - try - { - if (sender != null) - { - var bmp = new Bitmap(sender.Width, sender.Height, PixelFormat.Format32bppRgb); - Graphics g = Graphics.FromImage(bmp); - g.CopyFromScreen(sender.PointToScreen(Point.Empty), Point.Empty, bmp.Size, - CopyPixelOperation.SourceCopy); - return bmp; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Taking Screenshot failed", ex); - } - - return null; - } - - public class EnumTypeConverter : EnumConverter - { - private readonly Type _enumType; - - public EnumTypeConverter(Type type) : base(type) - { - _enumType = type; - } - - public override bool CanConvertTo(ITypeDescriptorContext context, Type destType) - { - return destType == typeof(string); - } - - public override object ConvertTo(ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destType) - { - if (value == null) return null; - var fi = _enumType.GetField(Enum.GetName(_enumType, value)); - var dna = (DescriptionAttribute)Attribute.GetCustomAttribute(fi, typeof(DescriptionAttribute)); - - return dna != null ? dna.Description : value.ToString(); - } - - public override bool CanConvertFrom(ITypeDescriptorContext context, Type srcType) - { - return srcType == typeof(string); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - foreach (var fi in _enumType.GetFields()) - { - var dna = (DescriptionAttribute)Attribute.GetCustomAttribute(fi, typeof(DescriptionAttribute)); - - if (dna != null && (string)value == dna.Description) - { - return Enum.Parse(_enumType, fi.Name); - } - } - - return value != null ? Enum.Parse(_enumType, (string)value) : null; - } - } - - public class YesNoTypeConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType); - } - - public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) - { - return destinationType == typeof(string) || base.CanConvertTo(context, destinationType); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - if (!(value is string)) return base.ConvertFrom(context, culture, value); - if (string.Equals(value.ToString(), Language.Yes, StringComparison.CurrentCultureIgnoreCase)) - { - return true; - } - - if (string.Equals(value.ToString(), Language.No, StringComparison.CurrentCultureIgnoreCase)) - { - return false; - } - - throw new Exception("Values must be \"Yes\" or \"No\""); - } - - public override object ConvertTo(ITypeDescriptorContext context, - CultureInfo culture, - object value, - Type destinationType) - { - if (destinationType == typeof(string)) - { - return Convert.ToBoolean(value) ? Language.Yes : Language.No; - } - - return base.ConvertTo(context, culture, value, destinationType); - } - - public override bool GetStandardValuesSupported(ITypeDescriptorContext context) - { - return true; - } - - public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) - { - bool[] bools = {true, false}; - - var svc = new StandardValuesCollection(bools); - - return svc; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/MouseClickSimulator.cs b/mRemoteNG/Tools/MouseClickSimulator.cs deleted file mode 100644 index d0b702269..000000000 --- a/mRemoteNG/Tools/MouseClickSimulator.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.App; - -namespace mRemoteNG.Tools -{ - public class MouseClickSimulator - { - public static void Click(Control controlToClick, Point currentMousePosition) - { - // Simulate a mouse event since one wasn't generated by Windows - var clientMousePosition = controlToClick.PointToClient(currentMousePosition); - var tempWLow = clientMousePosition.X; - var tempWHigh = clientMousePosition.Y; - NativeMethods.SendMessage(controlToClick.Handle, NativeMethods.WM_LBUTTONDOWN, - (IntPtr)NativeMethods.MK_LBUTTON, - (IntPtr)NativeMethods.MAKELPARAM(ref tempWLow, ref tempWHigh)); - clientMousePosition.X = tempWLow; - clientMousePosition.Y = tempWHigh; - controlToClick.Focus(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/NotificationAreaIcon.cs b/mRemoteNG/Tools/NotificationAreaIcon.cs deleted file mode 100644 index 13e67989e..000000000 --- a/mRemoteNG/Tools/NotificationAreaIcon.cs +++ /dev/null @@ -1,139 +0,0 @@ -using System; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Properties; -using mRemoteNG.UI.Forms; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Tools -{ - public class NotificationAreaIcon - { - private readonly NotifyIcon _nI; - private readonly ContextMenuStrip _cMen; - private readonly ToolStripMenuItem _cMenCons; - private static readonly FrmMain FrmMain = FrmMain.Default; - - public bool Disposed { get; private set; } - - public NotificationAreaIcon() - { - try - { - _cMenCons = new ToolStripMenuItem - { - Text = Language.Connections, - Image = Properties.Resources.ASPWebSite_16x - }; - - var cMenSep1 = new ToolStripSeparator(); - - var cMenExit = new ToolStripMenuItem {Text = Language.Exit}; - cMenExit.Click += cMenExit_Click; - - _cMen = new ContextMenuStrip - { - Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, Convert.ToByte(0)), - RenderMode = ToolStripRenderMode.Professional - }; - _cMen.Items.AddRange(new ToolStripItem[] {_cMenCons, cMenSep1, cMenExit}); - - _nI = new NotifyIcon - { - Text = @"mRemoteNG", - BalloonTipText = @"mRemoteNG", - Icon = Properties.Resources.mRemoteNG_Icon, - ContextMenuStrip = _cMen, - Visible = true - }; - - _nI.MouseClick += nI_MouseClick; - _nI.MouseDoubleClick += nI_MouseDoubleClick; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Creating new SysTrayIcon failed", ex); - } - } - - public void Dispose() - { - try - { - _nI.Visible = false; - _nI.Dispose(); - _cMen.Dispose(); - Disposed = true; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Disposing SysTrayIcon failed", ex); - } - } - - private void nI_MouseClick(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Right) return; - _cMenCons.DropDownItems.Clear(); - var menuItemsConverter = new ConnectionsTreeToMenuItemsConverter - { - MouseUpEventHandler = ConMenItem_MouseUp - }; - - // ReSharper disable once CoVariantArrayConversion - ToolStripItem[] rootMenuItems = menuItemsConverter - .CreateToolStripDropDownItems(Runtime.ConnectionsService - .ConnectionTreeModel).ToArray(); - _cMenCons.DropDownItems.AddRange(rootMenuItems); - } - - private static void nI_MouseDoubleClick(object sender, MouseEventArgs e) - { - if (FrmMain.Visible) - { - HideForm(); - FrmMain.ShowInTaskbar = false; - } - else - { - ShowForm(); - FrmMain.ShowInTaskbar = true; - } - } - - private static void ShowForm() - { - FrmMain.Show(); - FrmMain.WindowState = FrmMain.PreviousWindowState; - - if (Settings.Default.ShowSystemTrayIcon) return; - Runtime.NotificationAreaIcon.Dispose(); - Runtime.NotificationAreaIcon = null; - } - - private static void HideForm() - { - FrmMain.Hide(); - FrmMain.PreviousWindowState = FrmMain.WindowState; - } - - private void ConMenItem_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) return; - if (((ToolStripMenuItem)sender).Tag is ContainerInfo) return; - if (FrmMain.Visible == false) - ShowForm(); - Runtime.ConnectionInitiator.OpenConnection((ConnectionInfo)((ToolStripMenuItem)sender).Tag); - } - - private static void cMenExit_Click(object sender, EventArgs e) - { - Shutdown.Quit(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/Optional.cs b/mRemoteNG/Tools/Optional.cs deleted file mode 100644 index 2d0c83eb6..000000000 --- a/mRemoteNG/Tools/Optional.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; - -namespace mRemoteNG.Tools -{ - /// - /// Represents a type that may or may not have been assigned a value. - /// A strongly typed collection that contains either 0 or 1 values. - /// - /// The underlying type that may or may not have a value - public class Optional : IEnumerable, IComparable> - { - private readonly T[] _optional; - - /// - /// Create a new empty instance of Optional - /// - public Optional() - { - _optional = new T[0]; - } - - /// - /// Create a new instance of Optional from the given value. - /// If the value is null, the Optional will be empty - /// - public Optional(T value) - { - _optional = value != null - ? new[] {value} - : new T[0]; - } - - public override string ToString() - { - return _optional.Any() ? _optional.First().ToString() : ""; - } - - public static implicit operator Optional(T value) - { - return new Optional(value); - } - - public static Optional FromNullable(TOut? value) where TOut : struct - { - return value.HasValue - ? new Optional(value.Value) - : new Optional(); - } - - /// - /// Returns an empty - /// - public static Optional Empty => new Optional(); - - #region IEnumerable - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - public IEnumerator GetEnumerator() - { - return ((IEnumerable)_optional).GetEnumerator(); - } - - #endregion - - #region IComparable - - /// - /// Compares this to another instance - /// of the same type. For purposes of comparison, empty Optional - /// objects are treated like Null and will be valued lower than - /// an Optional that contains a value. If both Optionals contain - /// values, the values are compared directly. - /// - /// - public int CompareTo(Optional other) - { - var otherHasAnything = other.Any(); - var thisHasAnything = _optional.Length > 0; - - // both are empty, equivalent value - if (!thisHasAnything && !otherHasAnything) - return 0; - // we are empty, they are greater value - if (!thisHasAnything) - return -1; - // they are empty, we are greater value - if (!otherHasAnything) - return 1; - // neither are empty, compare wrapped objects directly - if (_optional[0] is IComparable) - return ((IComparable)_optional[0]).CompareTo(other.First()); - - throw new ArgumentException(string.Format( - "Cannot compare objects. Optional type {0} is not comparable to itself", - typeof(T).FullName)); - } - - #endregion - - #region Override Equals and GetHashCode - - public override bool Equals(object obj) - { - if (ReferenceEquals(this, obj)) - return true; - - var objAsOptional = obj as Optional; - if (objAsOptional != null) - return Equals(objAsOptional); - - if (obj is T) - Equals((T)obj); - - return false; - } - - public bool Equals(Optional other) - { - var otherObj = other.FirstOrDefault(); - var thisObj = _optional.FirstOrDefault(); - if (thisObj == null && otherObj == null) - return true; - if (thisObj == null) - return false; - return thisObj.Equals(otherObj); - } - - public override int GetHashCode() - { - return _optional != null - ? _optional.GetHashCode() - : 0; - } - - #endregion - - #region Operators - - public static bool operator ==(Optional left, Optional right) - { - return Equals(left, right); - } - - public static bool operator !=(Optional left, Optional right) - { - return !Equals(left, right); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/PortScanner.cs b/mRemoteNG/Tools/PortScanner.cs deleted file mode 100644 index 212c426a3..000000000 --- a/mRemoteNG/Tools/PortScanner.cs +++ /dev/null @@ -1,365 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Net; -using System.Net.NetworkInformation; -using System.Net.Sockets; -using System.Threading; -using mRemoteNG.App; -using mRemoteNG.Messages; - - -namespace mRemoteNG.Tools -{ - public class PortScanner - { - private readonly List _ipAddresses = new List(); - private readonly List _ports = new List(); - private Thread _scanThread; - private readonly List _scannedHosts = new List(); - private readonly int _timeoutInMilliseconds; - - #region Public Methods - - public PortScanner(IPAddress ipAddress1, - IPAddress ipAddress2, - int port1, - int port2, - int timeoutInMilliseconds = 5000, - bool checkDefaultPortsOnly = false) - { - var ipAddressStart = IpAddressMin(ipAddress1, ipAddress2); - var ipAddressEnd = IpAddressMax(ipAddress1, ipAddress2); - - var portStart = Math.Min(port1, port2); - var portEnd = Math.Max(port1, port2); - - // if only one port was specified, just scan the one port... - if (portStart == 0) - portStart = portEnd; - - if (timeoutInMilliseconds < 0) - throw new ArgumentOutOfRangeException(nameof(timeoutInMilliseconds)); - - _timeoutInMilliseconds = timeoutInMilliseconds; - _ports.Clear(); - - if (checkDefaultPortsOnly) - _ports.AddRange(new[] - { - ScanHost.SshPort, ScanHost.TelnetPort, ScanHost.HttpPort, ScanHost.HttpsPort, ScanHost.RloginPort, - ScanHost.RdpPort, ScanHost.VncPort - }); - else - { - for (var port = portStart; port <= portEnd; port++) - { - _ports.Add(port); - } - } - - _ipAddresses.Clear(); - _ipAddresses.AddRange(IpAddressArrayFromRange(ipAddressStart, ipAddressEnd)); - - _scannedHosts.Clear(); - } - - public void StartScan() - { - _scanThread = new Thread(ScanAsync); - _scanThread.SetApartmentState(ApartmentState.STA); - _scanThread.IsBackground = true; - _scanThread.Start(); - } - - public void StopScan() - { - foreach (var p in _pings) - { - p.SendAsyncCancel(); - } - - _scanThread.Abort(); - } - - public static bool IsPortOpen(string hostname, string port) - { - try - { - var tcpClient = new TcpClient(hostname, Convert.ToInt32(port)); - tcpClient.Close(); - return true; - } - catch (Exception) - { - return false; - } - } - - #endregion - - #region Private Methods - - private int _hostCount; - private readonly List _pings = new List(); - - private void ScanAsync() - { - try - { - _hostCount = 0; - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Tools.PortScan: Starting scan of {_ipAddresses.Count} hosts...", - true); - foreach (var ipAddress in _ipAddresses) - { - RaiseBeginHostScanEvent(ipAddress); - - var pingSender = new Ping(); - _pings.Add(pingSender); - - try - { - pingSender.PingCompleted += PingSender_PingCompleted; - pingSender.SendAsync(ipAddress, _timeoutInMilliseconds, ipAddress); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - $"Tools.PortScan: Ping failed for {ipAddress} {Environment.NewLine} {ex.Message}", - true); - } - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - $"StartScanBG failed (Tools.PortScan) {Environment.NewLine} {ex.Message}", - true); - } - } - - /* Some examples found here: - * http://stackoverflow.com/questions/2114266/convert-ping-application-to-multithreaded-version-to-increase-speed-c-sharp - */ - private void PingSender_PingCompleted(object sender, PingCompletedEventArgs e) - { - // used for clean up later... - var p = (Ping)sender; - - // UserState is the IP Address - var ip = e.UserState.ToString(); - var scanHost = new ScanHost(ip); - _hostCount++; - - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Tools.PortScan: Scanning {_hostCount} of {_ipAddresses.Count} hosts: {scanHost.HostIp}", - true); - - - if (e.Cancelled) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Tools.PortScan: CANCELLED host: {scanHost.HostIp}", true); - // cleanup - p.PingCompleted -= PingSender_PingCompleted; - p.Dispose(); - return; - } - - if (e.Error != null) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Ping failed to {e.UserState} {Environment.NewLine} {e.Error.Message}", - true); - scanHost.ClosedPorts.AddRange(_ports); - scanHost.SetAllProtocols(false); - } - else if (e.Reply.Status == IPStatus.Success) - { - /* ping was successful, try to resolve the hostname */ - try - { - scanHost.HostName = Dns.GetHostEntry(scanHost.HostIp).HostName; - } - catch (Exception dnsex) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Tools.PortScan: Could not resolve {scanHost.HostIp} {Environment.NewLine} {dnsex.Message}", - true); - } - - if (string.IsNullOrEmpty(scanHost.HostName)) - { - scanHost.HostName = scanHost.HostIp; - } - - foreach (var port in _ports) - { - bool isPortOpen; - try - { - var tcpClient = new TcpClient(ip, port); - isPortOpen = true; - scanHost.OpenPorts.Add(port); - tcpClient.Close(); - } - catch (Exception) - { - isPortOpen = false; - scanHost.ClosedPorts.Add(port); - } - - if (port == ScanHost.SshPort) - { - scanHost.Ssh = isPortOpen; - } - else if (port == ScanHost.TelnetPort) - { - scanHost.Telnet = isPortOpen; - } - else if (port == ScanHost.HttpPort) - { - scanHost.Http = isPortOpen; - } - else if (port == ScanHost.HttpsPort) - { - scanHost.Https = isPortOpen; - } - else if (port == ScanHost.RloginPort) - { - scanHost.Rlogin = isPortOpen; - } - else if (port == ScanHost.RdpPort) - { - scanHost.Rdp = isPortOpen; - } - else if (port == ScanHost.VncPort) - { - scanHost.Vnc = isPortOpen; - } - } - } - else if (e.Reply.Status != IPStatus.Success) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Ping did not complete to {e.UserState} : {e.Reply.Status}", true); - scanHost.ClosedPorts.AddRange(_ports); - scanHost.SetAllProtocols(false); - } - - // cleanup - p.PingCompleted -= PingSender_PingCompleted; - p.Dispose(); - - var h = string.IsNullOrEmpty(scanHost.HostName) ? "HostNameNotFound" : scanHost.HostName; - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Tools.PortScan: Scan of {scanHost.HostIp} ({h}) complete.", true); - - _scannedHosts.Add(scanHost); - RaiseHostScannedEvent(scanHost, _hostCount, _ipAddresses.Count); - - if (_scannedHosts.Count == _ipAddresses.Count) - RaiseScanCompleteEvent(_scannedHosts); - } - - private static IEnumerable IpAddressArrayFromRange(IPAddress ipAddress1, IPAddress ipAddress2) - { - var startIpAddress = IpAddressMin(ipAddress1, ipAddress2); - var endIpAddress = IpAddressMax(ipAddress1, ipAddress2); - - var startAddress = IpAddressToInt32(startIpAddress); - var endAddress = IpAddressToInt32(endIpAddress); - var addressCount = endAddress - startAddress; - - var addressArray = new IPAddress[addressCount + 1]; - var index = 0; - for (var address = startAddress; address <= endAddress; address++) - { - addressArray[index] = IpAddressFromInt32(address); - index++; - } - - return addressArray; - } - - private static IPAddress IpAddressMin(IPAddress ipAddress1, IPAddress ipAddress2) - { - return IpAddressCompare(ipAddress1, ipAddress2) < 0 ? ipAddress1 : ipAddress2; - } - - private static IPAddress IpAddressMax(IPAddress ipAddress1, IPAddress ipAddress2) - { - return IpAddressCompare(ipAddress1, ipAddress2) > 0 ? ipAddress1 : ipAddress2; - } - - private static int IpAddressCompare(IPAddress ipAddress1, IPAddress ipAddress2) - { - return IpAddressToInt32(ipAddress1) - IpAddressToInt32(ipAddress2); - } - - private static int IpAddressToInt32(IPAddress ipAddress) - { - if (ipAddress.AddressFamily != AddressFamily.InterNetwork) - { - throw (new ArgumentException("ipAddress")); - } - - var addressBytes = ipAddress.GetAddressBytes(); // in network order (big-endian) - if (BitConverter.IsLittleEndian) - { - Array.Reverse(addressBytes); // to host order (little-endian) - } - - Debug.Assert(addressBytes.Length == 4); - - return BitConverter.ToInt32(addressBytes, 0); - } - - private static IPAddress IpAddressFromInt32(int ipAddress) - { - var addressBytes = BitConverter.GetBytes(ipAddress); // in host order - if (BitConverter.IsLittleEndian) - { - Array.Reverse(addressBytes); // to network order (big-endian) - } - - Debug.Assert(addressBytes.Length == 4); - - return new IPAddress(addressBytes); - } - - #endregion - - #region Events - - public delegate void BeginHostScanEventHandler(string host); - - public event BeginHostScanEventHandler BeginHostScan; - - private void RaiseBeginHostScanEvent(IPAddress ipAddress) - { - BeginHostScan?.Invoke(ipAddress.ToString()); - } - - public delegate void HostScannedEventHandler(ScanHost scanHost, int scannedHostCount, int totalHostCount); - - public event HostScannedEventHandler HostScanned; - - private void RaiseHostScannedEvent(ScanHost scanHost, int scannedHostCount, int totalHostCount) - { - HostScanned?.Invoke(scanHost, scannedHostCount, totalHostCount); - } - - public delegate void ScanCompleteEventHandler(List hosts); - - public event ScanCompleteEventHandler ScanComplete; - - private void RaiseScanCompleteEvent(List hosts) - { - ScanComplete?.Invoke(hosts); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ProcessController.cs b/mRemoteNG/Tools/ProcessController.cs deleted file mode 100644 index 57915b4b5..000000000 --- a/mRemoteNG/Tools/ProcessController.cs +++ /dev/null @@ -1,184 +0,0 @@ -using System.Collections.Generic; -using System; -using System.Diagnostics; -using System.Text; -using mRemoteNG.App; -using mRemoteNG.Properties; -using mRemoteNG.Tools.Cmdline; - -namespace mRemoteNG.Tools -{ - public class ProcessController : IDisposable - { - #region Public Methods - - public bool Start(string fileName, CommandLineArguments arguments = null) - { - Process.StartInfo.UseShellExecute = false; - Process.StartInfo.FileName = fileName; - if (arguments != null) - Process.StartInfo.Arguments = arguments.ToString(); - - if (!Process.Start()) - return false; - GetMainWindowHandle(); - - return true; - } - - public bool SetControlVisible(string className, string text, bool visible = true) - { - if (Process == null || Process.HasExited) - return false; - if (Handle == IntPtr.Zero) - return false; - - var controlHandle = GetControlHandle(className, text); - if (controlHandle == IntPtr.Zero) - return false; - - var nCmdShow = visible ? NativeMethods.SW_SHOW : NativeMethods.SW_HIDE; - NativeMethods.ShowWindow(controlHandle, (int)nCmdShow); - return true; - } - - public bool SetControlText(string className, string oldText, string newText) - { - if (Process == null || Process.HasExited || Handle == IntPtr.Zero) - return false; - - var controlHandle = GetControlHandle(className, oldText); - if (controlHandle == IntPtr.Zero) - return false; - - var result = NativeMethods.SendMessage(controlHandle, NativeMethods.WM_SETTEXT, (IntPtr)0, - new StringBuilder(newText)); - return result.ToInt32() == NativeMethods.TRUE; - } - - public bool SelectListBoxItem(string itemText) - { - if (Process == null || Process.HasExited || Handle == IntPtr.Zero) - return false; - - var listBoxHandle = GetControlHandle("ListBox"); - if (listBoxHandle == IntPtr.Zero) - return false; - - var result = NativeMethods.SendMessage(listBoxHandle, NativeMethods.LB_SELECTSTRING, (IntPtr)(-1), - new StringBuilder(itemText)); - return result.ToInt32() != NativeMethods.LB_ERR; - } - - public bool ClickButton(string text) - { - if (Process == null || Process.HasExited || Handle == IntPtr.Zero) - return false; - - var buttonHandle = GetControlHandle("Button", text); - if (buttonHandle == IntPtr.Zero) - return false; - - var buttonControlId = NativeMethods.GetDlgCtrlID(buttonHandle); - NativeMethods.SendMessage(Handle, NativeMethods.WM_COMMAND, (IntPtr)buttonControlId, buttonHandle); - - return true; - } - - public void WaitForExit() - { - if (Process == null || Process.HasExited) - return; - Process.WaitForExit(); - } - - #endregion - - #region Protected Fields - - private readonly Process Process = new Process(); - private IntPtr Handle = IntPtr.Zero; - private List Controls = new List(); - - #endregion - - #region Protected Methods - - // ReSharper disable once UnusedMethodReturnValue.Local - private IntPtr GetMainWindowHandle() - { - if (Process == null || Process.HasExited) - return IntPtr.Zero; - - Process.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000); - - Handle = IntPtr.Zero; - var startTicks = Environment.TickCount; - while (Handle == IntPtr.Zero && - Environment.TickCount < startTicks + (Settings.Default.MaxPuttyWaitTime * 1000)) - { - Process.Refresh(); - Handle = Process.MainWindowHandle; - if (Handle == IntPtr.Zero) - { - System.Threading.Thread.Sleep(0); - } - } - - return Handle; - } - - private IntPtr GetControlHandle(string className, string text = "") - { - if (Process == null || Process.HasExited || Handle == IntPtr.Zero) - return IntPtr.Zero; - - if (Controls.Count == 0) - { - var windowEnumerator = new EnumWindows(); - Controls = windowEnumerator.EnumChildWindows(Handle); - } - - var stringBuilder = new StringBuilder(); - var controlHandle = IntPtr.Zero; - foreach (var control in Controls) - { - NativeMethods.GetClassName(control, stringBuilder, stringBuilder.Capacity); - if (stringBuilder.ToString() != className) continue; - if (string.IsNullOrEmpty(text)) - { - controlHandle = control; - break; - } - else - { - NativeMethods.SendMessage(control, NativeMethods.WM_GETTEXT, new IntPtr(stringBuilder.Capacity), - stringBuilder); - if (stringBuilder.ToString() != text) continue; - controlHandle = control; - break; - } - } - - return controlHandle; - } - - #endregion - - private void Dispose(bool disposing) - { - if (!disposing) return; - - if(Process != null) - Process.Dispose(); - - Handle = IntPtr.Zero; - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/PropertyGridCommandSite.cs b/mRemoteNG/Tools/PropertyGridCommandSite.cs deleted file mode 100644 index 8dfb7043c..000000000 --- a/mRemoteNG/Tools/PropertyGridCommandSite.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using System.ComponentModel; -using System.ComponentModel.Design; -using System.Reflection; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Tools -{ - public class PropertyGridCommandSite : IMenuCommandService, ISite - { - private readonly object TheObject; - - public PropertyGridCommandSite(object @object) - { - TheObject = @object; - } - - public DesignerVerbCollection Verbs - { - get - { - var objectVerbs = new DesignerVerbCollection(); - // ReSharper disable VBPossibleMistakenCallToGetType.2 - var methods = TheObject.GetType().GetMethods(BindingFlags.Public | BindingFlags.Instance); - // ReSharper restore VBPossibleMistakenCallToGetType.2 - foreach (var method in methods) - { - var commandAttributes = method.GetCustomAttributes(typeof(CommandAttribute), true); - if (commandAttributes.Length == 0) - { - continue; - } - - var commandAttribute = (CommandAttribute)commandAttributes[0]; - if (!commandAttribute.Command) - { - continue; - } - - var displayName = method.Name; - var displayNameAttributes = method.GetCustomAttributes(typeof(DisplayNameAttribute), true); - if (displayNameAttributes.Length != 0) - { - var displayNameAttribute = (DisplayNameAttribute)displayNameAttributes[0]; - if (!string.IsNullOrEmpty(displayNameAttribute.DisplayName)) - { - displayName = displayNameAttribute.DisplayName; - } - } - - objectVerbs.Add(new DesignerVerb(displayName, new EventHandler(VerbEventHandler))); - } - - return objectVerbs; - } - } - - private void VerbEventHandler(object sender, EventArgs e) - { - var verb = sender as DesignerVerb; - if (verb == null) - { - return; - } - - // ReSharper disable VBPossibleMistakenCallToGetType.2 - var methods = TheObject.GetType().GetMethods(BindingFlags.Public | BindingFlags.Instance); - // ReSharper restore VBPossibleMistakenCallToGetType.2 - foreach (var method in methods) - { - var commandAttributes = method.GetCustomAttributes(typeof(CommandAttribute), true); - if (commandAttributes.Length == 0) - { - continue; - } - - var commandAttribute = (CommandAttribute)commandAttributes[0]; - if (!commandAttribute.Command) - { - continue; - } - - var displayName = method.Name; - var displayNameAttributes = method.GetCustomAttributes(typeof(DisplayNameAttribute), true); - if (displayNameAttributes.Length != 0) - { - var displayNameAttribute = (DisplayNameAttribute)displayNameAttributes[0]; - if (!string.IsNullOrEmpty(displayNameAttribute.DisplayName)) - { - displayName = displayNameAttribute.DisplayName; - } - } - - if (verb.Text != displayName) continue; - method.Invoke(TheObject, null); - return; - } - } - - public object GetService(Type serviceType) - { - return serviceType == typeof(IMenuCommandService) ? this : null; - } - - public IComponent Component => throw new NotSupportedException(); - - public IContainer Container => null; - - public bool DesignMode => true; - - public string Name - { - get => throw new NotSupportedException(); - set => throw new NotSupportedException(); - } - - public void AddCommand(MenuCommand command) - { - throw new NotSupportedException(); - } - - public void AddVerb(DesignerVerb verb) - { - throw new NotSupportedException(); - } - - public MenuCommand FindCommand(CommandID commandId) - { - throw new NotSupportedException(); - } - - public bool GlobalInvoke(CommandID commandId) - { - throw new NotSupportedException(); - } - - public void RemoveCommand(MenuCommand command) - { - throw new NotSupportedException(); - } - - public void RemoveVerb(DesignerVerb verb) - { - throw new NotSupportedException(); - } - - public void ShowContextMenu(CommandID menuId, int x, int y) - { - throw new NotSupportedException(); - } - } - - public class CommandAttribute : Attribute - { - public bool Command { get; set; } - - public CommandAttribute(bool isCommand = true) - { - Command = isCommand; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/PuttyProcessController.cs b/mRemoteNG/Tools/PuttyProcessController.cs deleted file mode 100644 index 43e1be15c..000000000 --- a/mRemoteNG/Tools/PuttyProcessController.cs +++ /dev/null @@ -1,16 +0,0 @@ -using mRemoteNG.Properties; -using mRemoteNG.Tools.Cmdline; - -namespace mRemoteNG.Tools -{ - public class PuttyProcessController : ProcessController - { - public bool Start(CommandLineArguments arguments = null) - { - var filename = Settings.Default.UseCustomPuttyPath - ? Settings.Default.CustomPuttyPath - : App.Info.GeneralAppInfo.PuttyPath; - return Start(filename, arguments); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/PuttyTypeDetector.cs b/mRemoteNG/Tools/PuttyTypeDetector.cs deleted file mode 100644 index 37e173f3c..000000000 --- a/mRemoteNG/Tools/PuttyTypeDetector.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using System.Diagnostics; -using mRemoteNG.Connection.Protocol; -using System.IO; - -namespace mRemoteNG.Tools -{ - public class PuttyTypeDetector - { - public static PuttyType GetPuttyType() - { - return GetPuttyType(PuttyBase.PuttyPath); - } - - public static PuttyType GetPuttyType(string filename) - { - if (IsPuttyNg(filename)) - { - return PuttyType.PuttyNg; - } - - if (IsKitty(filename)) - { - return PuttyType.Kitty; - } - - if (IsXming(filename)) - { - return PuttyType.Xming; - } - - // Check this last - if (IsPutty(filename)) - { - return PuttyType.Putty; - } - - return PuttyType.Unknown; - } - - private static bool IsPutty(string filename) - { - return !string.IsNullOrEmpty(filename) && File.Exists(filename) && - Convert.ToBoolean(FileVersionInfo.GetVersionInfo(filename).InternalName.Contains("PuTTY")); - } - - private static bool IsPuttyNg(string filename) - { - return !string.IsNullOrEmpty(filename) && File.Exists(filename) && - Convert.ToBoolean(FileVersionInfo.GetVersionInfo(filename).InternalName.Contains("PuTTYNG")); - } - - private static bool IsKitty(string filename) - { - return !string.IsNullOrEmpty(filename) && File.Exists(filename) && Convert.ToBoolean( - FileVersionInfo - .GetVersionInfo(filename) - .InternalName - .Contains("PuTTY") && - FileVersionInfo - .GetVersionInfo(filename) - .Comments - .Contains("KiTTY")); - } - - private static bool IsXming(string filename) - { - return !string.IsNullOrEmpty(filename) && File.Exists(filename) && Convert.ToBoolean( - FileVersionInfo - .GetVersionInfo(filename) - .InternalName - .Contains("PuTTY") && - FileVersionInfo - .GetVersionInfo(filename) - .ProductVersion - .Contains("Xming")); - } - - public enum PuttyType - { - Unknown = 0, - Putty, - PuttyNg, - Kitty, - Xming - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ReconnectGroup.Designer.cs b/mRemoteNG/Tools/ReconnectGroup.Designer.cs deleted file mode 100644 index 2166207c4..000000000 --- a/mRemoteNG/Tools/ReconnectGroup.Designer.cs +++ /dev/null @@ -1,139 +0,0 @@ -using mRemoteNG.UI.Controls; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Tools -{ - public partial class ReconnectGroup : System.Windows.Forms.UserControl - { - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()] - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.grpAutomaticReconnect = new System.Windows.Forms.GroupBox(); - this.lblAnimation = new mRemoteNG.UI.Controls.MrngLabel(); - this.btnClose = new MrngButton(); - this.lblServerStatus = new mRemoteNG.UI.Controls.MrngLabel(); - this.chkReconnectWhenReady = new MrngCheckBox(); - this.pbServerStatus = new System.Windows.Forms.PictureBox(); - this.tmrAnimation = new System.Windows.Forms.Timer(this.components); - this.grpAutomaticReconnect.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbServerStatus)).BeginInit(); - this.SuspendLayout(); - // - // grpAutomaticReconnect - // - this.grpAutomaticReconnect.BackColor = System.Drawing.Color.White; - this.grpAutomaticReconnect.Controls.Add(this.lblAnimation); - this.grpAutomaticReconnect.Controls.Add(this.btnClose); - this.grpAutomaticReconnect.Controls.Add(this.lblServerStatus); - this.grpAutomaticReconnect.Controls.Add(this.chkReconnectWhenReady); - this.grpAutomaticReconnect.Controls.Add(this.pbServerStatus); - this.grpAutomaticReconnect.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.grpAutomaticReconnect.Location = new System.Drawing.Point(3, 0); - this.grpAutomaticReconnect.Name = "grpAutomaticReconnect"; - this.grpAutomaticReconnect.Size = new System.Drawing.Size(171, 98); - this.grpAutomaticReconnect.TabIndex = 8; - this.grpAutomaticReconnect.TabStop = false; - this.grpAutomaticReconnect.Text = "Automatic Reconnect"; - // - // lblAnimation - // - this.lblAnimation.Location = new System.Drawing.Point(124, 22); - this.lblAnimation.Name = "lblAnimation"; - this.lblAnimation.Size = new System.Drawing.Size(32, 17); - this.lblAnimation.TabIndex = 8; - // - // btnClose - // - this.btnClose._mice = MrngButton.MouseState.HOVER; - this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnClose.Location = new System.Drawing.Point(6, 67); - this.btnClose.Name = "btnClose"; - this.btnClose.Size = new System.Drawing.Size(159, 23); - this.btnClose.TabIndex = 7; - this.btnClose.Text = Language._Close; - this.btnClose.UseVisualStyleBackColor = true; - this.btnClose.Click += new System.EventHandler(this.btnClose_Click); - // - // lblServerStatus - // - this.lblServerStatus.AutoSize = true; - this.lblServerStatus.Location = new System.Drawing.Point(15, 24); - this.lblServerStatus.Name = "lblServerStatus"; - this.lblServerStatus.Size = new System.Drawing.Size(76, 13); - this.lblServerStatus.TabIndex = 3; - this.lblServerStatus.Text = "Server Status:"; - // - // chkReconnectWhenReady - // - this.chkReconnectWhenReady._mice = MrngCheckBox.MouseState.HOVER; - this.chkReconnectWhenReady.AutoSize = true; - this.chkReconnectWhenReady.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.chkReconnectWhenReady.Location = new System.Drawing.Point(18, 44); - this.chkReconnectWhenReady.Name = "chkReconnectWhenReady"; - this.chkReconnectWhenReady.Size = new System.Drawing.Size(140, 17); - this.chkReconnectWhenReady.TabIndex = 6; - this.chkReconnectWhenReady.Text = Language.CheckboxReconnectWhenReady; - this.chkReconnectWhenReady.UseVisualStyleBackColor = true; - this.chkReconnectWhenReady.CheckedChanged += new System.EventHandler(this.chkReconnectWhenReady_CheckedChanged); - // - // pbServerStatus - // - this.pbServerStatus.Image = global::mRemoteNG.Properties.Resources.HostStatus_Check; - this.pbServerStatus.Location = new System.Drawing.Point(99, 23); - this.pbServerStatus.Name = "pbServerStatus"; - this.pbServerStatus.Size = new System.Drawing.Size(16, 16); - this.pbServerStatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pbServerStatus.TabIndex = 5; - this.pbServerStatus.TabStop = false; - // - // tmrAnimation - // - this.tmrAnimation.Enabled = true; - this.tmrAnimation.Interval = 200; - this.tmrAnimation.Tick += new System.EventHandler(this.tmrAnimation_Tick); - // - // ReconnectGroup - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.BackColor = System.Drawing.Color.White; - this.Controls.Add(this.grpAutomaticReconnect); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "ReconnectGroup"; - this.Size = new System.Drawing.Size(228, 138); - this.grpAutomaticReconnect.ResumeLayout(false); - this.grpAutomaticReconnect.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbServerStatus)).EndInit(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.GroupBox grpAutomaticReconnect; - internal MrngButton btnClose; - internal UI.Controls.MrngLabel lblServerStatus; - internal MrngCheckBox chkReconnectWhenReady; - internal System.Windows.Forms.PictureBox pbServerStatus; - internal System.Windows.Forms.Timer tmrAnimation; - internal UI.Controls.MrngLabel lblAnimation; - private System.ComponentModel.IContainer components; - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ReconnectGroup.cs b/mRemoteNG/Tools/ReconnectGroup.cs deleted file mode 100644 index 6aa9bc269..000000000 --- a/mRemoteNG/Tools/ReconnectGroup.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Drawing; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Tools -{ - public partial class ReconnectGroup - { - public ReconnectGroup() - { - InitializeComponent(); - } - - private bool _ServerReady; - - public bool ServerReady - { - get => _ServerReady; - set - { - SetStatusImage(value ? Properties.Resources.HostStatus_On : Properties.Resources.HostStatus_Off); - - _ServerReady = value; - } - } - - private delegate void SetStatusImageCB(Image Img); - - private void SetStatusImage(Image Img) - { - if (pbServerStatus.InvokeRequired) - { - var d = new SetStatusImageCB(SetStatusImage); - ParentForm?.Invoke(d, new object[] {Img}); - } - else - { - pbServerStatus.Image = Img; - } - } - - private void chkReconnectWhenReady_CheckedChanged(object sender, EventArgs e) - { - _ReconnectWhenReady = chkReconnectWhenReady.Checked; - } - - private bool _ReconnectWhenReady; - - public bool ReconnectWhenReady - { - get => _ReconnectWhenReady; - set - { - _ReconnectWhenReady = value; - SetCheckbox(value); - } - } - - private delegate void SetCheckboxCB(bool Val); - - private void SetCheckbox(bool Val) - { - if (chkReconnectWhenReady.InvokeRequired) - { - var d = new SetCheckboxCB(SetCheckbox); - ParentForm?.Invoke(d, new object[] {Val}); - } - else - { - chkReconnectWhenReady.Checked = Val; - } - } - - public delegate void CloseClickedEventHandler(); - - private CloseClickedEventHandler CloseClickedEvent; - - public event CloseClickedEventHandler CloseClicked - { - add => CloseClickedEvent = (CloseClickedEventHandler)Delegate.Combine(CloseClickedEvent, value); - remove => CloseClickedEvent = (CloseClickedEventHandler)Delegate.Remove(CloseClickedEvent, value); - } - - - private void btnClose_Click(object sender, EventArgs e) - { - CloseClickedEvent?.Invoke(); - } - - private void tmrAnimation_Tick(object sender, EventArgs e) - { - switch (lblAnimation.Text) - { - case "": - lblAnimation.Text = "»"; - break; - case "»": - lblAnimation.Text = "»»"; - break; - case "»»": - lblAnimation.Text = "»»»"; - break; - case "»»»": - lblAnimation.Text = ""; - break; - } - } - - private delegate void DisposeReconnectGroupCB(); - - public void DisposeReconnectGroup() - { - if (InvokeRequired) - { - var d = new DisposeReconnectGroupCB(DisposeReconnectGroup); - ParentForm?.Invoke(d); - } - else - { - Dispose(); - } - } - - public void ReconnectGroup_Load(object sender, EventArgs e) - { - ApplyLanguage(); - } - - private void ApplyLanguage() - { - grpAutomaticReconnect.Text = Language.GroupboxAutomaticReconnect; - btnClose.Text = Language._Close; - lblServerStatus.Text = Language.ServerStatus; - chkReconnectWhenReady.Text = Language.CheckboxReconnectWhenReady; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ReconnectGroup.resx b/mRemoteNG/Tools/ReconnectGroup.resx deleted file mode 100644 index 34ccac31d..000000000 --- a/mRemoteNG/Tools/ReconnectGroup.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 18, 18 - - - 60 - - \ No newline at end of file diff --git a/mRemoteNG/Tools/SSHTunnelTypeConverter.cs b/mRemoteNG/Tools/SSHTunnelTypeConverter.cs deleted file mode 100644 index 8459d245f..000000000 --- a/mRemoteNG/Tools/SSHTunnelTypeConverter.cs +++ /dev/null @@ -1,58 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using System.Collections.Generic; -using System.ComponentModel; - -namespace mRemoteNG.Tools -{ - public class SshTunnelTypeConverter : StringConverter - { - public static string[] SshTunnels - { - get - { - var sshTunnelList = new List {string.Empty}; - - // Add a blank entry to signify that no external tool is selected - sshTunnelList.AddRange(GetSshConnectionNames(Runtime.ConnectionsService.ConnectionTreeModel.RootNodes)); - return sshTunnelList.ToArray(); - } - } - - // recursively traverse the connection tree to find all ConnectionInfo s of type SSH - private static IEnumerable GetSshConnectionNames(IEnumerable rootnodes) - { - var result = new List(); - foreach (var node in rootnodes) - if (node is ContainerInfo container) - { - result.AddRange(GetSshConnectionNames(container.Children)); - } - else - { - if (node is PuttySessionInfo) continue; - if (node.Protocol == ProtocolType.SSH1 || node.Protocol == ProtocolType.SSH2) - result.Add(node.Name); - } - - return result; - } - - public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) - { - return new StandardValuesCollection(SshTunnels); - } - - public override bool GetStandardValuesExclusive(ITypeDescriptorContext context) - { - return true; - } - - public override bool GetStandardValuesSupported(ITypeDescriptorContext context) - { - return true; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/ScanHost.cs b/mRemoteNG/Tools/ScanHost.cs deleted file mode 100644 index ad347ae80..000000000 --- a/mRemoteNG/Tools/ScanHost.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Collections; -using mRemoteNG.App; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.Rlogin; -using mRemoteNG.Connection.Protocol.SSH; -using mRemoteNG.Connection.Protocol.Telnet; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Messages; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Tools -{ - public class ScanHost - { - #region Properties - - public static int SshPort { get; set; } = (int)ProtocolSSH1.Defaults.Port; - public static int TelnetPort { get; set; } = (int)ProtocolTelnet.Defaults.Port; - public static int HttpPort { get; set; } = (int)ProtocolHTTP.Defaults.Port; - public static int HttpsPort { get; set; } = (int)ProtocolHTTPS.Defaults.Port; - public static int RloginPort { get; set; } = (int)ProtocolRlogin.Defaults.Port; - public static int RdpPort { get; set; } = (int)RdpProtocol6.Defaults.Port; - public static int VncPort { get; set; } = (int)ProtocolVNC.Defaults.Port; - public ArrayList OpenPorts { get; set; } - public ArrayList ClosedPorts { get; set; } - public bool Rdp { get; set; } - public bool Vnc { get; set; } - public bool Ssh { get; set; } - public bool Telnet { get; set; } - public bool Rlogin { get; set; } - public bool Http { get; set; } - public bool Https { get; set; } - public string HostIp { get; set; } - public string HostName { get; set; } = ""; - - public string HostNameWithoutDomain - { - get - { - if (string.IsNullOrEmpty(HostName) || HostName == HostIp) - { - return HostIp; - } - - return HostName.Split('.')[0]; - } - } - - #endregion - - #region Methods - - public ScanHost(string host) - { - HostIp = host; - OpenPorts = new ArrayList(); - ClosedPorts = new ArrayList(); - } - - public override string ToString() - { - try - { - return "SSH: " + Convert.ToString(Ssh) + " Telnet: " + Convert.ToString(Telnet) + " HTTP: " + - Convert.ToString(Http) + " HTTPS: " + Convert.ToString(Https) + " Rlogin: " + - Convert.ToString(Rlogin) + " RDP: " + Convert.ToString(Rdp) + " VNC: " + Convert.ToString(Vnc); - } - catch (Exception) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, "ToString failed (Tools.PortScan)", true); - return ""; - } - } - - //Adpating to objectlistview instaed of listview - public string HostIPorName - { - get - { - if (string.IsNullOrEmpty(HostName)) - return HostIp; - else - return HostName; - } - } - - public string RdpName => BoolToYesNo(Rdp); - - public string VncName => BoolToYesNo(Vnc); - - public string SshName => BoolToYesNo(Rdp); - - public string TelnetName => BoolToYesNo(Telnet); - - public string RloginName => BoolToYesNo(Rlogin); - - public string HttpName => BoolToYesNo(Http); - - public string HttpsName => BoolToYesNo(Https); - - public string OpenPortsName - { - get - { - var strOpen = ""; - foreach (int p in OpenPorts) - { - strOpen += p + ", "; - } - - return strOpen; - } - } - - public string ClosedPortsName - { - get - { - var strClosed = ""; - foreach (int p in ClosedPorts) - { - strClosed += p + ", "; - } - - return strClosed; - } - } - - - private static string BoolToYesNo(bool value) - { - return value ? Language.Yes : Language.No; - } - - public void SetAllProtocols(bool value) - { - Vnc = value; - Telnet = value; - Ssh = value; - Rlogin = value; - Rdp = value; - Https = value; - Http = value; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/SecureTransfer.cs b/mRemoteNG/Tools/SecureTransfer.cs deleted file mode 100644 index 2c93e0521..000000000 --- a/mRemoteNG/Tools/SecureTransfer.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System; -using System.IO; -using mRemoteNG.App; -using Renci.SshNet; -using Renci.SshNet.Sftp; -using static System.IO.FileMode; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Tools -{ - internal class SecureTransfer : IDisposable - { - private readonly string Host; - private readonly string User; - private readonly string Password; - private readonly int Port; - public readonly SSHTransferProtocol Protocol; - public string SrcFile; - public string DstFile; - public ScpClient ScpClt; - public SftpClient SftpClt; - public SftpUploadAsyncResult asyncResult; - public AsyncCallback asyncCallback; - - - public SecureTransfer() - { - } - - public SecureTransfer(string host, string user, string pass, int port, SSHTransferProtocol protocol) - { - Host = host; - User = user; - Password = pass; - Port = port; - Protocol = protocol; - } - - public SecureTransfer(string host, - string user, - string pass, - int port, - SSHTransferProtocol protocol, - string source, - string dest) - { - Host = host; - User = user; - Password = pass; - Port = port; - Protocol = protocol; - SrcFile = source; - DstFile = dest; - } - - public void Connect() - { - if (Protocol == SSHTransferProtocol.SCP) - { - ScpClt = new ScpClient(Host, Port, User, Password); - ScpClt.Connect(); - } - - if (Protocol == SSHTransferProtocol.SFTP) - { - SftpClt = new SftpClient(Host, Port, User, Password); - SftpClt.Connect(); - } - } - - public void Disconnect() - { - if (Protocol == SSHTransferProtocol.SCP) - { - ScpClt.Disconnect(); - } - - if (Protocol == SSHTransferProtocol.SFTP) - { - SftpClt.Disconnect(); - } - } - - - public void Upload() - { - if (Protocol == SSHTransferProtocol.SCP) - { - if (!ScpClt.IsConnected) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - Language.SshTransferFailed + Environment.NewLine + - "SCP Not Connected!"); - return; - } - - ScpClt.Upload(new FileInfo(SrcFile), $"{DstFile}"); - } - - if (Protocol == SSHTransferProtocol.SFTP) - { - if (!SftpClt.IsConnected) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - Language.SshTransferFailed + Environment.NewLine + - "SFTP Not Connected!"); - return; - } - - asyncResult = - (SftpUploadAsyncResult)SftpClt.BeginUploadFile(new FileStream(SrcFile, Open), $"{DstFile}", - asyncCallback); - } - } - - public enum SSHTransferProtocol - { - SCP = 0, - SFTP = 1 - } - - private void Dispose(bool disposing) - { - if (!disposing) return; - - if (Protocol == SSHTransferProtocol.SCP) - { - ScpClt.Dispose(); - } - - if (Protocol == SSHTransferProtocol.SFTP) - { - SftpClt.Dispose(); - } - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/Tools.LocalizedAttributes.cs b/mRemoteNG/Tools/Tools.LocalizedAttributes.cs deleted file mode 100644 index d4c2d7fb6..000000000 --- a/mRemoteNG/Tools/Tools.LocalizedAttributes.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using System.ComponentModel; -using mRemoteNG.Resources.Language; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.Tools -{ - public class LocalizedAttributes - { - [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] - public class LocalizedCategoryAttribute : CategoryAttribute - { - private const int MaxOrder = 10; - private int Order; - - public LocalizedCategoryAttribute(string value, int Order = 1) : base(value) - { - this.Order = Order > MaxOrder ? MaxOrder : Order; - } - - protected override string GetLocalizedString(string value) - { - string OrderPrefix = ""; - for (int x = 0; x <= MaxOrder - Order; x++) - { - OrderPrefix += Convert.ToString("\t"); - } - - return OrderPrefix + Language.ResourceManager.GetString(value); - } - } - - [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] - public class LocalizedDisplayNameAttribute : DisplayNameAttribute - { - private bool Localized; - - public LocalizedDisplayNameAttribute(string value) : base(value) - { - Localized = false; - } - - public override string DisplayName - { - get - { - if (!Localized) - { - Localized = true; - DisplayNameValue = Language.ResourceManager.GetString(DisplayNameValue); - } - - return base.DisplayName; - } - } - } - - [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] - public class LocalizedDescriptionAttribute : DescriptionAttribute - { - private bool Localized; - - public LocalizedDescriptionAttribute(string value) : base(value) - { - Localized = false; - } - - public override string Description - { - get - { - if (!Localized) - { - Localized = true; - DescriptionValue = Language.ResourceManager.GetString(DescriptionValue); - } - - return base.Description; - } - } - } - - [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] - public class LocalizedDefaultValueAttribute : DefaultValueAttribute - { - public LocalizedDefaultValueAttribute(string name) : base(Language.ResourceManager.GetString(name)) - { - } - - // This allows localized attributes in a derived class to override a matching - // non-localized attribute inherited from its base class - public override object TypeId => typeof(DefaultValueAttribute); - } - - #region Special localization - with String.Format - - [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] - public class LocalizedDisplayNameInheritAttribute : DisplayNameAttribute - { - private bool Localized; - - public LocalizedDisplayNameInheritAttribute(string value) : base(value) - { - Localized = false; - } - - public override string DisplayName - { - get - { - if (!Localized) - { - Localized = true; - DisplayNameValue = string.Format(Language.FormatInherit, - Language.ResourceManager.GetString(DisplayNameValue)); - } - - return base.DisplayName; - } - } - } - - [AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = true)] - public class LocalizedDescriptionInheritAttribute : DescriptionAttribute - { - private bool Localized; - - public LocalizedDescriptionInheritAttribute(string value) : base(value) - { - Localized = false; - } - - public override string Description - { - get - { - if (!Localized) - { - Localized = true; - DescriptionValue = string.Format(Language.FormatInheritDescription, - Language.ResourceManager.GetString(DescriptionValue)); - } - - return base.Description; - } - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/Tools.WindowPlacement.cs b/mRemoteNG/Tools/Tools.WindowPlacement.cs deleted file mode 100644 index 11171286b..000000000 --- a/mRemoteNG/Tools/Tools.WindowPlacement.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Runtime.InteropServices; -using mRemoteNG.App; - -namespace mRemoteNG.Tools -{ - public class WindowPlacement - { - private Form _form; - - - public WindowPlacement(Form form) - { - _form = form; - } - - - #region Public Properties - - public Form Form - { - get => _form; - set => _form = value; - } - - public bool RestoreToMaximized - { - get - { - NativeMethods.WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); - return Convert.ToBoolean(windowPlacement.flags & NativeMethods.WPF_RESTORETOMAXIMIZED); - } - set - { - NativeMethods.WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); - if (value) - { - windowPlacement.flags = windowPlacement.flags | NativeMethods.WPF_RESTORETOMAXIMIZED; - } - else - { - windowPlacement.flags = windowPlacement.flags & ~NativeMethods.WPF_RESTORETOMAXIMIZED; - } - - SetWindowPlacement(windowPlacement); - } - } - - #endregion - - #region Private Functions - - private NativeMethods.WINDOWPLACEMENT GetWindowPlacement() - { - if (_form == null) - { - throw (new NullReferenceException("WindowPlacement.Form is not set.")); - } - - NativeMethods.WINDOWPLACEMENT windowPlacement = new NativeMethods.WINDOWPLACEMENT(); - windowPlacement.length = (uint)Marshal.SizeOf(windowPlacement); - try - { - NativeMethods.GetWindowPlacement(_form.Handle, ref windowPlacement); - return windowPlacement; - } - catch (Exception) - { - throw; - } - } - - private bool SetWindowPlacement(NativeMethods.WINDOWPLACEMENT windowPlacement) - { - if (_form == null) - { - throw (new NullReferenceException("WindowPlacement.Form is not set.")); - } - - windowPlacement.length = (uint)Marshal.SizeOf(windowPlacement); - try - { - return NativeMethods.SetWindowPlacement(_form.Handle, ref windowPlacement); - } - catch (Exception) - { - throw; - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/WindowMenu.cs b/mRemoteNG/Tools/WindowMenu.cs deleted file mode 100644 index 74776eb14..000000000 --- a/mRemoteNG/Tools/WindowMenu.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Drawing; -using mRemoteNG.App; -using Microsoft.Win32.SafeHandles; - -// ReSharper disable MemberCanBeMadeStatic.Global - -namespace mRemoteNG.Tools -{ - public sealed class WindowMenu : SafeHandleZeroOrMinusOneIsInvalid, IDisposable - { - [Flags] - public enum Flags - { - MF_STRING = NativeMethods.MF_STRING, - MF_SEPARATOR = NativeMethods.MF_SEPARATOR, - MF_BYCOMMAND = NativeMethods.MF_BYCOMMAND, - MF_BYPOSITION = NativeMethods.MF_BYPOSITION, - MF_POPUP = NativeMethods.MF_POPUP, - WM_SYSCOMMAND = NativeMethods.WM_SYSCOMMAND - } - - private bool _disposed; - internal IntPtr SystemMenuHandle; - private readonly IntPtr FormHandle; - - public WindowMenu(IntPtr Handle) : base(true) - { - FormHandle = Handle; - SystemMenuHandle = NativeMethods.GetSystemMenu(FormHandle, false); - SetHandle(SystemMenuHandle); - } - - public void Reset() - { - SystemMenuHandle = NativeMethods.GetSystemMenu(FormHandle, true); - } - - public void AppendMenuItem(IntPtr ParentMenu, Flags Flags, IntPtr ID, string Text) - { - NativeMethods.AppendMenu(ParentMenu, (int)Flags, ID, Text); - } - - public IntPtr CreatePopupMenuItem() - { - return NativeMethods.CreatePopupMenu(); - } - - public bool InsertMenuItem(IntPtr SysMenu, int Position, Flags Flags, IntPtr SubMenu, string Text) - { - return NativeMethods.InsertMenu(SysMenu, Position, (int)Flags, SubMenu, Text); - } - - public IntPtr SetBitmap(IntPtr Menu, int Position, Flags Flags, Bitmap Bitmap) - { - return new IntPtr(Convert.ToInt32(NativeMethods.SetMenuItemBitmaps(Menu, Position, (int)Flags, - Bitmap.GetHbitmap(), - Bitmap.GetHbitmap()))); - } - - protected override bool ReleaseHandle() - { - return NativeMethods.CloseHandle(SystemMenuHandle); - } - - - /* If we don't have the finalizer, then we get this warning: https://msdn.microsoft.com/library/ms182329.aspx (CA2216: Disposable types should declare finalizer) - * If we DO have the finalizer, then we get this warning: https://msdn.microsoft.com/library/ms244737.aspx (CA1063: Implement IDisposable correctly) - * - * Since the handle is likely going to be in use for the entierty of the process, the finalizer isn't very important since when we're calling it - * the process is likely exiting. Leaks would be moot once it exits. CA2216 is the lesser of 2 evils as far as I can tell. Suppress. - ~SystemMenu() - { - Dispose(false); - } - */ - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", - "CA2216:DisposableTypesShouldDeclareFinalizer")] - public new void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected override void Dispose(bool disposing) - { - if (_disposed) return; - if (disposing) return; - - ReleaseHandle(); - - _disposed = true; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/WindowsRegistry/IRegistry.cs b/mRemoteNG/Tools/WindowsRegistry/IRegistry.cs deleted file mode 100644 index 32cff52a8..000000000 --- a/mRemoteNG/Tools/WindowsRegistry/IRegistry.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace mRemoteNG.Tools.WindowsRegistry -{ - public interface IRegistry - { - Optional GetKeyValue(RegistryHive hive, string keyPath, string propertyName); - string[] GetSubKeyNames(RegistryHive hive, string keyPath); - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/WindowsRegistry/RegistryHive.cs b/mRemoteNG/Tools/WindowsRegistry/RegistryHive.cs deleted file mode 100644 index 4663bf273..000000000 --- a/mRemoteNG/Tools/WindowsRegistry/RegistryHive.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace mRemoteNG.Tools.WindowsRegistry -{ - public enum RegistryHive - { - ClassesRoot, - CurrentConfig, - CurrentUser, - Users, - LocalMachine - } -} \ No newline at end of file diff --git a/mRemoteNG/Tools/WindowsRegistry/WindowsRegistry.cs b/mRemoteNG/Tools/WindowsRegistry/WindowsRegistry.cs deleted file mode 100644 index b17745029..000000000 --- a/mRemoteNG/Tools/WindowsRegistry/WindowsRegistry.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Linq; -using Microsoft.Win32; - -namespace mRemoteNG.Tools.WindowsRegistry -{ - public class WindowsRegistry : IRegistry - { - public string[] GetSubKeyNames(RegistryHive hive, string keyPath) - { - keyPath.ThrowIfNull(nameof(keyPath)); - - using (var key = OpenSubKey(hive, keyPath)) - { - return key.Any() - ? key.First().GetSubKeyNames() - : new string[0]; - } - } - - public Optional GetKeyValue(RegistryHive hive, string keyPath, string propertyName) - { - keyPath.ThrowIfNull(nameof(keyPath)); - propertyName.ThrowIfNull(nameof(propertyName)); - - using (var key = OpenSubKey(hive, keyPath)) - { - if (!key.Any()) - return Optional.Empty; - - return key.First().GetValue(propertyName) as string; - } - } - - private DisposableOptional OpenSubKey(RegistryHive hive, string keyPath) - { - switch (hive) - { - case RegistryHive.ClassesRoot: - return new DisposableOptional(Registry.ClassesRoot.OpenSubKey(keyPath)); - case RegistryHive.CurrentConfig: - return new DisposableOptional(Registry.CurrentConfig.OpenSubKey(keyPath)); - case RegistryHive.CurrentUser: - return new DisposableOptional(Registry.CurrentUser.OpenSubKey(keyPath)); - case RegistryHive.Users: - return new DisposableOptional(Registry.Users.OpenSubKey(keyPath)); - case RegistryHive.LocalMachine: - return new DisposableOptional(Registry.LocalMachine.OpenSubKey(keyPath)); - default: - throw new ArgumentOutOfRangeException(nameof(hive), hive, null); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/AlwaysConfirmYes.cs b/mRemoteNG/Tree/AlwaysConfirmYes.cs deleted file mode 100644 index ff1f88cd3..000000000 --- a/mRemoteNG/Tree/AlwaysConfirmYes.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace mRemoteNG.Tree -{ - public class AlwaysConfirmYes : IConfirm - { - public bool Confirm(object target) - { - return true; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/ClickHandlers/ExpandNodeClickHandler.cs b/mRemoteNG/Tree/ClickHandlers/ExpandNodeClickHandler.cs deleted file mode 100644 index 41b14f130..000000000 --- a/mRemoteNG/Tree/ClickHandlers/ExpandNodeClickHandler.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.UI.Controls.ConnectionTree; - -namespace mRemoteNG.Tree.ClickHandlers -{ - public class ExpandNodeClickHandler : ITreeNodeClickHandler - { - private readonly IConnectionTree _connectionTree; - - public ExpandNodeClickHandler(IConnectionTree connectionTree) - { - if (connectionTree == null) - throw new ArgumentNullException(nameof(connectionTree)); - - _connectionTree = connectionTree; - } - - public void Execute(ConnectionInfo clickedNode) - { - var clickedNodeAsContainer = clickedNode as ContainerInfo; - if (clickedNodeAsContainer == null) return; - _connectionTree.ToggleExpansion(clickedNodeAsContainer); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/ClickHandlers/ITreeNodeClickHandler.cs b/mRemoteNG/Tree/ClickHandlers/ITreeNodeClickHandler.cs deleted file mode 100644 index 58f99a76d..000000000 --- a/mRemoteNG/Tree/ClickHandlers/ITreeNodeClickHandler.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Tree.ClickHandlers -{ - public interface ITreeNodeClickHandler - { - void Execute(T clickedNode); - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/ClickHandlers/OpenConnectionClickHandler.cs b/mRemoteNG/Tree/ClickHandlers/OpenConnectionClickHandler.cs deleted file mode 100644 index 81a2c8f3a..000000000 --- a/mRemoteNG/Tree/ClickHandlers/OpenConnectionClickHandler.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using mRemoteNG.Connection; - -namespace mRemoteNG.Tree.ClickHandlers -{ - public class OpenConnectionClickHandler : ITreeNodeClickHandler - { - private readonly IConnectionInitiator _connectionInitiator; - - public OpenConnectionClickHandler(IConnectionInitiator connectionInitiator) - { - if (connectionInitiator == null) - throw new ArgumentNullException(nameof(connectionInitiator)); - _connectionInitiator = connectionInitiator; - } - - public void Execute(ConnectionInfo clickedNode) - { - if (clickedNode == null) - throw new ArgumentNullException(nameof(clickedNode)); - if (clickedNode.GetTreeNodeType() != TreeNodeType.Connection && - clickedNode.GetTreeNodeType() != TreeNodeType.PuttySession) return; - _connectionInitiator.OpenConnection(clickedNode); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/ClickHandlers/SwitchToConnectionClickHandler.cs b/mRemoteNG/Tree/ClickHandlers/SwitchToConnectionClickHandler.cs deleted file mode 100644 index 77f13a639..000000000 --- a/mRemoteNG/Tree/ClickHandlers/SwitchToConnectionClickHandler.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using mRemoteNG.Connection; - -namespace mRemoteNG.Tree.ClickHandlers -{ - public class SwitchToConnectionClickHandler : ITreeNodeClickHandler - { - private readonly IConnectionInitiator _connectionInitiator; - - public SwitchToConnectionClickHandler(IConnectionInitiator connectionInitiator) - { - if (connectionInitiator == null) - throw new ArgumentNullException(nameof(connectionInitiator)); - _connectionInitiator = connectionInitiator; - } - - public void Execute(ConnectionInfo clickedNode) - { - if (clickedNode == null) - throw new ArgumentNullException(nameof(clickedNode)); - if (clickedNode.GetTreeNodeType() != TreeNodeType.Connection && - clickedNode.GetTreeNodeType() != TreeNodeType.PuttySession) return; - _connectionInitiator.SwitchToOpenConnection(clickedNode); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/ClickHandlers/TreeNodeCompositeClickHandler.cs b/mRemoteNG/Tree/ClickHandlers/TreeNodeCompositeClickHandler.cs deleted file mode 100644 index fc8ba718a..000000000 --- a/mRemoteNG/Tree/ClickHandlers/TreeNodeCompositeClickHandler.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using mRemoteNG.Connection; - -namespace mRemoteNG.Tree.ClickHandlers -{ - public class TreeNodeCompositeClickHandler : ITreeNodeClickHandler - { - public IEnumerable> ClickHandlers { get; set; } = - new ITreeNodeClickHandler[0]; - - public void Execute(ConnectionInfo clickedNode) - { - if (clickedNode == null) - throw new ArgumentNullException(nameof(clickedNode)); - foreach (var handler in ClickHandlers) - { - handler.Execute(clickedNode); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/ConnectionTreeDragAndDropHandler.cs b/mRemoteNG/Tree/ConnectionTreeDragAndDropHandler.cs deleted file mode 100644 index b97f6bf19..000000000 --- a/mRemoteNG/Tree/ConnectionTreeDragAndDropHandler.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System.Drawing; -using System.Linq; -using System.Windows.Forms; -using BrightIdeasSoftware; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Tree -{ - public class ConnectionTreeDragAndDropHandler - { - private readonly Color DropAllowedFeedbackColor = Color.Green; - private readonly Color DropDeniedFeedbackColor = Color.Red; - private string _infoMessage; - private Color _currentFeedbackColor; - private bool _enableFeedback; - - - public void HandleEvent_ModelDropped(object sender, ModelDropEventArgs e) - { - if (!(e.TargetModel is ConnectionInfo dropTarget)) return; - foreach(var dropSource in e.SourceModels.Cast()) - { - DropModel(dropSource, dropTarget, e.DropTargetLocation); - } - - e.Handled = true; - } - - public void DropModel(ConnectionInfo dropSource, - ConnectionInfo dropTarget, - DropTargetLocation dropTargetLocation) - { - switch (dropTargetLocation) - { - case DropTargetLocation.Item: - DropModelOntoTarget(dropSource, dropTarget); - break; - case DropTargetLocation.AboveItem: - DropModelAboveTarget(dropSource, dropTarget); - break; - case DropTargetLocation.BelowItem: - DropModelBelowTarget(dropSource, dropTarget); - break; - } - } - - private void DropModelOntoTarget(ConnectionInfo dropSource, ConnectionInfo dropTarget) - { - if (!(dropTarget is ContainerInfo dropTargetAsContainer)) return; - dropSource.SetParent(dropTargetAsContainer); - } - - private void DropModelAboveTarget(ConnectionInfo dropSource, ConnectionInfo dropTarget) - { - if (!dropSource.Parent.Equals(dropTarget.Parent)) - dropTarget.Parent.AddChildAbove(dropSource, dropTarget); - else - dropTarget.Parent.SetChildAbove(dropSource, dropTarget); - } - - private void DropModelBelowTarget(ConnectionInfo dropSource, ConnectionInfo dropTarget) - { - if (!dropSource.Parent.Equals(dropTarget.Parent)) - dropTarget.Parent.AddChildBelow(dropSource, dropTarget); - else - dropTarget.Parent.SetChildBelow(dropSource, dropTarget); - } - - public void HandleEvent_ModelCanDrop(object sender, ModelDropEventArgs e) - { - _enableFeedback = true; - _currentFeedbackColor = DropDeniedFeedbackColor; - _infoMessage = null; - foreach (var dropSource in e.SourceModels.Cast()) - { - var dropTarget = e.TargetModel as ConnectionInfo; - - e.Effect = CanModelDrop(dropSource, dropTarget, e.DropTargetLocation); - e.InfoMessage = _infoMessage; - e.DropSink.EnableFeedback = _enableFeedback; - e.DropSink.FeedbackColor = _currentFeedbackColor; - } - e.Handled = true; - } - - public DragDropEffects CanModelDrop(ConnectionInfo dropSource, - ConnectionInfo dropTarget, - DropTargetLocation dropTargetLocation) - { - var dragDropEffect = DragDropEffects.None; - if (!NodeIsDraggable(dropSource)) - { - _infoMessage = Language.NodeNotDraggable; - _enableFeedback = false; - } - else - switch (dropTargetLocation) - { - case DropTargetLocation.Item: - dragDropEffect = HandleCanDropOnItem(dropSource, dropTarget); - break; - case DropTargetLocation.AboveItem: - case DropTargetLocation.BelowItem: - dragDropEffect = HandleCanDropBetweenItems(dropSource, dropTarget); - break; - } - - return dragDropEffect; - } - - private DragDropEffects HandleCanDropOnItem(ConnectionInfo dropSource, ConnectionInfo dropTarget) - { - var dragDropEffect = DragDropEffects.None; - if (dropTarget is ContainerInfo && !(dropTarget is RootPuttySessionsNodeInfo)) - { - if (!IsValidDrag(dropSource, dropTarget)) return dragDropEffect; - dragDropEffect = DragDropEffects.Move; - _currentFeedbackColor = DropAllowedFeedbackColor; - } - else - { - _enableFeedback = false; - } - - return dragDropEffect; - } - - private DragDropEffects HandleCanDropBetweenItems(ConnectionInfo dropSource, ConnectionInfo dropTarget) - { - var dragDropEffect = DragDropEffects.None; - if (AncestorDraggingOntoChild(dropSource, dropTarget)) - _infoMessage = Language.NodeCannotDragParentOnChild; - else if (dropTarget is PuttySessionInfo || dropTarget is RootNodeInfo) - _enableFeedback = false; - else - { - dragDropEffect = DragDropEffects.Move; - _currentFeedbackColor = DropAllowedFeedbackColor; - } - - return dragDropEffect; - } - - private bool IsValidDrag(ConnectionInfo dropSource, ConnectionInfo dropTarget) - { - var validDrag = false; - if (NodeDraggingOntoSelf(dropSource, dropTarget)) - _infoMessage = Language.NodeCannotDragOnSelf; - else if (AncestorDraggingOntoChild(dropSource, dropTarget)) - _infoMessage = Language.NodeCannotDragParentOnChild; - else if (DraggingOntoCurrentParent(dropSource, dropTarget)) - _infoMessage = Language.NodeAlreadyInFolder; - else - validDrag = true; - return validDrag; - } - - private bool NodeIsDraggable(ConnectionInfo node) - { - return node != null && !(node is RootNodeInfo) && !(node is PuttySessionInfo); - } - - private bool NodeDraggingOntoSelf(ConnectionInfo source, ConnectionInfo target) - { - return source.Equals(target); - } - - private bool AncestorDraggingOntoChild(ConnectionInfo source, ConnectionInfo target) - { - return source is ContainerInfo sourceAsContainer && - sourceAsContainer.GetRecursiveChildList().Contains(target); - } - - private bool DraggingOntoCurrentParent(ConnectionInfo source, ConnectionInfo target) - { - return target is ContainerInfo targetAsContainer && targetAsContainer.Children.Contains(source); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/ConnectionTreeModel.cs b/mRemoteNG/Tree/ConnectionTreeModel.cs deleted file mode 100644 index 4400544b1..000000000 --- a/mRemoteNG/Tree/ConnectionTreeModel.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Properties; -using mRemoteNG.Tree.Root; - - -namespace mRemoteNG.Tree -{ - public sealed class ConnectionTreeModel : INotifyCollectionChanged, INotifyPropertyChanged - { - public List RootNodes { get; } = new List(); - - public void AddRootNode(ContainerInfo rootNode) - { - if (RootNodes.Contains(rootNode)) return; - RootNodes.Add(rootNode); - rootNode.CollectionChanged += RaiseCollectionChangedEvent; - rootNode.PropertyChanged += RaisePropertyChangedEvent; - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, - rootNode)); - } - - public void RemoveRootNode(ContainerInfo rootNode) - { - if (!RootNodes.Contains(rootNode)) return; - rootNode.CollectionChanged -= RaiseCollectionChangedEvent; - rootNode.PropertyChanged -= RaisePropertyChangedEvent; - RootNodes.Remove(rootNode); - RaiseCollectionChangedEvent(this, - new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, - rootNode)); - } - - public IReadOnlyList GetRecursiveChildList() - { - var list = new List(); - foreach (var rootNode in RootNodes) - { - list.AddRange(GetRecursiveChildList(rootNode)); - } - - return list; - } - - public IEnumerable GetRecursiveChildList(ContainerInfo container) - { - return container.GetRecursiveChildList(); - } - - public IEnumerable GetRecursiveFavoriteChildList(ContainerInfo container) - { - return container.GetRecursiveFavoriteChildList(); - } - - public void RenameNode(ConnectionInfo connectionInfo, string newName) - { - if (newName == null || newName.Length <= 0) - return; - - connectionInfo.Name = newName; - if (Settings.Default.SetHostnameLikeDisplayName) - connectionInfo.Hostname = newName; - } - - public void DeleteNode(ConnectionInfo connectionInfo) - { - if (connectionInfo is RootNodeInfo) - return; - - connectionInfo?.RemoveParent(); - } - - public event NotifyCollectionChangedEventHandler CollectionChanged; - - private void RaiseCollectionChangedEvent(object sender, NotifyCollectionChangedEventArgs args) - { - CollectionChanged?.Invoke(sender, args); - } - - public event PropertyChangedEventHandler PropertyChanged; - - private void RaisePropertyChangedEvent(object sender, PropertyChangedEventArgs args) - { - PropertyChanged?.Invoke(sender, args); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/IConfirm.cs b/mRemoteNG/Tree/IConfirm.cs deleted file mode 100644 index 606c8b819..000000000 --- a/mRemoteNG/Tree/IConfirm.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.Tree -{ - public interface IConfirm - { - bool Confirm(TConfirmationTarget confirmationTarget); - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/NodeSearcher.cs b/mRemoteNG/Tree/NodeSearcher.cs deleted file mode 100644 index 21d839123..000000000 --- a/mRemoteNG/Tree/NodeSearcher.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Connection; - - -namespace mRemoteNG.Tree -{ - public class NodeSearcher - { - private readonly ConnectionTreeModel _connectionTreeModel; - - private List Matches { get; set; } - public ConnectionInfo CurrentMatch { get; private set; } - - - public NodeSearcher(ConnectionTreeModel connectionTreeModel) - { - _connectionTreeModel = connectionTreeModel; - } - - public IEnumerable SearchByName(string searchText) - { - ResetMatches(); - if (searchText == "") return Matches; - var nodes = _connectionTreeModel.GetRecursiveChildList(); - var searchTextLower = searchText.ToLowerInvariant(); - foreach (var node in nodes) - { - if (node.Name.ToLowerInvariant().Contains(searchTextLower) || - node.Description.ToLowerInvariant().Contains(searchTextLower) || - node.Hostname.ToLowerInvariant().Contains(searchTextLower)) - Matches.Add(node); - } - - if (Matches.Count > 0) - CurrentMatch = Matches.First(); - return Matches; - } - - public ConnectionInfo NextMatch() - { - var currentMatchIndex = Matches.IndexOf(CurrentMatch); - if (!CurrentMatchIsTheLastMatchInTheList()) - CurrentMatch = Matches[currentMatchIndex + 1]; - return CurrentMatch; - } - - private bool CurrentMatchIsTheLastMatchInTheList() - { - var currentMatchIndex = Matches.IndexOf(CurrentMatch); - return currentMatchIndex >= Matches.Count - 1; - } - - public ConnectionInfo PreviousMatch() - { - var currentMatchIndex = Matches.IndexOf(CurrentMatch); - if (!CurrentMatchIsTheFirstMatchInTheList()) - CurrentMatch = Matches[currentMatchIndex - 1]; - return CurrentMatch; - } - - private bool CurrentMatchIsTheFirstMatchInTheList() - { - var currentMatchIndex = Matches.IndexOf(CurrentMatch); - return currentMatchIndex <= 0; - } - - private void ResetMatches() - { - Matches = new List(); - CurrentMatch = null; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/NodeType.cs b/mRemoteNG/Tree/NodeType.cs deleted file mode 100644 index 33ef4705c..000000000 --- a/mRemoteNG/Tree/NodeType.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace mRemoteNG.Tree -{ - public enum TreeNodeType - { - None = 0, - Root = 1, - Container = 2, - Connection = 3, - PuttyRoot = 4, - PuttySession = 5 - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/PreviousSessionOpener.cs b/mRemoteNG/Tree/PreviousSessionOpener.cs deleted file mode 100644 index a18299453..000000000 --- a/mRemoteNG/Tree/PreviousSessionOpener.cs +++ /dev/null @@ -1,37 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; -using System; -using System.Linq; -using mRemoteNG.UI.Controls.ConnectionTree; - - -namespace mRemoteNG.Tree -{ - public class PreviousSessionOpener : IConnectionTreeDelegate - { - private readonly IConnectionInitiator _connectionInitiator; - - public PreviousSessionOpener(IConnectionInitiator connectionInitiator) - { - if (connectionInitiator == null) - throw new ArgumentNullException(nameof(connectionInitiator)); - _connectionInitiator = connectionInitiator; - } - - public void Execute(IConnectionTree connectionTree) - { - var connectionInfoList = connectionTree.GetRootConnectionNode().GetRecursiveChildList() - .Where(node => !(node is ContainerInfo)); - var previouslyOpenedConnections = connectionInfoList - .Where(item => - item.PleaseConnect && - //ignore items that have already connected - !_connectionInitiator.ActiveConnections.Contains(item.ConstantID)); - - foreach (var connectionInfo in previouslyOpenedConnections) - { - _connectionInitiator.OpenConnection(connectionInfo); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/PreviouslyOpenedFolderExpander.cs b/mRemoteNG/Tree/PreviouslyOpenedFolderExpander.cs deleted file mode 100644 index ab42c43e9..000000000 --- a/mRemoteNG/Tree/PreviouslyOpenedFolderExpander.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Linq; -using mRemoteNG.Container; -using mRemoteNG.UI.Controls.ConnectionTree; - - -namespace mRemoteNG.Tree -{ - public class PreviouslyOpenedFolderExpander : IConnectionTreeDelegate - { - public void Execute(IConnectionTree connectionTree) - { - var rootNode = connectionTree.GetRootConnectionNode(); - var containerList = connectionTree.ConnectionTreeModel.GetRecursiveChildList(rootNode) - .OfType(); - var previouslyExpandedNodes = containerList.Where(container => container.IsExpanded); - connectionTree.ExpandedObjects = previouslyExpandedNodes; - connectionTree.InvokeRebuildAll(true); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/Root/RootNodeInfo.cs b/mRemoteNG/Tree/Root/RootNodeInfo.cs deleted file mode 100644 index b738cda1e..000000000 --- a/mRemoteNG/Tree/Root/RootNodeInfo.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.ComponentModel; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Tree.Root -{ - [DefaultProperty("Name")] - public class RootNodeInfo : ContainerInfo - { - private string _name; - private string _customPassword = ""; - - public RootNodeInfo(RootNodeType rootType, string uniqueId) - : base(uniqueId) - { - _name = Language.Connections; - Type = rootType; - } - - public RootNodeInfo(RootNodeType rootType) - : this(rootType, Guid.NewGuid().ToString()) - { - } - - #region Public Properties - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous)), - Browsable(true), - LocalizedAttributes.LocalizedDefaultValue(nameof(Language.Connections)), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Name)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionName))] - public override string Name - { - get => _name; - set => _name = value; - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Miscellaneous)), - Browsable(true), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.PasswordProtect)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionPasswordProtect)), - TypeConverter(typeof(MiscTools.YesNoTypeConverter))] - public new bool Password { get; set; } - - [Browsable(false)] - public string PasswordString - { - get => Password ? _customPassword : DefaultPassword; - set - { - _customPassword = value; - Password = !string.IsNullOrEmpty(value) && _customPassword != DefaultPassword; - } - } - - [Browsable(false)] public string DefaultPassword { get; } = "mR3m"; - - [Browsable(false)] public RootNodeType Type { get; set; } - - public override TreeNodeType GetTreeNodeType() - { - return Type == RootNodeType.Connection - ? TreeNodeType.Root - : TreeNodeType.PuttyRoot; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/Root/RootNodeTypeEnum.cs b/mRemoteNG/Tree/Root/RootNodeTypeEnum.cs deleted file mode 100644 index 6f08e359d..000000000 --- a/mRemoteNG/Tree/Root/RootNodeTypeEnum.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace mRemoteNG.Tree.Root -{ - public enum RootNodeType - { - Connection, - PuttySessions - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/Root/RootPuttySessionsNodeInfo.cs b/mRemoteNG/Tree/Root/RootPuttySessionsNodeInfo.cs deleted file mode 100644 index 748fd1dfe..000000000 --- a/mRemoteNG/Tree/Root/RootPuttySessionsNodeInfo.cs +++ /dev/null @@ -1,52 +0,0 @@ -using mRemoteNG.Properties; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.Tree.Root -{ - public class RootPuttySessionsNodeInfo : RootNodeInfo - { - private string _name; - private string _panel; - - - public RootPuttySessionsNodeInfo() : base(RootNodeType.PuttySessions) - { - _name = Language.PuttySavedSessionsRootName; - _panel = - string.IsNullOrEmpty(Settings.Default.PuttySavedSessionsPanel) - ? Language.General - : Settings.Default.PuttySavedSessionsPanel; - } - - #region Public Properties - - [LocalizedAttributes.LocalizedDefaultValue("strPuttySavedSessionsRootName")] - public override string Name - { - get => _name; - set => _name = value; - //Settings.Default.PuttySavedSessionsName = value; - } - - [LocalizedAttributes.LocalizedCategory(nameof(Language.Display)), - LocalizedAttributes.LocalizedDisplayName(nameof(Language.Panel)), - LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionPanel))] - public override string Panel - { - get => _panel; - set - { - _panel = value; - Settings.Default.PuttySavedSessionsPanel = value; - } - } - - public override TreeNodeType GetTreeNodeType() - { - return TreeNodeType.PuttyRoot; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/RootNodeExpander.cs b/mRemoteNG/Tree/RootNodeExpander.cs deleted file mode 100644 index ec6010af9..000000000 --- a/mRemoteNG/Tree/RootNodeExpander.cs +++ /dev/null @@ -1,14 +0,0 @@ -using mRemoteNG.UI.Controls.ConnectionTree; - - -namespace mRemoteNG.Tree -{ - public class RootNodeExpander : IConnectionTreeDelegate - { - public void Execute(IConnectionTree connectionTree) - { - var rootConnectionNode = connectionTree.GetRootConnectionNode(); - connectionTree.InvokeExpand(rootConnectionNode); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/Tree/SelectedConnectionDeletionConfirmer.cs b/mRemoteNG/Tree/SelectedConnectionDeletionConfirmer.cs deleted file mode 100644 index bf83cc6a3..000000000 --- a/mRemoteNG/Tree/SelectedConnectionDeletionConfirmer.cs +++ /dev/null @@ -1,56 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; -using System; -using System.Windows.Forms; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.Tree -{ - public class SelectedConnectionDeletionConfirmer : IConfirm - { - private readonly Func _confirmationFunc; - - public SelectedConnectionDeletionConfirmer(Func confirmationFunc) - { - _confirmationFunc = confirmationFunc; - } - - public bool Confirm(ConnectionInfo deletionTarget) - { - if (deletionTarget == null) - return false; - - var deletionTargetAsContainer = deletionTarget as ContainerInfo; - if (deletionTargetAsContainer != null) - return deletionTargetAsContainer.HasChildren() - ? UserConfirmsNonEmptyFolderDeletion(deletionTargetAsContainer) - : UserConfirmsEmptyFolderDeletion(deletionTargetAsContainer); - return UserConfirmsConnectionDeletion(deletionTarget); - } - - private bool UserConfirmsEmptyFolderDeletion(AbstractConnectionRecord deletionTarget) - { - var messagePrompt = string.Format(Language.ConfirmDeleteNodeFolder, deletionTarget.Name); - return PromptUser(messagePrompt); - } - - private bool UserConfirmsNonEmptyFolderDeletion(AbstractConnectionRecord deletionTarget) - { - var messagePrompt = string.Format(Language.ConfirmDeleteNodeFolderNotEmpty, deletionTarget.Name); - return PromptUser(messagePrompt); - } - - private bool UserConfirmsConnectionDeletion(AbstractConnectionRecord deletionTarget) - { - var messagePrompt = string.Format(Language.ConfirmDeleteNodeConnection, deletionTarget.Name); - return PromptUser(messagePrompt); - } - - private bool PromptUser(string promptMessage) - { - var msgBoxResponse = _confirmationFunc(promptMessage); - return msgBoxResponse == DialogResult.Yes; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/Adapters/CredentialRecordListAdaptor.cs b/mRemoteNG/UI/Controls/Adapters/CredentialRecordListAdaptor.cs deleted file mode 100644 index 6ea56b0b7..000000000 --- a/mRemoteNG/UI/Controls/Adapters/CredentialRecordListAdaptor.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.ComponentModel; -using System.Drawing.Design; -using System.Windows.Forms.Design; -using mRemoteNG.App; - -namespace mRemoteNG.UI.Controls.Adapters -{ - public class CredentialRecordListAdaptor : UITypeEditor - { - private IWindowsFormsEditorService _editorService; - - public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context) - { - return UITypeEditorEditStyle.DropDown; - } - - public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) - { - if (provider == null) return value; - _editorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; - if (_editorService == null) return value; - - var credentialManager = Runtime.CredentialProviderCatalog; - - var listBox = new CredentialRecordListBox(credentialManager.GetCredentialRecords()); - listBox.SelectedValueChanged += ListBoxOnSelectedValueChanged; - - _editorService.DropDownControl(listBox); - if (listBox.SelectedItem == listBox.NoneSelection) - return null; - if (listBox.SelectedItem == listBox.AddNewSelection) - { - //var newCred = new CredentialRecord(); - //credentialManager.Add(newCred); - //return newCred; - } - - return listBox.SelectedItem ?? value; - } - - private void ListBoxOnSelectedValueChanged(object sender, EventArgs eventArgs) - { - _editorService.CloseDropDown(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/ConnectionContextMenu.cs b/mRemoteNG/UI/Controls/ConnectionContextMenu.cs deleted file mode 100644 index 38143ba3c..000000000 --- a/mRemoteNG/UI/Controls/ConnectionContextMenu.cs +++ /dev/null @@ -1,941 +0,0 @@ -using System; -using System.ComponentModel; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Tools; -using mRemoteNG.Tools.Clipboard; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - -// ReSharper disable UnusedParameter.Local - - -namespace mRemoteNG.UI.Controls -{ - public sealed class ConnectionContextMenu : ContextMenuStrip - { - private ToolStripMenuItem _cMenTreeAddConnection; - private ToolStripMenuItem _cMenTreeAddFolder; - private ToolStripSeparator _cMenTreeSep1; - private ToolStripMenuItem _cMenTreeConnect; - private ToolStripMenuItem _cMenTreeConnectWithOptions; - private ToolStripMenuItem _cMenTreeConnectWithOptionsConnectToConsoleSession; - private ToolStripMenuItem _cMenTreeConnectWithOptionsNoCredentials; - private ToolStripMenuItem _cMenTreeConnectWithOptionsConnectInFullscreen; - private ToolStripMenuItem _cMenTreeConnectWithOptionsViewOnly; - private ToolStripMenuItem _cMenTreeDisconnect; - private ToolStripSeparator _cMenTreeSep2; - private ToolStripMenuItem _cMenTreeToolsTransferFile; - private ToolStripMenuItem _cMenTreeToolsSort; - private ToolStripMenuItem _cMenTreeToolsSortAscending; - private ToolStripMenuItem _cMenTreeToolsSortDescending; - private ToolStripSeparator _cMenTreeSep3; - private ToolStripMenuItem _cMenTreeRename; - private ToolStripMenuItem _cMenTreeDelete; - private ToolStripMenuItem _cMenTreeCopyHostname; - private ToolStripSeparator _cMenTreeSep4; - private ToolStripMenuItem _cMenTreeMoveUp; - private ToolStripMenuItem _cMenTreeMoveDown; - private ToolStripMenuItem _cMenTreeToolsExternalApps; - private ToolStripMenuItem _cMenTreeDuplicate; - private ToolStripMenuItem _cMenInheritanceSubMenu; - private ToolStripMenuItem _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting; - private ToolStripMenuItem _cMenTreeConnectWithOptionsDontConnectToConsoleSession; - private ToolStripMenuItem _cMenTreeImport; - private ToolStripMenuItem _cMenTreeExportFile; - private ToolStripSeparator _toolStripSeparator1; - private ToolStripMenuItem _cMenTreeImportFile; - private ToolStripMenuItem _cMenTreeImportActiveDirectory; - private ToolStripMenuItem _cMenTreeImportPortScan; - private ToolStripMenuItem _cMenTreeApplyInheritanceToChildren; - private ToolStripMenuItem _cMenTreeApplyDefaultInheritance; - private readonly ConnectionTree.ConnectionTree _connectionTree; - - - public ConnectionContextMenu(ConnectionTree.ConnectionTree connectionTree) - { - _connectionTree = connectionTree; - InitializeComponent(); - ApplyLanguage(); - EnableShortcutKeys(); - Opening += (sender, args) => - { - AddExternalApps(); - if (_connectionTree.SelectedNode == null) - { - args.Cancel = true; - return; - } - - ShowHideMenuItems(); - }; - } - - private void InitializeComponent() - { - _cMenTreeConnect = new ToolStripMenuItem(); - _cMenTreeConnectWithOptions = new ToolStripMenuItem(); - _cMenTreeConnectWithOptionsConnectToConsoleSession = new ToolStripMenuItem(); - _cMenTreeConnectWithOptionsDontConnectToConsoleSession = new ToolStripMenuItem(); - _cMenTreeConnectWithOptionsConnectInFullscreen = new ToolStripMenuItem(); - _cMenTreeConnectWithOptionsNoCredentials = new ToolStripMenuItem(); - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting = new ToolStripMenuItem(); - _cMenTreeConnectWithOptionsViewOnly = new ToolStripMenuItem(); - _cMenTreeDisconnect = new ToolStripMenuItem(); - _cMenTreeSep1 = new ToolStripSeparator(); - _cMenTreeToolsExternalApps = new ToolStripMenuItem(); - _cMenTreeToolsTransferFile = new ToolStripMenuItem(); - _cMenTreeSep2 = new ToolStripSeparator(); - _cMenTreeDuplicate = new ToolStripMenuItem(); - _cMenTreeRename = new ToolStripMenuItem(); - _cMenTreeDelete = new ToolStripMenuItem(); - _cMenTreeCopyHostname = new ToolStripMenuItem(); - _cMenTreeSep3 = new ToolStripSeparator(); - _cMenTreeImport = new ToolStripMenuItem(); - _cMenTreeImportFile = new ToolStripMenuItem(); - _cMenTreeImportActiveDirectory = new ToolStripMenuItem(); - _cMenTreeImportPortScan = new ToolStripMenuItem(); - _cMenInheritanceSubMenu = new ToolStripMenuItem(); - _cMenTreeApplyInheritanceToChildren = new ToolStripMenuItem(); - _cMenTreeApplyDefaultInheritance = new ToolStripMenuItem(); - _cMenTreeExportFile = new ToolStripMenuItem(); - _cMenTreeSep4 = new ToolStripSeparator(); - _cMenTreeAddConnection = new ToolStripMenuItem(); - _cMenTreeAddFolder = new ToolStripMenuItem(); - _toolStripSeparator1 = new ToolStripSeparator(); - _cMenTreeToolsSort = new ToolStripMenuItem(); - _cMenTreeToolsSortAscending = new ToolStripMenuItem(); - _cMenTreeToolsSortDescending = new ToolStripMenuItem(); - _cMenTreeMoveUp = new ToolStripMenuItem(); - _cMenTreeMoveDown = new ToolStripMenuItem(); - - - // - // cMenTree - // - Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, 0); - Items.AddRange(new ToolStripItem[] - { - _cMenTreeConnect, - _cMenTreeConnectWithOptions, - _cMenTreeDisconnect, - _cMenTreeSep1, - _cMenTreeToolsExternalApps, - _cMenTreeToolsTransferFile, - _cMenTreeSep2, - _cMenTreeDuplicate, - _cMenTreeRename, - _cMenTreeDelete, - _cMenTreeCopyHostname, - _cMenInheritanceSubMenu, - _cMenTreeSep3, - _cMenTreeImport, - _cMenTreeExportFile, - _cMenTreeSep4, - _cMenTreeAddConnection, - _cMenTreeAddFolder, - _toolStripSeparator1, - _cMenTreeToolsSort, - _cMenTreeMoveUp, - _cMenTreeMoveDown - }); - Name = "cMenTree"; - RenderMode = ToolStripRenderMode.Professional; - Size = new System.Drawing.Size(200, 364); - // - // cMenTreeConnect - // - _cMenTreeConnect.Image = Properties.Resources.Run_16x; - _cMenTreeConnect.Name = "_cMenTreeConnect"; - _cMenTreeConnect.Size = new System.Drawing.Size(199, 22); - _cMenTreeConnect.Text = "Connect"; - _cMenTreeConnect.Click += OnConnectClicked; - // - // cMenTreeConnectWithOptions - // - _cMenTreeConnectWithOptions.DropDownItems.AddRange(new ToolStripItem[] - { - _cMenTreeConnectWithOptionsConnectToConsoleSession, - _cMenTreeConnectWithOptionsDontConnectToConsoleSession, - _cMenTreeConnectWithOptionsConnectInFullscreen, - _cMenTreeConnectWithOptionsNoCredentials, - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting, - _cMenTreeConnectWithOptionsViewOnly - }); - _cMenTreeConnectWithOptions.Name = "_cMenTreeConnectWithOptions"; - _cMenTreeConnectWithOptions.Size = new System.Drawing.Size(199, 22); - _cMenTreeConnectWithOptions.Text = "Connect (with options)"; - // - // cMenTreeConnectWithOptionsConnectToConsoleSession - // - _cMenTreeConnectWithOptionsConnectToConsoleSession.Name = - "_cMenTreeConnectWithOptionsConnectToConsoleSession"; - _cMenTreeConnectWithOptionsConnectToConsoleSession.Size = new System.Drawing.Size(245, 22); - _cMenTreeConnectWithOptionsConnectToConsoleSession.Text = "Connect to console session"; - _cMenTreeConnectWithOptionsConnectToConsoleSession.Click += OnConnectToConsoleSessionClicked; - // - // cMenTreeConnectWithOptionsDontConnectToConsoleSession - // - _cMenTreeConnectWithOptionsDontConnectToConsoleSession.Name = - "_cMenTreeConnectWithOptionsDontConnectToConsoleSession"; - _cMenTreeConnectWithOptionsDontConnectToConsoleSession.Size = new System.Drawing.Size(245, 22); - _cMenTreeConnectWithOptionsDontConnectToConsoleSession.Text = "Don\'t connect to console session"; - _cMenTreeConnectWithOptionsDontConnectToConsoleSession.Visible = false; - _cMenTreeConnectWithOptionsDontConnectToConsoleSession.Click += OnDontConnectToConsoleSessionClicked; - // - // cMenTreeConnectWithOptionsConnectInFullscreen - // - _cMenTreeConnectWithOptionsConnectInFullscreen.Image = Properties.Resources.FullScreen_16x; - _cMenTreeConnectWithOptionsConnectInFullscreen.Name = "_cMenTreeConnectWithOptionsConnectInFullscreen"; - _cMenTreeConnectWithOptionsConnectInFullscreen.Size = new System.Drawing.Size(245, 22); - _cMenTreeConnectWithOptionsConnectInFullscreen.Text = "Connect in fullscreen"; - _cMenTreeConnectWithOptionsConnectInFullscreen.Click += OnConnectInFullscreenClicked; - // - // cMenTreeConnectWithOptionsNoCredentials - // - _cMenTreeConnectWithOptionsNoCredentials.Image = Properties.Resources.UniqueKeyError_16x; - _cMenTreeConnectWithOptionsNoCredentials.Name = "_cMenTreeConnectWithOptionsNoCredentials"; - _cMenTreeConnectWithOptionsNoCredentials.Size = new System.Drawing.Size(245, 22); - _cMenTreeConnectWithOptionsNoCredentials.Text = "Connect without credentials"; - _cMenTreeConnectWithOptionsNoCredentials.Click += OnConnectWithNoCredentialsClick; - // - // cMenTreeConnectWithOptionsChoosePanelBeforeConnecting - // - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Image = Properties.Resources.Panel_16x; - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Name = - "_cMenTreeConnectWithOptionsChoosePanelBeforeConnecting"; - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Size = new System.Drawing.Size(245, 22); - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Text = "Choose panel before connecting"; - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Click += OnChoosePanelBeforeConnectingClicked; - // - // cMenTreeConnectWithOptionsViewOnly - // - _cMenTreeConnectWithOptionsViewOnly.Image = Properties.Resources.Monitor_16x; - _cMenTreeConnectWithOptionsViewOnly.Name = - "_cMenTreeConnectWithOptionsViewOnly"; - _cMenTreeConnectWithOptionsViewOnly.Size = new System.Drawing.Size(245, 22); - _cMenTreeConnectWithOptionsViewOnly.Text = Language.ConnectInViewOnlyMode; - _cMenTreeConnectWithOptionsViewOnly.Click += ConnectWithOptionsViewOnlyOnClick; - // - // cMenTreeDisconnect - // - _cMenTreeDisconnect.Image = Properties.Resources.Stop_16x; - _cMenTreeDisconnect.Name = "_cMenTreeDisconnect"; - _cMenTreeDisconnect.Size = new System.Drawing.Size(199, 22); - _cMenTreeDisconnect.Text = "Disconnect"; - _cMenTreeDisconnect.Click += OnDisconnectClicked; - // - // cMenTreeSep1 - // - _cMenTreeSep1.Name = "_cMenTreeSep1"; - _cMenTreeSep1.Size = new System.Drawing.Size(196, 6); - // - // cMenTreeToolsExternalApps - // - _cMenTreeToolsExternalApps.Image = Properties.Resources.Console_16x; - _cMenTreeToolsExternalApps.Name = "_cMenTreeToolsExternalApps"; - _cMenTreeToolsExternalApps.Size = new System.Drawing.Size(199, 22); - _cMenTreeToolsExternalApps.Text = "External Applications"; - // - // cMenTreeToolsTransferFile - // - _cMenTreeToolsTransferFile.Image = Properties.Resources.SyncArrow_16x; - _cMenTreeToolsTransferFile.Name = "_cMenTreeToolsTransferFile"; - _cMenTreeToolsTransferFile.Size = new System.Drawing.Size(199, 22); - _cMenTreeToolsTransferFile.Text = "Transfer File (SSH)"; - _cMenTreeToolsTransferFile.Click += OnTransferFileClicked; - // - // cMenTreeSep2 - // - _cMenTreeSep2.Name = "_cMenTreeSep2"; - _cMenTreeSep2.Size = new System.Drawing.Size(196, 6); - // - // cMenTreeDuplicate - // - _cMenTreeDuplicate.Image = Properties.Resources.Copy_16x; - _cMenTreeDuplicate.Name = "_cMenTreeDuplicate"; - _cMenTreeDuplicate.Size = new System.Drawing.Size(199, 22); - _cMenTreeDuplicate.Text = "Duplicate"; - _cMenTreeDuplicate.Click += OnDuplicateClicked; - // - // cMenTreeRename - // - _cMenTreeRename.Image = Properties.Resources.Rename_16x; - _cMenTreeRename.Name = "_cMenTreeRename"; - _cMenTreeRename.Size = new System.Drawing.Size(199, 22); - _cMenTreeRename.Text = "Rename"; - _cMenTreeRename.Click += OnRenameClicked; - // - // cMenTreeDelete - // - _cMenTreeDelete.Image = Properties.Resources.Close_16x; - _cMenTreeDelete.Name = "_cMenTreeDelete"; - _cMenTreeDelete.Size = new System.Drawing.Size(199, 22); - _cMenTreeDelete.Text = "Delete"; - _cMenTreeDelete.Click += OnDeleteClicked; - // - // cMenTreeCopyHostname - // - _cMenTreeCopyHostname.Name = "_cMenTreeCopyHostname"; - _cMenTreeCopyHostname.Size = new System.Drawing.Size(199, 22); - _cMenTreeCopyHostname.Text = "Copy Hostname"; - _cMenTreeCopyHostname.Click += OnCopyHostnameClicked; - // - // cMenTreeSep3 - // - _cMenTreeSep3.Name = "_cMenTreeSep3"; - _cMenTreeSep3.Size = new System.Drawing.Size(196, 6); - // - // cMenTreeImport - // - _cMenTreeImport.DropDownItems.AddRange(new ToolStripItem[] - { - _cMenTreeImportFile, - _cMenTreeImportActiveDirectory, - _cMenTreeImportPortScan - }); - _cMenTreeImport.Name = "_cMenTreeImport"; - _cMenTreeImport.Size = new System.Drawing.Size(199, 22); - _cMenTreeImport.Text = "&Import"; - // - // cMenTreeImportFile - // - _cMenTreeImportFile.Name = "_cMenTreeImportFile"; - _cMenTreeImportFile.Size = new System.Drawing.Size(226, 22); - _cMenTreeImportFile.Text = "Import from &File..."; - _cMenTreeImportFile.Click += OnImportFileClicked; - // - // cMenTreeImportActiveDirectory - // - _cMenTreeImportActiveDirectory.Name = "_cMenTreeImportActiveDirectory"; - _cMenTreeImportActiveDirectory.Size = new System.Drawing.Size(226, 22); - _cMenTreeImportActiveDirectory.Text = "Import from &Active Directory..."; - _cMenTreeImportActiveDirectory.Click += OnImportActiveDirectoryClicked; - // - // cMenTreeImportPortScan - // - _cMenTreeImportPortScan.Name = "_cMenTreeImportPortScan"; - _cMenTreeImportPortScan.Size = new System.Drawing.Size(226, 22); - _cMenTreeImportPortScan.Text = "Import from &Port Scan..."; - _cMenTreeImportPortScan.Click += OnImportPortScanClicked; - // - // cMenTreeExportFile - // - _cMenTreeExportFile.Name = "_cMenTreeExportFile"; - _cMenTreeExportFile.Size = new System.Drawing.Size(199, 22); - _cMenTreeExportFile.Text = "&Export to File..."; - _cMenTreeExportFile.Click += OnExportFileClicked; - // - // cMenTreeSep4 - // - _cMenTreeSep4.Name = "_cMenTreeSep4"; - _cMenTreeSep4.Size = new System.Drawing.Size(196, 6); - // - // cMenTreeAddConnection - // - _cMenTreeAddConnection.Image = Properties.Resources.AddItem_16x; - _cMenTreeAddConnection.Name = "_cMenTreeAddConnection"; - _cMenTreeAddConnection.Size = new System.Drawing.Size(199, 22); - _cMenTreeAddConnection.Text = "New Connection"; - _cMenTreeAddConnection.Click += OnAddConnectionClicked; - // - // cMenTreeAddFolder - // - _cMenTreeAddFolder.Image = Properties.Resources.AddFolder_16x; - _cMenTreeAddFolder.Name = "_cMenTreeAddFolder"; - _cMenTreeAddFolder.Size = new System.Drawing.Size(199, 22); - _cMenTreeAddFolder.Text = "New Folder"; - _cMenTreeAddFolder.Click += OnAddFolderClicked; - // - // ToolStripSeparator1 - // - _toolStripSeparator1.Name = "_toolStripSeparator1"; - _toolStripSeparator1.Size = new System.Drawing.Size(196, 6); - // - // cMenTreeToolsSort - // - _cMenTreeToolsSort.DropDownItems.AddRange(new ToolStripItem[] - { - _cMenTreeToolsSortAscending, - _cMenTreeToolsSortDescending - }); - _cMenTreeToolsSort.Name = "_cMenTreeToolsSort"; - _cMenTreeToolsSort.Size = new System.Drawing.Size(199, 22); - _cMenTreeToolsSort.Text = "Sort"; - // - // cMenTreeToolsSortAscending - // - _cMenTreeToolsSortAscending.Image = Properties.Resources.SortAscending_16x; - _cMenTreeToolsSortAscending.Name = "_cMenTreeToolsSortAscending"; - _cMenTreeToolsSortAscending.Size = new System.Drawing.Size(161, 22); - _cMenTreeToolsSortAscending.Text = "Ascending (A-Z)"; - _cMenTreeToolsSortAscending.Click += OnSortAscendingClicked; - // - // cMenTreeToolsSortDescending - // - _cMenTreeToolsSortDescending.Image = Properties.Resources.SortDescending_16x; - _cMenTreeToolsSortDescending.Name = "_cMenTreeToolsSortDescending"; - _cMenTreeToolsSortDescending.Size = new System.Drawing.Size(161, 22); - _cMenTreeToolsSortDescending.Text = "Descending (Z-A)"; - _cMenTreeToolsSortDescending.Click += OnSortDescendingClicked; - // - // cMenTreeMoveUp - // - _cMenTreeMoveUp.Image = Properties.Resources.GlyphUp_16x; - _cMenTreeMoveUp.Name = "_cMenTreeMoveUp"; - _cMenTreeMoveUp.Size = new System.Drawing.Size(199, 22); - _cMenTreeMoveUp.Text = "Move up"; - _cMenTreeMoveUp.Click += OnMoveUpClicked; - // - // cMenTreeMoveDown - // - _cMenTreeMoveDown.Image = Properties.Resources.GlyphDown_16x; - _cMenTreeMoveDown.Name = "_cMenTreeMoveDown"; - _cMenTreeMoveDown.Size = new System.Drawing.Size(199, 22); - _cMenTreeMoveDown.Text = "Move down"; - _cMenTreeMoveDown.Click += OnMoveDownClicked; - // - // cMenEditSubMenu - // - _cMenInheritanceSubMenu.DropDownItems.AddRange(new ToolStripItem[] - { - _cMenTreeApplyInheritanceToChildren, - _cMenTreeApplyDefaultInheritance - }); - _cMenInheritanceSubMenu.Name = "_cMenInheritanceSubMenu"; - _cMenInheritanceSubMenu.Size = new System.Drawing.Size(199, 22); - _cMenInheritanceSubMenu.Text = "Inheritance"; - // - // _cMenTreeApplyInheritanceToChildren - // - _cMenTreeApplyInheritanceToChildren.Name = "_cMenTreeApplyInheritanceToChildren"; - _cMenTreeApplyInheritanceToChildren.Size = new System.Drawing.Size(199, 22); - _cMenTreeApplyInheritanceToChildren.Text = "Apply inheritance to children"; - _cMenTreeApplyInheritanceToChildren.Click += OnApplyInheritanceToChildrenClicked; - // - // _cMenTreeApplyDefaultInheritance - // - _cMenTreeApplyDefaultInheritance.Name = "_cMenTreeApplyDefaultInheritance"; - _cMenTreeApplyDefaultInheritance.Size = new System.Drawing.Size(199, 22); - _cMenTreeApplyDefaultInheritance.Text = "Apply default inheritance"; - _cMenTreeApplyDefaultInheritance.Click += OnApplyDefaultInheritanceClicked; - } - - - private void ApplyLanguage() - { - _cMenTreeConnect.Text = Language.Connect; - _cMenTreeConnectWithOptions.Text = Language.ConnectWithOptions; - _cMenTreeConnectWithOptionsConnectToConsoleSession.Text = Language.ConnectToConsoleSession; - _cMenTreeConnectWithOptionsDontConnectToConsoleSession.Text = Language.DontConnectToConsoleSession; - _cMenTreeConnectWithOptionsConnectInFullscreen.Text = Language.ConnectInFullscreen; - _cMenTreeConnectWithOptionsNoCredentials.Text = Language.ConnectNoCredentials; - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Text = Language.ChoosePanelBeforeConnecting; - _cMenTreeConnectWithOptionsViewOnly.Text = Language.ConnectInViewOnlyMode; - _cMenTreeDisconnect.Text = Language.Disconnect; - - _cMenTreeToolsExternalApps.Text = Language._Tools; - _cMenTreeToolsTransferFile.Text = Language.TransferFile; - - _cMenTreeDuplicate.Text = Language.Duplicate; - _cMenTreeRename.Text = Language.Rename; - _cMenTreeDelete.Text = Language.Delete; - _cMenTreeCopyHostname.Text = Language.CopyHostname; - - _cMenTreeImport.Text = Language._Import; - _cMenTreeImportFile.Text = Language.ImportFromFile; - _cMenTreeImportActiveDirectory.Text = Language.ImportAD; - _cMenTreeImportPortScan.Text = Language.ImportPortScan; - _cMenTreeExportFile.Text = Language._ExportToFile; - - _cMenTreeAddConnection.Text = Language.NewConnection; - _cMenTreeAddFolder.Text = Language.NewFolder; - - _cMenTreeToolsSort.Text = Language.Sort; - _cMenTreeToolsSortAscending.Text = Language.SortAsc; - _cMenTreeToolsSortDescending.Text = Language.SortDesc; - _cMenTreeMoveUp.Text = Language.MoveUp; - _cMenTreeMoveDown.Text = Language.MoveDown; - - _cMenInheritanceSubMenu.Text = Language.Inheritance; - _cMenTreeApplyInheritanceToChildren.Text = Language.ApplyInheritanceToChildren; - _cMenTreeApplyDefaultInheritance.Text = Language.ApplyDefaultInheritance; - } - - internal void ShowHideMenuItems() - { - try - { - Enabled = true; - EnableMenuItemsRecursive(Items); - if (_connectionTree.SelectedNode is RootPuttySessionsNodeInfo) - { - ShowHideMenuItemsForRootPuttyNode(); - } - else if (_connectionTree.SelectedNode is RootNodeInfo) - { - ShowHideMenuItemsForRootConnectionNode(); - } - else if (_connectionTree.SelectedNode is ContainerInfo containerInfo) - { - ShowHideMenuItemsForContainer(containerInfo); - } - else if (_connectionTree.SelectedNode is PuttySessionInfo puttyNode) - { - ShowHideMenuItemsForPuttyNode(puttyNode); - } - else - { - ShowHideMenuItemsForConnectionNode(_connectionTree.SelectedNode); - } - - _cMenInheritanceSubMenu.Enabled = _cMenInheritanceSubMenu.DropDownItems - .OfType().Any(i => i.Enabled); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "ShowHideMenuItems (UI.Controls.ConnectionContextMenu) failed", - ex); - } - } - - internal void ShowHideMenuItemsForRootPuttyNode() - { - _cMenTreeAddConnection.Enabled = false; - _cMenTreeAddFolder.Enabled = false; - _cMenTreeConnect.Enabled = false; - _cMenTreeConnectWithOptions.Enabled = false; - _cMenTreeDisconnect.Enabled = false; - _cMenTreeToolsTransferFile.Enabled = false; - _cMenTreeConnectWithOptions.Enabled = false; - _cMenTreeToolsSort.Enabled = false; - _cMenTreeToolsExternalApps.Enabled = false; - _cMenTreeDuplicate.Enabled = false; - _cMenTreeImport.Enabled = false; - _cMenTreeExportFile.Enabled = false; - _cMenTreeRename.Enabled = false; - _cMenTreeDelete.Enabled = false; - _cMenTreeMoveUp.Enabled = false; - _cMenTreeMoveDown.Enabled = false; - _cMenTreeConnectWithOptionsViewOnly.Enabled = false; - _cMenTreeApplyInheritanceToChildren.Enabled = false; - _cMenTreeApplyDefaultInheritance.Enabled = false; - _cMenTreeCopyHostname.Enabled = false; - } - - internal void ShowHideMenuItemsForRootConnectionNode() - { - _cMenTreeConnect.Enabled = false; - _cMenTreeConnectWithOptions.Enabled = false; - _cMenTreeConnectWithOptionsConnectInFullscreen.Enabled = false; - _cMenTreeConnectWithOptionsConnectToConsoleSession.Enabled = false; - _cMenTreeConnectWithOptionsChoosePanelBeforeConnecting.Enabled = false; - _cMenTreeDisconnect.Enabled = false; - _cMenTreeToolsTransferFile.Enabled = false; - _cMenTreeToolsExternalApps.Enabled = false; - _cMenTreeDuplicate.Enabled = false; - _cMenTreeDelete.Enabled = false; - _cMenTreeMoveUp.Enabled = false; - _cMenTreeMoveDown.Enabled = false; - _cMenTreeConnectWithOptionsViewOnly.Enabled = false; - _cMenTreeApplyInheritanceToChildren.Enabled = false; - _cMenTreeApplyDefaultInheritance.Enabled = false; - } - - internal void ShowHideMenuItemsForContainer(ContainerInfo containerInfo) - { - _cMenTreeConnectWithOptionsConnectInFullscreen.Enabled = false; - _cMenTreeConnectWithOptionsConnectToConsoleSession.Enabled = false; - - var hasOpenConnections = containerInfo.Children.Any(child => child.OpenConnections.Count > 0); - _cMenTreeDisconnect.Enabled = hasOpenConnections; - - _cMenTreeToolsTransferFile.Enabled = false; - _cMenTreeConnectWithOptionsViewOnly.Enabled = false; - } - - internal void ShowHideMenuItemsForPuttyNode(PuttySessionInfo connectionInfo) - { - _cMenTreeAddConnection.Enabled = false; - _cMenTreeAddFolder.Enabled = false; - - if (connectionInfo.OpenConnections.Count == 0) - _cMenTreeDisconnect.Enabled = false; - - if (!(connectionInfo.Protocol == ProtocolType.SSH1 | connectionInfo.Protocol == ProtocolType.SSH2)) - _cMenTreeToolsTransferFile.Enabled = false; - - _cMenTreeConnectWithOptionsConnectInFullscreen.Enabled = false; - _cMenTreeConnectWithOptionsConnectToConsoleSession.Enabled = false; - _cMenTreeToolsSort.Enabled = false; - _cMenTreeDuplicate.Enabled = false; - _cMenTreeRename.Enabled = false; - _cMenTreeDelete.Enabled = false; - _cMenTreeMoveUp.Enabled = false; - _cMenTreeMoveDown.Enabled = false; - _cMenTreeImport.Enabled = false; - _cMenTreeExportFile.Enabled = false; - _cMenTreeConnectWithOptionsViewOnly.Enabled = false; - _cMenTreeApplyInheritanceToChildren.Enabled = false; - _cMenTreeApplyDefaultInheritance.Enabled = false; - } - - internal void ShowHideMenuItemsForConnectionNode(ConnectionInfo connectionInfo) - { - if (connectionInfo.OpenConnections.Count == 0) - _cMenTreeDisconnect.Enabled = false; - - if (!(connectionInfo.Protocol == ProtocolType.SSH1 | connectionInfo.Protocol == ProtocolType.SSH2)) - _cMenTreeToolsTransferFile.Enabled = false; - - if (!(connectionInfo.Protocol == ProtocolType.RDP)) - { - _cMenTreeConnectWithOptionsConnectInFullscreen.Enabled = false; - _cMenTreeConnectWithOptionsConnectToConsoleSession.Enabled = false; - } - - if (connectionInfo.Protocol == ProtocolType.IntApp) - _cMenTreeConnectWithOptionsNoCredentials.Enabled = false; - - if (connectionInfo.Protocol != ProtocolType.RDP && connectionInfo.Protocol != ProtocolType.VNC) - _cMenTreeConnectWithOptionsViewOnly.Enabled = false; - - _cMenTreeApplyInheritanceToChildren.Enabled = false; - } - - internal void DisableShortcutKeys() - { - _cMenTreeConnect.ShortcutKeys = Keys.None; - _cMenTreeDuplicate.ShortcutKeys = Keys.None; - _cMenTreeRename.ShortcutKeys = Keys.None; - _cMenTreeDelete.ShortcutKeys = Keys.None; - _cMenTreeMoveUp.ShortcutKeys = Keys.None; - _cMenTreeMoveDown.ShortcutKeys = Keys.None; - } - - internal void EnableShortcutKeys() - { - _cMenTreeConnect.ShortcutKeys = ((Keys.Control | Keys.Shift) | Keys.C); - _cMenTreeDuplicate.ShortcutKeys = Keys.Control | Keys.D; - _cMenTreeRename.ShortcutKeys = Keys.F2; - _cMenTreeDelete.ShortcutKeys = Keys.Delete; - _cMenTreeMoveUp.ShortcutKeys = Keys.Control | Keys.Up; - _cMenTreeMoveDown.ShortcutKeys = Keys.Control | Keys.Down; - } - - private static void EnableMenuItemsRecursive(ToolStripItemCollection items, bool enable = true) - { - foreach (ToolStripItem item in items) - { - var menuItem = item as ToolStripMenuItem; - if (menuItem == null) - { - continue; - } - - menuItem.Enabled = enable; - if (menuItem.HasDropDownItems) - { - EnableMenuItemsRecursive(menuItem.DropDownItems, enable); - } - } - } - - private void AddExternalApps() - { - try - { - ResetExternalAppMenu(); - - foreach (ExternalTool extA in Runtime.ExternalToolsService.ExternalTools) - { - var menuItem = new ToolStripMenuItem - { - Text = extA.DisplayName, - Tag = extA, - Image = extA.Image - }; - - menuItem.Click += OnExternalToolClicked; - _cMenTreeToolsExternalApps.DropDownItems.Add(menuItem); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "cMenTreeTools_DropDownOpening failed (UI.Window.ConnectionTreeWindow)", - ex); - } - } - - private void ResetExternalAppMenu() - { - if (_cMenTreeToolsExternalApps.DropDownItems.Count <= 0) return; - for (var i = _cMenTreeToolsExternalApps.DropDownItems.Count - 1; i >= 0; i--) - _cMenTreeToolsExternalApps.DropDownItems[i].Dispose(); - - _cMenTreeToolsExternalApps.DropDownItems.Clear(); - } - - #region Click handlers - - private void OnConnectClicked(object sender, EventArgs e) - { - var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo; - if (selectedNodeAsContainer != null) - Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer, ConnectionInfo.Force.DoNotJump); - else - Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode, ConnectionInfo.Force.DoNotJump); - } - - private void OnConnectToConsoleSessionClicked(object sender, EventArgs e) - { - var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo; - if (selectedNodeAsContainer != null) - Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer, - ConnectionInfo.Force.UseConsoleSession | - ConnectionInfo.Force.DoNotJump); - else - Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode, - ConnectionInfo.Force.UseConsoleSession | - ConnectionInfo.Force.DoNotJump); - - } - - private void OnDontConnectToConsoleSessionClicked(object sender, EventArgs e) - { - var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo; - if (selectedNodeAsContainer != null) - Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer, - ConnectionInfo.Force.DontUseConsoleSession | - ConnectionInfo.Force.DoNotJump); - else - Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode, - ConnectionInfo.Force.DontUseConsoleSession | - ConnectionInfo.Force.DoNotJump); - } - - private void OnConnectInFullscreenClicked(object sender, EventArgs e) - { - var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo; - if (selectedNodeAsContainer != null) - Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer, - ConnectionInfo.Force.Fullscreen | ConnectionInfo.Force.DoNotJump); - else - Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode, - ConnectionInfo.Force.Fullscreen | ConnectionInfo.Force.DoNotJump); - } - - private void OnConnectWithNoCredentialsClick(object sender, EventArgs e) - { - var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo; - if (selectedNodeAsContainer != null) - Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer, ConnectionInfo.Force.NoCredentials); - else - Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode, ConnectionInfo.Force.NoCredentials); - } - - private void OnChoosePanelBeforeConnectingClicked(object sender, EventArgs e) - { - var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo; - if (selectedNodeAsContainer != null) - Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer, - ConnectionInfo.Force.OverridePanel | - ConnectionInfo.Force.DoNotJump); - else - Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode, - ConnectionInfo.Force.OverridePanel | - ConnectionInfo.Force.DoNotJump); - } - - private void ConnectWithOptionsViewOnlyOnClick(object sender, EventArgs e) - { - var connectionTarget = _connectionTree.SelectedNode as ContainerInfo - ?? _connectionTree.SelectedNode; - Runtime.ConnectionInitiator.OpenConnection(connectionTarget, ConnectionInfo.Force.ViewOnly); - } - - private void OnDisconnectClicked(object sender, EventArgs e) - { - DisconnectConnection(_connectionTree.SelectedNode); - } - - public void DisconnectConnection(ConnectionInfo connectionInfo) - { - try - { - if (connectionInfo == null) return; - var nodeAsContainer = connectionInfo as ContainerInfo; - if (nodeAsContainer != null) - { - foreach (var child in nodeAsContainer.Children) - { - for (var i = 0; i <= child.OpenConnections.Count - 1; i++) - { - child.OpenConnections[i].Disconnect(); - } - } - } - else - { - for (var i = 0; i <= connectionInfo.OpenConnections.Count - 1; i++) - { - connectionInfo.OpenConnections[i].Disconnect(); - } - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "DisconnectConnection (UI.Window.ConnectionTreeWindow) failed", - ex); - } - } - - private void OnTransferFileClicked(object sender, EventArgs e) - { - SshTransferFile(); - } - - public void SshTransferFile() - { - try - { - Windows.Show(WindowType.SSHTransfer); - Windows.SshtransferForm.Hostname = _connectionTree.SelectedNode.Hostname; - Windows.SshtransferForm.Username = _connectionTree.SelectedNode.Username; - Windows.SshtransferForm.Password = _connectionTree.SelectedNode.Password; - Windows.SshtransferForm.Port = Convert.ToString(_connectionTree.SelectedNode.Port); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "SSHTransferFile (UI.Window.ConnectionTreeWindow) failed", - ex); - } - } - - private void OnDuplicateClicked(object sender, EventArgs e) - { - _connectionTree.DuplicateSelectedNode(); - } - - private void OnRenameClicked(object sender, EventArgs e) - { - _connectionTree.RenameSelectedNode(); - } - - private void OnDeleteClicked(object sender, EventArgs e) - { - _connectionTree.DeleteSelectedNode(); - } - - private void OnCopyHostnameClicked(object sender, EventArgs e) - { - _connectionTree.CopyHostnameSelectedNode(new WindowsClipboard()); - } - - private void OnImportFileClicked(object sender, EventArgs e) - { - ContainerInfo selectedNodeAsContainer; - if (_connectionTree.SelectedNode == null) - selectedNodeAsContainer = Runtime.ConnectionsService.ConnectionTreeModel.RootNodes.First(); - else - selectedNodeAsContainer = - _connectionTree.SelectedNode as ContainerInfo ?? _connectionTree.SelectedNode.Parent; - Import.ImportFromFile(selectedNodeAsContainer); - } - - private void OnImportActiveDirectoryClicked(object sender, EventArgs e) - { - Windows.Show(WindowType.ActiveDirectoryImport); - } - - private void OnImportPortScanClicked(object sender, EventArgs e) - { - Windows.Show(WindowType.PortScan); - } - - private void OnExportFileClicked(object sender, EventArgs e) - { - Export.ExportToFile(_connectionTree.SelectedNode, Runtime.ConnectionsService.ConnectionTreeModel); - } - - private void OnAddConnectionClicked(object sender, EventArgs e) - { - _connectionTree.AddConnection(); - } - - private void OnAddFolderClicked(object sender, EventArgs e) - { - _connectionTree.AddFolder(); - } - - private void OnSortAscendingClicked(object sender, EventArgs e) - { - _connectionTree.SortRecursive(_connectionTree.SelectedNode, ListSortDirection.Ascending); - } - - private void OnSortDescendingClicked(object sender, EventArgs e) - { - _connectionTree.SortRecursive(_connectionTree.SelectedNode, ListSortDirection.Descending); - } - - private void OnMoveUpClicked(object sender, EventArgs e) - { - _connectionTree.SelectedNode.Parent.PromoteChild(_connectionTree.SelectedNode); - } - - private void OnMoveDownClicked(object sender, EventArgs e) - { - _connectionTree.SelectedNode.Parent.DemoteChild(_connectionTree.SelectedNode); - } - - private void OnExternalToolClicked(object sender, EventArgs e) - { - StartExternalApp((ExternalTool)((ToolStripMenuItem)sender).Tag); - } - - private void StartExternalApp(ExternalTool externalTool) - { - try - { - if (_connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Connection | - _connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.PuttySession | - _connectionTree.SelectedNode.GetTreeNodeType() == TreeNodeType.Container) - externalTool.Start(_connectionTree.SelectedNode); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "cMenTreeToolsExternalAppsEntry_Click failed (UI.Window.ConnectionTreeWindow)", - ex); - } - } - - private void OnApplyInheritanceToChildrenClicked(object sender, EventArgs e) - { - if (!(_connectionTree.SelectedNode is ContainerInfo container)) - return; - - container.ApplyInheritancePropertiesToChildren(); - } - - private void OnApplyDefaultInheritanceClicked(object sender, EventArgs e) - { - if (_connectionTree.SelectedNode == null) - return; - - DefaultConnectionInheritance.Instance.SaveTo(_connectionTree.SelectedNode.Inheritance); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.Designer.cs b/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.Designer.cs deleted file mode 100644 index 080b248a8..000000000 --- a/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.Designer.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid -{ - partial class ConnectionInfoPropertyGrid - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.cs b/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.cs deleted file mode 100644 index 3bf8322b4..000000000 --- a/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/ConnectionInfoPropertyGrid.cs +++ /dev/null @@ -1,358 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.Security; -using mRemoteNG.Tools; -using mRemoteNG.Tools.Attributes; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid -{ - public partial class ConnectionInfoPropertyGrid : FilteredPropertyGrid.FilteredPropertyGrid - { - private readonly Dictionary> _propertyCache = new Dictionary>(); - private ConnectionInfo _selectedConnectionInfo; - private PropertyMode _propertyMode; - - /// - /// The currently being shown by this - /// property grid. - /// - public ConnectionInfo SelectedConnectionInfo - { - get => _selectedConnectionInfo; - set - { - if (_selectedConnectionInfo == value) - return; - - _selectedConnectionInfo = value; - RootNodeSelected = SelectedConnectionInfo is RootNodeInfo; - SetGridObject(); - } - } - - /// - /// Determines which set of properties this grid will display. - /// - public PropertyMode PropertyMode - { - get => _propertyMode; - set - { - if (_propertyMode == value) - return; - _propertyMode = value; - SetGridObject(); - } - } - - /// - /// Is the property grid showing the selected connection's - /// inheritance info? If false, the connection's normal - /// properties are shown instead. - /// - public bool IsShowingInheritance => PropertyMode == PropertyMode.Inheritance || - PropertyMode == PropertyMode.DefaultInheritance; - - /// - /// This indicates whether the current - /// is a . - /// - public bool IsShowingDefaultProperties => PropertyMode == PropertyMode.DefaultConnection || - PropertyMode == PropertyMode.DefaultInheritance; - - /// - /// True when the is - /// of type . - /// - public bool RootNodeSelected { get; private set; } - - public ConnectionInfoPropertyGrid() - { - InitializeComponent(); - PropertyValueChanged += pGrid_PropertyValueChanged; - } - - private void SetGridObject() - { - ClearFilters(); - - switch (PropertyMode) - { - case PropertyMode.Connection: - default: - SelectedObject = SelectedConnectionInfo; - break; - case PropertyMode.Inheritance: - SelectedObject = SelectedConnectionInfo?.Inheritance; - break; - case PropertyMode.DefaultConnection: - SelectedObject = DefaultConnectionInfo.Instance; - break; - case PropertyMode.DefaultInheritance: - SelectedObject = DefaultConnectionInheritance.Instance; - break; - } - - if (SelectedObject != null) - ShowHideGridItems(); - } - - private void ShowHideGridItems() - { - try - { - if (SelectedConnectionInfo == null) - return; - - if (RootNodeSelected && PropertyMode == PropertyMode.Connection) - { - if (SelectedConnectionInfo is RootPuttySessionsNodeInfo) - { - BrowsableProperties = new[] - { - nameof(RootPuttySessionsNodeInfo.Name) - }; - } - else if (SelectedConnectionInfo is RootNodeInfo) - { - BrowsableProperties = new[] - { - nameof(RootNodeInfo.Name), - nameof(RootNodeInfo.Password) - }; - } - - Refresh(); - return; - } - - // set all browsable properties valid for this connection's protocol - BrowsableProperties = - GetPropertiesForGridObject(SelectedObject) - .Where(property => - IsValidForProtocol(property, SelectedConnectionInfo.Protocol, IsShowingInheritance)) - .Select(property => property.Name) - .ToArray(); - - var strHide = new List(); - - if (PropertyMode == PropertyMode.Connection) - { - // hide any inherited properties - strHide.AddRange(SelectedConnectionInfo.Inheritance.GetEnabledInheritanceProperties()); - - // ReSharper disable once SwitchStatementMissingSomeCases - switch (SelectedConnectionInfo.Protocol) - { - case ProtocolType.RDP: - strHide.AddRange(SpecialRdpExclusions()); - break; - case ProtocolType.VNC: - strHide.AddRange(SpecialVncExclusions()); - break; - } - - if (SelectedConnectionInfo.IsContainer) - strHide.Add(nameof(AbstractConnectionRecord.Hostname)); - - if (SelectedConnectionInfo is PuttySessionInfo) - strHide.Add(nameof(AbstractConnectionRecord.Favorite)); - } - else if (PropertyMode == PropertyMode.DefaultConnection) - { - strHide.Add(nameof(AbstractConnectionRecord.Hostname)); - strHide.Add(nameof(AbstractConnectionRecord.Name)); - } - - HiddenProperties = strHide.ToArray(); - Refresh(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage( - MessageClass.ErrorMsg, - Language.ConfigPropertyGridHideItemsFailed + - Environment.NewLine + ex.Message, true); - } - } - - private IEnumerable GetPropertiesForGridObject(object currentGridObject) - { - if (_propertyCache.TryGetValue(currentGridObject.GetType(), out var properties)) - return properties; - - var type = currentGridObject.GetType(); - var props = type.GetProperties(); - _propertyCache.Add(type, props); - - return props; - } - - private bool IsValidForProtocol(PropertyInfo property, ProtocolType protocol, bool skipProtocolCheck) - { - return - property.GetCustomAttribute()?.Browsable != false && - (skipProtocolCheck || property.GetCustomAttribute()? - .SupportedProtocolTypes - .Contains(protocol) != false); - } - - /// - /// - /// - private List SpecialRdpExclusions() - { - var strHide = new List(); - - if (SelectedConnectionInfo.RDPMinutesToIdleTimeout <= 0) - { - strHide.Add(nameof(AbstractConnectionRecord.RDPAlertIdleTimeout)); - } - - if (SelectedConnectionInfo.RDGatewayUsageMethod == RDGatewayUsageMethod.Never) - { - strHide.Add(nameof(AbstractConnectionRecord.RDGatewayDomain)); - strHide.Add(nameof(AbstractConnectionRecord.RDGatewayHostname)); - strHide.Add(nameof(AbstractConnectionRecord.RDGatewayPassword)); - strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUseConnectionCredentials)); - strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUsername)); - } - else if (SelectedConnectionInfo.RDGatewayUseConnectionCredentials == - RDGatewayUseConnectionCredentials.Yes) - { - strHide.Add(nameof(AbstractConnectionRecord.RDGatewayDomain)); - strHide.Add(nameof(AbstractConnectionRecord.RDGatewayPassword)); - strHide.Add(nameof(AbstractConnectionRecord.RDGatewayUsername)); - } - - if (!(SelectedConnectionInfo.Resolution == RDPResolutions.FitToWindow || - SelectedConnectionInfo.Resolution == RDPResolutions.Fullscreen)) - { - strHide.Add(nameof(AbstractConnectionRecord.AutomaticResize)); - } - - if (SelectedConnectionInfo.RedirectSound != RDPSounds.BringToThisComputer) - { - strHide.Add(nameof(AbstractConnectionRecord.SoundQuality)); - } - - if (!SelectedConnectionInfo.UseVmId) - { - strHide.Add(nameof(AbstractConnectionRecord.VmId)); - strHide.Add(nameof(AbstractConnectionRecord.UseEnhancedMode)); - } - - return strHide; - } - - private List SpecialVncExclusions() - { - var strHide = new List(); - if (SelectedConnectionInfo.VNCAuthMode == ProtocolVNC.AuthMode.AuthVNC) - { - strHide.Add(nameof(AbstractConnectionRecord.Username)); - strHide.Add(nameof(AbstractConnectionRecord.Domain)); - } - - if (SelectedConnectionInfo.VNCProxyType == ProtocolVNC.ProxyType.ProxyNone) - { - strHide.Add(nameof(AbstractConnectionRecord.VNCProxyIP)); - strHide.Add(nameof(AbstractConnectionRecord.VNCProxyPassword)); - strHide.Add(nameof(AbstractConnectionRecord.VNCProxyPort)); - strHide.Add(nameof(AbstractConnectionRecord.VNCProxyUsername)); - } - - return strHide; - } - - private void UpdateConnectionInfoNode(PropertyValueChangedEventArgs e) - { - if (IsShowingInheritance) - return; - - if (e.ChangedItem.Label == Language.Protocol) - { - SelectedConnectionInfo.SetDefaultPort(); - } - else if (e.ChangedItem.Label == Language.Name) - { - if (Settings.Default.SetHostnameLikeDisplayName) - { - if (!string.IsNullOrEmpty(SelectedConnectionInfo.Name)) - SelectedConnectionInfo.Hostname = SelectedConnectionInfo.Name; - } - } - - if (IsShowingDefaultProperties) - DefaultConnectionInfo.Instance.SaveTo(Settings.Default, a => "ConDefault" + a); - } - - private void UpdateRootInfoNode(PropertyValueChangedEventArgs e) - { - if (!(SelectedObject is RootNodeInfo rootInfo)) - return; - - if (e.ChangedItem.PropertyDescriptor?.Name != "Password") - return; - - if (rootInfo.Password) - { - var passwordName = Settings.Default.UseSQLServer - ? Language.SQLServer.TrimEnd(':') - : Path.GetFileName(Runtime.ConnectionsService.GetStartupConnectionFileName()); - - var password = MiscTools.PasswordDialog(passwordName); - - // operation cancelled, dont set a password - if (!password.Any() || password.First().Length == 0) - { - rootInfo.Password = false; - return; - } - - rootInfo.PasswordString = password.First().ConvertToUnsecureString(); - } - else - { - rootInfo.PasswordString = ""; - } - } - - private void UpdateInheritanceNode() - { - if (IsShowingDefaultProperties && IsShowingInheritance) - DefaultConnectionInheritance.Instance.SaveTo(Settings.Default, a => "InhDefault" + a); - } - - private void pGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) - { - try - { - UpdateConnectionInfoNode(e); - UpdateRootInfoNode(e); - UpdateInheritanceNode(); - ShowHideGridItems(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ConfigPropertyGridValueFailed + Environment.NewLine + - ex.Message, true); - } - } - } -} diff --git a/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/PropertyMode.cs b/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/PropertyMode.cs deleted file mode 100644 index 4654b5bd7..000000000 --- a/mRemoteNG/UI/Controls/ConnectionInfoPropertyGrid/PropertyMode.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid -{ - public enum PropertyMode - { - Connection, - Inheritance, - DefaultConnection, - DefaultInheritance, - } -} diff --git a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.Designer.cs b/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.Designer.cs deleted file mode 100644 index 6155067bc..000000000 --- a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.Designer.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace mRemoteNG.UI.Controls.ConnectionTree -{ - partial class ConnectionTree - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); - this.SuspendLayout(); - // - // ConnectionTree - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.cs b/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.cs deleted file mode 100644 index 95a900442..000000000 --- a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.cs +++ /dev/null @@ -1,549 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; -using System.Linq; -using System.Windows.Forms; -using BrightIdeasSoftware; -using mRemoteNG.App; -using mRemoteNG.Config.Putty; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Properties; -using mRemoteNG.Themes; -using mRemoteNG.Tools.Clipboard; -using mRemoteNG.Tree; -using mRemoteNG.Tree.ClickHandlers; -using mRemoteNG.Tree.Root; -using mRemoteNG.Resources.Language; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.UI.Controls.ConnectionTree -{ - public partial class ConnectionTree : TreeListView, IConnectionTree - { - private readonly ConnectionTreeDragAndDropHandler _dragAndDropHandler = new ConnectionTreeDragAndDropHandler(); - private readonly PuttySessionsManager _puttySessionsManager = PuttySessionsManager.Instance; - private readonly StatusImageList _statusImageList = new StatusImageList(); - private ThemeManager _themeManager; - - private readonly ConnectionTreeSearchTextFilter _connectionTreeSearchTextFilter = - new ConnectionTreeSearchTextFilter(); - - private bool _nodeInEditMode; - private bool _allowEdit; - private ConnectionContextMenu _contextMenu; - private ConnectionTreeModel _connectionTreeModel; - - public ConnectionInfo SelectedNode => (ConnectionInfo)SelectedObject; - - public NodeSearcher NodeSearcher { get; private set; } - - public IConfirm NodeDeletionConfirmer { get; set; } = new AlwaysConfirmYes(); - - public IEnumerable PostSetupActions { get; set; } = new IConnectionTreeDelegate[0]; - - public ITreeNodeClickHandler DoubleClickHandler { get; set; } = - new TreeNodeCompositeClickHandler(); - - public ITreeNodeClickHandler SingleClickHandler { get; set; } = - new TreeNodeCompositeClickHandler(); - - public ConnectionTreeModel ConnectionTreeModel - { - get { return _connectionTreeModel; } - set - { - if (_connectionTreeModel == value) - return; - - UnregisterModelUpdateHandlers(_connectionTreeModel); - _connectionTreeModel = value; - PopulateTreeView(value); - } - } - - public ConnectionTree() - { - InitializeComponent(); - SetupConnectionTreeView(); - UseOverlays = false; - _themeManager = ThemeManager.getInstance(); - _themeManager.ThemeChanged += ThemeManagerOnThemeChanged; - ApplyTheme(); - } - - private void ThemeManagerOnThemeChanged() - { - ApplyTheme(); - } - - private void ApplyTheme() - { - if (!_themeManager.ActiveAndExtended) - return; - - var themePalette = _themeManager.ActiveTheme.ExtendedPalette; - - BackColor = themePalette.getColor("TreeView_Background"); - ForeColor = themePalette.getColor("TreeView_Foreground"); - SelectedBackColor = themePalette.getColor("Treeview_SelectedItem_Active_Background"); - SelectedForeColor = themePalette.getColor("Treeview_SelectedItem_Active_Foreground"); - UnfocusedSelectedBackColor = themePalette.getColor("Treeview_SelectedItem_Inactive_Background"); - UnfocusedSelectedForeColor = themePalette.getColor("Treeview_SelectedItem_Inactive_Foreground"); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - components?.Dispose(); - _statusImageList?.Dispose(); - - _themeManager.ThemeChanged -= ThemeManagerOnThemeChanged; - } - - base.Dispose(disposing); - } - - #region ConnectionTree Setup - - private void SetupConnectionTreeView() - { - SmallImageList = _statusImageList.ImageList; - AddColumns(_statusImageList.ImageGetter); - LinkModelToView(); - _contextMenu = new ConnectionContextMenu(this); - ContextMenuStrip = _contextMenu; - SetupDropSink(); - SetEventHandlers(); - } - - private void AddColumns(ImageGetterDelegate imageGetterDelegate) - { - Columns.Add(new NameColumn(imageGetterDelegate)); - } - - private void LinkModelToView() - { - CanExpandGetter = item => - { - var itemAsContainer = item as ContainerInfo; - return itemAsContainer?.Children.Count > 0; - }; - ChildrenGetter = item => ((ContainerInfo)item).Children; - } - - private void SetupDropSink() - { - DropSink = new SimpleDropSink - { - CanDropBetween = true - }; - } - - private void SetEventHandlers() - { - Collapsed += (sender, args) => - { - if (!(args.Model is ContainerInfo container)) return; - container.IsExpanded = false; - AutoResizeColumn(Columns[0]); - }; - Expanded += (sender, args) => - { - if (!(args.Model is ContainerInfo container)) return; - container.IsExpanded = true; - AutoResizeColumn(Columns[0]); - }; - SelectionChanged += tvConnections_AfterSelect; - MouseDoubleClick += OnMouse_DoubleClick; - MouseClick += OnMouse_SingleClick; - CellToolTipShowing += tvConnections_CellToolTipShowing; - ModelCanDrop += _dragAndDropHandler.HandleEvent_ModelCanDrop; - ModelDropped += _dragAndDropHandler.HandleEvent_ModelDropped; - BeforeLabelEdit += OnBeforeLabelEdit; - AfterLabelEdit += OnAfterLabelEdit; - } - - /// - /// Resizes the given column to ensure that all content is shown - /// - private void AutoResizeColumn(ColumnHeader column) - { - if (InvokeRequired) - { - Invoke((MethodInvoker)(() => AutoResizeColumn(column))); - return; - } - - var longestIndentationAndTextWidth = int.MinValue; - var horizontalScrollOffset = LowLevelScrollPosition.X; - const int padding = 10; - - for (var i = 0; i < Items.Count; i++) - { - var rowIndentation = Items[i].Position.X; - var rowTextWidth = TextRenderer.MeasureText(Items[i].Text, Font).Width; - - longestIndentationAndTextWidth = - Math.Max(rowIndentation + rowTextWidth, longestIndentationAndTextWidth); - } - - column.Width = longestIndentationAndTextWidth + - SmallImageSize.Width + - horizontalScrollOffset + - padding; - } - - private void PopulateTreeView(ConnectionTreeModel newModel) - { - SetObjects(newModel.RootNodes); - RegisterModelUpdateHandlers(newModel); - NodeSearcher = new NodeSearcher(newModel); - ExecutePostSetupActions(); - AutoResizeColumn(Columns[0]); - } - - private void RegisterModelUpdateHandlers(ConnectionTreeModel newModel) - { - _puttySessionsManager.PuttySessionsCollectionChanged += OnPuttySessionsCollectionChanged; - newModel.CollectionChanged += HandleCollectionChanged; - newModel.PropertyChanged += HandleCollectionPropertyChanged; - } - - private void UnregisterModelUpdateHandlers(ConnectionTreeModel oldConnectionTreeModel) - { - _puttySessionsManager.PuttySessionsCollectionChanged -= OnPuttySessionsCollectionChanged; - - if (oldConnectionTreeModel == null) - return; - - oldConnectionTreeModel.CollectionChanged -= HandleCollectionChanged; - oldConnectionTreeModel.PropertyChanged -= HandleCollectionPropertyChanged; - } - - private void OnPuttySessionsCollectionChanged(object sender, NotifyCollectionChangedEventArgs args) - { - RefreshObjects(GetRootPuttyNodes().ToList()); - } - - private void HandleCollectionPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs) - { - // for some reason property changed events are getting triggered twice for each changed property. should be just once. cant find source of duplication - // Removed "TO DO" from above comment. Per #142 it apperas that this no longer occurs with ObjectListView 2.9.1 - var property = propertyChangedEventArgs.PropertyName; - if (property != nameof(ConnectionInfo.Name) - && property != nameof(ConnectionInfo.OpenConnections) - && property != nameof(ConnectionInfo.Icon)) - { - return; - } - - if (!(sender is ConnectionInfo senderAsConnectionInfo)) - return; - - RefreshObject(senderAsConnectionInfo); - AutoResizeColumn(Columns[0]); - } - - private void ExecutePostSetupActions() - { - foreach (var action in PostSetupActions) - { - action.Execute(this); - } - } - - #endregion - - #region ConnectionTree Behavior - - public RootNodeInfo GetRootConnectionNode() - { - return (RootNodeInfo)ConnectionTreeModel.RootNodes.First(item => item is RootNodeInfo); - } - - public void Invoke(Action action) - { - Invoke((Delegate)action); - } - - public void InvokeExpand(object model) - { - Invoke(() => Expand(model)); - } - - public void InvokeRebuildAll(bool preserveState) - { - Invoke(() => RebuildAll(preserveState)); - } - - public IEnumerable GetRootPuttyNodes() - { - return Objects.OfType(); - } - - public void AddConnection() - { - try - { - AddNode(new ConnectionInfo()); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("UI.Window.Tree.AddConnection() failed.", ex); - } - } - - public void AddFolder() - { - try - { - AddNode(new ContainerInfo()); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.ErrorAddFolderFailed, ex); - } - } - - private void AddNode(ConnectionInfo newNode) - { - if (SelectedNode?.GetTreeNodeType() == TreeNodeType.PuttyRoot || - SelectedNode?.GetTreeNodeType() == TreeNodeType.PuttySession) - return; - - // the new node will survive filtering if filtering is active - _connectionTreeSearchTextFilter.SpecialInclusionList.Add(newNode); - - // use root node if no node is selected - ConnectionInfo parentNode = SelectedNode ?? GetRootConnectionNode(); - DefaultConnectionInfo.Instance.SaveTo(newNode); - DefaultConnectionInheritance.Instance.SaveTo(newNode.Inheritance); - var selectedContainer = parentNode as ContainerInfo; - var parent = selectedContainer ?? parentNode?.Parent; - newNode.SetParent(parent); - Expand(parent); - SelectObject(newNode, true); - EnsureModelVisible(newNode); - _allowEdit = true; - SelectedItem.BeginEdit(); - } - - public void DuplicateSelectedNode() - { - if (SelectedNode == null) - return; - - var selectedNodeType = SelectedNode.GetTreeNodeType(); - if (selectedNodeType != TreeNodeType.Connection && selectedNodeType != TreeNodeType.Container) - return; - - var newNode = SelectedNode.Clone(); - SelectedNode.Parent.AddChildBelow(newNode, SelectedNode); - newNode.Parent.SetChildBelow(newNode, SelectedNode); - } - - public void RenameSelectedNode() - { - if (SelectedItem == null) return; - _allowEdit = true; - SelectedItem.BeginEdit(); - } - - public void DeleteSelectedNode() - { - if (SelectedNode is RootNodeInfo || SelectedNode is PuttySessionInfo) return; - if (!NodeDeletionConfirmer.Confirm(SelectedNode)) return; - ConnectionTreeModel.DeleteNode(SelectedNode); - } - - /// - /// Copies the Hostname of the selected connection (or the Name of - /// the selected container) to the given . - /// - /// - public void CopyHostnameSelectedNode(IClipboard clipboard) - { - if (SelectedNode == null) - return; - - var textToCopy = SelectedNode.IsContainer ? SelectedNode.Name : SelectedNode.Hostname; - - if (string.IsNullOrEmpty(textToCopy)) - return; - - clipboard.SetText(textToCopy); - } - - public void SortRecursive(ConnectionInfo sortTarget, ListSortDirection sortDirection) - { - if (sortTarget == null) - sortTarget = GetRootConnectionNode(); - - Runtime.ConnectionsService.BeginBatchingSaves(); - - if (sortTarget is ContainerInfo sortTargetAsContainer) - sortTargetAsContainer.SortRecursive(sortDirection); - else - SelectedNode.Parent.SortRecursive(sortDirection); - - Runtime.ConnectionsService.EndBatchingSaves(); - } - - /// - /// Expands all tree objects and recalculates the - /// column widths. - /// - public override void ExpandAll() - { - base.ExpandAll(); - AutoResizeColumn(Columns[0]); - } - - /// - /// Filters tree items based on the given - /// - /// The text to filter by - public void ApplyFilter(string filterText) - { - UseFiltering = true; - _connectionTreeSearchTextFilter.FilterText = filterText; - ModelFilter = _connectionTreeSearchTextFilter; - } - - /// - /// Removes all item filtering from the connection tree - /// - public void RemoveFilter() - { - UseFiltering = false; - ResetColumnFiltering(); - } - - private void HandleCollectionChanged(object sender, NotifyCollectionChangedEventArgs args) - { - // disable filtering if necessary. prevents RefreshObjects from - // throwing an exception - var filteringEnabled = IsFiltering; - var filter = ModelFilter; - if (filteringEnabled) - { - ResetColumnFiltering(); - } - - RefreshObject(sender); - AutoResizeColumn(Columns[0]); - - // turn filtering back on - if (!filteringEnabled) return; - ModelFilter = filter; - UpdateFiltering(); - } - - protected override void UpdateFiltering() - { - base.UpdateFiltering(); - AutoResizeColumn(Columns[0]); - } - - private void tvConnections_AfterSelect(object sender, EventArgs e) - { - try - { - Windows.ConfigForm.SelectedTreeNode = SelectedNode; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "tvConnections_AfterSelect (UI.Window.ConnectionTreeWindow) failed", - ex); - } - } - - private void OnMouse_DoubleClick(object sender, MouseEventArgs mouseEventArgs) - { - if (mouseEventArgs.Clicks < 2) return; - // ReSharper disable once NotAccessedVariable - OLVColumn column; - var listItem = GetItemAt(mouseEventArgs.X, mouseEventArgs.Y, out column); - if (!(listItem?.RowObject is ConnectionInfo clickedNode)) return; - DoubleClickHandler.Execute(clickedNode); - } - - private void OnMouse_SingleClick(object sender, MouseEventArgs mouseEventArgs) - { - if (mouseEventArgs.Clicks > 1) return; - // ReSharper disable once NotAccessedVariable - OLVColumn column; - var listItem = GetItemAt(mouseEventArgs.X, mouseEventArgs.Y, out column); - if (!(listItem?.RowObject is ConnectionInfo clickedNode)) return; - SingleClickHandler.Execute(clickedNode); - } - - private void tvConnections_CellToolTipShowing(object sender, ToolTipShowingEventArgs e) - { - try - { - if (!Settings.Default.ShowDescriptionTooltipsInTree) - { - // setting text to null prevents the tooltip from being shown - e.Text = null; - return; - } - - var nodeProducingTooltip = (ConnectionInfo)e.Model; - e.Text = nodeProducingTooltip.Description; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "tvConnections_MouseMove (UI.Window.ConnectionTreeWindow) failed", - ex); - } - } - - private void OnBeforeLabelEdit(object sender, LabelEditEventArgs e) - { - if (_nodeInEditMode || !(sender is ConnectionTree)) - return; - - if (!_allowEdit || SelectedNode is PuttySessionInfo || SelectedNode is RootPuttySessionsNodeInfo) - { - e.CancelEdit = true; - return; - } - - _nodeInEditMode = true; - _contextMenu.DisableShortcutKeys(); - } - - private void OnAfterLabelEdit(object sender, LabelEditEventArgs e) - { - if (!_nodeInEditMode) - return; - - try - { - _contextMenu.EnableShortcutKeys(); - ConnectionTreeModel.RenameNode(SelectedNode, e.Label); - _nodeInEditMode = false; - _allowEdit = false; - // ensures that if we are filtering and a new item is added that doesn't match the filter, it will be filtered out - _connectionTreeSearchTextFilter.SpecialInclusionList.Clear(); - UpdateFiltering(); - Windows.ConfigForm.SelectedTreeNode = SelectedNode; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "tvConnections_AfterLabelEdit (UI.Window.ConnectionTreeWindow) failed", - ex); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.resx b/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTree.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTreeSearchTextFilter.cs b/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTreeSearchTextFilter.cs deleted file mode 100644 index 1761713c7..000000000 --- a/mRemoteNG/UI/Controls/ConnectionTree/ConnectionTreeSearchTextFilter.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Collections.Generic; -using BrightIdeasSoftware; -using mRemoteNG.Connection; - -namespace mRemoteNG.UI.Controls.ConnectionTree -{ - public class ConnectionTreeSearchTextFilter : IModelFilter - { - public string FilterText { get; set; } = ""; - - /// - /// A list of objects that should - /// always be included in the output, regardless of matching - /// the desired . - /// - public List SpecialInclusionList { get; } = new List(); - - public bool Filter(object modelObject) - { - if (!(modelObject is ConnectionInfo objectAsConnectionInfo)) - return false; - - if (SpecialInclusionList.Contains(objectAsConnectionInfo)) - return true; - - var filterTextLower = FilterText.ToLowerInvariant(); - - return objectAsConnectionInfo.Name.ToLowerInvariant().Contains(filterTextLower) || - objectAsConnectionInfo.Hostname.ToLowerInvariant().Contains(filterTextLower) || - objectAsConnectionInfo.Description.ToLowerInvariant().Contains(filterTextLower); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/ConnectionTree/IConnectionTree.cs b/mRemoteNG/UI/Controls/ConnectionTree/IConnectionTree.cs deleted file mode 100644 index ada70bddf..000000000 --- a/mRemoteNG/UI/Controls/ConnectionTree/IConnectionTree.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using mRemoteNG.Connection; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.UI.Controls.ConnectionTree -{ - public interface IConnectionTree - { - ConnectionTreeModel ConnectionTreeModel { get; set; } - - ConnectionInfo SelectedNode { get; } - - IEnumerable ExpandedObjects { get; set; } - - RootNodeInfo GetRootConnectionNode(); - - void InvokeExpand(object model); - - void InvokeRebuildAll(bool preserveState); - - void ToggleExpansion(object model); - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/ConnectionTree/IConnectionTreeDelegate.cs b/mRemoteNG/UI/Controls/ConnectionTree/IConnectionTreeDelegate.cs deleted file mode 100644 index fb76c31a6..000000000 --- a/mRemoteNG/UI/Controls/ConnectionTree/IConnectionTreeDelegate.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace mRemoteNG.UI.Controls.ConnectionTree -{ - public interface IConnectionTreeDelegate - { - void Execute(IConnectionTree connectionTree); - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/ConnectionTree/NameColumn.cs b/mRemoteNG/UI/Controls/ConnectionTree/NameColumn.cs deleted file mode 100644 index 54b2bf6c7..000000000 --- a/mRemoteNG/UI/Controls/ConnectionTree/NameColumn.cs +++ /dev/null @@ -1,17 +0,0 @@ -using BrightIdeasSoftware; -using mRemoteNG.Connection; - -namespace mRemoteNG.UI.Controls.ConnectionTree -{ - public class NameColumn : OLVColumn - { - public NameColumn(ImageGetterDelegate imageGetterDelegate) - { - AspectName = "Name"; - FillsFreeSpace = false; - AspectGetter = item => ((ConnectionInfo)item).Name; - ImageGetter = imageGetterDelegate; - AutoCompleteEditor = false; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/CredentialRecordComboBox.Designer.cs b/mRemoteNG/UI/Controls/CredentialRecordComboBox.Designer.cs deleted file mode 100644 index 3877645d5..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordComboBox.Designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace mRemoteNG.UI.Controls -{ - partial class CredentialRecordComboBox - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // CredentialRecordComboBox - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Controls/CredentialRecordComboBox.cs b/mRemoteNG/UI/Controls/CredentialRecordComboBox.cs deleted file mode 100644 index 143ca8504..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordComboBox.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; -using System.Windows.Forms; -using mRemoteNG.Credential; - -namespace mRemoteNG.UI.Controls -{ - public partial class CredentialRecordComboBox : ComboBox - { - public IEnumerable CredentialRecords { get; set; } - - public CredentialRecordComboBox() - { - InitializeComponent(); - PopulateItems(CredentialRecords); - } - - private void PopulateItems(IEnumerable credentialRecords) - { - if (credentialRecords == null) return; - Items.Clear(); - foreach (var credential in credentialRecords) - Items.Add(credential); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/CredentialRecordComboBox.resx b/mRemoteNG/UI/Controls/CredentialRecordComboBox.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordComboBox.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/CredentialRecordListBox.Designer.cs b/mRemoteNG/UI/Controls/CredentialRecordListBox.Designer.cs deleted file mode 100644 index 645745053..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordListBox.Designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace mRemoteNG.UI.Controls -{ - partial class CredentialRecordListBox - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // CredentialRecordListBox - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Controls/CredentialRecordListBox.cs b/mRemoteNG/UI/Controls/CredentialRecordListBox.cs deleted file mode 100644 index e3c46f7cf..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordListBox.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows.Forms; -using mRemoteNG.Credential; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls -{ - public partial class CredentialRecordListBox : ListBox - { - public new ICredentialRecord SelectedItem => (ICredentialRecord)base.SelectedItem; - public ICredentialRecord NoneSelection { get; } = new CredentialRecord {Title = $"--{Language.None}--"}; - public ICredentialRecord AddNewSelection { get; } = new CredentialRecord {Title = $"--{Language.Add}--"}; - - public CredentialRecordListBox(IEnumerable listOfCredentialRecords) - { - InitializeComponent(); - PopulateList(listOfCredentialRecords); - } - - public CredentialRecordListBox(IEnumerable listOfCredentialRecords, IContainer container) - { - container.Add(this); - - InitializeComponent(); - PopulateList(listOfCredentialRecords); - } - - private void PopulateList(IEnumerable listOfCredentialRecords) - { - SelectionMode = SelectionMode.One; - DisplayMember = nameof(ICredentialRecord.Title); - Items.Add(NoneSelection); - Items.Add(AddNewSelection); - - foreach (var credential in listOfCredentialRecords) - { - Items.Add(credential); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/CredentialRecordListBox.resx b/mRemoteNG/UI/Controls/CredentialRecordListBox.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordListBox.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/CredentialRecordListView.Designer.cs b/mRemoteNG/UI/Controls/CredentialRecordListView.Designer.cs deleted file mode 100644 index e2084c33a..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordListView.Designer.cs +++ /dev/null @@ -1,129 +0,0 @@ -namespace mRemoteNG.UI.Controls -{ - partial class CredentialRecordListView - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.objectListView1 = new mRemoteNG.UI.Controls.MrngListView(); - this.olvColumnTitle = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnUsername = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnDomain = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnCredentialId = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnRepositoryTitle = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnRepositorySource = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit(); - this.SuspendLayout(); - // - // objectListView1 - // - this.objectListView1.AllColumns.Add(this.olvColumnTitle); - this.objectListView1.AllColumns.Add(this.olvColumnUsername); - this.objectListView1.AllColumns.Add(this.olvColumnDomain); - this.objectListView1.AllColumns.Add(this.olvColumnCredentialId); - this.objectListView1.AllColumns.Add(this.olvColumnRepositoryTitle); - this.objectListView1.AllColumns.Add(this.olvColumnRepositorySource); - this.objectListView1.CellEditUseWholeCell = false; - this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvColumnTitle, - this.olvColumnUsername, - this.olvColumnDomain, - this.olvColumnRepositoryTitle}); - this.objectListView1.CopySelectionOnControlC = false; - this.objectListView1.CopySelectionOnControlCUsesDragSource = false; - this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default; - this.objectListView1.DecorateLines = true; - this.objectListView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.objectListView1.FullRowSelect = true; - this.objectListView1.HideSelection = false; - this.objectListView1.Location = new System.Drawing.Point(0, 0); - this.objectListView1.Name = "objectListView1"; - this.objectListView1.SelectAllOnControlA = false; - this.objectListView1.ShowGroups = false; - this.objectListView1.Size = new System.Drawing.Size(367, 204); - this.objectListView1.TabIndex = 2; - this.objectListView1.UseCompatibleStateImageBehavior = false; - this.objectListView1.UseNotifyPropertyChanged = true; - this.objectListView1.View = System.Windows.Forms.View.Details; - // - // olvColumnTitle - // - this.olvColumnTitle.AspectName = ""; - this.olvColumnTitle.Groupable = false; - this.olvColumnTitle.Text = "Title"; - // - // olvColumnUsername - // - this.olvColumnUsername.AspectName = ""; - this.olvColumnUsername.Text = "Username"; - // - // olvColumnDomain - // - this.olvColumnDomain.AspectName = ""; - this.olvColumnDomain.Text = "Domain"; - // - // olvColumnCredentialId - // - this.olvColumnCredentialId.AspectName = ""; - this.olvColumnCredentialId.DisplayIndex = 0; - this.olvColumnCredentialId.IsEditable = false; - this.olvColumnCredentialId.IsVisible = false; - this.olvColumnCredentialId.Text = "Credential ID"; - // - // olvColumnRepositoryTitle - // - this.olvColumnRepositoryTitle.Text = "Repository Title"; - // - // olvColumnRepositorySource - // - this.olvColumnRepositorySource.DisplayIndex = 4; - this.olvColumnRepositorySource.IsVisible = false; - this.olvColumnRepositorySource.Text = "Source"; - // - // CredentialRecordListView - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.objectListView1); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "CredentialRecordListView"; - this.Size = new System.Drawing.Size(367, 204); - ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private MrngListView objectListView1; - private BrightIdeasSoftware.OLVColumn olvColumnCredentialId; - private BrightIdeasSoftware.OLVColumn olvColumnTitle; - private BrightIdeasSoftware.OLVColumn olvColumnUsername; - private BrightIdeasSoftware.OLVColumn olvColumnDomain; - private BrightIdeasSoftware.OLVColumn olvColumnRepositorySource; - private BrightIdeasSoftware.OLVColumn olvColumnRepositoryTitle; - } -} diff --git a/mRemoteNG/UI/Controls/CredentialRecordListView.cs b/mRemoteNG/UI/Controls/CredentialRecordListView.cs deleted file mode 100644 index c51cea3a7..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordListView.cs +++ /dev/null @@ -1,154 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using BrightIdeasSoftware; -using mRemoteNG.Credential; -using mRemoteNG.Credential.Repositories; -using mRemoteNG.Tools.CustomCollections; -using mRemoteNG.UI.Controls.PageSequence; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls -{ - public partial class CredentialRecordListView : SequencedControl - { - private ICredentialRepositoryList _credentialRepositoryList = new CredentialRepositoryList(); - - public ICredentialRepositoryList CredentialRepositoryList - { - get => _credentialRepositoryList; - set - { - _credentialRepositoryList.RepositoriesUpdated -= CredentialRepositoryListOnRepositoriesUpdated; - _credentialRepositoryList.CredentialsUpdated -= CredentialRepositoryListOnCredentialsUpdated; - _credentialRepositoryList = value; - _credentialRepositoryList.RepositoriesUpdated += CredentialRepositoryListOnRepositoriesUpdated; - _credentialRepositoryList.CredentialsUpdated += CredentialRepositoryListOnCredentialsUpdated; - SetObjectList(); - objectListView1.AutoResizeColumns(); - } - } - - public KeyValuePair SelectedObject => - CastRowObject(objectListView1.SelectedObject); - - public IEnumerable> SelectedObjects => - from object item - in objectListView1.SelectedObjects - select CastRowObject(item); - - public bool MultipleObjectsSelected => objectListView1.SelectedObjects.Count > 1; - - public CredentialRecordListView() - { - InitializeComponent(); - Disposed += OnDisposed; - olvColumnCredentialId.AspectGetter = CredentialIdAspectGetter; - olvColumnTitle.AspectGetter = CredentialTitleAspectGetter; - olvColumnUsername.AspectGetter = CredentialUsernameAspectGetter; - olvColumnDomain.AspectGetter = CredentialDomainAspectGetter; - olvColumnRepositorySource.AspectGetter = CredentialSourceAspectGetter; - olvColumnRepositoryTitle.AspectGetter = RepoTitleAspectGetter; - objectListView1.SelectionChanged += (sender, args) => RaiseSelectionChangedEvent(); - objectListView1.CellClick += RaiseCellClickEvent; - ApplyLanguage(); - } - - private void OnDisposed(object sender, EventArgs eventArgs) - { - _credentialRepositoryList.RepositoriesUpdated -= CredentialRepositoryListOnRepositoriesUpdated; - _credentialRepositoryList.CredentialsUpdated -= CredentialRepositoryListOnCredentialsUpdated; - } - - private void SetObjectList() - { - var objects = new Dictionary(); - foreach (var repository in _credentialRepositoryList.CredentialProviders) - { - foreach (var credential in repository.CredentialRecords) - objects.Add(credential, repository); - } - - objectListView1.SetObjects(objects, true); - } - - private void ApplyLanguage() - { - olvColumnTitle.Text = Language.Title; - olvColumnUsername.Text = Language.Username; - olvColumnDomain.Text = Language.Domain; - } - - private object CredentialIdAspectGetter(object rowObject) - { - var keyValuePair = CastRowObject(rowObject); - return keyValuePair.Key.Id; - } - - private object CredentialTitleAspectGetter(object rowObject) - { - var keyValuePair = CastRowObject(rowObject); - return keyValuePair.Key.Title; - } - - private object CredentialUsernameAspectGetter(object rowObject) - { - var keyValuePair = CastRowObject(rowObject); - return keyValuePair.Key.Username; - } - - private object CredentialDomainAspectGetter(object rowObject) - { - var keyValuePair = CastRowObject(rowObject); - return keyValuePair.Key.Domain; - } - - private object CredentialSourceAspectGetter(object rowObject) - { - var keyValuePair = CastRowObject(rowObject); - return keyValuePair.Value.Config.Source; - } - - private object RepoTitleAspectGetter(object rowObject) - { - var keyValuePair = CastRowObject(rowObject); - return keyValuePair.Value.Config.Title; - } - - private KeyValuePair CastRowObject(object model) - { - if (!(model is KeyValuePair)) - return default(KeyValuePair); - var keyValuePair = (KeyValuePair)model; - return keyValuePair; - } - - private void CredentialRepositoryListOnRepositoriesUpdated(object sender, - CollectionUpdatedEventArgs - arg) - { - SetObjectList(); - } - - private void CredentialRepositoryListOnCredentialsUpdated(object sender, - CollectionUpdatedEventArgs - collectionUpdatedEventArgs) - { - SetObjectList(); - } - - public event EventHandler SelectionChanged; - - private void RaiseSelectionChangedEvent() - { - SelectionChanged?.Invoke(this, EventArgs.Empty); - } - - public event EventHandler CellClick; - - private void RaiseCellClickEvent(object sender, CellClickEventArgs args) - { - CellClick?.Invoke(sender, args); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/CredentialRecordListView.resx b/mRemoteNG/UI/Controls/CredentialRecordListView.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Controls/CredentialRecordListView.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/CredentialRepositoryListView.Designer.cs b/mRemoteNG/UI/Controls/CredentialRepositoryListView.Designer.cs deleted file mode 100644 index 922c6d044..000000000 --- a/mRemoteNG/UI/Controls/CredentialRepositoryListView.Designer.cs +++ /dev/null @@ -1,110 +0,0 @@ -namespace mRemoteNG.UI.Controls -{ - partial class CredentialRepositoryListView - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.objectListView1 = new mRemoteNG.UI.Controls.MrngListView(); - this.olvColumnTitle = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnProvider = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnIsLoaded = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnSource = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.olvColumnId = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit(); - this.SuspendLayout(); - // - // objectListView1 - // - this.objectListView1.AllColumns.Add(this.olvColumnTitle); - this.objectListView1.AllColumns.Add(this.olvColumnProvider); - this.objectListView1.AllColumns.Add(this.olvColumnIsLoaded); - this.objectListView1.AllColumns.Add(this.olvColumnSource); - this.objectListView1.AllColumns.Add(this.olvColumnId); - this.objectListView1.CellEditUseWholeCell = false; - this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.olvColumnTitle, - this.olvColumnProvider, - this.olvColumnIsLoaded, - this.olvColumnSource, - this.olvColumnId}); - this.objectListView1.CopySelectionOnControlC = false; - this.objectListView1.CopySelectionOnControlCUsesDragSource = false; - this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default; - this.objectListView1.DecorateLines = true; - this.objectListView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.objectListView1.FullRowSelect = true; - this.objectListView1.HideSelection = false; - this.objectListView1.Location = new System.Drawing.Point(0, 0); - this.objectListView1.Name = "objectListView1"; - this.objectListView1.SelectAllOnControlA = false; - this.objectListView1.ShowGroups = false; - this.objectListView1.Size = new System.Drawing.Size(308, 171); - this.objectListView1.TabIndex = 8; - this.objectListView1.UseCompatibleStateImageBehavior = false; - this.objectListView1.UseNotifyPropertyChanged = true; - this.objectListView1.View = System.Windows.Forms.View.Details; - // - // olvColumnTitle - // - this.olvColumnTitle.Groupable = false; - this.olvColumnTitle.Text = "Title"; - // - // olvColumnProvider - // - this.olvColumnProvider.AspectName = ""; - this.olvColumnProvider.Groupable = false; - this.olvColumnProvider.Hideable = false; - this.olvColumnProvider.IsEditable = false; - this.olvColumnProvider.Searchable = false; - this.olvColumnProvider.Text = "Provider"; - // - // olvColumnIsLoaded - // - this.olvColumnIsLoaded.IsEditable = false; - this.olvColumnIsLoaded.Text = "Loaded"; - // - // olvColumnSource - // - this.olvColumnSource.AspectName = ""; - this.olvColumnSource.ButtonSizing = BrightIdeasSoftware.OLVColumn.ButtonSizingMode.FixedBounds; - this.olvColumnSource.Groupable = false; - this.olvColumnSource.Text = "Source"; - // - // olvColumnId - // - this.olvColumnId.Text = "ID"; - // - // CredentialRepositoryListView - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.objectListView1); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "CredentialRepositoryListView"; - this.Size = new System.Drawing.Size(308, 171); - ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private MrngListView objectListView1; - private BrightIdeasSoftware.OLVColumn olvColumnProvider; - private BrightIdeasSoftware.OLVColumn olvColumnSource; - private BrightIdeasSoftware.OLVColumn olvColumnTitle; - private BrightIdeasSoftware.OLVColumn olvColumnId; - private BrightIdeasSoftware.OLVColumn olvColumnIsLoaded; - } -} diff --git a/mRemoteNG/UI/Controls/CredentialRepositoryListView.cs b/mRemoteNG/UI/Controls/CredentialRepositoryListView.cs deleted file mode 100644 index 5225eb8b1..000000000 --- a/mRemoteNG/UI/Controls/CredentialRepositoryListView.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; -using BrightIdeasSoftware; -using mRemoteNG.Credential; -using mRemoteNG.Credential.Repositories; -using mRemoteNG.Tools.CustomCollections; - -namespace mRemoteNG.UI.Controls -{ - public partial class CredentialRepositoryListView : UserControl - { - private ICredentialRepositoryList _credentialRepositoryList = new CredentialRepositoryList(); - - public ICredentialRepositoryList CredentialRepositoryList - { - get => _credentialRepositoryList; - set - { - _credentialRepositoryList.RepositoriesUpdated -= OnRepositoriesUpdated; - _credentialRepositoryList = value; - SetListObjects(CredentialRepositoryList.CredentialProviders); - objectListView1.AutoResizeColumns(); - _credentialRepositoryList.RepositoriesUpdated += OnRepositoriesUpdated; - } - } - - public Func RepositoryFilter { get; set; } - public ICredentialRepository SelectedRepository => GetSelectedRepository(); - public Func DoubleClickHandler { get; set; } - - public CredentialRepositoryListView() - { - InitializeComponent(); - SetupObjectListView(); - } - - public void RefreshObjects() - { - var repos = CredentialRepositoryList.CredentialProviders.ToList(); - objectListView1.RefreshObjects(repos); - } - - private void SetupObjectListView() - { - olvColumnTitle.AspectGetter = rowObject => ((ICredentialRepository)rowObject).Config.Title; - olvColumnProvider.AspectGetter = rowObject => ((ICredentialRepository)rowObject).Config.TypeName; - olvColumnSource.AspectGetter = rowObject => ((ICredentialRepository)rowObject).Config.Source; - olvColumnId.AspectGetter = rowObject => ((ICredentialRepository)rowObject).Config.Id; - olvColumnIsLoaded.AspectGetter = rowObject => ((ICredentialRepository)rowObject).IsLoaded; - SetListObjects(CredentialRepositoryList.CredentialProviders); - objectListView1.SelectionChanged += (sender, args) => RaiseSelectionChangedEvent(); - objectListView1.MouseDoubleClick += ObjectListView1OnMouseDoubleClick; - } - - private void OnRepositoriesUpdated(object sender, CollectionUpdatedEventArgs args) - { - SetListObjects(CredentialRepositoryList.CredentialProviders); - } - - private void SetListObjects(IEnumerable repositories) - { - var filteredRepositories = RepositoryFilter == null ? repositories : repositories.Where(RepositoryFilter); - objectListView1.SetObjects(filteredRepositories); - } - - private void ObjectListView1OnMouseDoubleClick(object sender, MouseEventArgs mouseEventArgs) - { - if (mouseEventArgs.Clicks < 2) return; - OLVColumn column; - var listItem = objectListView1.GetItemAt(mouseEventArgs.X, mouseEventArgs.Y, out column); - var clickedNode = listItem.RowObject as ICredentialRepository; - if (clickedNode == null) return; - DoubleClickHandler?.Invoke(clickedNode); - } - - private ICredentialRepository GetSelectedRepository() - { - return objectListView1.SelectedObject as ICredentialRepository; - } - - public event EventHandler SelectionChanged; - - private void RaiseSelectionChangedEvent() - { - SelectionChanged?.Invoke(this, EventArgs.Empty); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - _credentialRepositoryList.RepositoriesUpdated -= OnRepositoriesUpdated; - components?.Dispose(); - } - - base.Dispose(disposing); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/CredentialRepositoryListView.resx b/mRemoteNG/UI/Controls/CredentialRepositoryListView.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Controls/CredentialRepositoryListView.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/ExternalToolsToolStrip.cs b/mRemoteNG/UI/Controls/ExternalToolsToolStrip.cs deleted file mode 100644 index eac400593..000000000 --- a/mRemoteNG/UI/Controls/ExternalToolsToolStrip.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.ComponentModel; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.Tools; -using mRemoteNG.Tree; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls -{ - public class ExternalToolsToolStrip : ToolStrip - { - private IContainer components; - private ContextMenuStrip _cMenExtAppsToolbar; - internal ToolStripMenuItem CMenToolbarShowText; - - public ExternalToolsToolStrip() - { - Initialize(); - Runtime.ExternalToolsService.ExternalTools.CollectionUpdated += - (sender, args) => AddExternalToolsToToolBar(); - } - - private void Initialize() - { - components = new System.ComponentModel.Container(); - _cMenExtAppsToolbar = new ContextMenuStrip(components); - CMenToolbarShowText = new ToolStripMenuItem(); - - // - // tsExternalTools - // - ContextMenuStrip = _cMenExtAppsToolbar; - Dock = DockStyle.None; - Location = new System.Drawing.Point(39, 49); - Name = "tsExternalTools"; - Size = new System.Drawing.Size(111, 25); - TabIndex = 17; - // - // cMenExtAppsToolbar - // - _cMenExtAppsToolbar.Items.Add(CMenToolbarShowText); - _cMenExtAppsToolbar.Name = "cMenToolbar"; - _cMenExtAppsToolbar.Size = new System.Drawing.Size(129, 26); - // - // cMenToolbarShowText - // - CMenToolbarShowText.Checked = true; - CMenToolbarShowText.CheckState = CheckState.Checked; - CMenToolbarShowText.Name = "cMenToolbarShowText"; - CMenToolbarShowText.Size = new System.Drawing.Size(128, 22); - CMenToolbarShowText.Text = Language.ShowText; - CMenToolbarShowText.Click += cMenToolbarShowText_Click; - } - - #region Ext Apps Toolbar - - private void cMenToolbarShowText_Click(object sender, EventArgs e) - { - SwitchToolBarText(!CMenToolbarShowText.Checked); - } - - public void AddExternalToolsToToolBar() - { - try - { - SuspendLayout(); - - for (var index = Items.Count - 1; index >= 0; index--) - Items[index].Dispose(); - Items.Clear(); - - foreach (var tool in Runtime.ExternalToolsService.ExternalTools) - { - if (!tool.ShowOnToolbar) continue; - var button = (ToolStripButton)Items.Add(tool.DisplayName, tool.Image, tsExtAppEntry_Click); - if (CMenToolbarShowText.Checked) - button.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; - else - button.DisplayStyle = button.Image != null - ? ToolStripItemDisplayStyle.Image - : ToolStripItemDisplayStyle.ImageAndText; - - button.Tag = tool; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.ErrorAddExternalToolsToToolBarFailed, ex); - } - finally - { - ResumeLayout(true); - } - } - - private static void tsExtAppEntry_Click(object sender, EventArgs e) - { - var extA = (ExternalTool)((ToolStripButton)sender).Tag; - - var selectedTreeNode = Windows.TreeForm.SelectedNode; - if (selectedTreeNode != null && selectedTreeNode.GetTreeNodeType() == TreeNodeType.Connection || - selectedTreeNode.GetTreeNodeType() == TreeNodeType.PuttySession) - extA.Start(selectedTreeNode); - else - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "No connection was selected, external tool may return errors.", - true); - extA.Start(); - } - } - - public void SwitchToolBarText(bool show) - { - foreach (ToolStripButton tItem in Items) - { - if (show) - tItem.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; - else - tItem.DisplayStyle = tItem.Image != null - ? ToolStripItemDisplayStyle.Image - : ToolStripItemDisplayStyle.ImageAndText; - } - - CMenToolbarShowText.Checked = show; - } - - #endregion - - // CodeAyalysis doesn't like null propagation - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", - MessageId = "components")] - protected override void Dispose(bool disposing) - { - try - { - if (!disposing) return; - components?.Dispose(); - } - finally - { - base.Dispose(disposing); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs b/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs deleted file mode 100644 index 80e3ae41f..000000000 --- a/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs +++ /dev/null @@ -1,421 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Windows.Forms; - -namespace mRemoteNG.UI.Controls.FilteredPropertyGrid -{ - /// - /// This class overrides the standard PropertyGrid provided by Microsoft. - /// It also allows to hide (or filter) the properties of the SelectedObject displayed by the PropertyGrid. - /// - public partial class FilteredPropertyGrid : PropertyGrid - { - /// - /// Contain a reference to the collection of properties to show in the parent PropertyGrid. - /// - /// By default, m_PropertyDescriptors contain all the properties of the object. - readonly List _propertyDescriptors = new List(); - - /// - /// Contain a reference to the array of properties to display in the PropertyGrid. - /// - private AttributeCollection _hiddenAttributes; - - private AttributeCollection _browsableAttributes; - - /// - /// Contain references to the arrays of properties or categories to hide. - /// - private string[] _mBrowsableProperties; - - private string[] _mHiddenProperties; - - /// - /// Contain a reference to the wrapper that contains the object to be displayed into the PropertyGrid. - /// - private ObjectWrapper _mWrapper; - - /// - /// Public constructor. - /// - public FilteredPropertyGrid() - { - InitializeComponent(); - base.SelectedObject = _mWrapper; - } - - /// - /// A list of all currently properties being shown by the property grid. - /// - public IEnumerable VisibleProperties => _propertyDescriptors.Select(p => p.Name); - - public new AttributeCollection BrowsableAttributes - { - get => _browsableAttributes; - set - { - if (_browsableAttributes == value) return; - _hiddenAttributes = null; - _browsableAttributes = value; - RefreshProperties(); - } - } - - /// - /// Get or set the categories to hide. - /// - public AttributeCollection HiddenAttributes - { - get => _hiddenAttributes; - set - { - if (value == _hiddenAttributes) return; - _hiddenAttributes = value; - _browsableAttributes = null; - RefreshProperties(); - } - } - - /// - /// Get or set the properties to show. - /// - /// if one or several properties don't exist. - public string[] BrowsableProperties - { - get => _mBrowsableProperties; - set - { - if (value == _mBrowsableProperties) return; - _mBrowsableProperties = value; - RefreshProperties(); - } - } - - /// Get or set the properties to hide. - public string[] HiddenProperties - { - get => _mHiddenProperties; - set - { - if (value == _mHiddenProperties) return; - _mHiddenProperties = value; - RefreshProperties(); - } - } - - /// - /// Overwrite the PropertyGrid.SelectedObject property. - /// - /// The object passed to the base PropertyGrid is the wrapper. - public new object SelectedObject - { - get => - _mWrapper != null - ? ((ObjectWrapper)base.SelectedObject).SelectedObject - : null; - set - { - // Set the new object to the wrapper and create one if necessary. - if (_mWrapper == null) - { - _mWrapper = new ObjectWrapper(value); - RefreshProperties(); - } - else if (_mWrapper.SelectedObject != value) - { - var needrefresh = value?.GetType() != _mWrapper.SelectedObject?.GetType(); - _mWrapper.SelectedObject = value ?? new object(); - if (needrefresh) - RefreshProperties(); - } - - // Set the list of properties to the wrapper. - _mWrapper.PropertyDescriptors = _propertyDescriptors; - // Link the wrapper to the parent PropertyGrid. - base.SelectedObject = _mWrapper; - } - } - - public List GetVisibleGridItems() - { - var gridRoot = SelectedGridItem; - while (gridRoot.GridItemType != GridItemType.Root) - { - gridRoot = gridRoot.Parent; - } - return GetVisibleGridItemsRecursive(gridRoot, new List()); - } - - private List GetVisibleGridItemsRecursive(GridItem item, List gridItems) - { - if (item.GridItemType == GridItemType.Property && !gridItems.Contains(item)) - gridItems.Add(item); - - if (item.Expandable && !item.Expanded) - return gridItems; - - foreach (GridItem child in item.GridItems) - { - GetVisibleGridItemsRecursive(child, gridItems); - } - - return gridItems; - } - - public GridItem FindPreviousGridItemProperty(GridItem startItem) - { - var gridItems = GetVisibleGridItems(); - - if (gridItems.Count == 0 || startItem == null) - return null; - - var startIndex = gridItems.IndexOf(startItem); - if (startItem.GridItemType == GridItemType.Property) - { - startIndex--; - if (startIndex < 0) - { - startIndex = gridItems.Count - 1; - } - } - - var previousIndex = 0; - var previousIndexValid = false; - for (var index = startIndex; index >= 0; index--) - { - if (gridItems[index].GridItemType != GridItemType.Property) continue; - previousIndex = index; - previousIndexValid = true; - break; - } - - if (previousIndexValid) - return gridItems[previousIndex]; - - for (var index = gridItems.Count - 1; index >= startIndex + 1; index--) - { - if (gridItems[index].GridItemType != GridItemType.Property) continue; - previousIndex = index; - previousIndexValid = true; - break; - } - - return !previousIndexValid ? null : gridItems[previousIndex]; - } - - public GridItem FindNextGridItemProperty(GridItem startItem) - { - var gridItems = GetVisibleGridItems(); - - if (gridItems.Count == 0 || startItem == null) - return null; - - var startIndex = gridItems.IndexOf(startItem); - if (startItem.GridItemType == GridItemType.Property) - { - startIndex++; - if (startIndex >= gridItems.Count) - { - startIndex = 0; - } - } - - var nextIndex = 0; - var nextIndexValid = false; - for (var index = startIndex; index <= gridItems.Count - 1; index++) - { - if (gridItems[index].GridItemType != GridItemType.Property) continue; - nextIndex = index; - nextIndexValid = true; - break; - } - - if (nextIndexValid) - return gridItems[nextIndex]; - - for (var index = 0; index <= startIndex - 1; index++) - { - if (gridItems[index].GridItemType != GridItemType.Property) continue; - nextIndex = index; - nextIndexValid = true; - break; - } - - return !nextIndexValid ? null : gridItems[nextIndex]; - } - - /// - /// Selects the next grid item in the property grid - /// using the currently selected grid item as a reference. - /// Does nothing if there is no next item. - /// - public void SelectNextGridItem() - { - var nextGridItem = FindNextGridItemProperty(SelectedGridItem); - if (nextGridItem != null) - SelectedGridItem = nextGridItem; - } - - /// - /// Selects the previous grid item in the property grid - /// using the currently selected grid item as a reference. - /// Does nothing if there is no previous item. - /// - public void SelectPreviousGridItem() - { - var previousGridItem = FindPreviousGridItemProperty(SelectedGridItem); - if (previousGridItem != null) - SelectedGridItem = previousGridItem; - } - - /// - /// Select the grid item whose backing property name - /// matches the given . - /// - /// - public void SelectGridItem(string propertyName) - { - var item = GetVisibleGridItems() - .FirstOrDefault(gridItem => gridItem.PropertyDescriptor?.Name == propertyName); - - if (item != null) - SelectedGridItem = item; - } - - public void ClearFilters() - { - _mBrowsableProperties = null; - _mHiddenProperties = null; - RefreshProperties(); - } - - /// - /// Build the list of the properties to be displayed in the PropertyGrid, following the filters defined the Browsable and Hidden properties. - /// - private void RefreshProperties() - { - if (_mWrapper == null) - return; - - // Clear the list of properties to be displayed. - _propertyDescriptors.Clear(); - // Check whether the list is filtered - if (_browsableAttributes != null && _browsableAttributes.Count > 0) - { - // Add to the list the attributes that need to be displayed. - foreach (Attribute attribute in _browsableAttributes) - ShowAttribute(attribute); - } - - // Display if necessary, some properties - if (_mBrowsableProperties != null && _mBrowsableProperties.Length > 0) - { - var allproperties = TypeDescriptor.GetProperties(_mWrapper.SelectedObject); - foreach (var propertyname in _mBrowsableProperties) - { - var property = allproperties[propertyname]; - - if (property == null) - throw new InvalidOperationException($"Property '{propertyname}' not found on object '{_mWrapper.GetClassName()}'"); - - ShowProperty(property); - } - } - - if ((_browsableAttributes == null || _browsableAttributes.Count == 0) && - (_mBrowsableProperties == null || _mBrowsableProperties.Length == 0)) - { - // Fill the collection with all the properties. - var originalPropertyDescriptors = TypeDescriptor - .GetProperties(_mWrapper.SelectedObject) - .OfType() - .Where(PropertyDoesntHaveBrowsableFalseAttribute); - - foreach (PropertyDescriptor propertyDescriptor in originalPropertyDescriptors) - _propertyDescriptors.Add(propertyDescriptor); - } - - // Remove from the list the attributes that mustn't be displayed. - if (_hiddenAttributes != null) - foreach (Attribute attribute in _hiddenAttributes) - HideAttribute(attribute); - - // Hide if necessary, some properties - if (_mHiddenProperties != null && _mHiddenProperties.Length > 0) - { - // Remove from the list the properties that mustn't be displayed. - foreach (var propertyname in _mHiddenProperties) - { - var property = _propertyDescriptors.FirstOrDefault(p => p.Name == propertyname); - - // Remove from the list the property - HideProperty(property); - } - } - } - - /// - /// Predicate to determine if a property has a Browsable(false) attribute - /// attatched to it. If so, it should not be shown. - /// - /// - /// - private bool PropertyDoesntHaveBrowsableFalseAttribute(PropertyDescriptor propertyDescriptor) - { - return !propertyDescriptor.Attributes.Contains(new BrowsableAttribute(false)); - } - - /// - /// Allows to hide a set of properties to the parent PropertyGrid. - /// - /// A set of attributes that filter the original collection of properties. - /// For better performance, include the BrowsableAttribute with true value. - private void HideAttribute(Attribute attribute) - { - var filteredoriginalpropertydescriptors = - TypeDescriptor.GetProperties(_mWrapper.SelectedObject, new[] {attribute}); - if (filteredoriginalpropertydescriptors == null || filteredoriginalpropertydescriptors.Count == 0) - throw new ArgumentException("Attribute not found", attribute.ToString()); - - foreach (PropertyDescriptor propertydescriptor in filteredoriginalpropertydescriptors) - HideProperty(propertydescriptor); - } - - /// - /// Add all the properties that match an attribute to the list of properties to be displayed in the PropertyGrid. - /// - /// The attribute to be added. - private void ShowAttribute(Attribute attribute) - { - var filteredoriginalpropertydescriptors = - TypeDescriptor.GetProperties(_mWrapper.SelectedObject, new[] {attribute}); - if (filteredoriginalpropertydescriptors == null || filteredoriginalpropertydescriptors.Count == 0) - throw new ArgumentException("Attribute not found", attribute.ToString()); - - foreach (PropertyDescriptor propertydescriptor in filteredoriginalpropertydescriptors) - ShowProperty(propertydescriptor); - } - - /// - /// Add a property to the list of properties to be displayed in the PropertyGrid. - /// - /// The property to be added. - private void ShowProperty(PropertyDescriptor property) - { - if (!_propertyDescriptors.Contains(property)) - _propertyDescriptors.Add(property); - } - - /// - /// Allows to hide a property to the parent PropertyGrid. - /// - /// The name of the property to be hidden. - private void HideProperty(PropertyDescriptor property) - { - if (_propertyDescriptors.Contains(property)) - _propertyDescriptors.Remove(property); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs b/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs deleted file mode 100644 index 1113c99d9..000000000 --- a/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace mRemoteNG.UI.Controls.FilteredPropertyGrid -{ - partial class FilteredPropertyGrid - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) { - if(disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() { - this.SuspendLayout(); - // - // FilteredPropertyGrid - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.resx b/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/FilteredPropertyGrid/ObjectWrapper.cs b/mRemoteNG/UI/Controls/FilteredPropertyGrid/ObjectWrapper.cs deleted file mode 100644 index 221edec33..000000000 --- a/mRemoteNG/UI/Controls/FilteredPropertyGrid/ObjectWrapper.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; - -namespace mRemoteNG.UI.Controls.FilteredPropertyGrid -{ - /// - /// This class is a wrapper. It contains the object the PropertyGrid has to display. - /// - internal class ObjectWrapper : ICustomTypeDescriptor - { - /// - /// Creates a new instance of an with the given object to be wrapped. - /// - /// A reference to the selected object that will linked to the parent PropertyGrid. - internal ObjectWrapper(object obj) - { - SelectedObject = obj; - } - - /// - /// Get or set a reference to the selected objet that will linked to the parent PropertyGrid. - /// - public object SelectedObject { get; set; } - - /// - /// Get or set a reference to the collection of properties to show in the parent PropertyGrid - /// - public List PropertyDescriptors { get; set; } = new List(); - - #region ICustomTypeDescriptor Members - - public PropertyDescriptorCollection GetProperties(Attribute[] attributes) - { - return GetProperties(); - } - - public PropertyDescriptorCollection GetProperties() - { - return new PropertyDescriptorCollection(PropertyDescriptors.ToArray(), true); - } - - /// - /// GetAttributes - /// - /// AttributeCollection - public AttributeCollection GetAttributes() - { - return TypeDescriptor.GetAttributes(SelectedObject, true); - } - - /// - /// Get Class Name - /// - /// String - public string GetClassName() - { - return TypeDescriptor.GetClassName(SelectedObject, true); - } - - /// - /// GetComponentName - /// - /// String - public string GetComponentName() - { - return TypeDescriptor.GetComponentName(SelectedObject, true); - } - - /// - /// GetConverter - /// - /// TypeConverter - public TypeConverter GetConverter() - { - return TypeDescriptor.GetConverter(SelectedObject, true); - } - - /// - /// GetDefaultEvent - /// - /// EventDescriptor - public EventDescriptor GetDefaultEvent() - { - return TypeDescriptor.GetDefaultEvent(SelectedObject, true); - } - - /// - /// GetDefaultProperty - /// - /// PropertyDescriptor - public PropertyDescriptor GetDefaultProperty() - { - return TypeDescriptor.GetDefaultProperty(SelectedObject, true); - } - - /// - /// GetEditor - /// - /// editorBaseType - /// object - public object GetEditor(Type editorBaseType) - { - return TypeDescriptor.GetEditor(this, editorBaseType, true); - } - - public EventDescriptorCollection GetEvents(Attribute[] attributes) - { - return TypeDescriptor.GetEvents(SelectedObject, attributes, true); - } - - public EventDescriptorCollection GetEvents() - { - return TypeDescriptor.GetEvents(SelectedObject, true); - } - - public object GetPropertyOwner(PropertyDescriptor pd) - { - return SelectedObject; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/HeadlessTabControl.cs b/mRemoteNG/UI/Controls/HeadlessTabControl.cs deleted file mode 100644 index 07b06960c..000000000 --- a/mRemoteNG/UI/Controls/HeadlessTabControl.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.App; - -namespace mRemoteNG.UI.Controls -{ - public class HeadlessTabControl : TabControl - { - protected override void WndProc(ref Message m) - { - // Hide tabs by trapping the TCM_ADJUSTRECT message - if (m.Msg == NativeMethods.TCM_ADJUSTRECT && !DesignMode) - m.Result = (IntPtr)1; - else - base.WndProc(ref m); - } - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // HeadlessTabControl - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/HeadlessTabControl.resx b/mRemoteNG/UI/Controls/HeadlessTabControl.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/HeadlessTabControl.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/MultiSshToolStrip.cs b/mRemoteNG/UI/Controls/MultiSshToolStrip.cs deleted file mode 100644 index 9764d9f41..000000000 --- a/mRemoteNG/UI/Controls/MultiSshToolStrip.cs +++ /dev/null @@ -1,190 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using mRemoteNG.Themes; -using System; -using System.Collections; -using System.Linq; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls -{ - public partial class MultiSshToolStrip : ToolStrip - { - private IContainer components; - private ToolStripLabel lblMultiSsh; - private ToolStripTextBox txtMultiSsh; - private int previousCommandIndex = 0; - private readonly ArrayList processHandlers = new ArrayList(); - private readonly ArrayList quickConnectConnections = new ArrayList(); - private readonly ArrayList previousCommands = new ArrayList(); - private readonly ThemeManager _themeManager; - - private int CommandHistoryLength { get; set; } = 100; - - public MultiSshToolStrip() - { - InitializeComponent(); - _themeManager = ThemeManager.getInstance(); - _themeManager.ThemeChanged += ApplyTheme; - ApplyTheme(); - } - - private void ApplyTheme() - { - if (!_themeManager.ActiveAndExtended) return; - txtMultiSsh.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - txtMultiSsh.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - } - - private ArrayList ProcessOpenConnections(ConnectionInfo connection) - { - var handlers = new ArrayList(); - - foreach (ProtocolBase _base in connection.OpenConnections) - { - if (_base.GetType().IsSubclassOf(typeof(PuttyBase))) - { - handlers.Add((PuttyBase)_base); - } - } - - return handlers; - } - - private void SendAllKeystrokes(int keyType, int keyData) - { - if (processHandlers.Count == 0) return; - - foreach (PuttyBase proc in processHandlers) - { - NativeMethods.PostMessage(proc.PuttyHandle, keyType, new IntPtr(keyData), new IntPtr(0)); - } - } - - #region Key Event Handler - - private void RefreshActiveConnections(object sender, EventArgs e) - { - processHandlers.Clear(); - foreach (ConnectionInfo connection in quickConnectConnections) - { - processHandlers.AddRange(ProcessOpenConnections(connection)); - } - - var connectionTreeConnections = Runtime.ConnectionsService.ConnectionTreeModel.GetRecursiveChildList() - .Where(item => item.OpenConnections.Count > 0); - - foreach (var connection in connectionTreeConnections) - { - processHandlers.AddRange(ProcessOpenConnections(connection)); - } - } - - private void ProcessKeyPress(object sender, KeyEventArgs e) - { - if (e.KeyCode == Keys.Up || e.KeyCode == Keys.Down) - { - e.SuppressKeyPress = true; - try - { - switch (e.KeyCode) - { - case Keys.Up when previousCommandIndex - 1 >= 0: - previousCommandIndex -= 1; - break; - case Keys.Down when previousCommandIndex + 1 < previousCommands.Count: - previousCommandIndex += 1; - break; - default: - return; - } - } - catch { } - - txtMultiSsh.Text = previousCommands[previousCommandIndex].ToString(); - txtMultiSsh.SelectAll(); - } - - if (e.Control && e.KeyCode != Keys.V && e.Alt == false) - { - SendAllKeystrokes(NativeMethods.WM_KEYDOWN, e.KeyValue); - } - - if (e.KeyCode == Keys.Enter) - { - foreach (var chr1 in txtMultiSsh.Text) - { - SendAllKeystrokes(NativeMethods.WM_CHAR, Convert.ToByte(chr1)); - } - - SendAllKeystrokes(NativeMethods.WM_KEYDOWN, 13); // Enter = char13 - } - } - - private void ProcessKeyRelease(object sender, KeyEventArgs e) - { - if (e.KeyCode != Keys.Enter) return; - if (string.IsNullOrWhiteSpace(txtMultiSsh.Text)) return; - - previousCommands.Add(txtMultiSsh.Text.Trim()); - - if (previousCommands.Count >= CommandHistoryLength) previousCommands.RemoveAt(0); - - previousCommandIndex = previousCommands.Count - 1; - txtMultiSsh.Clear(); - } - - #endregion - - protected override void Dispose(bool disposing) - { - if (disposing) - { - if(components != null) - components.Dispose(); - } - - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.lblMultiSsh = new ToolStripLabel(); - this.txtMultiSsh = new ToolStripTextBox(); - this.SuspendLayout(); - // - // lblMultiSSH - // - this.lblMultiSsh.Name = "_lblMultiSsh"; - this.lblMultiSsh.Size = new System.Drawing.Size(77, 22); - this.lblMultiSsh.Text = Language.MultiSsh; - // - // txtMultiSsh - // - this.txtMultiSsh.Name = "_txtMultiSsh"; - this.txtMultiSsh.Size = new System.Drawing.Size(new DisplayProperties().ScaleWidth(300), 25); - this.txtMultiSsh.ToolTipText = Language.MultiSshToolTip; - this.txtMultiSsh.Enter += RefreshActiveConnections; - this.txtMultiSsh.KeyDown += ProcessKeyPress; - this.txtMultiSsh.KeyUp += ProcessKeyRelease; - - this.Items.AddRange(new ToolStripItem[] - { - lblMultiSsh, - txtMultiSsh - }); - this.ResumeLayout(false); - } - - #endregion - - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/NewPasswordWithVerification.Designer.cs b/mRemoteNG/UI/Controls/NewPasswordWithVerification.Designer.cs deleted file mode 100644 index 64f99a4c9..000000000 --- a/mRemoteNG/UI/Controls/NewPasswordWithVerification.Designer.cs +++ /dev/null @@ -1,125 +0,0 @@ -namespace mRemoteNG.UI.Controls -{ - partial class NewPasswordWithVerification - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.labelFirstPasswordBox = new mRemoteNG.UI.Controls.MrngLabel(); - this.labelSecondPasswordBox = new mRemoteNG.UI.Controls.MrngLabel(); - this.labelPasswordsDontMatch = new mRemoteNG.UI.Controls.MrngLabel(); - this.imgError = new System.Windows.Forms.PictureBox(); - this.secureTextBox2 = new mRemoteNG.UI.Controls.SecureTextBox(); - this.secureTextBox1 = new mRemoteNG.UI.Controls.SecureTextBox(); - ((System.ComponentModel.ISupportInitialize)(this.imgError)).BeginInit(); - this.SuspendLayout(); - // - // labelFirstPasswordBox - // - this.labelFirstPasswordBox.AutoSize = true; - this.labelFirstPasswordBox.Location = new System.Drawing.Point(-3, 0); - this.labelFirstPasswordBox.Name = "labelFirstPasswordBox"; - this.labelFirstPasswordBox.Size = new System.Drawing.Size(82, 13); - this.labelFirstPasswordBox.TabIndex = 2; - this.labelFirstPasswordBox.Text = "New Password"; - // - // labelSecondPasswordBox - // - this.labelSecondPasswordBox.AutoSize = true; - this.labelSecondPasswordBox.Location = new System.Drawing.Point(-3, 42); - this.labelSecondPasswordBox.Name = "labelSecondPasswordBox"; - this.labelSecondPasswordBox.Size = new System.Drawing.Size(84, 13); - this.labelSecondPasswordBox.TabIndex = 3; - this.labelSecondPasswordBox.Text = "VerifyPassword"; - // - // labelPasswordsDontMatch - // - this.labelPasswordsDontMatch.AutoSize = true; - this.labelPasswordsDontMatch.Location = new System.Drawing.Point(23, 83); - this.labelPasswordsDontMatch.Name = "labelPasswordsDontMatch"; - this.labelPasswordsDontMatch.Size = new System.Drawing.Size(133, 13); - this.labelPasswordsDontMatch.TabIndex = 4; - this.labelPasswordsDontMatch.Text = "Passwords do not match"; - this.labelPasswordsDontMatch.Visible = false; - // - // imgError - // - this.imgError.Image = global::mRemoteNG.Properties.Resources.LogError_16x; - this.imgError.Location = new System.Drawing.Point(3, 81); - this.imgError.Name = "imgError"; - this.imgError.Size = new System.Drawing.Size(16, 16); - this.imgError.TabIndex = 5; - this.imgError.TabStop = false; - this.imgError.Visible = false; - // - // secureTextBox2 - // - this.secureTextBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.secureTextBox2.Location = new System.Drawing.Point(0, 58); - this.secureTextBox2.Name = "secureTextBox2"; - this.secureTextBox2.Size = new System.Drawing.Size(193, 22); - this.secureTextBox2.TabIndex = 1; - // - // secureTextBox1 - // - this.secureTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.secureTextBox1.Location = new System.Drawing.Point(0, 16); - this.secureTextBox1.Name = "secureTextBox1"; - this.secureTextBox1.Size = new System.Drawing.Size(193, 22); - this.secureTextBox1.TabIndex = 0; - // - // NewPasswordWithVerification - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.imgError); - this.Controls.Add(this.labelPasswordsDontMatch); - this.Controls.Add(this.labelSecondPasswordBox); - this.Controls.Add(this.labelFirstPasswordBox); - this.Controls.Add(this.secureTextBox2); - this.Controls.Add(this.secureTextBox1); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.MinimumSize = new System.Drawing.Size(0, 100); - this.Name = "NewPasswordWithVerification"; - this.Size = new System.Drawing.Size(193, 100); - ((System.ComponentModel.ISupportInitialize)(this.imgError)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private SecureTextBox secureTextBox1; - private SecureTextBox secureTextBox2; - private Controls.MrngLabel labelFirstPasswordBox; - private Controls.MrngLabel labelSecondPasswordBox; - private Controls.MrngLabel labelPasswordsDontMatch; - private System.Windows.Forms.PictureBox imgError; - } -} diff --git a/mRemoteNG/UI/Controls/NewPasswordWithVerification.cs b/mRemoteNG/UI/Controls/NewPasswordWithVerification.cs deleted file mode 100644 index 2a4ae999b..000000000 --- a/mRemoteNG/UI/Controls/NewPasswordWithVerification.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.ComponentModel; -using System.Drawing; -using System.Security; -using System.Windows.Forms; -using mRemoteNG.Security; - -namespace mRemoteNG.UI.Controls -{ - public partial class NewPasswordWithVerification : UserControl - { - private bool _useSystemPasswordChar; - private char _passwordChar; - - - [Browsable(false)] public SecureString SecureString { get; private set; } - - [Browsable(false)] public bool PasswordsMatch { get; private set; } - - [Browsable(true)] - public char PasswordChar - { - get => _passwordChar; - set - { - _passwordChar = value; - secureTextBox1.PasswordChar = _passwordChar; - secureTextBox2.PasswordChar = _passwordChar; - } - } - - [Browsable(true)] - public bool UseSystemPasswordChar - { - get => _useSystemPasswordChar; - set - { - _useSystemPasswordChar = value; - secureTextBox1.UseSystemPasswordChar = _useSystemPasswordChar; - secureTextBox2.UseSystemPasswordChar = _useSystemPasswordChar; - } - } - - public NewPasswordWithVerification() - { - InitializeComponent(); - secureTextBox1.TextChanged += OnSecureTextBoxTextChanged; - secureTextBox2.TextChanged += OnSecureTextBoxTextChanged; - } - - public void SetPassword(SecureString password) - { - var text = password.ConvertToUnsecureString(); - secureTextBox1.Text = text; - secureTextBox2.Text = text; - } - - private bool Verify() - { - return secureTextBox1.SecString.Length == secureTextBox2.SecString.Length && - secureTextBox1.SecString.ConvertToUnsecureString() == - secureTextBox2.SecString.ConvertToUnsecureString(); - } - - private void TogglePasswordMatchIndicator(bool passwordsMatch) - { - labelPasswordsDontMatch.Visible = !passwordsMatch; - imgError.Visible = !passwordsMatch; - if (passwordsMatch) - { - secureTextBox1.BackColor = SystemColors.Window; - secureTextBox2.BackColor = SystemColors.Window; - } - else - { - secureTextBox1.BackColor = Color.MistyRose; - secureTextBox2.BackColor = Color.MistyRose; - } - } - - private void OnSecureTextBoxTextChanged(object sender, EventArgs eventArgs) - { - if (Verify() && !PasswordsMatch) - { - PasswordsMatch = true; - SecureString = secureTextBox1.SecString; - RaiseVerifiedEvent(); - } - else - { - PasswordsMatch = false; - SecureString = null; - } - - TogglePasswordMatchIndicator(PasswordsMatch); - } - - public event EventHandler Verified; - - private void RaiseVerifiedEvent() - { - Verified?.Invoke(this, EventArgs.Empty); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/NewPasswordWithVerification.resx b/mRemoteNG/UI/Controls/NewPasswordWithVerification.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Controls/NewPasswordWithVerification.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/PageSequence/ISequenceChangingNotifier.cs b/mRemoteNG/UI/Controls/PageSequence/ISequenceChangingNotifier.cs deleted file mode 100644 index cb4ae8d83..000000000 --- a/mRemoteNG/UI/Controls/PageSequence/ISequenceChangingNotifier.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace mRemoteNG.UI.Controls.PageSequence -{ - public interface ISequenceChangingNotifier - { - event EventHandler Next; - event EventHandler Previous; - event SequencedPageReplcementRequestHandler PageReplacementRequested; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/PageSequence/PageSequence.cs b/mRemoteNG/UI/Controls/PageSequence/PageSequence.cs deleted file mode 100644 index fe11dc3ee..000000000 --- a/mRemoteNG/UI/Controls/PageSequence/PageSequence.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; - -namespace mRemoteNG.UI.Controls.PageSequence -{ - public class PageSequence : IDisposable - { - private readonly Control _pageContainer; - private readonly IList _pages = new List(); - - public IEnumerable Pages => _pages; - public int CurrentPageIndex { get; private set; } - - public PageSequence(Control pageContainer, IEnumerable pages) : this(pageContainer, - pages.ToArray()) - { - } - - public PageSequence(Control pageContainer, params SequencedControl[] pages) - { - if (pages == null) - throw new ArgumentNullException(nameof(pages)); - - _pageContainer = pageContainer ?? throw new ArgumentNullException(nameof(pageContainer)); - foreach (var page in pages) - { - SubscribeToPageEvents(page); - _pages.Add(page); - } - } - - public virtual void NextPage() - { - CurrentPageIndex++; - ActivatePage(CurrentPageIndex); - if (CurrentPageIndex == _pages.Count - 1) - Dispose(); - } - - public virtual void PreviousPage() - { - CurrentPageIndex--; - ActivatePage(CurrentPageIndex); - if (CurrentPageIndex == 0) - Dispose(); - } - - public virtual void ReplacePage(SequencedControl newPage, RelativePagePosition pageToReplace) - { - var indexModifier = 0; - // ReSharper disable once SwitchStatementMissingSomeCases - switch (pageToReplace) - { - case RelativePagePosition.PreviousPage: - indexModifier--; - break; - case RelativePagePosition.NextPage: - indexModifier++; - break; - } - - var pageIndexToReplace = CurrentPageIndex + indexModifier; - UnsubscribeFromPageEvents(_pages[pageIndexToReplace]); - SubscribeToPageEvents(newPage); - _pages[pageIndexToReplace] = newPage; - } - - private void ActivatePage(int sequenceNumber) - { - _pageContainer.Controls.Clear(); - _pageContainer.Controls.Add(_pages[sequenceNumber]); - } - - private void SubscribeToPageEvents(ISequenceChangingNotifier page) - { - if (_pages.Contains(page)) return; - page.Next += PageOnNext; - page.Previous += PageOnPrevious; - page.PageReplacementRequested += PageOnPageReplacementRequested; - } - - private void UnsubscribeFromPageEvents(ISequenceChangingNotifier page) - { - if (!_pages.Contains(page)) return; - page.Next -= PageOnNext; - page.Previous -= PageOnPrevious; - page.PageReplacementRequested -= PageOnPageReplacementRequested; - } - - private void PageOnNext(object sender, EventArgs eventArgs) - { - NextPage(); - } - - private void PageOnPrevious(object sender, EventArgs eventArgs) - { - PreviousPage(); - } - - private void PageOnPageReplacementRequested(object sender, SequencedPageReplcementRequestArgs args) - { - ReplacePage(args.NewControl, args.PagePosition); - } - - public void Dispose() - { - Dispose(true); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposing) return; - foreach (var page in _pages) - { - UnsubscribeFromPageEvents(page); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/PageSequence/SequencedControl.cs b/mRemoteNG/UI/Controls/PageSequence/SequencedControl.cs deleted file mode 100644 index 4e4f4681f..000000000 --- a/mRemoteNG/UI/Controls/PageSequence/SequencedControl.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Controls.PageSequence -{ - public class SequencedControl : UserControl, ISequenceChangingNotifier - { - public event EventHandler Next; - public event EventHandler Previous; - public event SequencedPageReplcementRequestHandler PageReplacementRequested; - - public SequencedControl() - { - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - InitializeComponent(); - } - - protected virtual void RaiseNextPageEvent() - { - Next?.Invoke(this, EventArgs.Empty); - } - - protected virtual void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) return; - BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - protected virtual void RaisePreviousPageEvent() - { - Previous?.Invoke(this, EventArgs.Empty); - } - - protected virtual void RaisePageReplacementEvent(SequencedControl control, RelativePagePosition pagetoReplace) - { - PageReplacementRequested?.Invoke(this, new SequencedPageReplcementRequestArgs(control, pagetoReplace)); - } - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // SequencedControl - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "SequencedControl"; - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/PageSequence/SequencedControl.resx b/mRemoteNG/UI/Controls/PageSequence/SequencedControl.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Controls/PageSequence/SequencedControl.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/PageSequence/SequencedPageReplcementRequestArgs.cs b/mRemoteNG/UI/Controls/PageSequence/SequencedPageReplcementRequestArgs.cs deleted file mode 100644 index 4cd851089..000000000 --- a/mRemoteNG/UI/Controls/PageSequence/SequencedPageReplcementRequestArgs.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace mRemoteNG.UI.Controls.PageSequence -{ - public delegate void SequencedPageReplcementRequestHandler(object sender, SequencedPageReplcementRequestArgs args); - - public enum RelativePagePosition - { - PreviousPage, - CurrentPage, - NextPage - } - - public class SequencedPageReplcementRequestArgs - { - public SequencedControl NewControl { get; } - public RelativePagePosition PagePosition { get; } - - public SequencedPageReplcementRequestArgs(SequencedControl newControl, RelativePagePosition pageToReplace) - { - NewControl = newControl ?? throw new ArgumentNullException(nameof(newControl)); - PagePosition = pageToReplace; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/QuickConnectComboBox.cs b/mRemoteNG/UI/Controls/QuickConnectComboBox.cs deleted file mode 100644 index 1a1a4038e..000000000 --- a/mRemoteNG/UI/Controls/QuickConnectComboBox.cs +++ /dev/null @@ -1,242 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls -{ - public class QuickConnectComboBox : ToolStripComboBox - { - private readonly ComboBox _comboBox; - private bool _ignoreEnter; - - public QuickConnectComboBox() - { - _comboBox = ComboBox; - if (_comboBox == null) return; - _comboBox.PreviewKeyDown += ComboBox_PreviewKeyDown; - _comboBox.SelectedIndexChanged += ComboBox_SelectedIndexChanged; - _comboBox.DrawItem += ComboBox_DrawItem; - _comboBox.DrawMode = DrawMode.OwnerDrawFixed; - CausesValidation = false; - - // This makes it so that _ignoreEnter works correctly before any items are added to the combo box - _comboBox.Items.Clear(); - } - - private void ComboBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) - { - if (e.KeyCode == Keys.Enter & _comboBox.DroppedDown) - { - _ignoreEnter = true; - } - } - - protected override void OnKeyDown(KeyEventArgs e) - { - base.OnKeyDown(e); - if (e.KeyCode == Keys.Enter) - { - // Only connect if Enter was not pressed while the combo box was dropped down - if (!_ignoreEnter) - { - OnConnectRequested(new ConnectRequestedEventArgs(_comboBox.Text)); - } - - _ignoreEnter = false; - e.Handled = true; - } - else if (e.KeyCode == Keys.Delete & _comboBox.DroppedDown) - { - if (_comboBox.SelectedIndex != -1) - { - // Items can't be removed from the ComboBox while it is dropped down without possibly causing - // an exception so we must close it, delete the item, and then drop it down again. When we - // close it programmatically, the SelectedItem may revert to Nothing, so we must save it first. - var item = _comboBox.SelectedItem; - _comboBox.DroppedDown = false; - _comboBox.Items.Remove(item); - _comboBox.SelectedIndex = -1; - if (_comboBox.Items.Count != 0) - { - _comboBox.DroppedDown = true; - } - } - - e.Handled = true; - } - } - - private void ComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - if (!(_comboBox.SelectedItem is HistoryItem)) - { - return; - } - - var historyItem = (HistoryItem)_comboBox.SelectedItem; - OnProtocolChanged(new ProtocolChangedEventArgs(historyItem.ConnectionInfo.Protocol)); - } - - private static void ComboBox_DrawItem(object sender, DrawItemEventArgs e) - { - var comboBox = sender as ComboBox; - if (comboBox == null) - { - return; - } - - var drawItem = comboBox.Items[e.Index]; - - string drawString; - if (drawItem is HistoryItem) - { - var historyItem = (HistoryItem)drawItem; - drawString = historyItem.ToString(true); - } - else - { - drawString = drawItem.ToString(); - } - - e.DrawBackground(); - e.Graphics.DrawString(drawString, e.Font, new SolidBrush(e.ForeColor), - new RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)); - e.DrawFocusRectangle(); - } - - private struct HistoryItem : IEquatable - { - public ConnectionInfo ConnectionInfo { get; set; } - - public bool Equals(HistoryItem other) - { - if (ConnectionInfo.Hostname != other.ConnectionInfo.Hostname) - { - return false; - } - - if (ConnectionInfo.Port != other.ConnectionInfo.Port) - { - return false; - } - - return ConnectionInfo.Protocol == other.ConnectionInfo.Protocol; - } - - public override string ToString() - { - return ToString(false); - } - - public string ToString(bool includeProtocol) - { - var port = string.Empty; - if (ConnectionInfo.Port != ConnectionInfo.GetDefaultPort()) - { - port = $":{ConnectionInfo.Port}"; - } - - return includeProtocol - ? $"{ConnectionInfo.Hostname}{port} ({ConnectionInfo.Protocol})" - : $"{ConnectionInfo.Hostname}{port}"; - } - } - - private bool Exists(HistoryItem searchItem) - { - foreach (var item in _comboBox.Items) - { - if (!(item is HistoryItem)) - { - continue; - } - - var historyItem = (HistoryItem)item; - if (historyItem.Equals(searchItem)) - { - return true; - } - } - - return false; - } - - public void Add(ConnectionInfo connectionInfo) - { - try - { - var historyItem = new HistoryItem {ConnectionInfo = connectionInfo}; - if (!Exists(historyItem)) - { - _comboBox.Items.Insert(0, historyItem); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.QuickConnectAddFailed, ex); - } - } - - #region Events - - public class ConnectRequestedEventArgs : EventArgs - { - public ConnectRequestedEventArgs(string connectionString) - { - ConnectionString = connectionString; - } - - public string ConnectionString { get; } - } - - public delegate void ConnectRequestedEventHandler(object sender, ConnectRequestedEventArgs e); - - private ConnectRequestedEventHandler ConnectRequestedEvent; - - public event ConnectRequestedEventHandler ConnectRequested - { - add => ConnectRequestedEvent = (ConnectRequestedEventHandler)Delegate.Combine(ConnectRequestedEvent, value); - remove => ConnectRequestedEvent = (ConnectRequestedEventHandler)Delegate.Remove(ConnectRequestedEvent, value); - } - - - private void OnConnectRequested(ConnectRequestedEventArgs e) - { - // TODO: Any reason to not jsut pass "e"? - ConnectRequestedEvent?.Invoke(this, new ConnectRequestedEventArgs(e.ConnectionString)); - } - - public class ProtocolChangedEventArgs : EventArgs - { - public ProtocolChangedEventArgs(ProtocolType protocol) - { - Protocol = protocol; - } - - public ProtocolType Protocol { get; } - } - - public delegate void ProtocolChangedEventHandler(object sender, ProtocolChangedEventArgs e); - - private ProtocolChangedEventHandler ProtocolChangedEvent; - - public event ProtocolChangedEventHandler ProtocolChanged - { - add => ProtocolChangedEvent = (ProtocolChangedEventHandler)Delegate.Combine(ProtocolChangedEvent, value); - remove => ProtocolChangedEvent = (ProtocolChangedEventHandler)Delegate.Remove(ProtocolChangedEvent, value); - } - - - private void OnProtocolChanged(ProtocolChangedEventArgs e) - { - // TODO: Any reason to not jsut pass "e"? - ProtocolChangedEvent?.Invoke(this, new ProtocolChangedEventArgs(e.Protocol)); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/QuickConnectToolStrip.cs b/mRemoteNG/UI/Controls/QuickConnectToolStrip.cs deleted file mode 100644 index 6f838bc99..000000000 --- a/mRemoteNG/UI/Controls/QuickConnectToolStrip.cs +++ /dev/null @@ -1,308 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Properties; -using mRemoteNG.Themes; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls -{ - public class QuickConnectToolStrip : ToolStrip - { - private IContainer components; - private ToolStripLabel _lblQuickConnect; - private ToolStripDropDownButton _btnConnections; - private MrngToolStripSplitButton _btnQuickConnect; - private ContextMenuStrip _mnuQuickConnectProtocol; - private QuickConnectComboBox _cmbQuickConnect; - private ContextMenuStrip _mnuConnections; - private readonly ThemeManager _themeManager; - private WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender vsToolStripExtender; - private readonly DisplayProperties _display; - - - public QuickConnectToolStrip() - { - _display = new DisplayProperties(); - Initialize(); - _themeManager = ThemeManager.getInstance(); - _themeManager.ThemeChanged += ApplyTheme; - PopulateQuickConnectProtocolMenu(); - ApplyTheme(); - ApplyLanguage(); - } - - private void ApplyLanguage() - { - _lblQuickConnect.Text = Language.QuickConnect; - } - - private void Initialize() - { - components = new System.ComponentModel.Container(); - _lblQuickConnect = new ToolStripLabel(); - _cmbQuickConnect = new QuickConnectComboBox(); - _btnQuickConnect = new MrngToolStripSplitButton(); - _mnuQuickConnectProtocol = new ContextMenuStrip(components); - _btnConnections = new ToolStripDropDownButton(); - _mnuConnections = new ContextMenuStrip(components); - SuspendLayout(); - // - //Theming support - // - vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(components); - // - // lblQuickConnect - // - _lblQuickConnect.Name = "lblQuickConnect"; - _lblQuickConnect.Size = new Size(55, 22); - _lblQuickConnect.Text = Language.Connect; - _lblQuickConnect.Click += lblQuickConnect_Click; - // - // cmbQuickConnect - // - _cmbQuickConnect.AutoCompleteMode = AutoCompleteMode.SuggestAppend; - _cmbQuickConnect.AutoCompleteSource = AutoCompleteSource.ListItems; - _cmbQuickConnect.Margin = new Padding(1, 0, 3, 0); - _cmbQuickConnect.Name = "cmbQuickConnect"; - _cmbQuickConnect.Size = new Size(_display.ScaleWidth(200), 25); - _cmbQuickConnect.ConnectRequested += cmbQuickConnect_ConnectRequested; - _cmbQuickConnect.ProtocolChanged += cmbQuickConnect_ProtocolChanged; - // - // tsQuickConnect - // - Dock = DockStyle.None; - Items.AddRange(new ToolStripItem[] - { - _lblQuickConnect, - _cmbQuickConnect, - _btnQuickConnect, - _btnConnections - }); - Location = new Point(3, 24); - Name = "tsQuickConnect"; - Size = new Size(_display.ScaleWidth(387), 25); - TabIndex = 18; - // - // btnQuickConnect - // - _btnQuickConnect.DropDown = _mnuQuickConnectProtocol; - _btnQuickConnect.Image = Properties.Resources.Run_16x; - _btnQuickConnect.ImageTransparentColor = Color.Magenta; - _btnQuickConnect.Margin = new Padding(0, 1, 3, 2); - _btnQuickConnect.Name = "btnQuickConnect"; - _btnQuickConnect.Size = new Size(84, 22); - _btnQuickConnect.Text = Language.Connect; - _btnQuickConnect.ButtonClick += btnQuickConnect_ButtonClick; - _btnQuickConnect.DropDownItemClicked += btnQuickConnect_DropDownItemClicked; - // - // mnuQuickConnectProtocol - // - _mnuQuickConnectProtocol.Name = "mnuQuickConnectProtocol"; - _mnuQuickConnectProtocol.OwnerItem = _btnQuickConnect; - _mnuQuickConnectProtocol.ShowCheckMargin = true; - _mnuQuickConnectProtocol.ShowImageMargin = false; - _mnuQuickConnectProtocol.Size = new Size(61, 4); - // - // btnConnections - // - _btnConnections.DisplayStyle = ToolStripItemDisplayStyle.Image; - _btnConnections.DropDown = _mnuConnections; - _btnConnections.Image = Properties.Resources.ASPWebSite_16x; - _btnConnections.ImageScaling = ToolStripItemImageScaling.SizeToFit; - _btnConnections.ImageTransparentColor = Color.Magenta; - _btnConnections.Name = "btnConnections"; - _btnConnections.Size = new Size(29, 22); - _btnConnections.Text = Language.Connections; - _btnConnections.DropDownOpening += btnConnections_DropDownOpening; - // - // mnuConnections - // - _mnuConnections.Name = "mnuConnections"; - _mnuConnections.OwnerItem = _btnConnections; - _mnuConnections.Size = new Size(61, 4); - - ResumeLayout(); - } - - private void ApplyTheme() - { - if (!_themeManager.ThemingActive) return; - vsToolStripExtender.SetStyle(_mnuQuickConnectProtocol, _themeManager.ActiveTheme.Version, - _themeManager.ActiveTheme.Theme); - vsToolStripExtender.SetStyle(_mnuConnections, _themeManager.ActiveTheme.Version, - _themeManager.ActiveTheme.Theme); - - if (!_themeManager.ActiveAndExtended) return; - _cmbQuickConnect.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - _cmbQuickConnect.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - } - - #region Quick Connect - - private void PopulateQuickConnectProtocolMenu() - { - try - { - _mnuQuickConnectProtocol.Items.Clear(); - foreach (var fieldInfo in typeof(ProtocolType).GetFields()) - { - if (fieldInfo.Name == "value__" || fieldInfo.Name == "IntApp") continue; - var menuItem = new ToolStripMenuItem(fieldInfo.Name); - if (fieldInfo.Name == Settings.Default.QuickConnectProtocol) - { - menuItem.Checked = true; - _btnQuickConnect.Text = Settings.Default.QuickConnectProtocol; - } - - _mnuQuickConnectProtocol.Items.Add(menuItem); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("PopulateQuickConnectProtocolMenu() failed.", ex); - } - } - - private void lblQuickConnect_Click(object sender, EventArgs e) - { - _cmbQuickConnect.Focus(); - } - - private void cmbQuickConnect_ConnectRequested(object sender, QuickConnectComboBox.ConnectRequestedEventArgs e) - { - btnQuickConnect_ButtonClick(sender, e); - } - - private void btnQuickConnect_ButtonClick(object sender, EventArgs e) - { - try - { - var connectionInfo = Runtime.ConnectionsService.CreateQuickConnect(_cmbQuickConnect.Text.Trim(), - Converter.StringToProtocol(Settings - .Default - .QuickConnectProtocol)); - if (connectionInfo == null) - { - _cmbQuickConnect.Focus(); - return; - } - - _cmbQuickConnect.Add(connectionInfo); - Runtime.ConnectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("btnQuickConnect_ButtonClick() failed.", ex); - } - } - - private void cmbQuickConnect_ProtocolChanged(object sender, QuickConnectComboBox.ProtocolChangedEventArgs e) - { - SetQuickConnectProtocol(Converter.ProtocolToString(e.Protocol)); - } - - private void btnQuickConnect_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e) - { - SetQuickConnectProtocol(e.ClickedItem.Text); - if (string.IsNullOrEmpty(_cmbQuickConnect.Text)) - _cmbQuickConnect.Focus(); - else - btnQuickConnect_ButtonClick(this, e); - } - - private void SetQuickConnectProtocol(string protocol) - { - Settings.Default.QuickConnectProtocol = protocol; - _btnQuickConnect.Text = protocol; - foreach (ToolStripMenuItem menuItem in _mnuQuickConnectProtocol.Items) - { - menuItem.Checked = menuItem.Text.Equals(protocol); - } - } - - #endregion - - #region Connections DropDown - - private void btnConnections_DropDownOpening(object sender, EventArgs e) - { - _btnConnections.DropDownItems.Clear(); - var menuItemsConverter = new ConnectionsTreeToMenuItemsConverter - { - MouseUpEventHandler = ConnectionsMenuItem_MouseUp - }; - - // ReSharper disable once CoVariantArrayConversion - ToolStripItem[] rootMenuItems = menuItemsConverter - .CreateToolStripDropDownItems(Runtime.ConnectionsService - .ConnectionTreeModel).ToArray(); - _btnConnections.DropDownItems.AddRange(rootMenuItems); - - ToolStripMenuItem favorites = new ToolStripMenuItem(Language.Favorites, Properties.Resources.Favorite_16x); - var rootNodes = Runtime.ConnectionsService.ConnectionTreeModel.RootNodes; - List favoritesList = new List(); - - foreach (var node in rootNodes) - { - foreach (var containerInfo in Runtime.ConnectionsService.ConnectionTreeModel.GetRecursiveFavoriteChildList(node)) - { - var favoriteMenuItem = new ToolStripMenuItem - { - Text = containerInfo.Name, - Tag = containerInfo, - Image = containerInfo.OpenConnections.Count > 0 ? Properties.Resources.Run_16x : Properties.Resources.Stop_16x - }; - favoriteMenuItem.MouseUp += ConnectionsMenuItem_MouseUp; - favoritesList.Add(favoriteMenuItem); - } - } - favorites.DropDownItems.AddRange(favoritesList.ToArray()); - _btnConnections.DropDownItems.Add(favorites); - } - - private void ConnectionsMenuItem_MouseUp(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) return; - var menuItem = (ToolStripMenuItem)sender; - - switch (menuItem.Tag) - { - // While we can connect to a whole folder at once, it is - // probably not the expected behavior when navigating through - // a nested menu. Just return - case ContainerInfo _: - return; - case ConnectionInfo connectionInfo: - Runtime.ConnectionInitiator.OpenConnection(connectionInfo); - break; - } - } - - #endregion - - // CodeAyalysis doesn't like null propagation - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", - MessageId = "components")] - protected override void Dispose(bool disposing) - { - try - { - if (!disposing) return; - components?.Dispose(); - } - finally - { - base.Dispose(disposing); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/QuickConnectToolStrip.resx b/mRemoteNG/UI/Controls/QuickConnectToolStrip.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/QuickConnectToolStrip.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/SecureTextBox.Designer.cs b/mRemoteNG/UI/Controls/SecureTextBox.Designer.cs deleted file mode 100644 index 5e7f73fa2..000000000 --- a/mRemoteNG/UI/Controls/SecureTextBox.Designer.cs +++ /dev/null @@ -1,50 +0,0 @@ -namespace mRemoteNG.UI.Controls -{ - partial class SecureTextBox - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - // CodeAnalysis doesn't like null propagation, and possibly IDisposable auto properties (like SecString). - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "components")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "k__BackingField")] - protected override void Dispose(bool disposing) - { - try - { - if (!disposing) return; - components?.Dispose(); - SecString?.Dispose(); - } - finally - { - base.Dispose(disposing); - } - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // SecureTextBox - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Controls/SecureTextBox.cs b/mRemoteNG/UI/Controls/SecureTextBox.cs deleted file mode 100644 index fc1b3d699..000000000 --- a/mRemoteNG/UI/Controls/SecureTextBox.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.Security; -using mRemoteNG.Security; - -namespace mRemoteNG.UI.Controls -{ - public partial class SecureTextBox : MrngTextBox - { - public SecureString SecString { get; private set; } = new SecureString(); - - public SecureTextBox() - { - InitializeComponent(); - TextChanged += SecureTextBox_TextChanged; - } - - private void SecureTextBox_TextChanged(object sender, System.EventArgs e) - { - SecString = Text.ConvertToSecureString(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/SecureTextBox.resx b/mRemoteNG/UI/Controls/SecureTextBox.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/SecureTextBox.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngAdTree.Designer.cs b/mRemoteNG/UI/Controls/mrngAdTree.Designer.cs deleted file mode 100644 index 8a94f19dc..000000000 --- a/mRemoteNG/UI/Controls/mrngAdTree.Designer.cs +++ /dev/null @@ -1,73 +0,0 @@ -namespace mRemoteNG.UI.Controls -{ - partial class MrngAdTree - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MrngAdTree)); - this.tvActiveDirectory = new System.Windows.Forms.TreeView(); - this.ImglTree = new System.Windows.Forms.ImageList(this.components); - this.SuspendLayout(); - // - // tvActiveDirectory - // - this.tvActiveDirectory.Dock = System.Windows.Forms.DockStyle.Fill; - this.tvActiveDirectory.Location = new System.Drawing.Point(0, 0); - this.tvActiveDirectory.Name = "tvActiveDirectory"; - this.tvActiveDirectory.Size = new System.Drawing.Size(800, 450); - this.tvActiveDirectory.TabIndex = 0; - this.tvActiveDirectory.AfterExpand += new System.Windows.Forms.TreeViewEventHandler(this.TvActiveDirectory_AfterExpand); - this.tvActiveDirectory.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.TvActiveDirectory_AfterSelect); - // - // ImglTree - // - this.ImglTree.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ImglTree.ImageStream"))); - this.ImglTree.TransparentColor = System.Drawing.Color.Transparent; - this.ImglTree.Images.SetKeyName(0, "Root.png"); - this.ImglTree.Images.SetKeyName(1, "OU.png"); - this.ImglTree.Images.SetKeyName(2, "Folder.png"); - this.ImglTree.Images.SetKeyName(3, "Question.png"); - // - // AdTree - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.tvActiveDirectory); - this.Name = "AdTree"; - this.Size = new System.Drawing.Size(800, 450); - this.Load += new System.EventHandler(this.AdTree_Load); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TreeView tvActiveDirectory; - private System.Windows.Forms.ImageList ImglTree; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngAdTree.cs b/mRemoteNG/UI/Controls/mrngAdTree.cs deleted file mode 100644 index c151f35ce..000000000 --- a/mRemoteNG/UI/Controls/mrngAdTree.cs +++ /dev/null @@ -1,123 +0,0 @@ -using mRemoteNG.Tools; -using System; -using System.Runtime.CompilerServices; -using System.Windows.Forms; - -namespace mRemoteNG.UI.Controls -{ - public partial class MrngAdTree : UserControl - { - #region Public Methods - - public MrngAdTree() - { - InitializeComponent(); - } - - public event AdPathChangedEventHandler AdPathChanged; - - public delegate void AdPathChangedEventHandler(object sender); - - public string AdPath { get; set; } - - public string Domain - { - private get => string.IsNullOrEmpty(_domain) == false ? _domain : Environment.UserDomainName; - set => _domain = value; - } - - public object SelectedNode { get; internal set; } - - #endregion Public Methods - - #region Private Methods - - private string _domain; - - private void TvActiveDirectory_AfterExpand(object sender, TreeViewEventArgs e) - { - try - { - foreach (TreeNode node in e.Node.Nodes) - AddTreeNodes(node); - } - catch (Exception ex) - { - Console.WriteLine(ex.StackTrace); - } - } - - private void TvActiveDirectory_AfterSelect(object sender, TreeViewEventArgs e) - { - AdPath = e.Node.Tag.ToString(); - var pathChangedEvent = AdPathChanged; - pathChangedEvent?.Invoke(this); - } - - private void AdTree_Load(object sender, EventArgs e) - { - tvActiveDirectory.Nodes.Clear(); - var treeNode = new TreeNode(Domain) { Tag = "" }; - tvActiveDirectory.Nodes.Add(treeNode); - AddTreeNodes(treeNode); - tvActiveDirectory.Nodes[0].Expand(); - } - - private void AddTreeNodes(TreeNode tNode) - { - var adhelper = new AdHelper(Domain); - adhelper.GetChildEntries(tNode.Tag.ToString()); - var enumerator = adhelper.Children.GetEnumerator(); - tvActiveDirectory.BeginUpdate(); - while (enumerator.MoveNext()) - { - var flag1 = false; - if (enumerator.Key == null) continue; - var node1 = new TreeNode(enumerator.Key.ToString().Substring(3)) - { - Tag = RuntimeHelpers.GetObjectValue(enumerator.Value) - }; - if (!enumerator.Key.ToString().Substring(0, 2).Equals("CN") || - enumerator.Key.ToString().Equals("CN=Computers") || - enumerator.Key.ToString().Equals("CN=Users")) - flag1 = true; - - if (flag1) - { - var flag2 = false; - try - { - foreach (TreeNode node2 in tNode.Nodes) - { - if (!node2.Text.Equals(node1.Text)) continue; - flag2 = true; - break; - } - } - catch (Exception ex) - { - Console.WriteLine(ex.StackTrace); - } - - if (!flag2) - tNode.Nodes.Add(node1); - } - - var imageIndex = GetImageIndex(enumerator.Key.ToString().Substring(0, 2)); - node1.ImageIndex = imageIndex; - node1.SelectedImageIndex = imageIndex; - } - - tvActiveDirectory.EndUpdate(); - } - - private static int GetImageIndex(string objType) - { - if (objType.Equals("CN")) - return 2; - return objType.Equals("OU") ? 1 : 3; - } - - #endregion Private Methods - } -} diff --git a/mRemoteNG/UI/Controls/mrngAdTree.resx b/mRemoteNG/UI/Controls/mrngAdTree.resx deleted file mode 100644 index 6e89531ad..000000000 --- a/mRemoteNG/UI/Controls/mrngAdTree.resx +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAA4 - DAAAAk1TRnQBSQFMAgEBBAEAARgBAAEYAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo - AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA - AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 - AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA - AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm - AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM - AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA - ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz - AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ - AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcw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ASADAAEBAQABAQYAAQEWAAP/gQAB4AEHAf8BDwT/AcABAwH4AQ8E/wGAAQMB4AEDAQABAQEAAQEBwAED - AcABAQEAAQEBAAEBAcABAwGAAgABAQEAAQEBgAEBAwABAQEAAQEFAAEBAQABAQUAAQEBAAEBBQABAQEA - AQEFAAEBAQABAQUAAQEBAAEBBQABAQEAAQEBgAEBAwAB/wEAAf8BwAEDAYACAQH/AQEB/wHgAQcBwAED - BP8B8AEPAeABBwT/Cw== - - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngButton.cs b/mRemoteNG/UI/Controls/mrngButton.cs deleted file mode 100644 index 7d9f0ef49..000000000 --- a/mRemoteNG/UI/Controls/mrngButton.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Text; -using System.Windows.Forms; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Controls -{ - [ToolboxBitmap(typeof(Button))] - //Extended button class, the button onPaint completely repaint the control - public class MrngButton : Button - { - private ThemeManager _themeManager; - - /// - /// Store the mouse state, required for coloring the component according to the mouse state - /// - public enum MouseState - { - HOVER, - DOWN, - OUT - } - - public MrngButton() - { - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - public MouseState _mice { get; set; } - - /// - /// Rewrite the function to allow for coloring the component depending on the mouse state - /// - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (_themeManager.ThemingActive) - { - _mice = MouseState.OUT; - MouseEnter += (sender, args) => - { - _mice = MouseState.HOVER; - Invalidate(); - }; - MouseLeave += (sender, args) => - { - _mice = MouseState.OUT; - Invalidate(); - }; - MouseDown += (sender, args) => - { - if (args.Button == MouseButtons.Left) - { - _mice = MouseState.DOWN; - Invalidate(); - } - }; - MouseUp += (sender, args) => - { - _mice = MouseState.OUT; - - Invalidate(); - }; - Invalidate(); - } - } - - - /// - /// Repaint the componente, the elements considered are the clipping rectangle, text and an icon - /// - /// - protected override void OnPaint(PaintEventArgs e) - { - if (!_themeManager.ActiveAndExtended) - { - base.OnPaint(e); - return; - } - - Color back; - Color fore; - Color border; - if (Enabled) - { - switch (_mice) - { - case MouseState.HOVER: - back = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Hover_Background"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Hover_Foreground"); - border = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Hover_Border"); - break; - case MouseState.DOWN: - back = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Pressed_Background"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Pressed_Foreground"); - border = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Pressed_Border"); - break; - default: - back = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Background"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Foreground"); - border = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Border"); - break; - } - } - else - { - back = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Disabled_Background"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Disabled_Foreground"); - border = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Disabled_Border"); - } - - - e.Graphics.FillRectangle(new SolidBrush(back), e.ClipRectangle); - e.Graphics.DrawRectangle(new Pen(border, 1), 0, 0, Width - 1, Height - 1); - e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; - e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias; - //Warning. the app doesnt use many images in buttons so this positions are kinda tailored just for the used by the app - //not by general usage of iamges in buttons - if (Image != null) - { - SizeF stringSize = e.Graphics.MeasureString(Text, Font); - - e.Graphics.DrawImageUnscaled(Image, Width / 2 - (int)stringSize.Width / 2 - Image.Width, - Height / 2 - Image.Height / 2); - } - - TextRenderer.DrawText(e.Graphics, Text, Font, ClientRectangle, fore, - TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter); - } - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // NGButton - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngButton.resx b/mRemoteNG/UI/Controls/mrngButton.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngButton.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngCheckBox.cs b/mRemoteNG/UI/Controls/mrngCheckBox.cs deleted file mode 100644 index a9e3202f7..000000000 --- a/mRemoteNG/UI/Controls/mrngCheckBox.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Controls -{ - //Extended CheckBox class, the NGCheckBox onPaint completely repaint the control - - // - // If this causes design issues in the future, may want to think about migrating to - // CheckBoxRenderer: - // https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.checkboxrenderer?view=netframework-4.6 - // - public class MrngCheckBox : CheckBox - { - private ThemeManager _themeManager; - private readonly Size _checkboxSize; - private readonly int _checkboxYCoord; - private readonly int _textXCoord; - - public MrngCheckBox() - { - InitializeComponent(); - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - var display = new DisplayProperties(); - _checkboxSize = new Size(display.ScaleWidth(11), display.ScaleHeight(11)); - _checkboxYCoord = (display.ScaleHeight(Height) - _checkboxSize.Height) / 2 - display.ScaleHeight(5); - _textXCoord = _checkboxSize.Width + display.ScaleWidth(2); - } - - public enum MouseState - { - HOVER, - DOWN, - OUT - } - - public MouseState _mice { get; set; } - - - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ThemingActive) return; - _mice = MouseState.OUT; - MouseEnter += (sender, args) => - { - _mice = MouseState.HOVER; - Invalidate(); - }; - MouseLeave += (sender, args) => - { - _mice = MouseState.OUT; - Invalidate(); - }; - MouseDown += (sender, args) => - { - if (args.Button != MouseButtons.Left) return; - _mice = MouseState.DOWN; - Invalidate(); - }; - MouseUp += (sender, args) => - { - _mice = MouseState.OUT; - - Invalidate(); - }; - - Invalidate(); - } - - - protected override void OnPaint(PaintEventArgs e) - { - if (!_themeManager.ActiveAndExtended) - { - base.OnPaint(e); - return; - } - - //Get the colors - Color fore; - Color glyph; - Color checkBorder; - - var back = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Background"); - if (Enabled) - { - glyph = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Glyph"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Text"); - // ReSharper disable once SwitchStatementMissingSomeCases - switch (_mice) - { - case MouseState.HOVER: - checkBorder = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Border_Hover"); - break; - case MouseState.DOWN: - checkBorder = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Border_Pressed"); - break; - default: - checkBorder = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Border"); - break; - } - } - else - { - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Text_Disabled"); - glyph = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Glyph_Disabled"); - checkBorder = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Border_Disabled"); - } - - e.Graphics.Clear(Parent.BackColor); - - using (var p = new Pen(checkBorder)) - { - var boxRect = new Rectangle(0, _checkboxYCoord, _checkboxSize.Width, _checkboxSize.Height); - e.Graphics.FillRectangle(new SolidBrush(back), boxRect); - e.Graphics.DrawRectangle(p, boxRect); - } - - if (Checked) - { - // | \uE001 |  |  | is the tick/check mark and it exists in Segoe UI Symbol at least... - e.Graphics.DrawString("\uE001", new Font("Segoe UI Symbol", 7.75f), new SolidBrush(glyph), -4, 0); - } - - var textRect = new Rectangle(_textXCoord, 0, Width - 16, Height); - TextRenderer.DrawText(e.Graphics, Text, Font, textRect, fore, Parent.BackColor, - TextFormatFlags.PathEllipsis); - } - - private void InitializeComponent() - { - SuspendLayout(); - // - // NGCheckBox - // - Font = new Font("Segoe UI", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0); - ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngCheckBox.resx b/mRemoteNG/UI/Controls/mrngCheckBox.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngCheckBox.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngComboBox.cs b/mRemoteNG/UI/Controls/mrngComboBox.cs deleted file mode 100644 index de473cc66..000000000 --- a/mRemoteNG/UI/Controls/mrngComboBox.cs +++ /dev/null @@ -1,172 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Controls -{ - //Extended ComboBox class, the NGComboBox onPaint completely repaint the control as does the item painting - //warning: THe DropDown style rendering is glitchy in this control, only use DropDownList or correct the rendering method - internal class MrngComboBox : ComboBox - { - private ThemeManager _themeManager; - - public enum MouseState - { - HOVER, - DOWN, - OUT - } - - public MouseState _mice { get; set; } - - public MrngComboBox() - { - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ActiveAndExtended) return; - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Background"); - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Foreground"); - DrawMode = DrawMode.OwnerDrawFixed; - SetStyle(ControlStyles.OptimizedDoubleBuffer | - ControlStyles.UserPaint, true); - DrawItem += NG_DrawItem; - _mice = MouseState.OUT; - MouseEnter += (sender, args) => - { - _mice = MouseState.HOVER; - Invalidate(); - }; - MouseLeave += (sender, args) => - { - _mice = MouseState.OUT; - Invalidate(); - }; - MouseDown += (sender, args) => - { - if (args.Button != MouseButtons.Left) return; - _mice = MouseState.DOWN; - Invalidate(); - }; - MouseUp += (sender, args) => - { - _mice = MouseState.OUT; - - Invalidate(); - }; - Invalidate(); - } - - private void NG_DrawItem(object sender, DrawItemEventArgs e) - { - var index = e.Index >= 0 ? e.Index : 0; - Brush itemBrush = new SolidBrush(_themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Foreground")); - - if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) - { - itemBrush = new SolidBrush( - _themeManager - .ActiveTheme.ExtendedPalette.getColor("List_Item_Selected_Foreground")); - e.Graphics.FillRectangle( - new SolidBrush(_themeManager - .ActiveTheme.ExtendedPalette - .getColor("List_Item_Selected_Background")), - e.Bounds); - } - else - e.Graphics.FillRectangle( - new SolidBrush(_themeManager - .ActiveTheme.ExtendedPalette.getColor("ComboBox_Background")), - e.Bounds); - - if (Items.Count > 0) - { - if (string.IsNullOrEmpty(DisplayMember)) - e.Graphics.DrawString(Items[index].ToString(), e.Font, itemBrush, e.Bounds, - StringFormat.GenericDefault); - else - { - if (Items[index].GetType().GetProperty(DisplayMember) != null) - { - e.Graphics.DrawString( - Items[index] - .GetType().GetProperty(DisplayMember)?.GetValue(Items[index], null) - .ToString(), - e.Font, itemBrush, e.Bounds, StringFormat.GenericDefault); - } - } - } - - e.DrawFocusRectangle(); - } - - protected override void OnPaint(PaintEventArgs e) - { - if (!_themeManager.ActiveAndExtended) - { - base.OnPaint(e); - return; - } - - //Colors - var Border = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Border"); - var Back = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Background"); - var Fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Foreground"); - var ButtBack = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Button_Background"); - var ButtFore = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Button_Foreground"); - - if (_mice == MouseState.HOVER) - { - Border = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_MouseOver_Border"); - ButtBack = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Button_MouseOver_Background"); - ButtFore = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Button_MouseOver_Foreground"); - } - - if (DroppedDown) - { - Border = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_MouseOver_Border"); - ButtBack = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Button_Pressed_Background"); - ButtFore = _themeManager.ActiveTheme.ExtendedPalette.getColor("ComboBox_Button_Pressed_Foreground"); - } - - - e.Graphics.Clear(Back); - - //Border - using (var p = new Pen(Border)) - { - var boxRect = new Rectangle(0, 0, Width - 1, Height - 1); - e.Graphics.DrawRectangle(p, boxRect); - } - - //Button - using (var b = new SolidBrush(ButtBack)) - { - e.Graphics.FillRectangle(b, Width - 18, 2, 16, Height - 4); - } - - //Arrow - e.Graphics.DrawString("\u25BC", Font, new SolidBrush(ButtFore), Width - 17, Height / 2 - 5); - - //Text - var textRect = new Rectangle(2, 2, Width - 20, Height - 4); - TextRenderer.DrawText(e.Graphics, Text, Font, textRect, Fore, Back, - TextFormatFlags.Left | TextFormatFlags.VerticalCenter); - } - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // NGComboBox - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngComboBox.resx b/mRemoteNG/UI/Controls/mrngComboBox.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngComboBox.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngGroupBox.cs b/mRemoteNG/UI/Controls/mrngGroupBox.cs deleted file mode 100644 index cfc1f1fcb..000000000 --- a/mRemoteNG/UI/Controls/mrngGroupBox.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Controls -{ - //Groupbox is colored using the innerTab colors as the vstheme doesnt have explicit groupbox palettes (at least completes) - //This clas completely repaints the control - public class MrngGroupBox : GroupBox - { - private ThemeManager _themeManager; - - public MrngGroupBox() - { - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (_themeManager.ThemingActive) - { - Invalidate(); - } - } - - protected override void OnPaint(PaintEventArgs e) - { - if (!_themeManager.ActiveAndExtended) - { - base.OnPaint(e); - return; - } - - //Reusing the textbox colors - var titleColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("GroupBox_Foreground"); - //var backColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("GroupBox_Backgorund"); - var lineColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("GroupBox_Line"); - - if (!Enabled) - { - titleColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("GroupBox_Disabled_Foreground"); - //backColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("GroupBox_Disabled_Background"); - lineColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("GroupBox_Disabled_Line"); - } - - - //var state = Enabled ? GroupBoxState.Normal : GroupBoxState.Disabled; - var flags = TextFormatFlags.PreserveGraphicsTranslateTransform | TextFormatFlags.PreserveGraphicsClipping | - TextFormatFlags.TextBoxControl | TextFormatFlags.WordBreak; - - if (!ShowKeyboardCues) - flags |= TextFormatFlags.HidePrefix; - if (RightToLeft == RightToLeft.Yes) - flags |= TextFormatFlags.RightToLeft | TextFormatFlags.Right; - - //No clear backgorund, this control is transparently - //e.Graphics.FillRectangle(new SolidBrush(backColor), 0, 0, Width, Height); - - var bounds = new Rectangle(0, 0, Width, Height); - var rectangle = bounds; - rectangle.Width -= 8; - var size = TextRenderer.MeasureText(e.Graphics, Text, Font, new Size(rectangle.Width, rectangle.Height), - flags); - rectangle.Width = size.Width; - rectangle.Height = size.Height; - if ((flags & TextFormatFlags.Right) == TextFormatFlags.Right) - rectangle.X = (bounds.Right - rectangle.Width) - 8; - else - rectangle.X += 8; - TextRenderer.DrawText(e.Graphics, Text, Font, rectangle, titleColor, flags); - - if (rectangle.Width > 0) - rectangle.Inflate(2, 0); - using (var pen = new Pen(lineColor)) - { - var num = bounds.Top + (Font.Height / 2); - //Left line - e.Graphics.DrawLine(pen, bounds.Left + Padding.Left, num - Padding.Top, bounds.Left + Padding.Left, - bounds.Height - Padding.Bottom); - //Bottom line - e.Graphics.DrawLine(pen, bounds.Left + Padding.Left, bounds.Height - Padding.Bottom, - bounds.Width - Padding.Right, bounds.Height - Padding.Bottom); - //Beside text line - e.Graphics.DrawLine(pen, bounds.Left + Padding.Left, num - Padding.Top, rectangle.X - 3, - num - Padding.Top); - //Top line cutted - e.Graphics.DrawLine(pen, rectangle.X + rectangle.Width + 2, num - Padding.Top, - bounds.Width - Padding.Right, num - Padding.Top); - //Right line - e.Graphics.DrawLine(pen, bounds.Width - Padding.Right, num - Padding.Top, bounds.Width - Padding.Right, - bounds.Height - Padding.Bottom); - } - - RaisePaintEvent(this, e); - } - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // NGGroupBox - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngGroupBox.resx b/mRemoteNG/UI/Controls/mrngGroupBox.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngGroupBox.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngIpTextBox.cs b/mRemoteNG/UI/Controls/mrngIpTextBox.cs deleted file mode 100644 index 3ad5dc489..000000000 --- a/mRemoteNG/UI/Controls/mrngIpTextBox.cs +++ /dev/null @@ -1,436 +0,0 @@ -/* Source modified from here: - * http://www.codeproject.com/Articles/11576/IP-TextBox - * Original Author: mawnkay - */ - -using System; -using System.Windows.Forms; -using mRemoteNG.Themes; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls -{ - /* class IPTextBox - * An IP Address Box - * A TextBox that only allows entry of a valid ip address - */ - public class MrngIpTextBox : UserControl - { - private Panel panel1; - public MrngTextBox Octet1; - public MrngTextBox Octet2; - public MrngTextBox Octet3; - public MrngTextBox Octet4; - private MrngLabel label1; - private MrngLabel label2; - private MrngLabel label3; - private ToolTip toolTip1; - private System.ComponentModel.IContainer components; - - /* Sets and Gets the tooltiptext on toolTip1 */ - public string ToolTipText - { - get => toolTip1.GetToolTip(Octet1); - set - { - toolTip1.SetToolTip(Octet1, value); - toolTip1.SetToolTip(Octet2, value); - toolTip1.SetToolTip(Octet3, value); - toolTip1.SetToolTip(Octet4, value); - toolTip1.SetToolTip(label1, value); - toolTip1.SetToolTip(label2, value); - toolTip1.SetToolTip(label3, value); - } - } - - /* Set or Get the string that represents the value in the box */ - public override string Text - { - get => Octet1.Text + @"." + Octet2.Text + @"." + Octet3.Text + @"." + Octet4.Text; - set - { - if (!string.IsNullOrEmpty(value)) - { - var pieces = value.Split(@".".ToCharArray(), 4); - Octet1.Text = pieces[0]; - Octet2.Text = pieces[1]; - Octet3.Text = pieces[2]; - Octet4.Text = pieces[3]; - } - else - { - Octet1.Text = ""; - Octet2.Text = ""; - Octet3.Text = ""; - Octet4.Text = ""; - } - } - } - - public MrngIpTextBox() - { - // This call is required by the Windows.Forms Form Designer. - InitializeComponent(); - SetTabSTopProperties(); - } - - private void SetTabSTopProperties() - { - Octet1.TabIndex = 0; - Octet2.TabIndex = 1; - Octet3.TabIndex = 2; - Octet4.TabIndex = 3; - Octet1.TabStop = true; - Octet2.TabStop = true; - Octet3.TabStop = true; - Octet4.TabStop = true; - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - ApplyTheme(); - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - } - - private void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) return; - panel1.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - // ReSharper disable once UseNullPropagation - if (components != null) - components.Dispose(); - } - - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.panel1 = new System.Windows.Forms.Panel(); - this.Octet4 = new mRemoteNG.UI.Controls.MrngTextBox(); - this.Octet3 = new mRemoteNG.UI.Controls.MrngTextBox(); - this.Octet2 = new mRemoteNG.UI.Controls.MrngTextBox(); - this.Octet1 = new mRemoteNG.UI.Controls.MrngTextBox(); - this.label2 = new mRemoteNG.UI.Controls.MrngLabel(); - this.label1 = new mRemoteNG.UI.Controls.MrngLabel(); - this.label3 = new mRemoteNG.UI.Controls.MrngLabel(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.BackColor = System.Drawing.SystemColors.Window; - this.panel1.Controls.Add(this.Octet4); - this.panel1.Controls.Add(this.Octet3); - this.panel1.Controls.Add(this.Octet2); - this.panel1.Controls.Add(this.Octet1); - this.panel1.Controls.Add(this.label2); - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.label3); - this.panel1.Font = new System.Drawing.Font("Segoe UI", 9F); - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(124, 18); - this.panel1.TabIndex = 0; - // - // Octet4 - // - this.Octet4.BackColor = System.Drawing.SystemColors.Menu; - this.Octet4.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.Octet4.Font = new System.Drawing.Font("Segoe UI", 9F); - this.Octet4.Location = new System.Drawing.Point(95, 1); - this.Octet4.MaxLength = 3; - this.Octet4.Name = "Octet4"; - this.Octet4.Size = new System.Drawing.Size(24, 16); - this.Octet4.TabIndex = 4; - this.Octet4.TabStop = false; - this.Octet4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.Octet4.Enter += new System.EventHandler(this.Box_Enter); - this.Octet4.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Box4_KeyPress); - // - // Octet3 - // - this.Octet3.BackColor = System.Drawing.SystemColors.Menu; - this.Octet3.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.Octet3.Font = new System.Drawing.Font("Segoe UI", 9F); - this.Octet3.Location = new System.Drawing.Point(63, 1); - this.Octet3.MaxLength = 3; - this.Octet3.Name = "Octet3"; - this.Octet3.Size = new System.Drawing.Size(24, 16); - this.Octet3.TabIndex = 3; - this.Octet3.TabStop = false; - this.Octet3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.Octet3.Enter += new System.EventHandler(this.Box_Enter); - this.Octet3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Box3_KeyPress); - // - // Octet2 - // - this.Octet2.BackColor = System.Drawing.SystemColors.Menu; - this.Octet2.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.Octet2.Font = new System.Drawing.Font("Segoe UI", 9F); - this.Octet2.Location = new System.Drawing.Point(32, 1); - this.Octet2.MaxLength = 3; - this.Octet2.Name = "Octet2"; - this.Octet2.Size = new System.Drawing.Size(24, 16); - this.Octet2.TabIndex = 2; - this.Octet2.TabStop = false; - this.Octet2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.Octet2.Enter += new System.EventHandler(this.Box_Enter); - this.Octet2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Box2_KeyPress); - // - // Octet1 - // - this.Octet1.BackColor = System.Drawing.SystemColors.Menu; - this.Octet1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.Octet1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Octet1.Location = new System.Drawing.Point(1, 1); - this.Octet1.MaxLength = 3; - this.Octet1.Name = "Octet1"; - this.Octet1.Size = new System.Drawing.Size(24, 16); - this.Octet1.TabIndex = 1; - this.Octet1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.Octet1.Enter += new System.EventHandler(this.Box_Enter); - this.Octet1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Box1_KeyPress); - // - // label2 - // - this.label2.Location = new System.Drawing.Point(86, 2); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(8, 13); - this.label2.TabIndex = 5; - this.label2.Text = "."; - // - // label1 - // - this.label1.Location = new System.Drawing.Point(55, 2); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(8, 13); - this.label1.TabIndex = 1; - this.label1.Text = "."; - // - // label3 - // - this.label3.Location = new System.Drawing.Point(23, 1); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(8, 13); - this.label3.TabIndex = 6; - this.label3.Text = "."; - // - // IPTextBox - // - this.Controls.Add(this.panel1); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "IPTextBox"; - this.Size = new System.Drawing.Size(124, 18); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.ResumeLayout(false); - } - - #endregion - - /* IsValid(string inString) - * Checks that a string passed in resolves to an integer value between 0 and 255 - * param inString: The string passed in for testing - * return: True if the string is between 0 and 255 inclusively, false otherwise - * endif - */ - private static bool IsValid(string inString) - { - try - { - var theValue = int.Parse(inString); - if (theValue >= 0 && theValue <= 255) - return true; - - MessageBox.Show(Language.MustBeBetween0And255, Language.OutOfRange); - return false; - } - catch - { - return false; - } - } - - /* Performs KeyPress analysis and handling to ensure a valid ip octet is - * being entered in Box1. - */ - private void Box1_KeyPress(object sender, KeyPressEventArgs e) - { - //Only Accept a '.', a numeral, or backspace - if (e.KeyChar.ToString() == "." || char.IsDigit(e.KeyChar) || e.KeyChar == 8) - { - //If the key pressed is a '.' - if (e.KeyChar.ToString() == ".") - { - //If the Text is a valid ip octet move to the next box - if (Octet1.Text != "" && Octet1.Text.Length != Octet1.SelectionLength) - { - if (IsValid(Octet1.Text)) - Octet2.Focus(); - else - Octet1.SelectAll(); - } - - e.Handled = true; - } - - //If we are not overwriting the whole text - else if (Octet1.SelectionLength != Octet1.Text.Length) - { - //Check that the new Text value will be a valid - // ip octet then move on to next box - if (Octet1.Text.Length != 2) return; - if (!IsValid(Octet1.Text + e.KeyChar)) - { - Octet1.SelectAll(); - e.Handled = true; - } - else - { - Octet2.Focus(); - } - } - } - //Do nothing if the keypress is not numeral, backspace, or '.' - else - e.Handled = true; - } - - /* Performs KeyPress analysis and handling to ensure a valid ip octet is - * being entered in Box2. - */ - private void Box2_KeyPress(object sender, KeyPressEventArgs e) - { - //Similar to Box1_KeyPress but in special case for backspace moves cursor - //to the previous box (Box1) - if (e.KeyChar.ToString() == "." || char.IsDigit(e.KeyChar) || e.KeyChar == 8) - { - if (e.KeyChar.ToString() == ".") - { - if (Octet2.Text != "" && Octet2.Text.Length != Octet2.SelectionLength) - { - if (IsValid(Octet1.Text)) - Octet3.Focus(); - else - Octet2.SelectAll(); - } - - e.Handled = true; - } - else if (Octet2.SelectionLength != Octet2.Text.Length) - { - if (Octet2.Text.Length != 2) return; - if (!IsValid(Octet2.Text + e.KeyChar)) - { - Octet2.SelectAll(); - e.Handled = true; - } - else - { - Octet3.Focus(); - } - } - else if (Octet2.Text.Length == 0 && e.KeyChar == 8) - { - Octet1.Focus(); - Octet1.SelectionStart = Octet1.Text.Length; - } - } - else - e.Handled = true; - } - - /* Performs KeyPress analysis and handling to ensure a valid ip octet is - * being entered in Box3. - */ - private void Box3_KeyPress(object sender, KeyPressEventArgs e) - { - //Identical to Box2_KeyPress except that previous box is Box2 and - //next box is Box3 - if (e.KeyChar.ToString() == "." || char.IsDigit(e.KeyChar) || e.KeyChar == 8) - { - if (e.KeyChar.ToString() == ".") - { - if (Octet3.Text != "" && Octet3.SelectionLength != Octet3.Text.Length) - { - if (IsValid(Octet1.Text)) - Octet4.Focus(); - else - Octet3.SelectAll(); - } - - e.Handled = true; - } - else if (Octet3.SelectionLength != Octet3.Text.Length) - { - if (Octet3.Text.Length != 2) return; - if (!IsValid(Octet3.Text + e.KeyChar)) - { - Octet3.SelectAll(); - e.Handled = true; - } - else - { - Octet4.Focus(); - } - } - else if (Octet3.Text.Length == 0 && e.KeyChar == 8) - { - Octet2.Focus(); - Octet2.SelectionStart = Octet2.Text.Length; - } - } - else - e.Handled = true; - } - - /* Performs KeyPress analysis and handling to ensure a valid ip octet is - * being entered in Box4. - */ - private void Box4_KeyPress(object sender, KeyPressEventArgs e) - { - //Similar to Box3 but ignores the '.' character and does not advance - //to the next box. Also Box3 is previous box for backspace case. - if (char.IsDigit(e.KeyChar) || e.KeyChar == 8) - { - if (Octet4.SelectionLength != Octet4.Text.Length) - { - if (Octet4.Text.Length != 2) return; - if (IsValid(Octet4.Text + e.KeyChar)) return; - Octet4.SelectAll(); - e.Handled = true; - } - else if (Octet4.Text.Length == 0 && e.KeyChar == 8) - { - Octet3.Focus(); - Octet3.SelectionStart = Octet3.Text.Length; - } - } - else - e.Handled = true; - } - - // Selects All text in a box for overwriting upon entering the box - private void Box_Enter(object sender, EventArgs e) - { - var tb = (TextBox)sender; - tb.SelectAll(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngIpTextBox.resx b/mRemoteNG/UI/Controls/mrngIpTextBox.resx deleted file mode 100644 index 048325fc0..000000000 --- a/mRemoteNG/UI/Controls/mrngIpTextBox.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - 17, 17 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngLabel.cs b/mRemoteNG/UI/Controls/mrngLabel.cs deleted file mode 100644 index db4c8f35c..000000000 --- a/mRemoteNG/UI/Controls/mrngLabel.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using mRemoteNG.Themes; -using System.Drawing; -using System.Windows.Forms; - -namespace mRemoteNG.UI.Controls -{ - //Themable label to overide the winforms behavior of drawing the forecolor of disabled with a system color - //This class repaints the control to avoid Disabled state mismatch of the theme - [ToolboxBitmap(typeof(Label))] - public class MrngLabel : Label - { - private ThemeManager _themeManager; - private TextFormatFlags _textFormatFlags; - - public MrngLabel() - { - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ActiveAndExtended) return; - // Use the Dialog_* colors since Labels generally have the same colors as panels/dialogs/windows/etc... - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - FontOverrider.FontOverride(this); - BuildTextFormatFlags(); - Invalidate(); - } - - private void BuildTextFormatFlags() - { - _textFormatFlags = TextFormatFlags.TextBoxControl; - - // in default labels, wordwrap is enabled when autosize is false - if (AutoSize == false) - _textFormatFlags |= TextFormatFlags.WordBreak; - - switch (TextAlign) - { - case ContentAlignment.TopLeft: - _textFormatFlags |= TextFormatFlags.Top | TextFormatFlags.Left; - break; - case ContentAlignment.TopCenter: - _textFormatFlags |= TextFormatFlags.Top | TextFormatFlags.HorizontalCenter; - break; - case ContentAlignment.TopRight: - _textFormatFlags |= TextFormatFlags.Top | TextFormatFlags.Right; - break; - case ContentAlignment.MiddleLeft: - _textFormatFlags |= TextFormatFlags.VerticalCenter | TextFormatFlags.Left; - break; - case ContentAlignment.MiddleCenter: - _textFormatFlags |= TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter; - break; - case ContentAlignment.MiddleRight: - _textFormatFlags |= TextFormatFlags.VerticalCenter | TextFormatFlags.Right; - break; - case ContentAlignment.BottomLeft: - _textFormatFlags |= TextFormatFlags.Bottom | TextFormatFlags.Left; - break; - case ContentAlignment.BottomCenter: - _textFormatFlags |= TextFormatFlags.Bottom | TextFormatFlags.HorizontalCenter; - break; - case ContentAlignment.BottomRight: - _textFormatFlags |= TextFormatFlags.Bottom | TextFormatFlags.Right; - break; - default: - throw new ArgumentOutOfRangeException(); - } - } - - protected override void OnPaint(PaintEventArgs e) - { - if (!_themeManager.ActiveAndExtended) - { - base.OnPaint(e); - return; - } - - // let's use the defaults - this looks terrible in my testing.... - //e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; - //e.Graphics.TextRenderingHint = TextRenderingHint.AntiAlias; - if (Enabled) - { - TextRenderer.DrawText(e.Graphics, Text, Font, ClientRectangle, ForeColor, _textFormatFlags); - } - else - { - var disabledtextLabel = - _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Disabled_Foreground"); - TextRenderer.DrawText(e.Graphics, Text, Font, ClientRectangle, disabledtextLabel, _textFormatFlags); - } - } - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // NGLabel - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngLabel.resx b/mRemoteNG/UI/Controls/mrngLabel.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngLabel.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngListView.cs b/mRemoteNG/UI/Controls/mrngListView.cs deleted file mode 100644 index 9587eb04a..000000000 --- a/mRemoteNG/UI/Controls/mrngListView.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System.ComponentModel; -using System.Drawing; -using BrightIdeasSoftware; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Controls -{ - //Simple coloring of ObjectListView - //This is subclassed to avoid repeating the code in multiple places - internal class MrngListView : ObjectListView - { - private CellBorderDecoration deco; - - //Control if the gridlines are styled, must be set before the OnCreateControl is fired - public bool DecorateLines { get; set; } = true; - - public MrngListView() - { - InitializeComponent(); - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - protected override void OnCreateControl() - { - base.OnCreateControl(); - var _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ActiveAndExtended) return; - //List back color - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Background"); - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Foreground"); - //Selected item - SelectedBackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Selected_Background"); - SelectedForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Selected_Foreground"); - - //Header style - HeaderUsesThemes = false; - var headerStylo = new HeaderFormatStyle - { - Normal = - { - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Header_Background"), - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Header_Foreground") - } - }; - HeaderFormatStyle = headerStylo; - //Border style - if (DecorateLines) - { - UseCellFormatEvents = true; - GridLines = false; - deco = new CellBorderDecoration - { - BorderPen = new Pen(_themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Border")), - FillBrush = null, - BoundsPadding = Size.Empty, - CornerRounding = 0 - }; - FormatCell += NGListView_FormatCell; - } - - if (Items != null && Items.Count != 0) - BuildList(); - Invalidate(); - } - - private void NGListView_FormatCell(object sender, FormatCellEventArgs e) - { - if (e.Column.IsVisible) - { - e.SubItem.Decoration = deco; - } - } - - private void InitializeComponent() - { - ((ISupportInitialize)(this)).BeginInit(); - SuspendLayout(); - // - // NGListView - // - Font = new Font("Segoe UI", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0); - ((ISupportInitialize)(this)).EndInit(); - ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngListView.resx b/mRemoteNG/UI/Controls/mrngListView.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngListView.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngNumericUpDown.cs b/mRemoteNG/UI/Controls/mrngNumericUpDown.cs deleted file mode 100644 index 6a52361a7..000000000 --- a/mRemoteNG/UI/Controls/mrngNumericUpDown.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.Themes; - -// ReSharper disable LocalizableElement - -namespace mRemoteNG.UI.Controls -{ - //Repaint of the NumericUpDown, the composite control buttons are replaced because the - //original ones cannot be themed due to protected inheritance - internal class MrngNumericUpDown : NumericUpDown - { - private readonly ThemeManager _themeManager; - private MrngButton Up; - private MrngButton Down; - - public MrngNumericUpDown() - { - _themeManager = ThemeManager.getInstance(); - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - protected override void OnCreateControl() - { - base.OnCreateControl(); - if (!_themeManager.ActiveAndExtended) return; - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true); - - if (Controls.Count > 0) - { - for (var i = 0; i < Controls.Count; i++) - { - //Remove those non-themable buttons - if (Controls[i].GetType().ToString().Equals("System.Windows.Forms.UpDownBase+UpDownButtons")) - Controls.Remove(Controls[i]); - - /* This is a bit of a hack. - * But if we have the buttons that we created already, redraw/return and don't add any more... - * - * OptionsPages are an example where the control is potentially created twice: - * AddOptionsPagesToListView and then LstOptionPages_SelectedIndexChanged - */ - if (!(Controls[i] is MrngButton)) continue; - if (!Controls[i].Text.Equals("\u25B2") && !Controls[i].Text.Equals("\u25BC")) continue; - Invalidate(); - return; - } - } - - //Add new themable buttons - Up = new MrngButton - { - Text = "\u25B2", - Font = new Font(Font.FontFamily, 5f) - }; - Up.SetBounds(Controls.Owner.Width - 17, 2, 16, Controls.Owner.Height / 2 - 1); - Up.Click += Up_Click; - Down = new MrngButton - { - Text = "\u25BC", - Font = new Font(Font.FontFamily, 5f) - }; - Down.SetBounds(Controls.Owner.Width - 17, Controls.Owner.Height / 2 + 1, 16, Controls.Owner.Height / 2 - 1); - Down.Click += Down_Click; - Controls.Add(Up); - Controls.Add(Down); - Invalidate(); - } - - private void Down_Click(object sender, EventArgs e) - { - DownButton(); - } - - private void Up_Click(object sender, EventArgs e) - { - UpButton(); - } - - protected override void OnEnabledChanged(EventArgs e) - { - if (_themeManager.ActiveAndExtended) - { - if (Enabled) - { - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - } - else - { - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Disabled_Background"); - } - } - - base.OnEnabledChanged(e); - Invalidate(); - } - - - //Redrawing border - protected override void OnPaint(PaintEventArgs e) - { - base.OnPaint(e); - if (!_themeManager.ActiveAndExtended) return; - //Fix Border - if (BorderStyle != BorderStyle.None) - e.Graphics.DrawRectangle( - new Pen(_themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Border"), - 1), 0, 0, Width - 1, - Height - 1); - } - - private void InitializeComponent() - { - ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); - this.SuspendLayout(); - // - // NGNumericUpDown - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngNumericUpDown.resx b/mRemoteNG/UI/Controls/mrngNumericUpDown.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngNumericUpDown.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngPictureBox.Designer.cs b/mRemoteNG/UI/Controls/mrngPictureBox.Designer.cs deleted file mode 100644 index 6c207be65..000000000 --- a/mRemoteNG/UI/Controls/mrngPictureBox.Designer.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace mRemoteNG.UI.Controls -{ - partial class MrngPictureBox - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Controls/mrngPictureBox.cs b/mRemoteNG/UI/Controls/mrngPictureBox.cs deleted file mode 100644 index b3f241a25..000000000 --- a/mRemoteNG/UI/Controls/mrngPictureBox.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.ComponentModel; -using System.Windows.Forms; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Controls -{ - public partial class MrngPictureBox : PictureBox - { - private ThemeManager _themeManager; - - public MrngPictureBox() - { - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - public MrngPictureBox(IContainer container) - { - container.Add(this); - - InitializeComponent(); - } - - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ActiveAndExtended) return; - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - Invalidate(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngProgressBar.cs b/mRemoteNG/UI/Controls/mrngProgressBar.cs deleted file mode 100644 index 0047dd31c..000000000 --- a/mRemoteNG/UI/Controls/mrngProgressBar.cs +++ /dev/null @@ -1,44 +0,0 @@ -using mRemoteNG.Themes; -using System.Drawing; -using System.Windows.Forms; - -namespace mRemoteNG.UI.Controls -{ - // Repaint of a ProgressBar on a flat style - internal class MrngProgressBar : ProgressBar - { - private ThemeManager _themeManager; - - - public MrngProgressBar() - { - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ThemingActive) return; - SetStyle(ControlStyles.UserPaint, true); - SetStyle(ControlStyles.OptimizedDoubleBuffer, true); - Invalidate(); - } - - protected override void OnPaint(PaintEventArgs e) - { - if (!_themeManager.ActiveAndExtended) - { - base.OnPaint(e); - return; - } - - var progressFill = _themeManager.ActiveTheme.ExtendedPalette.getColor("ProgressBar_Fill"); - var back = _themeManager.ActiveTheme.ExtendedPalette.getColor("ProgressBar_Background"); - var doneProgress = (int)(e.ClipRectangle.Width * ((double)Value / Maximum)); - e.Graphics.FillRectangle(new SolidBrush(progressFill), 0, 0, doneProgress, e.ClipRectangle.Height); - e.Graphics.FillRectangle(new SolidBrush(back), doneProgress, 0, e.ClipRectangle.Width, - e.ClipRectangle.Height); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngRadioButton.cs b/mRemoteNG/UI/Controls/mrngRadioButton.cs deleted file mode 100644 index 56adb19b8..000000000 --- a/mRemoteNG/UI/Controls/mrngRadioButton.cs +++ /dev/null @@ -1,137 +0,0 @@ -using mRemoteNG.Themes; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Windows.Forms; - -namespace mRemoteNG.UI.Controls -{ - // total replace of RadioButton to avoid disabled state inconsistency on the themes - // and glyph color inconsistency - class MrngRadioButton : RadioButton - { - private ThemeManager _themeManager; - private readonly Rectangle _circle; - private readonly Rectangle _circleSmall; - private readonly int _textXCoord; - - // Constructor - public MrngRadioButton() - { - var display = new DisplayProperties(); - - _circleSmall = new Rectangle(display.ScaleWidth(4), display.ScaleHeight(4), display.ScaleWidth(6), - display.ScaleHeight(6)); - _circle = new Rectangle(display.ScaleWidth(1), display.ScaleHeight(1), display.ScaleWidth(12), - display.ScaleHeight(12)); - _textXCoord = display.ScaleWidth(16); - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - - private enum MouseState - { - HOVER, - DOWN, - OUT - } - - private MouseState _mice { get; set; } - - - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ThemingActive) return; - // Allows for Overlaying - SetStyle(ControlStyles.SupportsTransparentBackColor, true); - BackColor = Color.Transparent; - _mice = MouseState.OUT; - MouseEnter += (sender, args) => - { - _mice = MouseState.HOVER; - Invalidate(); - }; - MouseLeave += (sender, args) => - { - _mice = MouseState.OUT; - Invalidate(); - }; - MouseDown += (sender, args) => - { - if (args.Button != MouseButtons.Left) return; - _mice = MouseState.DOWN; - Invalidate(); - }; - MouseUp += (sender, args) => - { - _mice = MouseState.OUT; - - Invalidate(); - }; - Invalidate(); - } - - - //This class is painted with the checkbox colors, the glyph color is used for the radio inside - protected override void OnPaint(PaintEventArgs e) - { - if (!_themeManager.ActiveAndExtended) - { - base.OnPaint(e); - return; - } - - // Init - var g = e.Graphics; - g.SmoothingMode = SmoothingMode.AntiAlias; - - var fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Text"); - var outline = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Border"); - var centerBack = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Background"); - Color center; - - // Overlay Graphic - e.Graphics.Clear(Parent.BackColor); - if (Enabled) - { - if (Checked) - { - center = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Glyph"); - } - else - { - center = Color.Transparent; - if (_mice == MouseState.HOVER) - { - outline = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Border_Hover"); - } - } - } - else - { - center = Color.Transparent; - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("CheckBox_Text_Disabled"); - } - - var textRect = new Rectangle(_textXCoord, Padding.Top, Width - 16, Height); - TextRenderer.DrawText(e.Graphics, Text, Font, textRect, fore, Parent.BackColor, - TextFormatFlags.PathEllipsis); - - g.FillEllipse(new SolidBrush(centerBack), _circle); - g.FillEllipse(new SolidBrush(center), _circleSmall); - g.DrawEllipse(new Pen(outline), _circle); - } - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // NGRadioButton - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngRadioButton.resx b/mRemoteNG/UI/Controls/mrngRadioButton.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngRadioButton.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngSearchBox.cs b/mRemoteNG/UI/Controls/mrngSearchBox.cs deleted file mode 100644 index eab3887d6..000000000 --- a/mRemoteNG/UI/Controls/mrngSearchBox.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Controls -{ - public class MrngSearchBox : MrngTextBox - { - private bool _showDefaultText = true; - private bool _settingDefaultText = true; - private readonly PictureBox _pbClear = new PictureBox(); - private readonly ToolTip _btClearToolTip = new ToolTip(); - - public MrngSearchBox() - { - TextChanged += NGSearchBox_TextChanged; - LostFocus += FocusLost; - GotFocus += FocusGot; - AddClearButton(); - ApplyLanguage(); - } - - private void ApplyLanguage() - { - _btClearToolTip.SetToolTip(_pbClear, Language.ClearSearchString); - } - - private void AddClearButton() - { - _pbClear.Image = Properties.Resources.Close_16x; - _pbClear.Width = 20; - _pbClear.Dock = DockStyle.Right; - _pbClear.Cursor = Cursors.Default; - _pbClear.Click += PbClear_Click; - _pbClear.LostFocus += FocusLost; - Controls.Add(_pbClear); - } - - private void FocusLost(object sender, EventArgs e) - { - if (!_showDefaultText) - return; - - _settingDefaultText = true; - Text = Language.SearchPrompt; - _pbClear.Visible = false; - } - - private void FocusGot(object sender, EventArgs e) - { - if (_showDefaultText) - Text = ""; - } - - private void PbClear_Click(object sender, EventArgs e) => Text = string.Empty; - - private void NGSearchBox_TextChanged(object sender, EventArgs e) - { - if (!_settingDefaultText) - { - _showDefaultText = string.IsNullOrEmpty(Text); - } - - _pbClear.Visible = !_showDefaultText && TextLength > 0; - _settingDefaultText = false; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngSearchBox.resx b/mRemoteNG/UI/Controls/mrngSearchBox.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngSearchBox.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngTextBox.cs b/mRemoteNG/UI/Controls/mrngTextBox.cs deleted file mode 100644 index e40ef7089..000000000 --- a/mRemoteNG/UI/Controls/mrngTextBox.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Controls -{ - //This class is only minimally themed as textboxes onPaint are hard to theme (system wm paint control most of the drawing process - //There are some glitches on the initial draw of some controls - public class MrngTextBox : TextBox - { - private ThemeManager _themeManager; - - public MrngTextBox() - { - InitializeComponent(); - ThemeManager.getInstance().ThemeChanged += OnCreateControl; - } - - protected override void OnCreateControl() - { - base.OnCreateControl(); - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ActiveAndExtended) return; - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor(ReadOnly - ? "TextBox_Disabled_Background" - : "TextBox_Background"); - Invalidate(); - } - - protected override void OnEnabledChanged(EventArgs e) - { - _themeManager = ThemeManager.getInstance(); - _themeManager = ThemeManager.getInstance(); - if (_themeManager.ActiveAndExtended) - { - if (Enabled) - { - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - } - else - { - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Disabled_Background"); - } - } - - base.OnEnabledChanged(e); - Invalidate(); - } - - private void InitializeComponent() - { - SuspendLayout(); - // - // NGTextBox - // - Font = new Font("Segoe UI", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0); - ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngTextBox.resx b/mRemoteNG/UI/Controls/mrngTextBox.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/Controls/mrngTextBox.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/Controls/mrngToolStripSplitButton.cs b/mRemoteNG/UI/Controls/mrngToolStripSplitButton.cs deleted file mode 100644 index d211255f0..000000000 --- a/mRemoteNG/UI/Controls/mrngToolStripSplitButton.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; - -namespace mRemoteNG.UI.Controls -{ - public class MrngToolStripSplitButton : System.Windows.Forms.ToolStripSplitButton - { - public new ToolStripDropDown DropDown - { - get => base.DropDown; - set - { - if (base.DropDown != value) - { - base.DropDown = value; - base.DropDown.Closing += DropDown_Closing; - } - } - } - - private void DropDown_Closing(object sender, ToolStripDropDownClosingEventArgs e) - { - if (e.CloseReason != ToolStripDropDownCloseReason.AppClicked) - { - return; - } - - Rectangle dropDownButtonBoundsClient = DropDownButtonBounds; // Relative to the ToolStripSplitButton - dropDownButtonBoundsClient.Offset(Bounds.Location); // Relative to the parent of the ToolStripSplitButton - Rectangle dropDownButtonBoundsScreen = - GetCurrentParent().RectangleToScreen(dropDownButtonBoundsClient); // Relative to the screen - - if (dropDownButtonBoundsScreen.Contains(Control.MousePosition)) - { - e.Cancel = true; - } - } - - protected override void OnMouseDown(MouseEventArgs e) - { - _dropDownVisibleOnMouseDown = DropDown.Visible; - base.OnMouseDown(e); - } - - protected override void OnMouseUp(MouseEventArgs e) - { - if (_dropDownVisibleOnMouseDown) - { - DropDown.Close(); - } - else - { - base.OnMouseUp(e); - } - } - - private bool _dropDownVisibleOnMouseDown; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/DialogFactory.cs b/mRemoteNG/UI/DialogFactory.cs deleted file mode 100644 index 64b1b71ca..000000000 --- a/mRemoteNG/UI/DialogFactory.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Messages; -using mRemoteNG.UI.TaskDialog; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI -{ - public class DialogFactory - { - public static OpenFileDialog BuildLoadConnectionsDialog() - { - return new OpenFileDialog - { - Title = "", - CheckFileExists = true, - InitialDirectory = ConnectionsFileInfo.DefaultConnectionsPath, - Filter = Language.FiltermRemoteXML + @"|*.xml|" + Language.FilterAll + @"|*.*" - }; - } - - /// - /// Creates and shows a dialog to either create a new connections file, load a different one, - /// exit, or optionally cancel the operation. - /// - /// - /// - /// - public static void ShowLoadConnectionsFailedDialog(string connectionFileName, - string messageText, - bool showCancelButton) - { - var commandButtons = new List - { - Language.ConfigurationCreateNew, - Language.OpenADifferentFile, - Language.Exit - }; - - if (showCancelButton) - commandButtons.Add(Language._Cancel); - - var answered = false; - while (!answered) - { - try - { - CTaskDialog.ShowTaskDialogBox( - GeneralAppInfo.ProductName, - messageText, - "", "", "", "", "", - string.Join(" | ", commandButtons), - ETaskDialogButtons.None, - ESysIcons.Question, - ESysIcons.Question); - - switch (CTaskDialog.CommandButtonResult) - { - case 0: // New - var saveAsDialog = ConnectionsSaveAsDialog(); - saveAsDialog.ShowDialog(); - Runtime.ConnectionsService.NewConnectionsFile(saveAsDialog.FileName); - answered = true; - break; - case 1: // Load - Runtime.LoadConnections(true); - answered = true; - break; - case 2: // Exit - Application.Exit(); - answered = true; - break; - case 3: // Cancel - answered = true; - break; - } - } - catch (Exception exception) - { - Runtime.MessageCollector.AddExceptionMessage( - string - .Format(Language.ConnectionsFileCouldNotBeLoadedNew, - connectionFileName), - exception, - MessageClass.WarningMsg); - } - } - } - - /// - /// Creates a new dialog that allows the user to select an mRemoteNG - /// connections file path. Don't forget to dispose the dialog when you - /// are done! - /// - public static SaveFileDialog ConnectionsSaveAsDialog() - { - return new SaveFileDialog - { - CheckPathExists = true, - InitialDirectory = ConnectionsFileInfo.DefaultConnectionsPath, - FileName = ConnectionsFileInfo.DefaultConnectionsFile, - OverwritePrompt = true, - Filter = Language.FiltermRemoteXML + @"|*.xml|" + Language.FilterAll + @"|*.*" - }; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/DisplayProperties.cs b/mRemoteNG/UI/DisplayProperties.cs deleted file mode 100644 index 2cf4ff15e..000000000 --- a/mRemoteNG/UI/DisplayProperties.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Drawing.Imaging; -using mRemoteNG.Tools; -using mRemoteNG.UI.GraphicsUtilities; - -namespace mRemoteNG.UI -{ - public class DisplayProperties - { - private readonly IGraphicsProvider _graphicsProvider; - - public SizeF ResolutionScalingFactor => _graphicsProvider.GetResolutionScalingFactor(); - - /// - /// Creates a new instance with the default - /// of type - /// - public DisplayProperties() - : this(new GdiPlusGraphicsProvider()) - { - } - - /// - /// Creates a new instance with the given - /// . - /// - /// - public DisplayProperties(IGraphicsProvider graphicsProvider) - { - _graphicsProvider = graphicsProvider.ThrowIfNull(nameof(graphicsProvider)); - } - - /// - /// Scale the given nominal width value by the - /// - /// - public int ScaleWidth(float width) - { - return CalculateScaledValue(width, ResolutionScalingFactor.Width); - } - - /// - /// Scale the given nominal height value by the - /// - /// - public int ScaleHeight(float height) - { - return CalculateScaledValue(height, ResolutionScalingFactor.Height); - } - - /// - /// Scales the height and width of the given struct - /// by the - /// - /// - /// - public Size ScaleSize(Size size) - { - return new Size(ScaleWidth(size.Width), ScaleHeight(size.Height)); - } - - /// - /// Scales the given image by - /// - /// The image to resize. - /// The resized image. - /// - /// Code from https://stackoverflow.com/questions/1922040/how-to-resize-an-image-c-sharp - /// - public Bitmap ScaleImage(Image image) - { - if (image == null) - throw new ArgumentNullException(nameof(image)); - - var width = ScaleWidth(image.Width); - var height = ScaleHeight(image.Height); - var destRect = new Rectangle(0, 0, width, height); - var destImage = new Bitmap(width, height); - - destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution); - - using (var graphics = Graphics.FromImage(destImage)) - { - graphics.CompositingMode = CompositingMode.SourceCopy; - graphics.CompositingQuality = CompositingQuality.HighQuality; - graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.HighQuality; - - using (var wrapMode = new ImageAttributes()) - { - wrapMode.SetWrapMode(WrapMode.TileFlipXY); - graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode); - } - } - - return destImage; - } - - public Bitmap ScaleImage(Icon icon) - { - if (icon == null) - throw new ArgumentNullException(nameof(icon)); - - return ScaleImage(icon.ToBitmap()); - } - - /// - /// Scale the given nominal height value by the - /// - /// - private int CalculateScaledValue(float value, float scalingValue) - { - return (int)Math.Round(value * scalingValue); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/FontOverrider.cs b/mRemoteNG/UI/FontOverrider.cs deleted file mode 100644 index a1267c696..000000000 --- a/mRemoteNG/UI/FontOverrider.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; - -namespace mRemoteNG.UI -{ - public class FontOverrider - { - public static void FontOverride(Control ctlParent) - { - // Override the font of all controls in a container with the default font based on the OS version - foreach (Control tempLoopVarCtlChild in ctlParent.Controls) - { - var ctlChild = tempLoopVarCtlChild; - ctlChild.Font = new Font(SystemFonts.MessageBoxFont.Name, ctlChild.Font.Size, ctlChild.Font.Style, - ctlChild.Font.Unit, ctlChild.Font.GdiCharSet); - if (ctlChild.Controls.Count > 0) - { - FontOverride(ctlChild); - } - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/FormExtensions.cs b/mRemoteNG/UI/FormExtensions.cs deleted file mode 100644 index a3fcb6c56..000000000 --- a/mRemoteNG/UI/FormExtensions.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; - - -namespace mRemoteNG.UI -{ - public static class FormExtensions - { - public static void CenterOnTarget(this Form formToMove, Form formToCenterOn) - { - var targetFormCenterX = formToCenterOn.Location.X + formToCenterOn.Width / 2; - var targetFormCenterY = formToCenterOn.Location.Y + formToCenterOn.Height / 2; - - var thisFormCenterX = formToMove.Location.X + formToMove.Width / 2; - var thisFormCenterY = formToMove.Location.Y + formToMove.Height / 2; - - formToMove.Location = new Point(targetFormCenterX - thisFormCenterX, targetFormCenterY - thisFormCenterY); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmAbout.Designer.cs b/mRemoteNG/UI/Forms/FrmAbout.Designer.cs deleted file mode 100644 index 698e8275f..000000000 --- a/mRemoteNG/UI/Forms/FrmAbout.Designer.cs +++ /dev/null @@ -1,173 +0,0 @@ -namespace mRemoteNG.UI.Forms -{ - public partial class FrmAbout - { - #region Windows Form Designer generated code - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAbout)); - this.pbLogo = new System.Windows.Forms.PictureBox(); - this.pnlBottom = new System.Windows.Forms.Panel(); - this.llCredits = new System.Windows.Forms.LinkLabel(); - this.llChangelog = new System.Windows.Forms.LinkLabel(); - this.llLicense = new System.Windows.Forms.LinkLabel(); - this.lblTitle = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblVersion = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblLicense = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblCopyright = new mRemoteNG.UI.Controls.MrngLabel(); - ((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit(); - this.pnlBottom.SuspendLayout(); - this.SuspendLayout(); - // - // pbLogo - // - this.pbLogo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(52)))), ((int)(((byte)(58)))), ((int)(((byte)(64))))); - this.pbLogo.BackgroundImage = global::mRemoteNG.Properties.Resources.Header_dark; - this.pbLogo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; - this.pbLogo.Dock = System.Windows.Forms.DockStyle.Top; - this.pbLogo.Location = new System.Drawing.Point(0, 0); - this.pbLogo.Name = "pbLogo"; - this.pbLogo.Size = new System.Drawing.Size(584, 120); - this.pbLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pbLogo.TabIndex = 1; - this.pbLogo.TabStop = false; - // - // pnlBottom - // - this.pnlBottom.BackColor = System.Drawing.SystemColors.Control; - this.pnlBottom.Controls.Add(this.llCredits); - this.pnlBottom.Controls.Add(this.llChangelog); - this.pnlBottom.Controls.Add(this.llLicense); - this.pnlBottom.Controls.Add(this.lblTitle); - this.pnlBottom.Controls.Add(this.lblVersion); - this.pnlBottom.Controls.Add(this.lblLicense); - this.pnlBottom.Controls.Add(this.lblCopyright); - this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlBottom.ForeColor = System.Drawing.SystemColors.ControlText; - this.pnlBottom.Location = new System.Drawing.Point(0, 120); - this.pnlBottom.Name = "pnlBottom"; - this.pnlBottom.Size = new System.Drawing.Size(584, 161); - this.pnlBottom.TabIndex = 1; - // - // llCredits - // - this.llCredits.AutoSize = true; - this.llCredits.Font = new System.Drawing.Font("Segoe UI", 9.75F); - this.llCredits.Location = new System.Drawing.Point(5, 134); - this.llCredits.Name = "llCredits"; - this.llCredits.Size = new System.Drawing.Size(49, 17); - this.llCredits.TabIndex = 10; - this.llCredits.TabStop = true; - this.llCredits.Text = "Credits"; - this.llCredits.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llCredits_LinkClicked); - // - // llChangelog - // - this.llChangelog.AutoSize = true; - this.llChangelog.Font = new System.Drawing.Font("Segoe UI", 9.75F); - this.llChangelog.Location = new System.Drawing.Point(5, 117); - this.llChangelog.Name = "llChangelog"; - this.llChangelog.Size = new System.Drawing.Size(71, 17); - this.llChangelog.TabIndex = 9; - this.llChangelog.TabStop = true; - this.llChangelog.Text = "Changelog"; - this.llChangelog.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llChangelog_LinkClicked); - // - // llLicense - // - this.llLicense.AutoSize = true; - this.llLicense.Font = new System.Drawing.Font("Segoe UI", 9.75F); - this.llLicense.Location = new System.Drawing.Point(5, 100); - this.llLicense.Name = "llLicense"; - this.llLicense.Size = new System.Drawing.Size(50, 17); - this.llLicense.TabIndex = 8; - this.llLicense.TabStop = true; - this.llLicense.Text = "License"; - this.llLicense.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llLicense_LinkClicked); - // - // lblTitle - // - this.lblTitle.AutoSize = true; - this.lblTitle.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblTitle.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblTitle.Location = new System.Drawing.Point(6, 3); - this.lblTitle.Name = "lblTitle"; - this.lblTitle.Size = new System.Drawing.Size(106, 27); - this.lblTitle.TabIndex = 0; - this.lblTitle.Text = "mRemoteNG"; - this.lblTitle.UseCompatibleTextRendering = true; - // - // lblVersion - // - this.lblVersion.AutoSize = true; - this.lblVersion.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblVersion.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblVersion.Location = new System.Drawing.Point(6, 30); - this.lblVersion.Name = "lblVersion"; - this.lblVersion.Size = new System.Drawing.Size(49, 22); - this.lblVersion.TabIndex = 1; - this.lblVersion.Text = "Version"; - this.lblVersion.UseCompatibleTextRendering = true; - // - // lblLicense - // - this.lblLicense.AutoSize = true; - this.lblLicense.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblLicense.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblLicense.Location = new System.Drawing.Point(6, 74); - this.lblLicense.Name = "lblLicense"; - this.lblLicense.Size = new System.Drawing.Size(48, 22); - this.lblLicense.TabIndex = 5; - this.lblLicense.Text = "License"; - this.lblLicense.UseCompatibleTextRendering = true; - // - // lblCopyright - // - this.lblCopyright.AutoSize = true; - this.lblCopyright.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCopyright.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblCopyright.Location = new System.Drawing.Point(6, 52); - this.lblCopyright.Name = "lblCopyright"; - this.lblCopyright.Size = new System.Drawing.Size(63, 22); - this.lblCopyright.TabIndex = 2; - this.lblCopyright.Text = "Copyright"; - this.lblCopyright.UseCompatibleTextRendering = true; - // - // FrmAbout - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.BackColor = System.Drawing.SystemColors.Control; - this.ClientSize = new System.Drawing.Size(584, 281); - this.Controls.Add(this.pnlBottom); - this.Controls.Add(this.pbLogo); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ForeColor = System.Drawing.SystemColors.ControlText; - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; - this.MaximumSize = new System.Drawing.Size(20000, 10000); - this.MinimizeBox = false; - this.Name = "FrmAbout"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "About"; - this.TopMost = true; - ((System.ComponentModel.ISupportInitialize)(this.pbLogo)).EndInit(); - this.pnlBottom.ResumeLayout(false); - this.pnlBottom.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - #endregion - - internal Controls.MrngLabel lblCopyright; - internal Controls.MrngLabel lblTitle; - internal Controls.MrngLabel lblVersion; - internal Controls.MrngLabel lblLicense; - internal System.Windows.Forms.Panel pnlBottom; - internal System.Windows.Forms.PictureBox pbLogo; - private System.Windows.Forms.LinkLabel llCredits; - private System.Windows.Forms.LinkLabel llChangelog; - private System.Windows.Forms.LinkLabel llLicense; - } -} diff --git a/mRemoteNG/UI/Forms/FrmAbout.cs b/mRemoteNG/UI/Forms/FrmAbout.cs deleted file mode 100644 index 59820ba3f..000000000 --- a/mRemoteNG/UI/Forms/FrmAbout.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System.Diagnostics; -using System.Windows.Forms; -using mRemoteNG.App.Info; -using mRemoteNG.Themes; -using mRemoteNG.Resources.Language; -using System.Reflection; -using mRemoteNG.Properties; -using System.Runtime.InteropServices; - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmAbout : Form - { - public static FrmAbout Instance { get; set; } = new FrmAbout(); - - private FrmAbout() - { - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.UIAboutBox_16x); - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - ApplyLanguage(); - ApplyTheme(); - } - - private void ApplyLanguage() - { - lblLicense.Text = Language.ReleasedUnderGPL; - base.Text = Language.About; - llChangelog.Text = Language.Changelog; - llCredits.Text = Language.Credits; - llLicense.Text = Language.License; - lblCopyright.Text = GeneralAppInfo.Copyright; - lblVersion.Text = $@"Version {GeneralAppInfo.ApplicationVersion}"; - AddPortableString(); - } - - [Conditional("PORTABLE")] - private void AddPortableString() => lblTitle.Text += $@" {Language.PortableEdition}"; - - private void ApplyTheme() - { - if (!ThemeManager.getInstance().ThemingActive) return; - if (!ThemeManager.getInstance().ActiveAndExtended) return; - pnlBottom.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlBottom.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - protected override void OnFormClosing(FormClosingEventArgs e) - { - base.OnFormClosing(e); - - e.Cancel = true; - Hide(); - } - - private void llLicense_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Settings.Default.CurrentUpdateChannelType + "/COPYING.txt"); - Close(); - } - - private void llChangelog_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Settings.Default.CurrentUpdateChannelType + "/CHANGELOG.md"); - Close(); - } - - private void llCredits_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) - { - OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Settings.Default.CurrentUpdateChannelType + "/CREDITS.md"); - Close(); - } - - private void OpenUrl(string url) - { - try - { - Process.Start(url); - } - catch - { - // hack because of this: https://github.com/dotnet/corefx/issues/10361 - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - url = url.Replace("&", "^&"); - Process.Start(new ProcessStartInfo("cmd", $"/c start {url}") { CreateNoWindow = true }); - } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - Process.Start("xdg-open", url); - } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - Process.Start("open", url); - } - else - { - throw; - } - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmAbout.resx b/mRemoteNG/UI/Forms/FrmAbout.resx deleted file mode 100644 index d32bf41c7..000000000 --- a/mRemoteNG/UI/Forms/FrmAbout.resx +++ /dev/null @@ -1,1117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - AAABAA0AICAQAAEABADoAgAA1gAAABAQEAABAAQAKAEAAL4DAAAwMAAAAQAIAKgOAADmBAAAICAAAAEA - CACoCAAAjhMAABAQAAABAAgAaAUAADYcAAAAAAAAAQAgAFofAACeIQAAQEAAAAEAIAAoQgAA+EAAADAw - AAABACAAqCUAACCDAAAoKAAAAQAgAGgaAADIqAAAICAAAAEAIACoEAAAMMMAABgYAAABACAAiAkAANjT - AAAUFAAAAQAgALgGAABg3QAAEBAAAAEAIABoBAAAGOQAACgAAAAgAAAA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pF/2dhXP+zr6v/7Onm/+/s6f/v7On/ - 7+zp/+vo5f+Ef3r/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6M98+OjTgQDo0/0A6NP9AOjT/ - bU06//WGTv//ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik// - /4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//CETf9zTzv/QDo0/0Q+OP+3s6// - 7+zp/+/s6f/v7On/7+zp/5eTj/9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/ - VU9J/87Kx//v7On/7+zp/+/s6f/v7On/tbGt/0Q+OP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjPf - Pjo04EA6NP9AOjT/QDo0/21NOv/1hk7//4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik// - /4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//SFTf+YX0D/ - RTw1/0A6NP9EPjj/t7Ov/+/s6f/v7On/7+zp/+/s6f+Xk4//QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/QDo0/0E7Nf+loZ3/7+zp/+/s6f/v7On/7+zp/8zIxf9NR0H/QDo0/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/QDoz3z46NOBAOjT/QDo0/0A6NP9pSzn/8IRN//2JT//9iU///YlP//2JT//9iU// - /YlP//2JT//9iU///YlP//2JT//9iU///YlP//2JT//9iU///YlP//2JT//9iU///IlP//uITv/4h07/ - 8IRN/9F2SP+CVT3/Rjw1/0A6NP9AOjT/RD44/7ezr//v7On/7+zp/+/s6f/v7On/l5OP/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/mZWQ/+/s6f/v7On/7+zp/+/s6f/Sz8v/ - UEpF/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A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zp/+7r6P/u6+j/ - 7uvo/+/s6f/v7On/7+zp/+/s6f/v7On/7+zp/93a1/92cWz/Qjw2/0A6NP9AOjT/QDo0/0A6NP9AOjT/ - QDo0/0A5Mt5AOjPfQDo0/0A6NP+MWj///olP//+KT//2hk7/bk07/0A6NP9AOjT/QDo0/5ZeQP//ik// - /4pP//SFTf9qTDr/QDo0/0A6NP9AOjT/jVo///2JT///ik//+YhO/3lSPP9YU03/29jV/+/s6f/v7On/ - 7+zp/+/s6f/v7On/7+zp/+/s6f/v7On/7+zp/+/s6f/v7On/7+zp/+3q5//Oysf/cm1o/0E7Nf9AOjT/ - QDo0/0A6NP9AOjT/QDo0/0A5Mt5AOjPfQDo0/0A6NP+MWj///olP//+KT//2hk7/c088/0c9Nf9HPTX/ - Rz01/5pgQf//ik///4pP//SFTf9vTjv/Rz01/0g9Nf9dRjj/y3RI//+KT///ik//9IVN/2tMOv9YU03/ - 29jV/+/s6f/v7On/5+Th/8zIxf/JxsL/ycbC/8nGwv/JxsL/ysfD/9LPy//j4N3/7uvo/+/s6f/v7On/ - 1dLO/2FbVv9AOjT/QDo0/0A6NP9AOjT/QDo0/0A5Mt5AOjPfQDo0/0A6NP+MWj///olP//+KT//9iU// - 2HlJ/8t0SP/LdEj/y3RI/+N+S///ik///4pP//yJTv/XeUn/y3RI/892SP/lf0v//YlP//+KT///ik// - 3HtK/1NCN/9YU03/29jV/+/s6f/v7On/zsvH/1ZQS/9LRT//S0U//0tFP/9LRT//S0VA/1FLRf9rZmH/ - yMTA/+/s6f/v7On/7uvo/6Gdmf9CPDb/QDo0/0A6NP9AOjT/QDo0/0A5Mt5AOjPfQDo0/0A6NP+MWj// - /olP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik// - /4pP//+KT//1hk7/j1s//0I7NP9YU03/29jV/+/s6f/v7On/zMnF/0xGQf9AOjT/QDo0/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/enVw/+rn5P/v7On/7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uqv9STUf/U05I/56alf/Oy8f/T0lE/0A5Mt5BOjPfWUQ3/2JIOf9iSDn/Ykg5/2JIOf9aRTj/ - SD84/7SwrP+/u7j/dG9q/3ZxbP+1sa3/x8TA/0xGQf9AOTLeQDoz30A6NP9AOjT/QDo0/0A6NP9AOjT/ - QDo0/0I8Nv+YlI//xcG+/8K+u//Bvbr/tbGt/29qZP9BOzX/QDky3kA6M99AOjT/QDo0/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/RkA6/0lDPf9JQz3/SEM9/0Q+OP9AOjT/QDo0/0A5Mt5AOTPeQDo0/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP8/OTLdQDk0w0A6NP9AOjT/ - QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDgzwkA9NUdAOTTD - QDky3kA6M99AOjPfQDoz30A6M99AOjPfQDoz30A6M99AOjPfQDoz30A6M99AOTLeQDk0wz47M0UAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmExport.Designer.cs b/mRemoteNG/UI/Forms/FrmExport.Designer.cs deleted file mode 100644 index 5951ff366..000000000 --- a/mRemoteNG/UI/Forms/FrmExport.Designer.cs +++ /dev/null @@ -1,338 +0,0 @@ - -using System.Windows.Forms; -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmExport : Form - { - #region Windows Form Designer generated code - - private void InitializeComponent() - { - this.btnCancel = new MrngButton(); - this.btnOK = new MrngButton(); - this.lblUncheckProperties = new mRemoteNG.UI.Controls.MrngLabel(); - this.chkUsername = new MrngCheckBox(); - this.chkPassword = new MrngCheckBox(); - this.chkDomain = new MrngCheckBox(); - this.chkInheritance = new MrngCheckBox(); - this.txtFileName = new mRemoteNG.UI.Controls.MrngTextBox(); - this.btnBrowse = new MrngButton(); - this.grpProperties = new System.Windows.Forms.GroupBox(); - this.chkAssignedCredential = new MrngCheckBox(); - this.grpFile = new System.Windows.Forms.GroupBox(); - this.lblFileFormat = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblFileName = new mRemoteNG.UI.Controls.MrngLabel(); - this.cboFileFormat = new MrngComboBox(); - this.grpItems = new System.Windows.Forms.GroupBox(); - this.lblSelectedConnection = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblSelectedFolder = new mRemoteNG.UI.Controls.MrngLabel(); - this.rdoExportSelectedConnection = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.rdoExportSelectedFolder = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.rdoExportEverything = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.grpProperties.SuspendLayout(); - this.grpFile.SuspendLayout(); - this.grpItems.SuspendLayout(); - this.SuspendLayout(); - // - // btnCancel - // - this.btnCancel._mice = MrngButton.MouseState.HOVER; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(447, 473); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 3; - this.btnCancel.Text = "&Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnOK - // - this.btnOK._mice = MrngButton.MouseState.HOVER; - this.btnOK.Location = new System.Drawing.Point(366, 473); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(75, 23); - this.btnOK.TabIndex = 2; - this.btnOK.Text = "&OK"; - this.btnOK.UseVisualStyleBackColor = true; - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - // - // lblUncheckProperties - // - this.lblUncheckProperties.AutoSize = true; - this.lblUncheckProperties.Location = new System.Drawing.Point(12, 134); - this.lblUncheckProperties.Name = "lblUncheckProperties"; - this.lblUncheckProperties.Size = new System.Drawing.Size(264, 13); - this.lblUncheckProperties.TabIndex = 4; - this.lblUncheckProperties.Text = "Uncheck the properties you want not to be saved!"; - // - // chkUsername - // - this.chkUsername._mice = MrngCheckBox.MouseState.HOVER; - this.chkUsername.AutoSize = true; - this.chkUsername.Checked = true; - this.chkUsername.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkUsername.Location = new System.Drawing.Point(15, 32); - this.chkUsername.Name = "chkUsername"; - this.chkUsername.Size = new System.Drawing.Size(77, 17); - this.chkUsername.TabIndex = 0; - this.chkUsername.Text = "Username"; - this.chkUsername.UseVisualStyleBackColor = true; - // - // chkPassword - // - this.chkPassword._mice = MrngCheckBox.MouseState.HOVER; - this.chkPassword.AutoSize = true; - this.chkPassword.Checked = true; - this.chkPassword.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkPassword.Location = new System.Drawing.Point(15, 55); - this.chkPassword.Name = "chkPassword"; - this.chkPassword.Size = new System.Drawing.Size(75, 17); - this.chkPassword.TabIndex = 1; - this.chkPassword.Text = "Password"; - this.chkPassword.UseVisualStyleBackColor = true; - // - // chkDomain - // - this.chkDomain._mice = MrngCheckBox.MouseState.HOVER; - this.chkDomain.AutoSize = true; - this.chkDomain.Checked = true; - this.chkDomain.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkDomain.Location = new System.Drawing.Point(15, 78); - this.chkDomain.Name = "chkDomain"; - this.chkDomain.Size = new System.Drawing.Size(66, 17); - this.chkDomain.TabIndex = 2; - this.chkDomain.Text = "Domain"; - this.chkDomain.UseVisualStyleBackColor = true; - // - // chkInheritance - // - this.chkInheritance._mice = MrngCheckBox.MouseState.HOVER; - this.chkInheritance.AutoSize = true; - this.chkInheritance.Checked = true; - this.chkInheritance.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkInheritance.Location = new System.Drawing.Point(15, 101); - this.chkInheritance.Name = "chkInheritance"; - this.chkInheritance.Size = new System.Drawing.Size(84, 17); - this.chkInheritance.TabIndex = 3; - this.chkInheritance.Text = "Inheritance"; - this.chkInheritance.UseVisualStyleBackColor = true; - // - // txtFileName - // - this.txtFileName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtFileName.Location = new System.Drawing.Point(15, 47); - this.txtFileName.Name = "txtFileName"; - this.txtFileName.Size = new System.Drawing.Size(396, 22); - this.txtFileName.TabIndex = 1; - this.txtFileName.TextChanged += new System.EventHandler(this.txtFileName_TextChanged); - // - // btnBrowse - // - this.btnBrowse._mice = MrngButton.MouseState.HOVER; - this.btnBrowse.Location = new System.Drawing.Point(417, 46); - this.btnBrowse.Name = "btnBrowse"; - this.btnBrowse.Size = new System.Drawing.Size(75, 23); - this.btnBrowse.TabIndex = 2; - this.btnBrowse.Text = "&Browse"; - this.btnBrowse.UseVisualStyleBackColor = true; - this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); - // - // grpProperties - // - this.grpProperties.Controls.Add(this.chkAssignedCredential); - this.grpProperties.Controls.Add(this.lblUncheckProperties); - this.grpProperties.Controls.Add(this.chkInheritance); - this.grpProperties.Controls.Add(this.chkUsername); - this.grpProperties.Controls.Add(this.chkDomain); - this.grpProperties.Controls.Add(this.chkPassword); - this.grpProperties.Location = new System.Drawing.Point(12, 304); - this.grpProperties.Name = "grpProperties"; - this.grpProperties.Size = new System.Drawing.Size(510, 163); - this.grpProperties.TabIndex = 1; - this.grpProperties.TabStop = false; - this.grpProperties.Text = "Export Properties"; - // - // chkAssignedCredential - // - this.chkAssignedCredential._mice = MrngCheckBox.MouseState.HOVER; - this.chkAssignedCredential.AutoSize = true; - this.chkAssignedCredential.Checked = true; - this.chkAssignedCredential.CheckState = System.Windows.Forms.CheckState.Checked; - this.chkAssignedCredential.Location = new System.Drawing.Point(143, 32); - this.chkAssignedCredential.Name = "chkAssignedCredential"; - this.chkAssignedCredential.Size = new System.Drawing.Size(129, 17); - this.chkAssignedCredential.TabIndex = 5; - this.chkAssignedCredential.Text = "Assigned Credential"; - this.chkAssignedCredential.UseVisualStyleBackColor = true; - this.chkAssignedCredential.Visible = false; - // - // grpFile - // - this.grpFile.Controls.Add(this.lblFileFormat); - this.grpFile.Controls.Add(this.lblFileName); - this.grpFile.Controls.Add(this.cboFileFormat); - this.grpFile.Controls.Add(this.txtFileName); - this.grpFile.Controls.Add(this.btnBrowse); - this.grpFile.Location = new System.Drawing.Point(12, 12); - this.grpFile.Name = "grpFile"; - this.grpFile.Size = new System.Drawing.Size(510, 140); - this.grpFile.TabIndex = 0; - this.grpFile.TabStop = false; - this.grpFile.Text = "Export File"; - // - // lblFileFormat - // - this.lblFileFormat.AutoSize = true; - this.lblFileFormat.Location = new System.Drawing.Point(12, 80); - this.lblFileFormat.Name = "lblFileFormat"; - this.lblFileFormat.Size = new System.Drawing.Size(67, 13); - this.lblFileFormat.TabIndex = 3; - this.lblFileFormat.Text = "File &Format:"; - // - // lblFileName - // - this.lblFileName.AutoSize = true; - this.lblFileName.Location = new System.Drawing.Point(12, 28); - this.lblFileName.Name = "lblFileName"; - this.lblFileName.Size = new System.Drawing.Size(56, 13); - this.lblFileName.TabIndex = 0; - this.lblFileName.Text = "Filename:"; - // - // cboFileFormat - // - this.cboFileFormat._mice = MrngComboBox.MouseState.HOVER; - this.cboFileFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboFileFormat.FormattingEnabled = true; - this.cboFileFormat.Location = new System.Drawing.Point(15, 100); - this.cboFileFormat.Name = "cboFileFormat"; - this.cboFileFormat.Size = new System.Drawing.Size(294, 21); - this.cboFileFormat.TabIndex = 4; - this.cboFileFormat.SelectedIndexChanged += new System.EventHandler(this.cboFileformat_SelectedIndexChanged); - // - // grpItems - // - this.grpItems.Controls.Add(this.lblSelectedConnection); - this.grpItems.Controls.Add(this.lblSelectedFolder); - this.grpItems.Controls.Add(this.rdoExportSelectedConnection); - this.grpItems.Controls.Add(this.rdoExportSelectedFolder); - this.grpItems.Controls.Add(this.rdoExportEverything); - this.grpItems.Location = new System.Drawing.Point(12, 158); - this.grpItems.Name = "grpItems"; - this.grpItems.Size = new System.Drawing.Size(510, 140); - this.grpItems.TabIndex = 4; - this.grpItems.TabStop = false; - this.grpItems.Text = "Export Items"; - // - // lblSelectedConnection - // - this.lblSelectedConnection.AutoSize = true; - this.lblSelectedConnection.Location = new System.Drawing.Point(48, 111); - this.lblSelectedConnection.Name = "lblSelectedConnection"; - this.lblSelectedConnection.Size = new System.Drawing.Size(99, 13); - this.lblSelectedConnection.TabIndex = 4; - this.lblSelectedConnection.Text = "Connection Name"; - // - // lblSelectedFolder - // - this.lblSelectedFolder.AutoSize = true; - this.lblSelectedFolder.Location = new System.Drawing.Point(48, 75); - this.lblSelectedFolder.Name = "lblSelectedFolder"; - this.lblSelectedFolder.Size = new System.Drawing.Size(72, 13); - this.lblSelectedFolder.TabIndex = 3; - this.lblSelectedFolder.Text = "Folder Name"; - // - // rdoExportSelectedConnection - // - this.rdoExportSelectedConnection.AutoSize = true; - this.rdoExportSelectedConnection.BackColor = System.Drawing.Color.Transparent; - this.rdoExportSelectedConnection.Location = new System.Drawing.Point(15, 91); - this.rdoExportSelectedConnection.Name = "rdoExportSelectedConnection"; - this.rdoExportSelectedConnection.Size = new System.Drawing.Size(232, 17); - this.rdoExportSelectedConnection.TabIndex = 2; - this.rdoExportSelectedConnection.TabStop = true; - this.rdoExportSelectedConnection.Text = "Export the currently selected connection"; - this.rdoExportSelectedConnection.UseVisualStyleBackColor = true; - // - // rdoExportSelectedFolder - // - this.rdoExportSelectedFolder.AutoSize = true; - this.rdoExportSelectedFolder.BackColor = System.Drawing.Color.Transparent; - this.rdoExportSelectedFolder.Location = new System.Drawing.Point(15, 55); - this.rdoExportSelectedFolder.Name = "rdoExportSelectedFolder"; - this.rdoExportSelectedFolder.Size = new System.Drawing.Size(205, 17); - this.rdoExportSelectedFolder.TabIndex = 1; - this.rdoExportSelectedFolder.TabStop = true; - this.rdoExportSelectedFolder.Text = "Export the currently selected folder"; - this.rdoExportSelectedFolder.UseVisualStyleBackColor = true; - // - // rdoExportEverything - // - this.rdoExportEverything.AutoSize = true; - this.rdoExportEverything.BackColor = System.Drawing.Color.Transparent; - this.rdoExportEverything.Checked = true; - this.rdoExportEverything.Location = new System.Drawing.Point(15, 32); - this.rdoExportEverything.Name = "rdoExportEverything"; - this.rdoExportEverything.Size = new System.Drawing.Size(115, 17); - this.rdoExportEverything.TabIndex = 0; - this.rdoExportEverything.TabStop = true; - this.rdoExportEverything.Text = "Export everything"; - this.rdoExportEverything.UseVisualStyleBackColor = true; - // - // ExportForm - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(534, 508); - this.Controls.Add(this.grpItems); - this.Controls.Add(this.grpFile); - this.Controls.Add(this.grpProperties); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.btnOK); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ExportForm"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Export Connections"; - this.Load += new System.EventHandler(this.ExportForm_Load); - this.grpProperties.ResumeLayout(false); - this.grpProperties.PerformLayout(); - this.grpFile.ResumeLayout(false); - this.grpFile.PerformLayout(); - this.grpItems.ResumeLayout(false); - this.grpItems.PerformLayout(); - this.ResumeLayout(false); - - } - private MrngButton btnCancel; - private MrngButton btnOK; - private Controls.MrngLabel lblUncheckProperties; - private MrngCheckBox chkUsername; - private MrngCheckBox chkPassword; - private MrngCheckBox chkDomain; - private MrngCheckBox chkInheritance; - private Controls.MrngTextBox txtFileName; - private MrngButton btnBrowse; - private System.Windows.Forms.GroupBox grpProperties; - private System.Windows.Forms.GroupBox grpFile; - private Controls.MrngLabel lblFileFormat; - private Controls.MrngLabel lblFileName; - private MrngComboBox cboFileFormat; - private System.Windows.Forms.GroupBox grpItems; - private Controls.MrngLabel lblSelectedConnection; - private Controls.MrngLabel lblSelectedFolder; - private Controls.MrngRadioButton rdoExportSelectedConnection; - private Controls.MrngRadioButton rdoExportSelectedFolder; - private Controls.MrngRadioButton rdoExportEverything; - #endregion - - private MrngCheckBox chkAssignedCredential; - } -} diff --git a/mRemoteNG/UI/Forms/FrmExport.cs b/mRemoteNG/UI/Forms/FrmExport.cs deleted file mode 100644 index 29dc32468..000000000 --- a/mRemoteNG/UI/Forms/FrmExport.cs +++ /dev/null @@ -1,310 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows.Forms; -using mRemoteNG.Config.Connections; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Themes; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmExport - { - private ThemeManager _themeManager; - - #region Public Properties - - public string FileName - { - get => txtFileName.Text; - set => txtFileName.Text = value; - } - - public SaveFormat SaveFormat - { - get - { - var exportFormat = cboFileFormat.SelectedItem as ExportFormat; - return exportFormat?.Format ?? SaveFormat.mRXML; - } - set - { - foreach (var item in cboFileFormat.Items) - { - var exportFormat = item as ExportFormat; - if (exportFormat?.Format != value) continue; - cboFileFormat.SelectedItem = item; - break; - } - } - } - - public ExportScope Scope - { - get - { - if (rdoExportSelectedFolder.Checked) - return ExportScope.SelectedFolder; - if (rdoExportSelectedConnection.Checked) - return ExportScope.SelectedConnection; - return ExportScope.Everything; - } - set - { - switch (value) - { - case ExportScope.Everything: - rdoExportEverything.Checked = true; - break; - case ExportScope.SelectedFolder: - rdoExportSelectedFolder.Checked = true; - break; - case ExportScope.SelectedConnection: - rdoExportSelectedConnection.Checked = true; - break; - } - } - } - - private ContainerInfo _selectedFolder; - - public ContainerInfo SelectedFolder - { - get => _selectedFolder; - set - { - _selectedFolder = value; - lblSelectedFolder.Text = value?.Name; - rdoExportSelectedFolder.Enabled = value != null; - } - } - - private ConnectionInfo _selectedConnection; - - public ConnectionInfo SelectedConnection - { - get => _selectedConnection; - set - { - _selectedConnection = value; - lblSelectedConnection.Text = value?.Name; - rdoExportSelectedConnection.Enabled = value != null; - } - } - - public bool IncludeUsername - { - get => chkUsername.Checked; - set => chkUsername.Checked = value; - } - - public bool IncludePassword - { - get => chkPassword.Checked; - set => chkPassword.Checked = value; - } - - public bool IncludeDomain - { - get => chkDomain.Checked; - set => chkDomain.Checked = value; - } - - public bool IncludeAssignedCredential - { - get => chkAssignedCredential.Checked; - set => chkAssignedCredential.Checked = value; - } - - public bool IncludeInheritance - { - get => chkInheritance.Checked; - set => chkInheritance.Checked = value; - } - - #endregion - - #region Constructors - - public FrmExport() - { - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Export_16x); - FontOverrider.FontOverride(this); - SelectedFolder = null; - SelectedConnection = null; - btnOK.Enabled = false; - } - - #endregion - - #region Private Methods - - #region Event Handlers - - private void ExportForm_Load(object sender, EventArgs e) - { - cboFileFormat.Items.Clear(); - cboFileFormat.Items.Add(new ExportFormat(SaveFormat.mRXML)); - cboFileFormat.Items.Add(new ExportFormat(SaveFormat.mRCSV)); - cboFileFormat.SelectedIndex = 0; - ApplyTheme(); - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - ApplyLanguage(); - } - - private void txtFileName_TextChanged(object sender, EventArgs e) - { - btnOK.Enabled = !string.IsNullOrEmpty(txtFileName.Text); - } - - private void btnBrowse_Click(object sender, EventArgs e) - { - using (var saveFileDialog = new SaveFileDialog()) - { - saveFileDialog.CheckPathExists = true; - saveFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); - saveFileDialog.OverwritePrompt = true; - - var fileTypes = new List(); - fileTypes.AddRange(new[] {Language.FiltermRemoteXML, "*.xml"}); - fileTypes.AddRange(new[] {Language.FiltermRemoteCSV, "*.csv"}); - fileTypes.AddRange(new[] {Language.FilterAll, "*.*"}); - - saveFileDialog.Filter = string.Join("|", fileTypes.ToArray()); - SelectFileTypeBasedOnSaveFormat(saveFileDialog); - - if (saveFileDialog.ShowDialog(this) != DialogResult.OK) - return; - - txtFileName.Text = saveFileDialog.FileName; - } - } - - private void SelectFileTypeBasedOnSaveFormat(FileDialog saveFileDialog) - { - saveFileDialog.FilterIndex = SaveFormat == SaveFormat.mRCSV ? 2 : 1; - } - - private void btnOK_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.OK; - } - - private void btnCancel_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.Cancel; - } - - private void cboFileformat_SelectedIndexChanged(object sender, EventArgs e) - { - // should only be active if we are using the credential manager feature - //if (SaveFormat == SaveFormat.mRXML) - //{ - // chkUsername.Enabled = false; - // chkPassword.Enabled = false; - // chkDomain.Enabled = false; - // chkAssignedCredential.Enabled = true; - //} - //else - //{ - // chkUsername.Enabled = true; - // chkPassword.Enabled = true; - // chkDomain.Enabled = true; - // chkAssignedCredential.Enabled = false; - //} - } - - #endregion - - private void ApplyTheme() - { - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ActiveAndExtended) return; - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - - private void ApplyLanguage() - { - Text = Language.Export; - - grpFile.Text = Language.ExportFile; - lblFileName.Text = Language.Filename; - btnBrowse.Text = Language._Browse; - lblFileFormat.Text = Language.FileFormat; - - grpItems.Text = Language.ExportItems; - rdoExportEverything.Text = Language.ExportEverything; - rdoExportSelectedFolder.Text = Language.ExportSelectedFolder; - rdoExportSelectedConnection.Text = Language.ExportSelectedConnection; - - grpProperties.Text = Language.ExportProperties; - chkUsername.Text = Language.Username; - chkPassword.Text = Language.Password; - chkDomain.Text = Language.Domain; - chkAssignedCredential.Text = Language.AssignedCredential; - chkInheritance.Text = Language.Inheritance; - lblUncheckProperties.Text = Language.UncheckProperties; - - btnOK.Text = Language._Ok; - btnCancel.Text = Language._Cancel; - } - - #endregion - - #region Public Enumerations - - public enum ExportScope - { - Everything, - SelectedFolder, - SelectedConnection - } - - #endregion - - #region Private Classes - - [ImmutableObject(true)] - private class ExportFormat - { - #region Public Properties - - public SaveFormat Format { get; } - - #endregion - - #region Constructors - - public ExportFormat(SaveFormat format) - { - Format = format; - } - - #endregion - - #region Public Methods - - public override string ToString() - { - switch (Format) - { - case SaveFormat.mRXML: - return Language.MremoteNgXml; - case SaveFormat.mRCSV: - return Language.MremoteNgCsv; - default: - return Format.ToString(); - } - } - - #endregion - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmExport.resx b/mRemoteNG/UI/Forms/FrmExport.resx deleted file mode 100644 index d58980a38..000000000 --- a/mRemoteNG/UI/Forms/FrmExport.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmInputBox.Designer.cs b/mRemoteNG/UI/Forms/FrmInputBox.Designer.cs deleted file mode 100644 index b5717b251..000000000 --- a/mRemoteNG/UI/Forms/FrmInputBox.Designer.cs +++ /dev/null @@ -1,138 +0,0 @@ -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms -{ - sealed partial class FrmInputBox - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this._Ok = new MrngButton(); - this.buttonCancel = new MrngButton(); - this.textBox = new mRemoteNG.UI.Controls.MrngTextBox(); - this.label = new mRemoteNG.UI.Controls.MrngLabel(); - this.tableLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 3; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.Controls.Add(this._Ok, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.buttonCancel, 2, 2); - this.tableLayoutPanel1.Controls.Add(this.textBox, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.label, 0, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(284, 81); - this.tableLayoutPanel1.TabIndex = 0; - // - // _Ok - // - this._Ok._mice = MrngButton.MouseState.HOVER; - this._Ok.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this._Ok.Location = new System.Drawing.Point(125, 55); - this._Ok.Name = "_Ok"; - this._Ok.Size = new System.Drawing.Size(75, 23); - this._Ok.TabIndex = 0; - this._Ok.Text = "Ok"; - this._Ok.UseVisualStyleBackColor = true; - this._Ok.Click += new System.EventHandler(this._Ok_Click); - // - // buttonCancel - // - this.buttonCancel._mice = MrngButton.MouseState.HOVER; - this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(206, 55); - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(75, 23); - this.buttonCancel.TabIndex = 1; - this.buttonCancel.Text = "Cancel"; - this.buttonCancel.UseVisualStyleBackColor = true; - this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); - // - // textBox - // - this.tableLayoutPanel1.SetColumnSpan(this.textBox, 3); - this.textBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBox.Location = new System.Drawing.Point(3, 27); - this.textBox.Name = "textBox"; - this.textBox.Size = new System.Drawing.Size(278, 22); - this.textBox.TabIndex = 2; - // - // label - // - this.label.AutoSize = true; - this.tableLayoutPanel1.SetColumnSpan(this.label, 3); - this.label.Dock = System.Windows.Forms.DockStyle.Fill; - this.label.Location = new System.Drawing.Point(3, 0); - this.label.Name = "label"; - this.label.Size = new System.Drawing.Size(278, 24); - this.label.TabIndex = 3; - this.label.Text = "Label"; - this.label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // FrmInputBox - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(284, 81); - this.ControlBox = false; - this.Controls.Add(this.tableLayoutPanel1); - this.DoubleBuffered = true; - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FrmInputBox"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "InputBox"; - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private MrngButton _Ok; - private MrngButton buttonCancel; - private Controls.MrngTextBox textBox; - private Controls.MrngLabel label; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmInputBox.cs b/mRemoteNG/UI/Forms/FrmInputBox.cs deleted file mode 100644 index a04afb955..000000000 --- a/mRemoteNG/UI/Forms/FrmInputBox.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Windows.Forms; -using mRemoteNG.Themes; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms -{ - public sealed partial class FrmInputBox : Form - { - internal string returnValue; - - public FrmInputBox(string title, string promptText, string value) - { - InitializeComponent(); - - Text = title; - label.Text = promptText; - textBox.Text = value; - ApplyLanguage(); - ApplyTheme(); - } - - private void ApplyLanguage() - { - _Ok.Text = Language._Ok; - buttonCancel.Text = Language._Cancel; - } - - private void ApplyTheme() - { - var _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ActiveAndExtended) return; - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - private void _Ok_Click(object sender, System.EventArgs e) - { - DialogResult = DialogResult.OK; - returnValue = textBox.Text; - Close(); - } - - private void buttonCancel_Click(object sender, System.EventArgs e) - { - DialogResult = DialogResult.Cancel; - Close(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmInputBox.resx b/mRemoteNG/UI/Forms/FrmInputBox.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/FrmInputBox.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmPassword.Designer.cs b/mRemoteNG/UI/Forms/FrmPassword.Designer.cs deleted file mode 100644 index 090e6ceec..000000000 --- a/mRemoteNG/UI/Forms/FrmPassword.Designer.cs +++ /dev/null @@ -1,209 +0,0 @@ -using mRemoteNG.UI.Controls; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms -{ - public - partial class FrmPassword : System.Windows.Forms.Form - { - - //Form overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()] - protected override void Dispose(bool disposing) - { - try - { - if (disposing) - { - if(components != null) - components.Dispose(); - - if(_password != null) - _password.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()] - private void InitializeComponent() - { - this.lblPassword = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblVerify = new mRemoteNG.UI.Controls.MrngLabel(); - this.btnOK = new MrngButton(); - this.btnCancel = new MrngButton(); - this.lblStatus = new mRemoteNG.UI.Controls.MrngLabel(); - this.pbLock = new System.Windows.Forms.PictureBox(); - this.txtVerify = new mRemoteNG.UI.Controls.MrngTextBox(); - this.txtPassword = new mRemoteNG.UI.Controls.MrngTextBox(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - ((System.ComponentModel.ISupportInitialize)(this.pbLock)).BeginInit(); - this.tableLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // lblPassword - // - this.lblPassword.AutoSize = true; - this.lblPassword.Location = new System.Drawing.Point(73, 9); - this.lblPassword.Name = "lblPassword"; - this.lblPassword.Size = new System.Drawing.Size(59, 13); - this.lblPassword.TabIndex = 1; - this.lblPassword.Text = "Password:"; - // - // lblVerify - // - this.lblVerify.AutoSize = true; - this.lblVerify.Location = new System.Drawing.Point(73, 50); - this.lblVerify.Name = "lblVerify"; - this.lblVerify.Size = new System.Drawing.Size(38, 13); - this.lblVerify.TabIndex = 3; - this.lblVerify.Text = "Verify:"; - // - // btnOK - // - this.btnOK._mice = MrngButton.MouseState.HOVER; - this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnOK.Location = new System.Drawing.Point(215, 124); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(75, 23); - this.btnOK.TabIndex = 7; - this.btnOK.Text = Language._Ok; - this.btnOK.UseVisualStyleBackColor = true; - this.btnOK.Click += new System.EventHandler(this.BtnOK_Click); - // - // btnCancel - // - this.btnCancel._mice = MrngButton.MouseState.HOVER; - this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(296, 124); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 6; - this.btnCancel.Text = Language._Cancel; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click); - // - // lblStatus - // - this.lblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel1.SetColumnSpan(this.lblStatus, 2); - this.lblStatus.ForeColor = System.Drawing.Color.Red; - this.lblStatus.Location = new System.Drawing.Point(73, 91); - this.lblStatus.Name = "lblStatus"; - this.lblStatus.Size = new System.Drawing.Size(298, 13); - this.lblStatus.TabIndex = 5; - this.lblStatus.Text = "Status"; - this.lblStatus.TextAlign = System.Drawing.ContentAlignment.TopRight; - this.lblStatus.Visible = false; - // - // pbLock - // - this.pbLock.Image = global::mRemoteNG.Properties.Resources.ASPWebSite_16x; - this.pbLock.Location = new System.Drawing.Point(3, 12); - this.pbLock.Name = "pbLock"; - this.tableLayoutPanel1.SetRowSpan(this.pbLock, 6); - this.pbLock.Size = new System.Drawing.Size(64, 64); - this.pbLock.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pbLock.TabIndex = 7; - this.pbLock.TabStop = false; - // - // txtVerify - // - this.txtVerify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel1.SetColumnSpan(this.txtVerify, 2); - this.txtVerify.Location = new System.Drawing.Point(73, 66); - this.txtVerify.Name = "txtVerify"; - this.txtVerify.Size = new System.Drawing.Size(298, 22); - this.txtVerify.TabIndex = 4; - this.txtVerify.UseSystemPasswordChar = true; - this.txtVerify.TextChanged += new System.EventHandler(this.TxtPassword_TextChanged); - // - // txtPassword - // - this.txtPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.tableLayoutPanel1.SetColumnSpan(this.txtPassword, 2); - this.txtPassword.Location = new System.Drawing.Point(73, 25); - this.txtPassword.Name = "txtPassword"; - this.txtPassword.Size = new System.Drawing.Size(298, 22); - this.txtPassword.TabIndex = 2; - this.txtPassword.UseSystemPasswordChar = true; - this.txtPassword.TextChanged += new System.EventHandler(this.TxtPassword_TextChanged); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 3; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.Controls.Add(this.pbLock, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.btnOK, 1, 6); - this.tableLayoutPanel1.Controls.Add(this.btnCancel, 2, 6); - this.tableLayoutPanel1.Controls.Add(this.lblStatus, 1, 5); - this.tableLayoutPanel1.Controls.Add(this.txtVerify, 1, 4); - this.tableLayoutPanel1.Controls.Add(this.lblVerify, 1, 3); - this.tableLayoutPanel1.Controls.Add(this.txtPassword, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.lblPassword, 1, 1); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 7; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.66667F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 83.33334F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(374, 150); - this.tableLayoutPanel1.TabIndex = 8; - // - // PasswordForm - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(374, 150); - this.ControlBox = false; - this.Controls.Add(this.tableLayoutPanel1); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "PasswordForm"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Password"; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.PasswordForm_FormClosed); - this.Load += new System.EventHandler(this.FrmPassword_Load); - ((System.ComponentModel.ISupportInitialize)(this.pbLock)).EndInit(); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.ResumeLayout(false); - - } - private Controls.MrngTextBox txtPassword; - private Controls.MrngTextBox txtVerify; - private Controls.MrngLabel lblPassword; - private Controls.MrngLabel lblVerify; - private MrngButton btnOK; - private MrngButton btnCancel; - private Controls.MrngLabel lblStatus; - private System.Windows.Forms.PictureBox pbLock; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - } -} diff --git a/mRemoteNG/UI/Forms/FrmPassword.cs b/mRemoteNG/UI/Forms/FrmPassword.cs deleted file mode 100644 index 20363086a..000000000 --- a/mRemoteNG/UI/Forms/FrmPassword.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Security; -using System.Windows.Forms; -using mRemoteNG.Security; -using mRemoteNG.Themes; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmPassword : IKeyProvider - { - private readonly string _passwordName; - private SecureString _password = new SecureString(); - - /// - /// Puts the dialog into the New Password mode. An extra - /// password box is shown which must match the first password - /// to continue. - /// - private bool NewPasswordMode { get; } - - /// - /// Creates a new password form for entering or setting a password. - /// - /// - /// - /// Puts the dialog into the New Password mode. An extra - /// password box is shown which must match the first password - /// to continue. - /// - public FrmPassword(string passwordName = null, bool newPasswordMode = true) - { - InitializeComponent(); - _passwordName = passwordName; - NewPasswordMode = newPasswordMode; - } - - /// - /// Dispaly a dialog box requesting that the user - /// enter their password. - /// - /// - public Optional GetKey() - { - var dialog = ShowDialog(); - return dialog == DialogResult.OK - ? _password - : Optional.Empty; - } - - #region Event Handlers - - private void FrmPassword_Load(object sender, EventArgs e) - { - ApplyLanguage(); - ApplyTheme(); - var display = new DisplayProperties(); - pbLock.Image = display.ScaleImage(pbLock.Image); - Height = tableLayoutPanel1.Height; - - if (NewPasswordMode) return; - lblVerify.Visible = false; - txtVerify.Visible = false; - } - - private void PasswordForm_FormClosed(object sender, FormClosedEventArgs e) - { - _password = txtPassword.Text.ConvertToSecureString(); - txtPassword.Text = ""; - txtVerify.Text = ""; - } - - private void BtnCancel_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.Cancel; - Close(); - } - - private void BtnOK_Click(object sender, EventArgs e) - { - if (NewPasswordMode) - VerifyNewPassword(); - - DialogResult = DialogResult.OK; - } - - private void TxtPassword_TextChanged(object sender, EventArgs e) - { - HideStatus(); - } - - #endregion - - #region Private Methods - - private void ApplyLanguage() - { - Text = string.IsNullOrEmpty(_passwordName) - ? Language.TitlePassword - : string.Format(Language.TitlePasswordWithName, _passwordName); - - lblPassword.Text = Language.Password; - lblVerify.Text = Language.Verify; - btnCancel.Text = Language._Cancel; - btnOK.Text = Language._Ok; - } - - private void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) - return; - - var activeTheme = ThemeManager.getInstance().ActiveTheme; - - BackColor = activeTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = activeTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - // ReSharper disable once UnusedMethodReturnValue.Local - private bool VerifyNewPassword() - { - if (txtPassword.Text.Length >= 3) - { - if (txtPassword.Text == txtVerify.Text) - return true; - ShowStatus(Language.PasswordStatusMustMatch); - return false; - } - - ShowStatus(Language.PasswordStatusTooShort); - return false; - } - - private void ShowStatus(string status) - { - lblStatus.Visible = true; - lblStatus.Text = status; - } - - private void HideStatus() - { - lblStatus.Visible = false; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmPassword.resx b/mRemoteNG/UI/Forms/FrmPassword.resx deleted file mode 100644 index d58980a38..000000000 --- a/mRemoteNG/UI/Forms/FrmPassword.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmSplashScreen.Designer.cs b/mRemoteNG/UI/Forms/FrmSplashScreen.Designer.cs deleted file mode 100644 index 080df07d0..000000000 --- a/mRemoteNG/UI/Forms/FrmSplashScreen.Designer.cs +++ /dev/null @@ -1,60 +0,0 @@ -namespace mRemoteNG.UI.Forms -{ - partial class FrmSplashScreen - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // FrmSplashScreen - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.BackgroundImage = global::mRemoteNG.Properties.Resources.Header_dark; - this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.ClientSize = new System.Drawing.Size(450, 120); - this.ControlBox = false; - this.DoubleBuffered = true; - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Margin = new System.Windows.Forms.Padding(2); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(180, 60); - this.Name = "FrmSplashScreen"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "frmSplashScreen"; - this.TopMost = true; - this.ResumeLayout(false); - - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmSplashScreen.cs b/mRemoteNG/UI/Forms/FrmSplashScreen.cs deleted file mode 100644 index 9c53f02f1..000000000 --- a/mRemoteNG/UI/Forms/FrmSplashScreen.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmSplashScreen : Form - { - static FrmSplashScreen instance = null; - - private FrmSplashScreen() - { - InitializeComponent(); - - Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 20, 20)); - } - - [DllImport("Gdi32.dll", EntryPoint = "CreateRoundRectRgn")] - private static extern IntPtr CreateRoundRectRgn - ( - int nLeftRect, // x-coordinate of upper-left corner - int nTopRect, // y-coordinate of upper-left corner - int nRightRect, // x-coordinate of lower-right corner - int nBottomRect, // y-coordinate of lower-right corner - int nWidthEllipse, // width of ellipse - int nHeightEllipse // height of ellipse - ); - - public static FrmSplashScreen getInstance() - { - if (instance == null) - instance = new FrmSplashScreen(); - return instance; - } - - protected override CreateParams CreateParams - { - get - { - CreateParams cp = base.CreateParams; - // turn on WS_EX_TOOLWINDOW style bit - cp.ExStyle |= 0x80; - return cp; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmSplashScreen.resx b/mRemoteNG/UI/Forms/FrmSplashScreen.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/FrmSplashScreen.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmUnhandledException.Designer.cs b/mRemoteNG/UI/Forms/FrmUnhandledException.Designer.cs deleted file mode 100644 index 67ca836d9..000000000 --- a/mRemoteNG/UI/Forms/FrmUnhandledException.Designer.cs +++ /dev/null @@ -1,242 +0,0 @@ -namespace mRemoteNG.UI.Forms -{ - partial class FrmUnhandledException - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.labelExceptionCaught = new System.Windows.Forms.Label(); - this.buttonClose = new System.Windows.Forms.Button(); - this.textBoxStackTrace = new System.Windows.Forms.TextBox(); - this.labelStackTraceHeader = new System.Windows.Forms.Label(); - this.labelExceptionMessageHeader = new System.Windows.Forms.Label(); - this.textBoxExceptionMessage = new System.Windows.Forms.TextBox(); - this.buttonCopyAll = new System.Windows.Forms.Button(); - this.labelExceptionIsFatalHeader = new System.Windows.Forms.Label(); - this.labelEnvironment = new System.Windows.Forms.Label(); - this.textBoxEnvironment = new System.Windows.Forms.TextBox(); - this.buttonCreateBug = new System.Windows.Forms.Button(); - this.tableLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 3; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Controls.Add(this.labelExceptionCaught, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.buttonClose, 2, 8); - this.tableLayoutPanel1.Controls.Add(this.textBoxStackTrace, 0, 5); - this.tableLayoutPanel1.Controls.Add(this.labelStackTraceHeader, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.labelExceptionMessageHeader, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.textBoxExceptionMessage, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.buttonCopyAll, 1, 8); - this.tableLayoutPanel1.Controls.Add(this.labelExceptionIsFatalHeader, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.labelEnvironment, 0, 6); - this.tableLayoutPanel1.Controls.Add(this.textBoxEnvironment, 0, 7); - this.tableLayoutPanel1.Controls.Add(this.buttonCreateBug, 0, 8); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 9; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(606, 442); - this.tableLayoutPanel1.TabIndex = 0; - // - // labelExceptionCaught - // - this.labelExceptionCaught.AutoSize = true; - this.tableLayoutPanel1.SetColumnSpan(this.labelExceptionCaught, 3); - this.labelExceptionCaught.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelExceptionCaught.Location = new System.Drawing.Point(3, 0); - this.labelExceptionCaught.Name = "labelExceptionCaught"; - this.labelExceptionCaught.Size = new System.Drawing.Size(311, 20); - this.labelExceptionCaught.TabIndex = 3; - this.labelExceptionCaught.Text = "An unhandled exception has occurred"; - // - // buttonClose - // - this.buttonClose.AutoSize = true; - this.buttonClose.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonClose.Dock = System.Windows.Forms.DockStyle.Right; - this.buttonClose.Location = new System.Drawing.Point(529, 414); - this.buttonClose.Name = "buttonClose"; - this.buttonClose.Size = new System.Drawing.Size(74, 25); - this.buttonClose.TabIndex = 1; - this.buttonClose.Text = "Close"; - this.buttonClose.UseVisualStyleBackColor = true; - this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click); - // - // textBoxStackTrace - // - this.tableLayoutPanel1.SetColumnSpan(this.textBoxStackTrace, 3); - this.textBoxStackTrace.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBoxStackTrace.Location = new System.Drawing.Point(3, 150); - this.textBoxStackTrace.Multiline = true; - this.textBoxStackTrace.Name = "textBoxStackTrace"; - this.textBoxStackTrace.ReadOnly = true; - this.textBoxStackTrace.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBoxStackTrace.Size = new System.Drawing.Size(600, 147); - this.textBoxStackTrace.TabIndex = 0; - // - // labelStackTraceHeader - // - this.labelStackTraceHeader.AutoSize = true; - this.labelStackTraceHeader.Dock = System.Windows.Forms.DockStyle.Bottom; - this.labelStackTraceHeader.Location = new System.Drawing.Point(3, 134); - this.labelStackTraceHeader.Name = "labelStackTraceHeader"; - this.labelStackTraceHeader.Size = new System.Drawing.Size(440, 13); - this.labelStackTraceHeader.TabIndex = 4; - this.labelStackTraceHeader.Text = "Stack trace"; - // - // labelExceptionMessageHeader - // - this.labelExceptionMessageHeader.AutoSize = true; - this.labelExceptionMessageHeader.Dock = System.Windows.Forms.DockStyle.Bottom; - this.labelExceptionMessageHeader.Location = new System.Drawing.Point(3, 53); - this.labelExceptionMessageHeader.Name = "labelExceptionMessageHeader"; - this.labelExceptionMessageHeader.Size = new System.Drawing.Size(440, 13); - this.labelExceptionMessageHeader.TabIndex = 5; - this.labelExceptionMessageHeader.Text = "Exception message"; - // - // textBoxExceptionMessage - // - this.tableLayoutPanel1.SetColumnSpan(this.textBoxExceptionMessage, 3); - this.textBoxExceptionMessage.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBoxExceptionMessage.Location = new System.Drawing.Point(3, 69); - this.textBoxExceptionMessage.Multiline = true; - this.textBoxExceptionMessage.Name = "textBoxExceptionMessage"; - this.textBoxExceptionMessage.ReadOnly = true; - this.textBoxExceptionMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBoxExceptionMessage.Size = new System.Drawing.Size(600, 55); - this.textBoxExceptionMessage.TabIndex = 6; - // - // buttonCopyAll - // - this.buttonCopyAll.AutoSize = true; - this.buttonCopyAll.Dock = System.Windows.Forms.DockStyle.Right; - this.buttonCopyAll.Location = new System.Drawing.Point(449, 414); - this.buttonCopyAll.Name = "buttonCopyAll"; - this.buttonCopyAll.Size = new System.Drawing.Size(74, 25); - this.buttonCopyAll.TabIndex = 7; - this.buttonCopyAll.Text = "Copy All"; - this.buttonCopyAll.UseVisualStyleBackColor = true; - this.buttonCopyAll.Click += new System.EventHandler(this.buttonCopyAll_Click); - // - // labelExceptionIsFatalHeader - // - this.labelExceptionIsFatalHeader.AutoSize = true; - this.tableLayoutPanel1.SetColumnSpan(this.labelExceptionIsFatalHeader, 3); - this.labelExceptionIsFatalHeader.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.labelExceptionIsFatalHeader.Location = new System.Drawing.Point(3, 30); - this.labelExceptionIsFatalHeader.Name = "labelExceptionIsFatalHeader"; - this.labelExceptionIsFatalHeader.Size = new System.Drawing.Size(281, 16); - this.labelExceptionIsFatalHeader.TabIndex = 8; - this.labelExceptionIsFatalHeader.Text = "This exception will force mRemoteNG to close"; - // - // labelEnvironment - // - this.labelEnvironment.AutoSize = true; - this.labelEnvironment.Dock = System.Windows.Forms.DockStyle.Bottom; - this.labelEnvironment.Location = new System.Drawing.Point(3, 307); - this.labelEnvironment.Name = "labelEnvironment"; - this.labelEnvironment.Size = new System.Drawing.Size(440, 13); - this.labelEnvironment.TabIndex = 9; - this.labelEnvironment.Text = "Environment"; - // - // textBoxEnvironment - // - this.tableLayoutPanel1.SetColumnSpan(this.textBoxEnvironment, 3); - this.textBoxEnvironment.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBoxEnvironment.Location = new System.Drawing.Point(3, 323); - this.textBoxEnvironment.Multiline = true; - this.textBoxEnvironment.Name = "textBoxEnvironment"; - this.textBoxEnvironment.ReadOnly = true; - this.textBoxEnvironment.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBoxEnvironment.Size = new System.Drawing.Size(600, 85); - this.textBoxEnvironment.TabIndex = 10; - // - // buttonCreateBug - // - this.buttonCreateBug.AutoSize = true; - this.buttonCreateBug.Dock = System.Windows.Forms.DockStyle.Right; - this.buttonCreateBug.Location = new System.Drawing.Point(358, 414); - this.buttonCreateBug.Name = "buttonCreateBug"; - this.buttonCreateBug.Size = new System.Drawing.Size(85, 25); - this.buttonCreateBug.TabIndex = 11; - this.buttonCreateBug.Text = "Report a Bug"; - this.buttonCreateBug.UseVisualStyleBackColor = true; - this.buttonCreateBug.Click += new System.EventHandler(this.buttonCreateBug_Click); - // - // FrmUnhandledException - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.buttonClose; - this.ClientSize = new System.Drawing.Size(606, 442); - this.ControlBox = false; - this.Controls.Add(this.tableLayoutPanel1); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.MinimumSize = new System.Drawing.Size(550, 350); - this.Name = "FrmUnhandledException"; - this.ShowInTaskbar = false; - this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "mRemoteNG Unhandled Exception"; - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.TextBox textBoxStackTrace; - private System.Windows.Forms.Button buttonClose; - private System.Windows.Forms.Label labelExceptionCaught; - private System.Windows.Forms.Label labelStackTraceHeader; - private System.Windows.Forms.Label labelExceptionMessageHeader; - private System.Windows.Forms.TextBox textBoxExceptionMessage; - private System.Windows.Forms.Button buttonCopyAll; - private System.Windows.Forms.Label labelExceptionIsFatalHeader; - private System.Windows.Forms.Label labelEnvironment; - private System.Windows.Forms.TextBox textBoxEnvironment; - private System.Windows.Forms.Button buttonCreateBug; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmUnhandledException.cs b/mRemoteNG/UI/Forms/FrmUnhandledException.cs deleted file mode 100644 index 34ff87d98..000000000 --- a/mRemoteNG/UI/Forms/FrmUnhandledException.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Diagnostics; -using System.Linq; -using System.Text; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmUnhandledException : Form - { - private readonly bool _isFatal; - - public FrmUnhandledException() - : this(null, false) - { - } - - public FrmUnhandledException(Exception exception, bool isFatal) - { - _isFatal = isFatal; - InitializeComponent(); - SetLanguage(); - - if (exception == null) - return; - - textBoxExceptionMessage.Text = exception.Message; - textBoxStackTrace.Text = exception.StackTrace; - SetEnvironmentText(); - } - - private void SetEnvironmentText() - { - textBoxEnvironment.Text = new StringBuilder() - .AppendLine($"OS: {Environment.OSVersion}") - .AppendLine($"{GeneralAppInfo.ProductName} Version: {GeneralAppInfo.ApplicationVersion}") - .AppendLine("Edition: " + (Runtime.IsPortableEdition ? "Portable" : "MSI")) - .AppendLine("Cmd line args: " + string.Join(" ", Environment.GetCommandLineArgs().Skip(1))) - .ToString(); - } - - private void SetLanguage() - { - Text = Language.mRemoteNGUnhandledException; - labelExceptionCaught.Text = Language.UnhandledExceptionOccured; - - labelExceptionIsFatalHeader.Text = _isFatal - ? Language.ExceptionForcesmRemoteNGToClose - : string.Empty; - - labelExceptionMessageHeader.Text = Language.ExceptionMessage; - labelStackTraceHeader.Text = Language.StackTrace; - labelEnvironment.Text = Language.Environment; - buttonCreateBug.Text = Language.ReportBug; - buttonCopyAll.Text = Language.CopyAll; - buttonClose.Text = _isFatal - ? Language.Exit - : Language._Close; - } - - private void buttonCopyAll_Click(object sender, EventArgs e) - { - var text = new StringBuilder() - .AppendLine("```") - .AppendLine(labelExceptionMessageHeader.Text) - .AppendLine("\"" + textBoxExceptionMessage.Text + "\"") - .AppendLine() - .AppendLine(labelStackTraceHeader.Text) - .AppendLine(textBoxStackTrace.Text) - .AppendLine() - .AppendLine(labelEnvironment.Text) - .AppendLine(textBoxEnvironment.Text) - .AppendLine("```") - .ToString(); - - Clipboard.SetText(text); - } - - private void buttonClose_Click(object sender, EventArgs e) - { - if (_isFatal) - Shutdown.Quit(); - - Close(); - } - - private void buttonCreateBug_Click(object sender, EventArgs e) - { - Process.Start(GeneralAppInfo.UrlBugs); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/FrmUnhandledException.resx b/mRemoteNG/UI/Forms/FrmUnhandledException.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/FrmUnhandledException.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.Designer.cs deleted file mode 100644 index 18220d259..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.Designer.cs +++ /dev/null @@ -1,237 +0,0 @@ - - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class AdvancedPage : OptionsPage - { - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()] - protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()] - private void InitializeComponent() - { - this.lblMaximumPuttyWaitTime = new mRemoteNG.UI.Controls.MrngLabel(); - this.chkAutomaticReconnect = new MrngCheckBox(); - this.numPuttyWaitTime = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.chkUseCustomPuttyPath = new MrngCheckBox(); - this.lblConfigurePuttySessions = new mRemoteNG.UI.Controls.MrngLabel(); - this.numUVNCSCPort = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.txtCustomPuttyPath = new mRemoteNG.UI.Controls.MrngTextBox(); - this.btnLaunchPutty = new MrngButton(); - this.lblUVNCSCPort = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblSeconds = new mRemoteNG.UI.Controls.MrngLabel(); - this.btnBrowseCustomPuttyPath = new MrngButton(); - this.chkLoadBalanceInfoUseUtf8 = new MrngCheckBox(); - ((System.ComponentModel.ISupportInitialize)(this.numPuttyWaitTime)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numUVNCSCPort)).BeginInit(); - this.SuspendLayout(); - // - // lblMaximumPuttyWaitTime - // - this.lblMaximumPuttyWaitTime.Location = new System.Drawing.Point(3, 145); - this.lblMaximumPuttyWaitTime.Name = "lblMaximumPuttyWaitTime"; - this.lblMaximumPuttyWaitTime.Size = new System.Drawing.Size(364, 20); - this.lblMaximumPuttyWaitTime.TabIndex = 7; - this.lblMaximumPuttyWaitTime.Text = "Maximum PuTTY wait time:"; - this.lblMaximumPuttyWaitTime.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // chkAutomaticReconnect - // - this.chkAutomaticReconnect._mice = MrngCheckBox.MouseState.OUT; - this.chkAutomaticReconnect.AutoSize = true; - this.chkAutomaticReconnect.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkAutomaticReconnect.Location = new System.Drawing.Point(3, 3); - this.chkAutomaticReconnect.Name = "chkAutomaticReconnect"; - this.chkAutomaticReconnect.Size = new System.Drawing.Size(430, 17); - this.chkAutomaticReconnect.TabIndex = 1; - this.chkAutomaticReconnect.Text = "Automatically try to reconnect when disconnected from server (RDP && ICA only)"; - this.chkAutomaticReconnect.UseVisualStyleBackColor = true; - // - // numPuttyWaitTime - // - this.numPuttyWaitTime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.numPuttyWaitTime.Location = new System.Drawing.Point(373, 143); - this.numPuttyWaitTime.Maximum = new decimal(new int[] { - 999, - 0, - 0, - 0}); - this.numPuttyWaitTime.Name = "numPuttyWaitTime"; - this.numPuttyWaitTime.Size = new System.Drawing.Size(60, 22); - this.numPuttyWaitTime.TabIndex = 7; - this.numPuttyWaitTime.Value = new decimal(new int[] { - 5, - 0, - 0, - 0}); - // - // chkUseCustomPuttyPath - // - this.chkUseCustomPuttyPath._mice = MrngCheckBox.MouseState.OUT; - this.chkUseCustomPuttyPath.AutoSize = true; - this.chkUseCustomPuttyPath.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkUseCustomPuttyPath.Location = new System.Drawing.Point(3, 49); - this.chkUseCustomPuttyPath.Name = "chkUseCustomPuttyPath"; - this.chkUseCustomPuttyPath.Size = new System.Drawing.Size(146, 17); - this.chkUseCustomPuttyPath.TabIndex = 3; - this.chkUseCustomPuttyPath.Text = "Use custom PuTTY path:"; - this.chkUseCustomPuttyPath.UseVisualStyleBackColor = true; - this.chkUseCustomPuttyPath.CheckedChanged += new System.EventHandler(this.chkUseCustomPuttyPath_CheckedChanged); - // - // lblConfigurePuttySessions - // - this.lblConfigurePuttySessions.Location = new System.Drawing.Point(3, 109); - this.lblConfigurePuttySessions.Name = "lblConfigurePuttySessions"; - this.lblConfigurePuttySessions.Size = new System.Drawing.Size(364, 25); - this.lblConfigurePuttySessions.TabIndex = 5; - this.lblConfigurePuttySessions.Text = "To configure PuTTY sessions click this button:"; - this.lblConfigurePuttySessions.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // numUVNCSCPort - // - this.numUVNCSCPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.numUVNCSCPort.Location = new System.Drawing.Point(373, 171); - this.numUVNCSCPort.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.numUVNCSCPort.Name = "numUVNCSCPort"; - this.numUVNCSCPort.Size = new System.Drawing.Size(60, 22); - this.numUVNCSCPort.TabIndex = 8; - this.numUVNCSCPort.Value = new decimal(new int[] { - 5500, - 0, - 0, - 0}); - this.numUVNCSCPort.Visible = false; - // - // txtCustomPuttyPath - // - this.txtCustomPuttyPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtCustomPuttyPath.Enabled = false; - this.txtCustomPuttyPath.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtCustomPuttyPath.Location = new System.Drawing.Point(21, 72); - this.txtCustomPuttyPath.Name = "txtCustomPuttyPath"; - this.txtCustomPuttyPath.Size = new System.Drawing.Size(346, 22); - this.txtCustomPuttyPath.TabIndex = 4; - this.txtCustomPuttyPath.TextChanged += new System.EventHandler(this.txtCustomPuttyPath_TextChanged); - // - // btnLaunchPutty - // - this.btnLaunchPutty._mice = MrngButton.MouseState.OUT; - this.btnLaunchPutty.Image = global::mRemoteNG.Properties.Resources.PuttyConfig; - this.btnLaunchPutty.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnLaunchPutty.Location = new System.Drawing.Point(373, 109); - this.btnLaunchPutty.Name = "btnLaunchPutty"; - this.btnLaunchPutty.Size = new System.Drawing.Size(122, 25); - this.btnLaunchPutty.TabIndex = 6; - this.btnLaunchPutty.Text = "Launch PuTTY"; - this.btnLaunchPutty.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnLaunchPutty.UseVisualStyleBackColor = true; - this.btnLaunchPutty.Click += new System.EventHandler(this.btnLaunchPutty_Click); - // - // lblUVNCSCPort - // - this.lblUVNCSCPort.Location = new System.Drawing.Point(3, 174); - this.lblUVNCSCPort.Name = "lblUVNCSCPort"; - this.lblUVNCSCPort.Size = new System.Drawing.Size(364, 19); - this.lblUVNCSCPort.TabIndex = 10; - this.lblUVNCSCPort.Text = "UltraVNC SingleClick Listening Port:"; - this.lblUVNCSCPort.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.lblUVNCSCPort.Visible = false; - // - // lblSeconds - // - this.lblSeconds.AutoSize = true; - this.lblSeconds.Location = new System.Drawing.Point(439, 149); - this.lblSeconds.Name = "lblSeconds"; - this.lblSeconds.Size = new System.Drawing.Size(49, 13); - this.lblSeconds.TabIndex = 9; - this.lblSeconds.Text = "seconds"; - // - // btnBrowseCustomPuttyPath - // - this.btnBrowseCustomPuttyPath._mice = MrngButton.MouseState.OUT; - this.btnBrowseCustomPuttyPath.Enabled = false; - this.btnBrowseCustomPuttyPath.Location = new System.Drawing.Point(373, 71); - this.btnBrowseCustomPuttyPath.Name = "btnBrowseCustomPuttyPath"; - this.btnBrowseCustomPuttyPath.Size = new System.Drawing.Size(122, 25); - this.btnBrowseCustomPuttyPath.TabIndex = 5; - this.btnBrowseCustomPuttyPath.Text = "Browse..."; - this.btnBrowseCustomPuttyPath.UseVisualStyleBackColor = true; - this.btnBrowseCustomPuttyPath.Click += new System.EventHandler(this.btnBrowseCustomPuttyPath_Click); - // - // chkLoadBalanceInfoUseUtf8 - // - this.chkLoadBalanceInfoUseUtf8._mice = MrngCheckBox.MouseState.OUT; - this.chkLoadBalanceInfoUseUtf8.AutoSize = true; - this.chkLoadBalanceInfoUseUtf8.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkLoadBalanceInfoUseUtf8.Location = new System.Drawing.Point(3, 26); - this.chkLoadBalanceInfoUseUtf8.Name = "chkLoadBalanceInfoUseUtf8"; - this.chkLoadBalanceInfoUseUtf8.Size = new System.Drawing.Size(317, 17); - this.chkLoadBalanceInfoUseUtf8.TabIndex = 2; - this.chkLoadBalanceInfoUseUtf8.Text = "Use UTF8 encoding for RDP \"Load Balance Info\" property"; - this.chkLoadBalanceInfoUseUtf8.UseVisualStyleBackColor = true; - // - // AdvancedPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.chkLoadBalanceInfoUseUtf8); - this.Controls.Add(this.lblMaximumPuttyWaitTime); - this.Controls.Add(this.chkAutomaticReconnect); - this.Controls.Add(this.numPuttyWaitTime); - this.Controls.Add(this.chkUseCustomPuttyPath); - this.Controls.Add(this.lblConfigurePuttySessions); - this.Controls.Add(this.numUVNCSCPort); - this.Controls.Add(this.txtCustomPuttyPath); - this.Controls.Add(this.btnLaunchPutty); - this.Controls.Add(this.lblUVNCSCPort); - this.Controls.Add(this.lblSeconds); - this.Controls.Add(this.btnBrowseCustomPuttyPath); - this.Margin = new System.Windows.Forms.Padding(4); - this.Name = "AdvancedPage"; - this.Size = new System.Drawing.Size(610, 490); - ((System.ComponentModel.ISupportInitialize)(this.numPuttyWaitTime)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numUVNCSCPort)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - internal Controls.MrngLabel lblMaximumPuttyWaitTime; - internal MrngCheckBox chkAutomaticReconnect; - internal Controls.MrngNumericUpDown numPuttyWaitTime; - internal MrngCheckBox chkUseCustomPuttyPath; - internal Controls.MrngLabel lblConfigurePuttySessions; - internal Controls.MrngNumericUpDown numUVNCSCPort; - internal Controls.MrngTextBox txtCustomPuttyPath; - internal MrngButton btnLaunchPutty; - internal Controls.MrngLabel lblUVNCSCPort; - internal Controls.MrngLabel lblSeconds; - internal MrngButton btnBrowseCustomPuttyPath; - private MrngCheckBox chkLoadBalanceInfoUseUtf8; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.cs b/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.cs deleted file mode 100644 index e6ec5b61e..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using System.IO; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config.Putty; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Properties; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class AdvancedPage - { - public AdvancedPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Settings_16x); - var display = new DisplayProperties(); - var img = display.ScaleImage(Properties.Resources.PuttyConfig); - btnLaunchPutty.Image = img; - } - - #region Public Methods - - public override string PageName - { - get => Language.Advanced; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - lblSeconds.Text = Language.Seconds; - lblMaximumPuttyWaitTime.Text = Language.PuttyTimeout; - chkAutomaticReconnect.Text = Language.CheckboxAutomaticReconnect; - chkLoadBalanceInfoUseUtf8.Text = Language.LoadBalanceInfoUseUtf8; - lblConfigurePuttySessions.Text = Language.PuttySessionsConfig; - btnLaunchPutty.Text = Language.ButtonLaunchPutty; - btnBrowseCustomPuttyPath.Text = Language._Browse; - chkUseCustomPuttyPath.Text = Language.CheckboxPuttyPath; - lblUVNCSCPort.Text = Language.UltraVNCSCListeningPort; - } - - public override void LoadSettings() - { - chkAutomaticReconnect.Checked = Settings.Default.ReconnectOnDisconnect; - chkLoadBalanceInfoUseUtf8.Checked = Settings.Default.RdpLoadBalanceInfoUseUtf8; - numPuttyWaitTime.Value = Settings.Default.MaxPuttyWaitTime; - - chkUseCustomPuttyPath.Checked = Settings.Default.UseCustomPuttyPath; - txtCustomPuttyPath.Text = Settings.Default.CustomPuttyPath; - SetPuttyLaunchButtonEnabled(); - - numUVNCSCPort.Value = Settings.Default.UVNCSCPort; - } - - public override void SaveSettings() - { - Settings.Default.ReconnectOnDisconnect = chkAutomaticReconnect.Checked; - Settings.Default.RdpLoadBalanceInfoUseUtf8 = chkLoadBalanceInfoUseUtf8.Checked; - - var puttyPathChanged = false; - if (Settings.Default.CustomPuttyPath != txtCustomPuttyPath.Text) - { - puttyPathChanged = true; - Settings.Default.CustomPuttyPath = txtCustomPuttyPath.Text; - } - - if (Settings.Default.UseCustomPuttyPath != chkUseCustomPuttyPath.Checked) - { - puttyPathChanged = true; - Settings.Default.UseCustomPuttyPath = chkUseCustomPuttyPath.Checked; - } - - if (puttyPathChanged) - { - PuttyBase.PuttyPath = Settings.Default.UseCustomPuttyPath - ? Settings.Default.CustomPuttyPath - : GeneralAppInfo.PuttyPath; - PuttySessionsManager.Instance.AddSessions(); - } - - Settings.Default.MaxPuttyWaitTime = (int)numPuttyWaitTime.Value; - Settings.Default.UVNCSCPort = (int)numUVNCSCPort.Value; - } - - #endregion - - #region Private Methods - - #region Event Handlers - - private void chkUseCustomPuttyPath_CheckedChanged(object sender, EventArgs e) - { - txtCustomPuttyPath.Enabled = chkUseCustomPuttyPath.Checked; - btnBrowseCustomPuttyPath.Enabled = chkUseCustomPuttyPath.Checked; - SetPuttyLaunchButtonEnabled(); - } - - private void txtCustomPuttyPath_TextChanged(object sender, EventArgs e) - { - SetPuttyLaunchButtonEnabled(); - } - - private void btnBrowseCustomPuttyPath_Click(object sender, EventArgs e) - { - using (var openFileDialog = new OpenFileDialog()) - { - openFileDialog.Filter = $@"{Language.FilterApplication}|*.exe|{Language.FilterAll}|*.*"; - openFileDialog.FileName = Path.GetFileName(GeneralAppInfo.PuttyPath); - openFileDialog.CheckFileExists = true; - openFileDialog.Multiselect = false; - - if (openFileDialog.ShowDialog() != DialogResult.OK) return; - txtCustomPuttyPath.Text = openFileDialog.FileName; - SetPuttyLaunchButtonEnabled(); - } - } - - private void btnLaunchPutty_Click(object sender, EventArgs e) - { - try - { - var puttyProcess = new PuttyProcessController(); - var fileName = chkUseCustomPuttyPath.Checked ? txtCustomPuttyPath.Text : GeneralAppInfo.PuttyPath; - puttyProcess.Start(fileName); - puttyProcess.SetControlText("Button", "&Cancel", "&Close"); - puttyProcess.SetControlVisible("Button", "&Open", false); - puttyProcess.WaitForExit(); - } - catch (Exception ex) - { - MessageBox.Show(Language.ErrorCouldNotLaunchPutty, Application.ProductName, - MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); - Runtime.MessageCollector.AddExceptionMessage(Language.ErrorCouldNotLaunchPutty, ex); - } - } - - #endregion - - private void SetPuttyLaunchButtonEnabled() - { - var puttyPath = chkUseCustomPuttyPath.Checked ? txtCustomPuttyPath.Text : GeneralAppInfo.PuttyPath; - - var exists = false; - try - { - exists = File.Exists(puttyPath); - } - catch - { - // ignored - } - - lblConfigurePuttySessions.Enabled = exists; - btnLaunchPutty.Enabled = exists; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.resx b/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/AdvancedPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.Designer.cs deleted file mode 100644 index 04458764e..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.Designer.cs +++ /dev/null @@ -1,161 +0,0 @@ - - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class AppearancePage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() - { - this.lblLanguageRestartRequired = new mRemoteNG.UI.Controls.MrngLabel(); - this.cboLanguage = new MrngComboBox(); - this.lblLanguage = new mRemoteNG.UI.Controls.MrngLabel(); - this.chkShowFullConnectionsFilePathInTitle = new MrngCheckBox(); - this.chkShowDescriptionTooltipsInTree = new MrngCheckBox(); - this.chkShowSystemTrayIcon = new MrngCheckBox(); - this.chkMinimizeToSystemTray = new MrngCheckBox(); - this.chkCloseToSystemTray = new MrngCheckBox(); - this.SuspendLayout(); - // - // lblLanguageRestartRequired - // - this.lblLanguageRestartRequired.AutoSize = true; - this.lblLanguageRestartRequired.Location = new System.Drawing.Point(3, 56); - this.lblLanguageRestartRequired.Name = "lblLanguageRestartRequired"; - this.lblLanguageRestartRequired.Size = new System.Drawing.Size(414, 13); - this.lblLanguageRestartRequired.TabIndex = 2; - this.lblLanguageRestartRequired.Text = "mRemoteNG must be restarted before changes to the language will take effect."; - // - // cboLanguage - // - this.cboLanguage._mice = MrngComboBox.MouseState.HOVER; - this.cboLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboLanguage.FormattingEnabled = true; - this.cboLanguage.Location = new System.Drawing.Point(3, 24); - this.cboLanguage.Name = "cboLanguage"; - this.cboLanguage.Size = new System.Drawing.Size(304, 21); - this.cboLanguage.Sorted = true; - this.cboLanguage.TabIndex = 1; - // - // lblLanguage - // - this.lblLanguage.AutoSize = true; - this.lblLanguage.Location = new System.Drawing.Point(3, 3); - this.lblLanguage.Name = "lblLanguage"; - this.lblLanguage.Size = new System.Drawing.Size(58, 13); - this.lblLanguage.TabIndex = 0; - this.lblLanguage.Text = "Language"; - // - // chkShowFullConnectionsFilePathInTitle - // - this.chkShowFullConnectionsFilePathInTitle._mice = MrngCheckBox.MouseState.OUT; - this.chkShowFullConnectionsFilePathInTitle.AutoSize = true; - this.chkShowFullConnectionsFilePathInTitle.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowFullConnectionsFilePathInTitle.Location = new System.Drawing.Point(3, 127); - this.chkShowFullConnectionsFilePathInTitle.Name = "chkShowFullConnectionsFilePathInTitle"; - this.chkShowFullConnectionsFilePathInTitle.Size = new System.Drawing.Size(268, 17); - this.chkShowFullConnectionsFilePathInTitle.TabIndex = 4; - this.chkShowFullConnectionsFilePathInTitle.Text = "Show full connections file path in window title"; - this.chkShowFullConnectionsFilePathInTitle.UseVisualStyleBackColor = true; - // - // chkShowDescriptionTooltipsInTree - // - this.chkShowDescriptionTooltipsInTree._mice = MrngCheckBox.MouseState.OUT; - this.chkShowDescriptionTooltipsInTree.AutoSize = true; - this.chkShowDescriptionTooltipsInTree.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowDescriptionTooltipsInTree.Location = new System.Drawing.Point(3, 104); - this.chkShowDescriptionTooltipsInTree.Name = "chkShowDescriptionTooltipsInTree"; - this.chkShowDescriptionTooltipsInTree.Size = new System.Drawing.Size(256, 17); - this.chkShowDescriptionTooltipsInTree.TabIndex = 3; - this.chkShowDescriptionTooltipsInTree.Text = "Show description tooltips in connection tree"; - this.chkShowDescriptionTooltipsInTree.UseVisualStyleBackColor = true; - // - // chkShowSystemTrayIcon - // - this.chkShowSystemTrayIcon._mice = MrngCheckBox.MouseState.OUT; - this.chkShowSystemTrayIcon.AutoSize = true; - this.chkShowSystemTrayIcon.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowSystemTrayIcon.Location = new System.Drawing.Point(3, 173); - this.chkShowSystemTrayIcon.Name = "chkShowSystemTrayIcon"; - this.chkShowSystemTrayIcon.Size = new System.Drawing.Size(178, 17); - this.chkShowSystemTrayIcon.TabIndex = 5; - this.chkShowSystemTrayIcon.Text = "Always show System Tray Icon"; - this.chkShowSystemTrayIcon.UseVisualStyleBackColor = true; - // - // chkMinimizeToSystemTray - // - this.chkMinimizeToSystemTray._mice = MrngCheckBox.MouseState.OUT; - this.chkMinimizeToSystemTray.AutoSize = true; - this.chkMinimizeToSystemTray.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkMinimizeToSystemTray.Location = new System.Drawing.Point(3, 196); - this.chkMinimizeToSystemTray.Name = "chkMinimizeToSystemTray"; - this.chkMinimizeToSystemTray.Size = new System.Drawing.Size(147, 17); - this.chkMinimizeToSystemTray.TabIndex = 6; - this.chkMinimizeToSystemTray.Text = "Minimize to System Tray"; - this.chkMinimizeToSystemTray.UseVisualStyleBackColor = true; - // - // chkCloseToSystemTray - // - this.chkCloseToSystemTray._mice = MrngCheckBox.MouseState.OUT; - this.chkCloseToSystemTray.AutoSize = true; - this.chkCloseToSystemTray.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkCloseToSystemTray.Location = new System.Drawing.Point(3, 219); - this.chkCloseToSystemTray.Name = "chkCloseToSystemTray"; - this.chkCloseToSystemTray.Size = new System.Drawing.Size(129, 17); - this.chkCloseToSystemTray.TabIndex = 7; - this.chkCloseToSystemTray.Text = "Close to System Tray"; - this.chkCloseToSystemTray.UseVisualStyleBackColor = true; - // - // AppearancePage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.chkCloseToSystemTray); - this.Controls.Add(this.lblLanguageRestartRequired); - this.Controls.Add(this.cboLanguage); - this.Controls.Add(this.lblLanguage); - this.Controls.Add(this.chkShowFullConnectionsFilePathInTitle); - this.Controls.Add(this.chkShowDescriptionTooltipsInTree); - this.Controls.Add(this.chkShowSystemTrayIcon); - this.Controls.Add(this.chkMinimizeToSystemTray); - this.Name = "AppearancePage"; - this.Size = new System.Drawing.Size(610, 490); - this.ResumeLayout(false); - this.PerformLayout(); - - } - internal Controls.MrngLabel lblLanguageRestartRequired; - internal MrngComboBox cboLanguage; - internal Controls.MrngLabel lblLanguage; - internal MrngCheckBox chkShowFullConnectionsFilePathInTitle; - internal MrngCheckBox chkShowDescriptionTooltipsInTree; - internal MrngCheckBox chkShowSystemTrayIcon; - internal MrngCheckBox chkMinimizeToSystemTray; - internal MrngCheckBox chkCloseToSystemTray; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.cs b/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.cs deleted file mode 100644 index 6663a038c..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Properties; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class AppearancePage - { - public AppearancePage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Panel_16x); - } - - public override string PageName - { - get => Language.Appearance; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - lblLanguage.Text = Language.LanguageString; - lblLanguageRestartRequired.Text = - string.Format(Language.LanguageRestartRequired, Application.ProductName); - chkShowDescriptionTooltipsInTree.Text = Language.ShowDescriptionTooltips; - chkShowFullConnectionsFilePathInTitle.Text = Language.ShowFullConsFilePath; - chkShowSystemTrayIcon.Text = Language.AlwaysShowSysTrayIcon; - chkMinimizeToSystemTray.Text = Language.MinimizeToSysTray; - chkCloseToSystemTray.Text = Language.CloseToSysTray; - } - - public override void LoadSettings() - { - cboLanguage.Items.Clear(); - cboLanguage.Items.Add(Language.LanguageDefault); - - foreach (var nativeName in SupportedCultures.CultureNativeNames) - { - cboLanguage.Items.Add(nativeName); - } - - if (!string.IsNullOrEmpty(Settings.Default.OverrideUICulture) && - SupportedCultures.IsNameSupported(Settings.Default.OverrideUICulture)) - { - cboLanguage.SelectedItem = SupportedCultures.get_CultureNativeName(Settings.Default.OverrideUICulture); - } - - if (cboLanguage.SelectedIndex == -1) - { - cboLanguage.SelectedIndex = 0; - } - - chkShowDescriptionTooltipsInTree.Checked = Settings.Default.ShowDescriptionTooltipsInTree; - chkShowFullConnectionsFilePathInTitle.Checked = Settings.Default.ShowCompleteConsPathInTitle; - chkShowSystemTrayIcon.Checked = Settings.Default.ShowSystemTrayIcon; - chkMinimizeToSystemTray.Checked = Settings.Default.MinimizeToTray; - chkCloseToSystemTray.Checked = Settings.Default.CloseToTray; - } - - public override void SaveSettings() - { - if (cboLanguage.SelectedIndex > 0 && - SupportedCultures.IsNativeNameSupported(Convert.ToString(cboLanguage.SelectedItem))) - { - Settings.Default.OverrideUICulture = - SupportedCultures.get_CultureName(Convert.ToString(cboLanguage.SelectedItem)); - } - else - { - Settings.Default.OverrideUICulture = string.Empty; - } - - Settings.Default.ShowDescriptionTooltipsInTree = chkShowDescriptionTooltipsInTree.Checked; - Settings.Default.ShowCompleteConsPathInTitle = chkShowFullConnectionsFilePathInTitle.Checked; - FrmMain.Default.ShowFullPathInTitle = chkShowFullConnectionsFilePathInTitle.Checked; - - Settings.Default.ShowSystemTrayIcon = chkShowSystemTrayIcon.Checked; - if (Settings.Default.ShowSystemTrayIcon) - { - if (Runtime.NotificationAreaIcon == null) - { - Runtime.NotificationAreaIcon = new NotificationAreaIcon(); - } - } - else - { - if (Runtime.NotificationAreaIcon != null) - { - Runtime.NotificationAreaIcon.Dispose(); - Runtime.NotificationAreaIcon = null; - } - } - - Settings.Default.MinimizeToTray = chkMinimizeToSystemTray.Checked; - Settings.Default.CloseToTray = chkCloseToSystemTray.Checked; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.resx b/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/AppearancePage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/BackupPage.Designer.cs deleted file mode 100644 index 2e28e94d3..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.Designer.cs +++ /dev/null @@ -1,164 +0,0 @@ - - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class BackupPage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() - { - this.tableLayoutPanelBackupFile = new System.Windows.Forms.TableLayoutPanel(); - this.textBoxConnectionBackupPath = new System.Windows.Forms.TextBox(); - this.lblConnectionsBackupPath = new System.Windows.Forms.Label(); - this.lblConnectionsBackupFrequency = new System.Windows.Forms.Label(); - this.lblConnectionsBackupMaxCount = new System.Windows.Forms.Label(); - this.cmbConnectionBackupFrequency = new System.Windows.Forms.ComboBox(); - this.buttonBrowsePath = new System.Windows.Forms.Button(); - this.numMaxBackups = new System.Windows.Forms.NumericUpDown(); - this.tableLayoutPanelBackupFile.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numMaxBackups)).BeginInit(); - this.SuspendLayout(); - // - // tableLayoutPanelBackupFile - // - this.tableLayoutPanelBackupFile.ColumnCount = 4; - this.tableLayoutPanelBackupFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanelBackupFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanelBackupFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanelBackupFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanelBackupFile.Controls.Add(this.textBoxConnectionBackupPath, 1, 2); - this.tableLayoutPanelBackupFile.Controls.Add(this.lblConnectionsBackupPath, 0, 2); - this.tableLayoutPanelBackupFile.Controls.Add(this.lblConnectionsBackupFrequency, 0, 0); - this.tableLayoutPanelBackupFile.Controls.Add(this.lblConnectionsBackupMaxCount, 0, 1); - this.tableLayoutPanelBackupFile.Controls.Add(this.cmbConnectionBackupFrequency, 1, 0); - this.tableLayoutPanelBackupFile.Controls.Add(this.buttonBrowsePath, 2, 2); - this.tableLayoutPanelBackupFile.Controls.Add(this.numMaxBackups, 1, 1); - this.tableLayoutPanelBackupFile.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanelBackupFile.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanelBackupFile.Name = "tableLayoutPanelBackupFile"; - this.tableLayoutPanelBackupFile.RowCount = 4; - this.tableLayoutPanelBackupFile.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelBackupFile.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelBackupFile.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelBackupFile.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanelBackupFile.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanelBackupFile.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanelBackupFile.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanelBackupFile.Size = new System.Drawing.Size(630, 412); - this.tableLayoutPanelBackupFile.TabIndex = 15; - // - // textBoxConnectionBackupPath - // - this.textBoxConnectionBackupPath.Dock = System.Windows.Forms.DockStyle.Fill; - this.textBoxConnectionBackupPath.Location = new System.Drawing.Point(195, 58); - this.textBoxConnectionBackupPath.Name = "textBoxConnectionBackupPath"; - this.textBoxConnectionBackupPath.Size = new System.Drawing.Size(250, 22); - this.textBoxConnectionBackupPath.TabIndex = 14; - // - // lblConnectionsBackupPath - // - this.lblConnectionsBackupPath.AutoSize = true; - this.lblConnectionsBackupPath.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblConnectionsBackupPath.Location = new System.Drawing.Point(3, 55); - this.lblConnectionsBackupPath.Name = "lblConnectionsBackupPath"; - this.lblConnectionsBackupPath.Size = new System.Drawing.Size(186, 29); - this.lblConnectionsBackupPath.TabIndex = 13; - this.lblConnectionsBackupPath.Text = "Location of connection file backup"; - this.lblConnectionsBackupPath.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // lblConnectionsBackupFrequency - // - this.lblConnectionsBackupFrequency.AutoSize = true; - this.lblConnectionsBackupFrequency.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblConnectionsBackupFrequency.Location = new System.Drawing.Point(3, 0); - this.lblConnectionsBackupFrequency.Name = "lblConnectionsBackupFrequency"; - this.lblConnectionsBackupFrequency.Size = new System.Drawing.Size(186, 27); - this.lblConnectionsBackupFrequency.TabIndex = 14; - this.lblConnectionsBackupFrequency.Text = "Connection Backup Frequency"; - this.lblConnectionsBackupFrequency.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // lblConnectionsBackupMaxCount - // - this.lblConnectionsBackupMaxCount.AutoSize = true; - this.lblConnectionsBackupMaxCount.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblConnectionsBackupMaxCount.Location = new System.Drawing.Point(3, 27); - this.lblConnectionsBackupMaxCount.Name = "lblConnectionsBackupMaxCount"; - this.lblConnectionsBackupMaxCount.Size = new System.Drawing.Size(186, 28); - this.lblConnectionsBackupMaxCount.TabIndex = 13; - this.lblConnectionsBackupMaxCount.Text = "Maximum number of backups"; - this.lblConnectionsBackupMaxCount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // cmbConnectionBackupFrequency - // - this.cmbConnectionBackupFrequency.Dock = System.Windows.Forms.DockStyle.Fill; - this.cmbConnectionBackupFrequency.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cmbConnectionBackupFrequency.FormattingEnabled = true; - this.cmbConnectionBackupFrequency.Location = new System.Drawing.Point(195, 3); - this.cmbConnectionBackupFrequency.Name = "cmbConnectionBackupFrequency"; - this.cmbConnectionBackupFrequency.Size = new System.Drawing.Size(250, 21); - this.cmbConnectionBackupFrequency.TabIndex = 13; - // - // buttonBrowsePath - // - this.buttonBrowsePath.Location = new System.Drawing.Point(451, 58); - this.buttonBrowsePath.Name = "buttonBrowsePath"; - this.buttonBrowsePath.Size = new System.Drawing.Size(75, 23); - this.buttonBrowsePath.TabIndex = 15; - this.buttonBrowsePath.Text = "Browse"; - this.buttonBrowsePath.UseVisualStyleBackColor = true; - this.buttonBrowsePath.Click += new System.EventHandler(this.ButtonBrowsePath_Click); - // - // numMaxBackups - // - this.numMaxBackups.Location = new System.Drawing.Point(195, 30); - this.numMaxBackups.Name = "numMaxBackups"; - this.numMaxBackups.Size = new System.Drawing.Size(60, 22); - this.numMaxBackups.TabIndex = 16; - // - // BackupPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.tableLayoutPanelBackupFile); - this.Name = "BackupPage"; - this.Size = new System.Drawing.Size(630, 412); - this.tableLayoutPanelBackupFile.ResumeLayout(false); - this.tableLayoutPanelBackupFile.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numMaxBackups)).EndInit(); - this.ResumeLayout(false); - - } - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanelBackupFile; - private System.Windows.Forms.TextBox textBoxConnectionBackupPath; - private System.Windows.Forms.Label lblConnectionsBackupPath; - private System.Windows.Forms.Label lblConnectionsBackupFrequency; - private System.Windows.Forms.Label lblConnectionsBackupMaxCount; - private System.Windows.Forms.ComboBox cmbConnectionBackupFrequency; - private System.Windows.Forms.Button buttonBrowsePath; - private System.Windows.Forms.NumericUpDown numMaxBackups; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.cs b/mRemoteNG/UI/Forms/OptionsPages/BackupPage.cs deleted file mode 100644 index daa6ed9d1..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.cs +++ /dev/null @@ -1,149 +0,0 @@ -using mRemoteNG.Config; -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Config.Connections; -using mRemoteNG.Security; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class BackupPage - { - private readonly FrmMain _frmMain = FrmMain.Default; - private List _connectionBackup; - - public BackupPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.DocumentsFolder_16x); - } - - public override string PageName - { - get => Language.strBackup; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - buttonBrowsePath.Text = Language.strBrowse; - - _connectionBackup = new List - { - { - new DropdownList((int) ConnectionsBackupFrequencyEnum.Never, - Language.ConnectionsBackupFrequencyNever) - }, - { - new DropdownList((int) ConnectionsBackupFrequencyEnum.OnEdit, - Language.ConnectionsBackupFrequencyOnEdit) - }, - { - new DropdownList((int) ConnectionsBackupFrequencyEnum.OnExit, - Language.ConnectionsBackupFrequencyOnExit) - }, - { - new DropdownList((int) ConnectionsBackupFrequencyEnum.Daily, - Language.ConnectionsBackupFrequencyDaily) - }, - { - new DropdownList((int) ConnectionsBackupFrequencyEnum.Weekly, - Language.ConnectionsBackupFrequencyWeekly) - }, - //{ new DropdownList( (int)ConnectionsBackupFrequencyEnum.Custom, Language.ConnectionsBackupFrequencyCustom)} - }; - - cmbConnectionBackupFrequency.DataSource = _connectionBackup; - cmbConnectionBackupFrequency.DisplayMember = "DisplayString"; - cmbConnectionBackupFrequency.ValueMember = "Index"; - - lblConnectionsBackupFrequency.Text = Language.strConnectionBackupFrequency; - lblConnectionsBackupMaxCount.Text = Language.strConnectionsBackupMaxCount; - lblConnectionsBackupPath.Text = Language.strConnectionsBackupPath; - } - - public override void LoadSettings() - { - numMaxBackups.Value = Convert.ToDecimal(Settings.Default.BackupFileKeepCount); - - if (Settings.Default.SaveConnectionsFrequency == (int) ConnectionsBackupFrequencyEnum.Unassigned) - { - if (Settings.Default.SaveConnectionsAfterEveryEdit) - { - Settings.Default.SaveConnectionsFrequency = (int) ConnectionsBackupFrequencyEnum.OnEdit; - } - else if (Settings.Default.SaveConsOnExit) - { - Settings.Default.SaveConnectionsFrequency = (int) ConnectionsBackupFrequencyEnum.OnExit; - } - else - { - Settings.Default.SaveConnectionsFrequency = (int) ConnectionsBackupFrequencyEnum.Never; - } - } - - cmbConnectionBackupFrequency.SelectedValue = Settings.Default.SaveConnectionsFrequency; - textBoxConnectionBackupPath.Text = Settings.Default.CustomConsPath; - - } - - public override void SaveSettings() - { - Settings.Default.BackupFileKeepCount = (int) numMaxBackups.Value; - - if (Settings.Default.AutoSaveEveryMinutes > 0) - { - _frmMain.tmrAutoSave.Interval = Settings.Default.AutoSaveEveryMinutes * 60000; - _frmMain.tmrAutoSave.Enabled = true; - } - else - { - _frmMain.tmrAutoSave.Enabled = false; - } - - Settings.Default.SaveConnectionsFrequency = (int) cmbConnectionBackupFrequency.SelectedValue; - - if (textBoxConnectionBackupPath.Text.Trim().Length <= 0) - { - Settings.Default.LoadConsFromCustomLocation = false; - Settings.Default.CustomConsPath = String.Empty; - } - else - { - var newFileName = textBoxConnectionBackupPath.Text; - - Runtime.ConnectionsService.SaveConnections(Runtime.ConnectionsService.ConnectionTreeModel, false, - new SaveFilter(), newFileName); - - if (newFileName == Runtime.ConnectionsService.GetDefaultStartupConnectionFileName()) - { - Settings.Default.LoadConsFromCustomLocation = false; - } - else - { - Settings.Default.LoadConsFromCustomLocation = true; - Settings.Default.CustomConsPath = newFileName; - } - } - - //Obsolete. Set to false - Settings.Default.SaveConnectionsAfterEveryEdit = false; - Settings.Default.SaveConsOnExit = false; - } - - private void ButtonBrowsePath_Click(object sender, EventArgs e) - { - var saveDialog = DialogFactory.ConnectionsSaveAsDialog(); - - var dialogResult = saveDialog.ShowDialog(this); - - textBoxConnectionBackupPath.Text = dialogResult == DialogResult.OK ? saveDialog.FileName : string.Empty; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.resx b/mRemoteNG/UI/Forms/OptionsPages/BackupPage.resx deleted file mode 100644 index 392a4fa0e..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.resx +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.Designer.cs deleted file mode 100644 index 89d4fc9b8..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.Designer.cs +++ /dev/null @@ -1,379 +0,0 @@ -using mRemoteNG.UI.Controls; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class ConnectionsPage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() - { - this.numRDPConTimeout = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.lblRDPConTimeout = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblRdpReconnectionCount = new mRemoteNG.UI.Controls.MrngLabel(); - this.numRdpReconnectionCount = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.chkSingleClickOnConnectionOpensIt = new MrngCheckBox(); - this.chkHostnameLikeDisplayName = new MrngCheckBox(); - this.chkSingleClickOnOpenedConnectionSwitchesToIt = new MrngCheckBox(); - this.lblAutoSave1 = new mRemoteNG.UI.Controls.MrngLabel(); - this.numAutoSave = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.pnlConfirmCloseConnection = new System.Windows.Forms.Panel(); - this.lblClosingConnections = new mRemoteNG.UI.Controls.MrngLabel(); - this.radCloseWarnAll = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.radCloseWarnMultiple = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.radCloseWarnExit = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.radCloseWarnNever = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.chkSaveConnectionsAfterEveryEdit = new MrngCheckBox(); - this.chkUseFilterSearch = new MrngCheckBox(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.chkPlaceSearchBarAboveConnectionTree = new MrngCheckBox(); - this.chkConnectionTreeTrackActiveConnection = new MrngCheckBox(); - this.chkDoNotTrimUsername = new MrngCheckBox(); - ((System.ComponentModel.ISupportInitialize)(this.numRDPConTimeout)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numRdpReconnectionCount)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numAutoSave)).BeginInit(); - this.pnlConfirmCloseConnection.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - this.SuspendLayout(); - // - // numRDPConTimeout - // - this.numRDPConTimeout.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.numRDPConTimeout.Location = new System.Drawing.Point(274, 29); - this.numRDPConTimeout.Maximum = new decimal(new int[] { - 600, - 0, - 0, - 0}); - this.numRDPConTimeout.Minimum = new decimal(new int[] { - 20, - 0, - 0, - 0}); - this.numRDPConTimeout.Name = "numRDPConTimeout"; - this.numRDPConTimeout.Size = new System.Drawing.Size(53, 22); - this.numRDPConTimeout.TabIndex = 1; - this.numRDPConTimeout.Value = new decimal(new int[] { - 20, - 0, - 0, - 0}); - // - // lblRDPConTimeout - // - this.lblRDPConTimeout.Dock = System.Windows.Forms.DockStyle.Top; - this.lblRDPConTimeout.Location = new System.Drawing.Point(3, 26); - this.lblRDPConTimeout.Name = "lblRDPConTimeout"; - this.lblRDPConTimeout.Size = new System.Drawing.Size(265, 26); - this.lblRDPConTimeout.TabIndex = 0; - this.lblRDPConTimeout.Text = "RDP Connection Timeout"; - this.lblRDPConTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // lblRdpReconnectionCount - // - this.lblRdpReconnectionCount.Dock = System.Windows.Forms.DockStyle.Top; - this.lblRdpReconnectionCount.Location = new System.Drawing.Point(3, 0); - this.lblRdpReconnectionCount.Name = "lblRdpReconnectionCount"; - this.lblRdpReconnectionCount.Size = new System.Drawing.Size(265, 26); - this.lblRdpReconnectionCount.TabIndex = 0; - this.lblRdpReconnectionCount.Text = "RDP Reconnection Count"; - this.lblRdpReconnectionCount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // numRdpReconnectionCount - // - this.numRdpReconnectionCount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.numRdpReconnectionCount.Location = new System.Drawing.Point(274, 3); - this.numRdpReconnectionCount.Maximum = new decimal(new int[] { - 20, - 0, - 0, - 0}); - this.numRdpReconnectionCount.Name = "numRdpReconnectionCount"; - this.numRdpReconnectionCount.Size = new System.Drawing.Size(53, 22); - this.numRdpReconnectionCount.TabIndex = 1; - this.numRdpReconnectionCount.Value = new decimal(new int[] { - 5, - 0, - 0, - 0}); - // - // chkSingleClickOnConnectionOpensIt - // - this.chkSingleClickOnConnectionOpensIt._mice = MrngCheckBox.MouseState.OUT; - this.chkSingleClickOnConnectionOpensIt.AutoSize = true; - this.chkSingleClickOnConnectionOpensIt.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSingleClickOnConnectionOpensIt.Location = new System.Drawing.Point(3, 3); - this.chkSingleClickOnConnectionOpensIt.Name = "chkSingleClickOnConnectionOpensIt"; - this.chkSingleClickOnConnectionOpensIt.Size = new System.Drawing.Size(206, 17); - this.chkSingleClickOnConnectionOpensIt.TabIndex = 0; - this.chkSingleClickOnConnectionOpensIt.Text = "Single click on connection opens it"; - this.chkSingleClickOnConnectionOpensIt.UseVisualStyleBackColor = true; - // - // chkHostnameLikeDisplayName - // - this.chkHostnameLikeDisplayName._mice = MrngCheckBox.MouseState.OUT; - this.chkHostnameLikeDisplayName.AutoSize = true; - this.chkHostnameLikeDisplayName.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkHostnameLikeDisplayName.Location = new System.Drawing.Point(3, 72); - this.chkHostnameLikeDisplayName.Name = "chkHostnameLikeDisplayName"; - this.chkHostnameLikeDisplayName.Size = new System.Drawing.Size(355, 17); - this.chkHostnameLikeDisplayName.TabIndex = 2; - this.chkHostnameLikeDisplayName.Text = "Set hostname like display name when creating new connections"; - this.chkHostnameLikeDisplayName.UseVisualStyleBackColor = true; - // - // chkSingleClickOnOpenedConnectionSwitchesToIt - // - this.chkSingleClickOnOpenedConnectionSwitchesToIt._mice = MrngCheckBox.MouseState.OUT; - this.chkSingleClickOnOpenedConnectionSwitchesToIt.AutoSize = true; - this.chkSingleClickOnOpenedConnectionSwitchesToIt.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSingleClickOnOpenedConnectionSwitchesToIt.Location = new System.Drawing.Point(3, 26); - this.chkSingleClickOnOpenedConnectionSwitchesToIt.Name = "chkSingleClickOnOpenedConnectionSwitchesToIt"; - this.chkSingleClickOnOpenedConnectionSwitchesToIt.Size = new System.Drawing.Size(492, 17); - this.chkSingleClickOnOpenedConnectionSwitchesToIt.TabIndex = 1; - this.chkSingleClickOnOpenedConnectionSwitchesToIt.Text = Language.SingleClickOnOpenConnectionSwitchesToIt; - this.chkSingleClickOnOpenedConnectionSwitchesToIt.UseVisualStyleBackColor = true; - // - // lblAutoSave1 - // - this.lblAutoSave1.Dock = System.Windows.Forms.DockStyle.Top; - this.lblAutoSave1.Location = new System.Drawing.Point(3, 52); - this.lblAutoSave1.Name = "lblAutoSave1"; - this.lblAutoSave1.Size = new System.Drawing.Size(265, 26); - this.lblAutoSave1.TabIndex = 0; - this.lblAutoSave1.Text = "Auto Save in Minutes (0 means disabled)"; - this.lblAutoSave1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // numAutoSave - // - this.numAutoSave.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.numAutoSave.Location = new System.Drawing.Point(274, 55); - this.numAutoSave.Maximum = new decimal(new int[] { - 9999, - 0, - 0, - 0}); - this.numAutoSave.Name = "numAutoSave"; - this.numAutoSave.Size = new System.Drawing.Size(53, 22); - this.numAutoSave.TabIndex = 1; - // - // pnlConfirmCloseConnection - // - this.pnlConfirmCloseConnection.Controls.Add(this.lblClosingConnections); - this.pnlConfirmCloseConnection.Controls.Add(this.radCloseWarnAll); - this.pnlConfirmCloseConnection.Controls.Add(this.radCloseWarnMultiple); - this.pnlConfirmCloseConnection.Controls.Add(this.radCloseWarnExit); - this.pnlConfirmCloseConnection.Controls.Add(this.radCloseWarnNever); - this.pnlConfirmCloseConnection.Location = new System.Drawing.Point(3, 270); - this.pnlConfirmCloseConnection.Name = "pnlConfirmCloseConnection"; - this.pnlConfirmCloseConnection.Size = new System.Drawing.Size(604, 137); - this.pnlConfirmCloseConnection.TabIndex = 6; - // - // lblClosingConnections - // - this.lblClosingConnections.AutoSize = true; - this.lblClosingConnections.Location = new System.Drawing.Point(3, 12); - this.lblClosingConnections.Name = "lblClosingConnections"; - this.lblClosingConnections.Size = new System.Drawing.Size(147, 13); - this.lblClosingConnections.TabIndex = 0; - this.lblClosingConnections.Text = "When closing connections:"; - // - // radCloseWarnAll - // - this.radCloseWarnAll.AutoSize = true; - this.radCloseWarnAll.BackColor = System.Drawing.Color.Transparent; - this.radCloseWarnAll.Location = new System.Drawing.Point(16, 34); - this.radCloseWarnAll.Name = "radCloseWarnAll"; - this.radCloseWarnAll.Size = new System.Drawing.Size(209, 17); - this.radCloseWarnAll.TabIndex = 1; - this.radCloseWarnAll.TabStop = true; - this.radCloseWarnAll.Text = "Warn me when closing connections"; - this.radCloseWarnAll.UseVisualStyleBackColor = false; - // - // radCloseWarnMultiple - // - this.radCloseWarnMultiple.AutoSize = true; - this.radCloseWarnMultiple.BackColor = System.Drawing.Color.Transparent; - this.radCloseWarnMultiple.Location = new System.Drawing.Point(16, 57); - this.radCloseWarnMultiple.Name = "radCloseWarnMultiple"; - this.radCloseWarnMultiple.Size = new System.Drawing.Size(279, 17); - this.radCloseWarnMultiple.TabIndex = 2; - this.radCloseWarnMultiple.TabStop = true; - this.radCloseWarnMultiple.Text = "Warn me only when closing multiple connections"; - this.radCloseWarnMultiple.UseVisualStyleBackColor = false; - // - // radCloseWarnExit - // - this.radCloseWarnExit.AutoSize = true; - this.radCloseWarnExit.BackColor = System.Drawing.Color.Transparent; - this.radCloseWarnExit.Location = new System.Drawing.Point(16, 80); - this.radCloseWarnExit.Name = "radCloseWarnExit"; - this.radCloseWarnExit.Size = new System.Drawing.Size(233, 17); - this.radCloseWarnExit.TabIndex = 3; - this.radCloseWarnExit.TabStop = true; - this.radCloseWarnExit.Text = "Warn me only when exiting mRemoteNG"; - this.radCloseWarnExit.UseVisualStyleBackColor = false; - // - // radCloseWarnNever - // - this.radCloseWarnNever.AutoSize = true; - this.radCloseWarnNever.BackColor = System.Drawing.Color.Transparent; - this.radCloseWarnNever.Location = new System.Drawing.Point(16, 103); - this.radCloseWarnNever.Name = "radCloseWarnNever"; - this.radCloseWarnNever.Size = new System.Drawing.Size(246, 17); - this.radCloseWarnNever.TabIndex = 4; - this.radCloseWarnNever.TabStop = true; - this.radCloseWarnNever.Text = "Do not warn me when closing connections"; - this.radCloseWarnNever.UseVisualStyleBackColor = false; - // - // chkSaveConnectionsAfterEveryEdit - // - this.chkSaveConnectionsAfterEveryEdit._mice = MrngCheckBox.MouseState.OUT; - this.chkSaveConnectionsAfterEveryEdit.AutoSize = true; - this.chkSaveConnectionsAfterEveryEdit.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSaveConnectionsAfterEveryEdit.Location = new System.Drawing.Point(3, 95); - this.chkSaveConnectionsAfterEveryEdit.Name = "chkSaveConnectionsAfterEveryEdit"; - this.chkSaveConnectionsAfterEveryEdit.Size = new System.Drawing.Size(194, 17); - this.chkSaveConnectionsAfterEveryEdit.TabIndex = 7; - this.chkSaveConnectionsAfterEveryEdit.Text = "Save connections after every edit"; - this.chkSaveConnectionsAfterEveryEdit.UseVisualStyleBackColor = true; - // - // chkUseFilterSearch - // - this.chkUseFilterSearch._mice = MrngCheckBox.MouseState.OUT; - this.chkUseFilterSearch.AutoSize = true; - this.chkUseFilterSearch.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkUseFilterSearch.Location = new System.Drawing.Point(3, 118); - this.chkUseFilterSearch.Name = "chkUseFilterSearch"; - this.chkUseFilterSearch.Size = new System.Drawing.Size(230, 17); - this.chkUseFilterSearch.TabIndex = 8; - this.chkUseFilterSearch.Text = "Filter search matches in connection tree"; - this.chkUseFilterSearch.UseVisualStyleBackColor = true; - // - // tableLayoutPanel2 - // - this.tableLayoutPanel2.ColumnCount = 2; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 45F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 55F)); - this.tableLayoutPanel2.Controls.Add(this.numRdpReconnectionCount, 1, 0); - this.tableLayoutPanel2.Controls.Add(this.numAutoSave, 1, 2); - this.tableLayoutPanel2.Controls.Add(this.lblRdpReconnectionCount, 0, 0); - this.tableLayoutPanel2.Controls.Add(this.lblAutoSave1, 0, 2); - this.tableLayoutPanel2.Controls.Add(this.lblRDPConTimeout, 0, 1); - this.tableLayoutPanel2.Controls.Add(this.numRDPConTimeout, 1, 1); - this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 185); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 3; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(604, 79); - this.tableLayoutPanel2.TabIndex = 9; - // - // chkPlaceSearchBarAboveConnectionTree - // - this.chkPlaceSearchBarAboveConnectionTree._mice = MrngCheckBox.MouseState.OUT; - this.chkPlaceSearchBarAboveConnectionTree.AutoSize = true; - this.chkPlaceSearchBarAboveConnectionTree.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkPlaceSearchBarAboveConnectionTree.Location = new System.Drawing.Point(3, 141); - this.chkPlaceSearchBarAboveConnectionTree.Name = "chkPlaceSearchBarAboveConnectionTree"; - this.chkPlaceSearchBarAboveConnectionTree.Size = new System.Drawing.Size(226, 17); - this.chkPlaceSearchBarAboveConnectionTree.TabIndex = 8; - this.chkPlaceSearchBarAboveConnectionTree.Text = "Place search bar above connection tree"; - this.chkPlaceSearchBarAboveConnectionTree.UseVisualStyleBackColor = true; - // - // chkConnectionTreeTrackActiveConnection - // - this.chkConnectionTreeTrackActiveConnection._mice = MrngCheckBox.MouseState.OUT; - this.chkConnectionTreeTrackActiveConnection.AutoSize = true; - this.chkConnectionTreeTrackActiveConnection.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkConnectionTreeTrackActiveConnection.Location = new System.Drawing.Point(3, 49); - this.chkConnectionTreeTrackActiveConnection.Name = "chkConnectionTreeTrackActiveConnection"; - this.chkConnectionTreeTrackActiveConnection.Size = new System.Drawing.Size(262, 17); - this.chkConnectionTreeTrackActiveConnection.TabIndex = 10; - this.chkConnectionTreeTrackActiveConnection.Text = "Track active connection in the connection tree"; - this.chkConnectionTreeTrackActiveConnection.UseVisualStyleBackColor = true; - // - // chkDoNotTrimUsername - // - this.chkDoNotTrimUsername._mice = MrngCheckBox.MouseState.OUT; - this.chkDoNotTrimUsername.AutoSize = true; - this.chkDoNotTrimUsername.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkDoNotTrimUsername.Location = new System.Drawing.Point(3, 165); - this.chkDoNotTrimUsername.Name = "chkDoNotTrimUsername"; - this.chkDoNotTrimUsername.Size = new System.Drawing.Size(143, 17); - this.chkDoNotTrimUsername.TabIndex = 11; - this.chkDoNotTrimUsername.Text = "Do not trim usernames"; - this.chkDoNotTrimUsername.UseVisualStyleBackColor = true; - // - // ConnectionsPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.chkDoNotTrimUsername); - this.Controls.Add(this.chkConnectionTreeTrackActiveConnection); - this.Controls.Add(this.tableLayoutPanel2); - this.Controls.Add(this.chkPlaceSearchBarAboveConnectionTree); - this.Controls.Add(this.chkUseFilterSearch); - this.Controls.Add(this.chkSaveConnectionsAfterEveryEdit); - this.Controls.Add(this.chkSingleClickOnConnectionOpensIt); - this.Controls.Add(this.chkHostnameLikeDisplayName); - this.Controls.Add(this.chkSingleClickOnOpenedConnectionSwitchesToIt); - this.Controls.Add(this.pnlConfirmCloseConnection); - this.Name = "ConnectionsPage"; - this.Size = new System.Drawing.Size(610, 490); - ((System.ComponentModel.ISupportInitialize)(this.numRDPConTimeout)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numRdpReconnectionCount)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numAutoSave)).EndInit(); - this.pnlConfirmCloseConnection.ResumeLayout(false); - this.pnlConfirmCloseConnection.PerformLayout(); - this.tableLayoutPanel2.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - internal Controls.MrngLabel lblRdpReconnectionCount; - internal MrngCheckBox chkSingleClickOnConnectionOpensIt; - internal MrngCheckBox chkHostnameLikeDisplayName; - internal MrngCheckBox chkSingleClickOnOpenedConnectionSwitchesToIt; - internal Controls.MrngLabel lblAutoSave1; - internal Controls.MrngNumericUpDown numAutoSave; - internal System.Windows.Forms.Panel pnlConfirmCloseConnection; - internal Controls.MrngLabel lblClosingConnections; - internal Controls.MrngRadioButton radCloseWarnAll; - internal Controls.MrngRadioButton radCloseWarnMultiple; - internal Controls.MrngRadioButton radCloseWarnExit; - internal Controls.MrngRadioButton radCloseWarnNever; - internal Controls.MrngNumericUpDown numRDPConTimeout; - internal Controls.MrngLabel lblRDPConTimeout; - internal Controls.MrngNumericUpDown numRdpReconnectionCount; - internal MrngCheckBox chkSaveConnectionsAfterEveryEdit; - private MrngCheckBox chkUseFilterSearch; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - private MrngCheckBox chkPlaceSearchBarAboveConnectionTree; - private MrngCheckBox chkConnectionTreeTrackActiveConnection; - private MrngCheckBox chkDoNotTrimUsername; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.cs b/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.cs deleted file mode 100644 index 6649cbcb7..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.cs +++ /dev/null @@ -1,120 +0,0 @@ -using mRemoteNG.Config; -using System; -using System.Collections.Generic; -using mRemoteNG.Config.Connections; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class ConnectionsPage - { - private readonly FrmMain _frmMain = FrmMain.Default; - private List _connectionWarning; - - public ConnectionsPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.ASPWebSite_16x); - } - - public override string PageName - { - get => Language.Connections; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - _connectionWarning = new List - { - { new DropdownList((int)ConfirmCloseEnum.Never, Language.RadioCloseWarnMultiple)}, - { new DropdownList((int)ConfirmCloseEnum.Exit, Language.RadioCloseWarnExit)}, - { new DropdownList((int)ConfirmCloseEnum.Multiple, Language.RadioCloseWarnMultiple)}, - { new DropdownList((int)ConfirmCloseEnum.All, Language._CloseWarnAll)} - }; - - //comboBoxConnectionWarning.DataSource = _connectionWarning; - //comboBoxConnectionWarning.DisplayMember = "DisplayString"; - //comboBoxConnectionWarning.ValueMember = "Index"; - - chkSingleClickOnConnectionOpensIt.Text = Language.SingleClickOnConnectionOpensIt; - chkSingleClickOnOpenedConnectionSwitchesToIt.Text = Language.SingleClickOnOpenConnectionSwitchesToIt; - chkConnectionTreeTrackActiveConnection.Text = Language.TrackActiveConnectionInConnectionTree; - chkHostnameLikeDisplayName.Text = Language.SetHostnameLikeDisplayName; - chkUseFilterSearch.Text = Language.FilterSearchMatchesInConnectionTree; - chkPlaceSearchBarAboveConnectionTree.Text = Language.PlaceSearchBarAboveConnectionTree; - chkDoNotTrimUsername.Text = Language.DoNotTrimUsername; - - lblRdpReconnectionCount.Text = Language.RdpReconnectCount; - lblRDPConTimeout.Text = Language.RdpOverallConnectionTimeout; - lblAutoSave1.Text = Language.AutoSaveEvery; - //ngLabel1.Text = Language.strLabelClosingConnections; - - } - - public override void LoadSettings() - { - chkSingleClickOnConnectionOpensIt.Checked = Settings.Default.SingleClickOnConnectionOpensIt; - chkSingleClickOnOpenedConnectionSwitchesToIt.Checked = Settings.Default.SingleClickSwitchesToOpenConnection; - chkConnectionTreeTrackActiveConnection.Checked = Settings.Default.TrackActiveConnectionInConnectionTree; - chkHostnameLikeDisplayName.Checked = Settings.Default.SetHostnameLikeDisplayName; - - chkUseFilterSearch.Checked = Settings.Default.UseFilterSearch; - chkPlaceSearchBarAboveConnectionTree.Checked = Settings.Default.PlaceSearchBarAboveConnectionTree; - chkDoNotTrimUsername.Checked = Settings.Default.DoNotTrimUsername; - - numRdpReconnectionCount.Value = Convert.ToDecimal(Settings.Default.RdpReconnectionCount); - numRDPConTimeout.Value = Convert.ToDecimal(Settings.Default.ConRDPOverallConnectionTimeout); - numAutoSave.Value = Convert.ToDecimal(Settings.Default.AutoSaveEveryMinutes); - - //comboBoxConnectionWarning.SelectedValue = Settings.Default.ConfirmCloseConnection; - - if (Settings.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.Unassigned) - { - if (Settings.Default.SaveConnectionsAfterEveryEdit) - { - Settings.Default.SaveConnectionsFrequency = (int)ConnectionsBackupFrequencyEnum.OnEdit; - } - else if (Settings.Default.SaveConsOnExit) - { - Settings.Default.SaveConnectionsFrequency = (int)ConnectionsBackupFrequencyEnum.OnExit; - } - else - { - Settings.Default.SaveConnectionsFrequency = (int)ConnectionsBackupFrequencyEnum.Never; - } - } - } - - public override void SaveSettings() - { - Settings.Default.SingleClickOnConnectionOpensIt = chkSingleClickOnConnectionOpensIt.Checked; - Settings.Default.SingleClickSwitchesToOpenConnection = chkSingleClickOnOpenedConnectionSwitchesToIt.Checked; - Settings.Default.TrackActiveConnectionInConnectionTree = chkConnectionTreeTrackActiveConnection.Checked; - Settings.Default.SetHostnameLikeDisplayName = chkHostnameLikeDisplayName.Checked; - - Settings.Default.UseFilterSearch = chkUseFilterSearch.Checked; - Settings.Default.PlaceSearchBarAboveConnectionTree = chkPlaceSearchBarAboveConnectionTree.Checked; - Settings.Default.DoNotTrimUsername = chkDoNotTrimUsername.Checked; - - Settings.Default.RdpReconnectionCount = (int)numRdpReconnectionCount.Value; - Settings.Default.ConRDPOverallConnectionTimeout = (int)numRDPConTimeout.Value; - Settings.Default.AutoSaveEveryMinutes = (int)numAutoSave.Value; - if (Settings.Default.AutoSaveEveryMinutes > 0) - { - _frmMain.tmrAutoSave.Interval = Settings.Default.AutoSaveEveryMinutes * 60000; - _frmMain.tmrAutoSave.Enabled = true; - } - else - { - _frmMain.tmrAutoSave.Enabled = false; - } - - //Settings.Default.ConfirmCloseConnection = (int)comboBoxConnectionWarning.SelectedValue; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.resx b/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/ConnectionsPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.Designer.cs deleted file mode 100644 index 7a11683ad..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.Designer.cs +++ /dev/null @@ -1,249 +0,0 @@ -namespace mRemoteNG.UI.Forms.OptionsPages -{ - sealed partial class CredentialsPage - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.pnlDefaultCredentials = new System.Windows.Forms.Panel(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.txtCredentialsUserViaAPI = new mRemoteNG.UI.Controls.MrngTextBox(); - this.txtCredentialsUsername = new mRemoteNG.UI.Controls.MrngTextBox(); - this.txtCredentialsPassword = new mRemoteNG.UI.Controls.MrngTextBox(); - this.txtCredentialsDomain = new mRemoteNG.UI.Controls.MrngTextBox(); - this.lblCredentialsDomain = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblCredentialsUserViaAPI = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblCredentialsUsername = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblCredentialsPassword = new mRemoteNG.UI.Controls.MrngLabel(); - this.radCredentialsCustom = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.lblDefaultCredentials = new mRemoteNG.UI.Controls.MrngLabel(); - this.radCredentialsNoInfo = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.radCredentialsWindows = new mRemoteNG.UI.Controls.MrngRadioButton(); - this.pnlDefaultCredentials.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // pnlDefaultCredentials - // - this.pnlDefaultCredentials.Controls.Add(this.tableLayoutPanel1); - this.pnlDefaultCredentials.Controls.Add(this.radCredentialsCustom); - this.pnlDefaultCredentials.Controls.Add(this.lblDefaultCredentials); - this.pnlDefaultCredentials.Controls.Add(this.radCredentialsNoInfo); - this.pnlDefaultCredentials.Controls.Add(this.radCredentialsWindows); - this.pnlDefaultCredentials.Location = new System.Drawing.Point(3, 3); - this.pnlDefaultCredentials.Name = "pnlDefaultCredentials"; - this.pnlDefaultCredentials.Size = new System.Drawing.Size(604, 167); - this.pnlDefaultCredentials.TabIndex = 0; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Controls.Add(this.txtCredentialsUserViaAPI, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.txtCredentialsUsername, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.txtCredentialsPassword, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.txtCredentialsDomain, 1, 3); - this.tableLayoutPanel1.Controls.Add(this.lblCredentialsUserViaAPI, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.lblCredentialsUsername, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.lblCredentialsPassword, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.lblCredentialsDomain, 0, 3); - this.tableLayoutPanel1.Location = new System.Drawing.Point(23, 85); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 3; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(332, 82); - this.tableLayoutPanel1.TabIndex = 1; - // - // txtCredentialsUserViaAPI - // - this.txtCredentialsUserViaAPI.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtCredentialsUserViaAPI.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtCredentialsUserViaAPI.Enabled = false; - this.txtCredentialsUserViaAPI.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtCredentialsUserViaAPI.Location = new System.Drawing.Point(163, 3); - this.txtCredentialsUserViaAPI.Name = "txtCredentialsUserViaAPI"; - this.txtCredentialsUserViaAPI.Size = new System.Drawing.Size(166, 22); - this.txtCredentialsUserViaAPI.TabIndex = 5; - // - // txtCredentialsUsername - // - this.txtCredentialsUsername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtCredentialsUsername.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtCredentialsUsername.Enabled = false; - this.txtCredentialsUsername.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtCredentialsUsername.Location = new System.Drawing.Point(163, 3); - this.txtCredentialsUsername.Name = "txtCredentialsUsername"; - this.txtCredentialsUsername.Size = new System.Drawing.Size(166, 22); - this.txtCredentialsUsername.TabIndex = 5; - // - // txtCredentialsPassword - // - this.txtCredentialsPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtCredentialsPassword.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtCredentialsPassword.Enabled = false; - this.txtCredentialsPassword.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtCredentialsPassword.Location = new System.Drawing.Point(163, 29); - this.txtCredentialsPassword.Name = "txtCredentialsPassword"; - this.txtCredentialsPassword.Size = new System.Drawing.Size(166, 22); - this.txtCredentialsPassword.TabIndex = 7; - this.txtCredentialsPassword.UseSystemPasswordChar = true; - // - // txtCredentialsDomain - // - this.txtCredentialsDomain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtCredentialsDomain.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtCredentialsDomain.Enabled = false; - this.txtCredentialsDomain.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtCredentialsDomain.Location = new System.Drawing.Point(163, 55); - this.txtCredentialsDomain.Name = "txtCredentialsDomain"; - this.txtCredentialsDomain.Size = new System.Drawing.Size(166, 22); - this.txtCredentialsDomain.TabIndex = 9; - // - // lblCredentialsDomain - // - this.lblCredentialsDomain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.lblCredentialsDomain.Enabled = false; - this.lblCredentialsDomain.Location = new System.Drawing.Point(3, 57); - this.lblCredentialsDomain.Name = "lblCredentialsDomain"; - this.lblCredentialsDomain.Size = new System.Drawing.Size(154, 19); - this.lblCredentialsDomain.TabIndex = 8; - this.lblCredentialsDomain.Text = "Domain:"; - this.lblCredentialsDomain.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // lblCredentialsUserViaAPI - // - this.lblCredentialsUserViaAPI.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.lblCredentialsUserViaAPI.Enabled = false; - this.lblCredentialsUserViaAPI.Location = new System.Drawing.Point(3, 3); - this.lblCredentialsUserViaAPI.Name = "lblCredentialsUserViaAPI"; - this.lblCredentialsUserViaAPI.Size = new System.Drawing.Size(154, 19); - this.lblCredentialsUserViaAPI.TabIndex = 4; - this.lblCredentialsUserViaAPI.Text = "User via API ID:"; - this.lblCredentialsUserViaAPI.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // lblCredentialsUsername - // - this.lblCredentialsUsername.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.lblCredentialsUsername.Enabled = false; - this.lblCredentialsUsername.Location = new System.Drawing.Point(3, 3); - this.lblCredentialsUsername.Name = "lblCredentialsUsername"; - this.lblCredentialsUsername.Size = new System.Drawing.Size(154, 19); - this.lblCredentialsUsername.TabIndex = 4; - this.lblCredentialsUsername.Text = "Username:"; - this.lblCredentialsUsername.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // lblCredentialsPassword - // - this.lblCredentialsPassword.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.lblCredentialsPassword.Enabled = false; - this.lblCredentialsPassword.Location = new System.Drawing.Point(3, 29); - this.lblCredentialsPassword.Name = "lblCredentialsPassword"; - this.lblCredentialsPassword.Size = new System.Drawing.Size(154, 19); - this.lblCredentialsPassword.TabIndex = 6; - this.lblCredentialsPassword.Text = "Password:"; - this.lblCredentialsPassword.TextAlign = System.Drawing.ContentAlignment.TopRight; - // - // radCredentialsCustom - // - this.radCredentialsCustom.AutoSize = true; - this.radCredentialsCustom.BackColor = System.Drawing.Color.Transparent; - this.radCredentialsCustom.Location = new System.Drawing.Point(3, 62); - this.radCredentialsCustom.Name = "radCredentialsCustom"; - this.radCredentialsCustom.Size = new System.Drawing.Size(98, 17); - this.radCredentialsCustom.TabIndex = 3; - this.radCredentialsCustom.Text = "the following:"; - this.radCredentialsCustom.UseVisualStyleBackColor = false; - this.radCredentialsCustom.CheckedChanged += new System.EventHandler(this.radCredentialsCustom_CheckedChanged); - // - // lblDefaultCredentials - // - this.lblDefaultCredentials.AutoSize = true; - this.lblDefaultCredentials.Location = new System.Drawing.Point(0, 0); - this.lblDefaultCredentials.Name = "lblDefaultCredentials"; - this.lblDefaultCredentials.Size = new System.Drawing.Size(279, 13); - this.lblDefaultCredentials.TabIndex = 0; - this.lblDefaultCredentials.Text = "For empty Username, Password or Domain fields use:"; - // - // radCredentialsNoInfo - // - this.radCredentialsNoInfo.AutoSize = true; - this.radCredentialsNoInfo.BackColor = System.Drawing.Color.Transparent; - this.radCredentialsNoInfo.Checked = true; - this.radCredentialsNoInfo.Location = new System.Drawing.Point(3, 16); - this.radCredentialsNoInfo.Name = "radCredentialsNoInfo"; - this.radCredentialsNoInfo.Size = new System.Drawing.Size(103, 17); - this.radCredentialsNoInfo.TabIndex = 1; - this.radCredentialsNoInfo.TabStop = true; - this.radCredentialsNoInfo.Text = "no information"; - this.radCredentialsNoInfo.UseVisualStyleBackColor = false; - // - // radCredentialsWindows - // - this.radCredentialsWindows.AutoSize = true; - this.radCredentialsWindows.BackColor = System.Drawing.Color.Transparent; - this.radCredentialsWindows.Location = new System.Drawing.Point(3, 39); - this.radCredentialsWindows.Name = "radCredentialsWindows"; - this.radCredentialsWindows.Size = new System.Drawing.Size(252, 17); - this.radCredentialsWindows.TabIndex = 2; - this.radCredentialsWindows.Text = "my current credentials (windows logon info)"; - this.radCredentialsWindows.UseVisualStyleBackColor = false; - // - // CredentialsPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.pnlDefaultCredentials); - this.Margin = new System.Windows.Forms.Padding(4); - this.Name = "CredentialsPage"; - this.Size = new System.Drawing.Size(610, 490); - this.pnlDefaultCredentials.ResumeLayout(false); - this.pnlDefaultCredentials.PerformLayout(); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - internal System.Windows.Forms.Panel pnlDefaultCredentials; - internal Controls.MrngRadioButton radCredentialsCustom; - internal Controls.MrngLabel lblDefaultCredentials; - internal Controls.MrngRadioButton radCredentialsNoInfo; - internal Controls.MrngRadioButton radCredentialsWindows; - internal Controls.MrngTextBox txtCredentialsDomain; - internal Controls.MrngLabel lblCredentialsUserViaAPI; - internal Controls.MrngLabel lblCredentialsUsername; - internal Controls.MrngTextBox txtCredentialsPassword; - internal Controls.MrngLabel lblCredentialsPassword; - internal Controls.MrngTextBox txtCredentialsUserViaAPI; - internal Controls.MrngTextBox txtCredentialsUsername; - internal Controls.MrngLabel lblCredentialsDomain; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.cs b/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.cs deleted file mode 100644 index 50c6982f6..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using mRemoteNG.App; -using mRemoteNG.Properties; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class CredentialsPage : OptionsPage - { - public CredentialsPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Key_16x); - } - - public override string PageName - { - get => Language.Credentials; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - lblDefaultCredentials.Text = Language.EmptyUsernamePasswordDomainFields; - radCredentialsNoInfo.Text = Language.None; - radCredentialsWindows.Text = Language.MyCurrentWindowsCreds; - radCredentialsCustom.Text = Language.TheFollowing; - lblCredentialsUsername.Text = Language.Username; - lblCredentialsPassword.Text = Language.Password; - lblCredentialsDomain.Text = Language.Domain; - } - - public override void LoadSettings() - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (Settings.Default.EmptyCredentials) - { - case "noinfo": - radCredentialsNoInfo.Checked = true; - break; - case "windows": - radCredentialsWindows.Checked = true; - break; - case "custom": - radCredentialsCustom.Checked = true; - break; - } - - txtCredentialsUsername.Text = Settings.Default.DefaultUsername; - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - txtCredentialsPassword.Text = - cryptographyProvider.Decrypt(Settings.Default.DefaultPassword, Runtime.EncryptionKey); - txtCredentialsDomain.Text = Settings.Default.DefaultDomain; - } - - public override void SaveSettings() - { - if (radCredentialsNoInfo.Checked) - { - Settings.Default.EmptyCredentials = "noinfo"; - } - else if (radCredentialsWindows.Checked) - { - Settings.Default.EmptyCredentials = "windows"; - } - else if (radCredentialsCustom.Checked) - { - Settings.Default.EmptyCredentials = "custom"; - } - - Settings.Default.DefaultUsername = txtCredentialsUsername.Text; - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - Settings.Default.DefaultPassword = - cryptographyProvider.Encrypt(txtCredentialsPassword.Text, Runtime.EncryptionKey); - Settings.Default.DefaultDomain = txtCredentialsDomain.Text; - } - - private void radCredentialsCustom_CheckedChanged(object sender, EventArgs e) - { - lblCredentialsUsername.Enabled = radCredentialsCustom.Checked; - lblCredentialsPassword.Enabled = radCredentialsCustom.Checked; - lblCredentialsDomain.Enabled = radCredentialsCustom.Checked; - txtCredentialsUsername.Enabled = radCredentialsCustom.Checked; - txtCredentialsPassword.Enabled = radCredentialsCustom.Checked; - txtCredentialsDomain.Enabled = radCredentialsCustom.Checked; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.resx b/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/CredentialsPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.Designer.cs deleted file mode 100644 index 319bb0c04..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.Designer.cs +++ /dev/null @@ -1,494 +0,0 @@ - - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class NotificationsPage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() - { - this.labelSwitchToErrorsAndInfos = new mRemoteNG.UI.Controls.MrngLabel(); - this.chkSwitchToMCInformation = new MrngCheckBox(); - this.chkSwitchToMCErrors = new MrngCheckBox(); - this.chkSwitchToMCWarnings = new MrngCheckBox(); - this.groupBoxNotifications = new MrngGroupBox(); - this.labelNotificationsShowTypes = new mRemoteNG.UI.Controls.MrngLabel(); - this.chkShowErrorInMC = new MrngCheckBox(); - this.chkShowWarningInMC = new MrngCheckBox(); - this.chkShowInfoInMC = new MrngCheckBox(); - this.chkShowDebugInMC = new MrngCheckBox(); - this.groupBoxLogging = new MrngGroupBox(); - this.tblLogging = new System.Windows.Forms.TableLayoutPanel(); - this.chkLogDebugMsgs = new MrngCheckBox(); - this.chkLogInfoMsgs = new MrngCheckBox(); - this.chkLogWarningMsgs = new MrngCheckBox(); - this.chkLogErrorMsgs = new MrngCheckBox(); - this.chkLogToCurrentDir = new MrngCheckBox(); - this.buttonRestoreDefaultLogPath = new MrngButton(); - this.buttonOpenLogFile = new MrngButton(); - this.buttonSelectLogPath = new MrngButton(); - this.labelLogTheseMsgTypes = new mRemoteNG.UI.Controls.MrngLabel(); - this.labelLogFilePath = new mRemoteNG.UI.Controls.MrngLabel(); - this.textBoxLogPath = new mRemoteNG.UI.Controls.MrngTextBox(); - this.saveFileDialogLogging = new System.Windows.Forms.SaveFileDialog(); - this.groupBoxPopups = new MrngGroupBox(); - this.tblPopups = new System.Windows.Forms.TableLayoutPanel(); - this.chkPopupDebug = new MrngCheckBox(); - this.chkPopupError = new MrngCheckBox(); - this.chkPopupInfo = new MrngCheckBox(); - this.chkPopupWarning = new MrngCheckBox(); - this.labelPopupShowTypes = new mRemoteNG.UI.Controls.MrngLabel(); - this.groupBoxNotifications.SuspendLayout(); - this.groupBoxLogging.SuspendLayout(); - this.tblLogging.SuspendLayout(); - this.groupBoxPopups.SuspendLayout(); - this.tblPopups.SuspendLayout(); - this.SuspendLayout(); - // - // labelSwitchToErrorsAndInfos - // - this.labelSwitchToErrorsAndInfos.AutoSize = true; - this.labelSwitchToErrorsAndInfos.Location = new System.Drawing.Point(177, 25); - this.labelSwitchToErrorsAndInfos.Name = "labelSwitchToErrorsAndInfos"; - this.labelSwitchToErrorsAndInfos.Size = new System.Drawing.Size(176, 13); - this.labelSwitchToErrorsAndInfos.TabIndex = 5; - this.labelSwitchToErrorsAndInfos.Text = "Switch to Notifications panel on:"; - // - // chkSwitchToMCInformation - // - this.chkSwitchToMCInformation._mice = MrngCheckBox.MouseState.OUT; - this.chkSwitchToMCInformation.AutoSize = true; - this.chkSwitchToMCInformation.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSwitchToMCInformation.Location = new System.Drawing.Point(195, 64); - this.chkSwitchToMCInformation.Name = "chkSwitchToMCInformation"; - this.chkSwitchToMCInformation.Size = new System.Drawing.Size(87, 17); - this.chkSwitchToMCInformation.TabIndex = 6; - this.chkSwitchToMCInformation.Text = "Information"; - this.chkSwitchToMCInformation.UseVisualStyleBackColor = true; - // - // chkSwitchToMCErrors - // - this.chkSwitchToMCErrors._mice = MrngCheckBox.MouseState.OUT; - this.chkSwitchToMCErrors.AutoSize = true; - this.chkSwitchToMCErrors.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSwitchToMCErrors.Location = new System.Drawing.Point(195, 110); - this.chkSwitchToMCErrors.Name = "chkSwitchToMCErrors"; - this.chkSwitchToMCErrors.Size = new System.Drawing.Size(51, 17); - this.chkSwitchToMCErrors.TabIndex = 8; - this.chkSwitchToMCErrors.Text = "Error"; - this.chkSwitchToMCErrors.UseVisualStyleBackColor = true; - // - // chkSwitchToMCWarnings - // - this.chkSwitchToMCWarnings._mice = MrngCheckBox.MouseState.OUT; - this.chkSwitchToMCWarnings.AutoSize = true; - this.chkSwitchToMCWarnings.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSwitchToMCWarnings.Location = new System.Drawing.Point(195, 87); - this.chkSwitchToMCWarnings.Name = "chkSwitchToMCWarnings"; - this.chkSwitchToMCWarnings.Size = new System.Drawing.Size(71, 17); - this.chkSwitchToMCWarnings.TabIndex = 7; - this.chkSwitchToMCWarnings.Text = "Warning"; - this.chkSwitchToMCWarnings.UseVisualStyleBackColor = true; - // - // groupBoxNotifications - // - this.groupBoxNotifications.Controls.Add(this.labelNotificationsShowTypes); - this.groupBoxNotifications.Controls.Add(this.labelSwitchToErrorsAndInfos); - this.groupBoxNotifications.Controls.Add(this.chkSwitchToMCErrors); - this.groupBoxNotifications.Controls.Add(this.chkShowErrorInMC); - this.groupBoxNotifications.Controls.Add(this.chkSwitchToMCInformation); - this.groupBoxNotifications.Controls.Add(this.chkShowWarningInMC); - this.groupBoxNotifications.Controls.Add(this.chkSwitchToMCWarnings); - this.groupBoxNotifications.Controls.Add(this.chkShowInfoInMC); - this.groupBoxNotifications.Controls.Add(this.chkShowDebugInMC); - this.groupBoxNotifications.Location = new System.Drawing.Point(6, 2); - this.groupBoxNotifications.Name = "groupBoxNotifications"; - this.groupBoxNotifications.Size = new System.Drawing.Size(601, 132); - this.groupBoxNotifications.TabIndex = 0; - this.groupBoxNotifications.TabStop = false; - this.groupBoxNotifications.Text = "Notifications Panel"; - // - // labelNotificationsShowTypes - // - this.labelNotificationsShowTypes.AutoSize = true; - this.labelNotificationsShowTypes.Location = new System.Drawing.Point(6, 25); - this.labelNotificationsShowTypes.Name = "labelNotificationsShowTypes"; - this.labelNotificationsShowTypes.Size = new System.Drawing.Size(147, 13); - this.labelNotificationsShowTypes.TabIndex = 0; - this.labelNotificationsShowTypes.Text = "Show these message types:"; - // - // chkShowErrorInMC - // - this.chkShowErrorInMC._mice = MrngCheckBox.MouseState.OUT; - this.chkShowErrorInMC.AutoSize = true; - this.chkShowErrorInMC.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowErrorInMC.Location = new System.Drawing.Point(20, 110); - this.chkShowErrorInMC.Name = "chkShowErrorInMC"; - this.chkShowErrorInMC.Size = new System.Drawing.Size(51, 17); - this.chkShowErrorInMC.TabIndex = 4; - this.chkShowErrorInMC.Text = "Error"; - this.chkShowErrorInMC.UseVisualStyleBackColor = true; - // - // chkShowWarningInMC - // - this.chkShowWarningInMC._mice = MrngCheckBox.MouseState.OUT; - this.chkShowWarningInMC.AutoSize = true; - this.chkShowWarningInMC.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowWarningInMC.Location = new System.Drawing.Point(20, 87); - this.chkShowWarningInMC.Name = "chkShowWarningInMC"; - this.chkShowWarningInMC.Size = new System.Drawing.Size(71, 17); - this.chkShowWarningInMC.TabIndex = 3; - this.chkShowWarningInMC.Text = "Warning"; - this.chkShowWarningInMC.UseVisualStyleBackColor = true; - // - // chkShowInfoInMC - // - this.chkShowInfoInMC._mice = MrngCheckBox.MouseState.OUT; - this.chkShowInfoInMC.AutoSize = true; - this.chkShowInfoInMC.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowInfoInMC.Location = new System.Drawing.Point(20, 64); - this.chkShowInfoInMC.Name = "chkShowInfoInMC"; - this.chkShowInfoInMC.Size = new System.Drawing.Size(87, 17); - this.chkShowInfoInMC.TabIndex = 2; - this.chkShowInfoInMC.Text = "Information"; - this.chkShowInfoInMC.UseVisualStyleBackColor = true; - // - // chkShowDebugInMC - // - this.chkShowDebugInMC._mice = MrngCheckBox.MouseState.OUT; - this.chkShowDebugInMC.AutoSize = true; - this.chkShowDebugInMC.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowDebugInMC.Location = new System.Drawing.Point(20, 41); - this.chkShowDebugInMC.Name = "chkShowDebugInMC"; - this.chkShowDebugInMC.Size = new System.Drawing.Size(61, 17); - this.chkShowDebugInMC.TabIndex = 1; - this.chkShowDebugInMC.Text = "Debug"; - this.chkShowDebugInMC.UseVisualStyleBackColor = true; - // - // groupBoxLogging - // - this.groupBoxLogging.Controls.Add(this.tblLogging); - this.groupBoxLogging.Controls.Add(this.chkLogToCurrentDir); - this.groupBoxLogging.Controls.Add(this.buttonRestoreDefaultLogPath); - this.groupBoxLogging.Controls.Add(this.buttonOpenLogFile); - this.groupBoxLogging.Controls.Add(this.buttonSelectLogPath); - this.groupBoxLogging.Controls.Add(this.labelLogTheseMsgTypes); - this.groupBoxLogging.Controls.Add(this.labelLogFilePath); - this.groupBoxLogging.Controls.Add(this.textBoxLogPath); - this.groupBoxLogging.Location = new System.Drawing.Point(6, 140); - this.groupBoxLogging.Name = "groupBoxLogging"; - this.groupBoxLogging.Size = new System.Drawing.Size(601, 173); - this.groupBoxLogging.TabIndex = 1; - this.groupBoxLogging.TabStop = false; - this.groupBoxLogging.Text = "Logging"; - // - // tblLogging - // - this.tblLogging.ColumnCount = 4; - this.tblLogging.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tblLogging.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tblLogging.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tblLogging.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tblLogging.Controls.Add(this.chkLogDebugMsgs, 0, 0); - this.tblLogging.Controls.Add(this.chkLogInfoMsgs, 1, 0); - this.tblLogging.Controls.Add(this.chkLogWarningMsgs, 2, 0); - this.tblLogging.Controls.Add(this.chkLogErrorMsgs, 3, 0); - this.tblLogging.Location = new System.Drawing.Point(9, 138); - this.tblLogging.Name = "tblLogging"; - this.tblLogging.RowCount = 1; - this.tblLogging.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tblLogging.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tblLogging.Size = new System.Drawing.Size(585, 25); - this.tblLogging.TabIndex = 7; - // - // chkLogDebugMsgs - // - this.chkLogDebugMsgs._mice = MrngCheckBox.MouseState.OUT; - this.chkLogDebugMsgs.AutoSize = true; - this.chkLogDebugMsgs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkLogDebugMsgs.Location = new System.Drawing.Point(3, 3); - this.chkLogDebugMsgs.Name = "chkLogDebugMsgs"; - this.chkLogDebugMsgs.Size = new System.Drawing.Size(61, 17); - this.chkLogDebugMsgs.TabIndex = 0; - this.chkLogDebugMsgs.Text = "Debug"; - this.chkLogDebugMsgs.UseVisualStyleBackColor = true; - // - // chkLogInfoMsgs - // - this.chkLogInfoMsgs._mice = MrngCheckBox.MouseState.OUT; - this.chkLogInfoMsgs.AutoSize = true; - this.chkLogInfoMsgs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkLogInfoMsgs.Location = new System.Drawing.Point(149, 3); - this.chkLogInfoMsgs.Name = "chkLogInfoMsgs"; - this.chkLogInfoMsgs.Size = new System.Drawing.Size(87, 17); - this.chkLogInfoMsgs.TabIndex = 1; - this.chkLogInfoMsgs.Text = "Information"; - this.chkLogInfoMsgs.UseVisualStyleBackColor = true; - // - // chkLogWarningMsgs - // - this.chkLogWarningMsgs._mice = MrngCheckBox.MouseState.OUT; - this.chkLogWarningMsgs.AutoSize = true; - this.chkLogWarningMsgs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkLogWarningMsgs.Location = new System.Drawing.Point(295, 3); - this.chkLogWarningMsgs.Name = "chkLogWarningMsgs"; - this.chkLogWarningMsgs.Size = new System.Drawing.Size(71, 17); - this.chkLogWarningMsgs.TabIndex = 2; - this.chkLogWarningMsgs.Text = "Warning"; - this.chkLogWarningMsgs.UseVisualStyleBackColor = true; - // - // chkLogErrorMsgs - // - this.chkLogErrorMsgs._mice = MrngCheckBox.MouseState.OUT; - this.chkLogErrorMsgs.AutoSize = true; - this.chkLogErrorMsgs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkLogErrorMsgs.Location = new System.Drawing.Point(441, 3); - this.chkLogErrorMsgs.Name = "chkLogErrorMsgs"; - this.chkLogErrorMsgs.Size = new System.Drawing.Size(51, 17); - this.chkLogErrorMsgs.TabIndex = 3; - this.chkLogErrorMsgs.Text = "Error"; - this.chkLogErrorMsgs.UseVisualStyleBackColor = true; - // - // chkLogToCurrentDir - // - this.chkLogToCurrentDir._mice = MrngCheckBox.MouseState.OUT; - this.chkLogToCurrentDir.AutoSize = true; - this.chkLogToCurrentDir.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkLogToCurrentDir.Location = new System.Drawing.Point(9, 18); - this.chkLogToCurrentDir.Name = "chkLogToCurrentDir"; - this.chkLogToCurrentDir.Size = new System.Drawing.Size(168, 17); - this.chkLogToCurrentDir.TabIndex = 0; - this.chkLogToCurrentDir.Text = "Log to application directory"; - this.chkLogToCurrentDir.UseVisualStyleBackColor = true; - this.chkLogToCurrentDir.CheckedChanged += new System.EventHandler(this.chkLogToCurrentDir_CheckedChanged); - // - // buttonRestoreDefaultLogPath - // - this.buttonRestoreDefaultLogPath._mice = MrngButton.MouseState.OUT; - this.buttonRestoreDefaultLogPath.Location = new System.Drawing.Point(9, 85); - this.buttonRestoreDefaultLogPath.Name = "buttonRestoreDefaultLogPath"; - this.buttonRestoreDefaultLogPath.Size = new System.Drawing.Size(179, 25); - this.buttonRestoreDefaultLogPath.TabIndex = 5; - this.buttonRestoreDefaultLogPath.Text = "Use Default"; - this.buttonRestoreDefaultLogPath.UseVisualStyleBackColor = true; - this.buttonRestoreDefaultLogPath.Click += new System.EventHandler(this.buttonRestoreDefaultLogPath_Click); - // - // buttonOpenLogFile - // - this.buttonOpenLogFile._mice = MrngButton.MouseState.OUT; - this.buttonOpenLogFile.Location = new System.Drawing.Point(378, 85); - this.buttonOpenLogFile.Name = "buttonOpenLogFile"; - this.buttonOpenLogFile.Size = new System.Drawing.Size(105, 25); - this.buttonOpenLogFile.TabIndex = 3; - this.buttonOpenLogFile.Text = "Open File"; - this.buttonOpenLogFile.UseVisualStyleBackColor = true; - this.buttonOpenLogFile.Click += new System.EventHandler(this.buttonOpenLogFile_Click); - // - // buttonSelectLogPath - // - this.buttonSelectLogPath._mice = MrngButton.MouseState.OUT; - this.buttonSelectLogPath.Location = new System.Drawing.Point(489, 85); - this.buttonSelectLogPath.Name = "buttonSelectLogPath"; - this.buttonSelectLogPath.Size = new System.Drawing.Size(105, 25); - this.buttonSelectLogPath.TabIndex = 4; - this.buttonSelectLogPath.Text = "Choose Path"; - this.buttonSelectLogPath.UseVisualStyleBackColor = true; - this.buttonSelectLogPath.Click += new System.EventHandler(this.buttonSelectLogPath_Click); - // - // labelLogTheseMsgTypes - // - this.labelLogTheseMsgTypes.AutoSize = true; - this.labelLogTheseMsgTypes.Location = new System.Drawing.Point(6, 122); - this.labelLogTheseMsgTypes.Name = "labelLogTheseMsgTypes"; - this.labelLogTheseMsgTypes.Size = new System.Drawing.Size(137, 13); - this.labelLogTheseMsgTypes.TabIndex = 6; - this.labelLogTheseMsgTypes.Text = "Log these message types:"; - // - // labelLogFilePath - // - this.labelLogFilePath.AutoSize = true; - this.labelLogFilePath.Location = new System.Drawing.Point(6, 38); - this.labelLogFilePath.Name = "labelLogFilePath"; - this.labelLogFilePath.Size = new System.Drawing.Size(75, 13); - this.labelLogFilePath.TabIndex = 1; - this.labelLogFilePath.Text = "Log file path:"; - // - // textBoxLogPath - // - this.textBoxLogPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.textBoxLogPath.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.textBoxLogPath.Location = new System.Drawing.Point(9, 57); - this.textBoxLogPath.Name = "textBoxLogPath"; - this.textBoxLogPath.ReadOnly = true; - this.textBoxLogPath.Size = new System.Drawing.Size(585, 22); - this.textBoxLogPath.TabIndex = 2; - // - // groupBoxPopups - // - this.groupBoxPopups.Controls.Add(this.tblPopups); - this.groupBoxPopups.Controls.Add(this.labelPopupShowTypes); - this.groupBoxPopups.Location = new System.Drawing.Point(6, 319); - this.groupBoxPopups.Name = "groupBoxPopups"; - this.groupBoxPopups.Size = new System.Drawing.Size(601, 74); - this.groupBoxPopups.TabIndex = 2; - this.groupBoxPopups.TabStop = false; - this.groupBoxPopups.Text = "Pop-ups"; - // - // tblPopups - // - this.tblPopups.ColumnCount = 4; - this.tblPopups.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tblPopups.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tblPopups.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tblPopups.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tblPopups.Controls.Add(this.chkPopupDebug, 0, 0); - this.tblPopups.Controls.Add(this.chkPopupError, 3, 0); - this.tblPopups.Controls.Add(this.chkPopupInfo, 1, 0); - this.tblPopups.Controls.Add(this.chkPopupWarning, 2, 0); - this.tblPopups.Location = new System.Drawing.Point(11, 40); - this.tblPopups.Name = "tblPopups"; - this.tblPopups.RowCount = 1; - this.tblPopups.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tblPopups.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); - this.tblPopups.Size = new System.Drawing.Size(584, 25); - this.tblPopups.TabIndex = 1; - // - // chkPopupDebug - // - this.chkPopupDebug._mice = MrngCheckBox.MouseState.OUT; - this.chkPopupDebug.AutoSize = true; - this.chkPopupDebug.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkPopupDebug.Location = new System.Drawing.Point(3, 3); - this.chkPopupDebug.Name = "chkPopupDebug"; - this.chkPopupDebug.Size = new System.Drawing.Size(61, 17); - this.chkPopupDebug.TabIndex = 0; - this.chkPopupDebug.Text = "Debug"; - this.chkPopupDebug.UseVisualStyleBackColor = true; - // - // chkPopupError - // - this.chkPopupError._mice = MrngCheckBox.MouseState.OUT; - this.chkPopupError.AutoSize = true; - this.chkPopupError.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkPopupError.Location = new System.Drawing.Point(441, 3); - this.chkPopupError.Name = "chkPopupError"; - this.chkPopupError.Size = new System.Drawing.Size(51, 17); - this.chkPopupError.TabIndex = 3; - this.chkPopupError.Text = "Error"; - this.chkPopupError.UseVisualStyleBackColor = true; - // - // chkPopupInfo - // - this.chkPopupInfo._mice = MrngCheckBox.MouseState.OUT; - this.chkPopupInfo.AutoSize = true; - this.chkPopupInfo.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkPopupInfo.Location = new System.Drawing.Point(149, 3); - this.chkPopupInfo.Name = "chkPopupInfo"; - this.chkPopupInfo.Size = new System.Drawing.Size(87, 17); - this.chkPopupInfo.TabIndex = 1; - this.chkPopupInfo.Text = "Information"; - this.chkPopupInfo.UseVisualStyleBackColor = true; - // - // chkPopupWarning - // - this.chkPopupWarning._mice = MrngCheckBox.MouseState.OUT; - this.chkPopupWarning.AutoSize = true; - this.chkPopupWarning.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkPopupWarning.Location = new System.Drawing.Point(295, 3); - this.chkPopupWarning.Name = "chkPopupWarning"; - this.chkPopupWarning.Size = new System.Drawing.Size(71, 17); - this.chkPopupWarning.TabIndex = 2; - this.chkPopupWarning.Text = "Warning"; - this.chkPopupWarning.UseVisualStyleBackColor = true; - // - // labelPopupShowTypes - // - this.labelPopupShowTypes.AutoSize = true; - this.labelPopupShowTypes.Location = new System.Drawing.Point(8, 24); - this.labelPopupShowTypes.Name = "labelPopupShowTypes"; - this.labelPopupShowTypes.Size = new System.Drawing.Size(147, 13); - this.labelPopupShowTypes.TabIndex = 0; - this.labelPopupShowTypes.Text = "Show these message types:"; - // - // NotificationsPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.groupBoxPopups); - this.Controls.Add(this.groupBoxLogging); - this.Controls.Add(this.groupBoxNotifications); - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); - this.Name = "NotificationsPage"; - this.Size = new System.Drawing.Size(610, 490); - this.groupBoxNotifications.ResumeLayout(false); - this.groupBoxNotifications.PerformLayout(); - this.groupBoxLogging.ResumeLayout(false); - this.groupBoxLogging.PerformLayout(); - this.tblLogging.ResumeLayout(false); - this.tblLogging.PerformLayout(); - this.groupBoxPopups.ResumeLayout(false); - this.groupBoxPopups.PerformLayout(); - this.tblPopups.ResumeLayout(false); - this.tblPopups.PerformLayout(); - this.ResumeLayout(false); - - } - - internal Controls.MrngLabel labelSwitchToErrorsAndInfos; - internal MrngCheckBox chkSwitchToMCInformation; - internal MrngCheckBox chkSwitchToMCErrors; - internal MrngCheckBox chkSwitchToMCWarnings; - private Controls.MrngLabel labelNotificationsShowTypes; - private MrngCheckBox chkShowErrorInMC; - private MrngCheckBox chkShowWarningInMC; - private MrngCheckBox chkShowInfoInMC; - private MrngCheckBox chkShowDebugInMC; - private System.Windows.Forms.SaveFileDialog saveFileDialogLogging; - private Controls.MrngLabel labelLogFilePath; - private Controls.MrngTextBox textBoxLogPath; - private MrngButton buttonSelectLogPath; - private Controls.MrngLabel labelLogTheseMsgTypes; - private MrngCheckBox chkLogErrorMsgs; - private MrngCheckBox chkLogWarningMsgs; - private MrngCheckBox chkLogInfoMsgs; - private MrngCheckBox chkLogDebugMsgs; - private MrngButton buttonOpenLogFile; - private MrngButton buttonRestoreDefaultLogPath; - private MrngCheckBox chkPopupError; - private Controls.MrngLabel labelPopupShowTypes; - private MrngCheckBox chkPopupWarning; - private MrngCheckBox chkPopupDebug; - private MrngCheckBox chkPopupInfo; - private MrngCheckBox chkLogToCurrentDir; - private System.Windows.Forms.TableLayoutPanel tblLogging; - private System.Windows.Forms.TableLayoutPanel tblPopups; - private MrngGroupBox groupBoxNotifications; - private MrngGroupBox groupBoxLogging; - private MrngGroupBox groupBoxPopups; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.cs b/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.cs deleted file mode 100644 index c3bcdb6bd..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.cs +++ /dev/null @@ -1,167 +0,0 @@ -using System.Diagnostics; -using System.IO; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class NotificationsPage - { - public NotificationsPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.LogError_16x); - } - - public override string PageName - { - get => Language.Notifications; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - // notifications panel - groupBoxNotifications.Text = Language.Notifications; - labelNotificationsShowTypes.Text = Language.ShowTheseMessageTypes; - chkShowDebugInMC.Text = Language.Debug; - chkShowInfoInMC.Text = Language.Informations; - chkShowWarningInMC.Text = Language.Warnings; - chkShowErrorInMC.Text = Language.Errors; - labelSwitchToErrorsAndInfos.Text = Language.SwitchToErrorsAndInfos; - chkSwitchToMCInformation.Text = Language.Informations; - chkSwitchToMCWarnings.Text = Language.Warnings; - chkSwitchToMCErrors.Text = Language.Errors; - - // logging - groupBoxLogging.Text = Language.Logging; - chkLogDebugMsgs.Text = Language.Debug; - chkLogInfoMsgs.Text = Language.Informations; - chkLogWarningMsgs.Text = Language.Warnings; - chkLogErrorMsgs.Text = Language.Errors; - chkLogToCurrentDir.Text = Language.LogToAppDir; - labelLogFilePath.Text = Language.LogFilePath; - labelLogTheseMsgTypes.Text = Language.LogTheseMessageTypes; - buttonOpenLogFile.Text = Language.OpenFile; - buttonSelectLogPath.Text = Language.ChoosePath; - buttonRestoreDefaultLogPath.Text = Language.UseDefault; - - // popups - groupBoxPopups.Text = Language.Popups; - labelPopupShowTypes.Text = Language.ShowTheseMessageTypes; - chkPopupDebug.Text = Language.Debug; - chkPopupInfo.Text = Language.Informations; - chkPopupWarning.Text = Language.Warnings; - chkPopupError.Text = Language.Errors; - } - - public override void LoadSettings() - { - LoadNotificationPanelSettings(); - LoadLoggingSettings(); - LoadPopupSettings(); - } - - public override void SaveSettings() - { - SaveNotificationPanelSettings(); - SaveLoggingSettings(); - SavePopupSettings(); - } - - private void LoadNotificationPanelSettings() - { - chkShowDebugInMC.Checked = Settings.Default.NotificationPanelWriterWriteDebugMsgs; - chkShowInfoInMC.Checked = Settings.Default.NotificationPanelWriterWriteInfoMsgs; - chkShowWarningInMC.Checked = Settings.Default.NotificationPanelWriterWriteWarningMsgs; - chkShowErrorInMC.Checked = Settings.Default.NotificationPanelWriterWriteErrorMsgs; - chkSwitchToMCInformation.Checked = Settings.Default.SwitchToMCOnInformation; - chkSwitchToMCWarnings.Checked = Settings.Default.SwitchToMCOnWarning; - chkSwitchToMCErrors.Checked = Settings.Default.SwitchToMCOnError; - } - - private void LoadLoggingSettings() - { - chkLogToCurrentDir.Checked = Settings.Default.LogToApplicationDirectory; - textBoxLogPath.Text = Settings.Default.LogFilePath; - chkLogDebugMsgs.Checked = Settings.Default.TextLogMessageWriterWriteDebugMsgs; - chkLogInfoMsgs.Checked = Settings.Default.TextLogMessageWriterWriteInfoMsgs; - chkLogWarningMsgs.Checked = Settings.Default.TextLogMessageWriterWriteWarningMsgs; - chkLogErrorMsgs.Checked = Settings.Default.TextLogMessageWriterWriteErrorMsgs; - } - - private void LoadPopupSettings() - { - chkPopupDebug.Checked = Settings.Default.PopupMessageWriterWriteDebugMsgs; - chkPopupInfo.Checked = Settings.Default.PopupMessageWriterWriteInfoMsgs; - chkPopupWarning.Checked = Settings.Default.PopupMessageWriterWriteWarningMsgs; - chkPopupError.Checked = Settings.Default.PopupMessageWriterWriteErrorMsgs; - } - - private void SaveNotificationPanelSettings() - { - Settings.Default.NotificationPanelWriterWriteDebugMsgs = chkShowDebugInMC.Checked; - Settings.Default.NotificationPanelWriterWriteInfoMsgs = chkShowInfoInMC.Checked; - Settings.Default.NotificationPanelWriterWriteWarningMsgs = chkShowWarningInMC.Checked; - Settings.Default.NotificationPanelWriterWriteErrorMsgs = chkShowErrorInMC.Checked; - Settings.Default.SwitchToMCOnInformation = chkSwitchToMCInformation.Checked; - Settings.Default.SwitchToMCOnWarning = chkSwitchToMCWarnings.Checked; - Settings.Default.SwitchToMCOnError = chkSwitchToMCErrors.Checked; - } - - private void SaveLoggingSettings() - { - Settings.Default.LogToApplicationDirectory = chkLogToCurrentDir.Checked; - Settings.Default.LogFilePath = textBoxLogPath.Text; - Logger.Instance.SetLogPath(Settings.Default.LogFilePath); - Settings.Default.TextLogMessageWriterWriteDebugMsgs = chkLogDebugMsgs.Checked; - Settings.Default.TextLogMessageWriterWriteInfoMsgs = chkLogInfoMsgs.Checked; - Settings.Default.TextLogMessageWriterWriteWarningMsgs = chkLogWarningMsgs.Checked; - Settings.Default.TextLogMessageWriterWriteErrorMsgs = chkLogErrorMsgs.Checked; - } - - private void SavePopupSettings() - { - Settings.Default.PopupMessageWriterWriteDebugMsgs = chkPopupDebug.Checked; - Settings.Default.PopupMessageWriterWriteInfoMsgs = chkPopupInfo.Checked; - Settings.Default.PopupMessageWriterWriteWarningMsgs = chkPopupWarning.Checked; - Settings.Default.PopupMessageWriterWriteErrorMsgs = chkPopupError.Checked; - } - - private void buttonSelectLogPath_Click(object sender, System.EventArgs e) - { - var currentFile = textBoxLogPath.Text; - var currentDirectory = Path.GetDirectoryName(currentFile); - saveFileDialogLogging.Title = Language.ChooseLogPath; - saveFileDialogLogging.Filter = @"Log file|*.log"; - saveFileDialogLogging.InitialDirectory = currentDirectory; - saveFileDialogLogging.FileName = currentFile; - var dialogResult = saveFileDialogLogging.ShowDialog(); - if (dialogResult != DialogResult.OK) return; - textBoxLogPath.Text = saveFileDialogLogging.FileName; - } - - private void buttonRestoreDefaultLogPath_Click(object sender, System.EventArgs e) - { - textBoxLogPath.Text = Logger.DefaultLogPath; - } - - private void buttonOpenLogFile_Click(object sender, System.EventArgs e) - { - if (Path.GetExtension(textBoxLogPath.Text) == ".log") - Process.Start(textBoxLogPath.Text); - } - - private void chkLogToCurrentDir_CheckedChanged(object sender, System.EventArgs e) - { - buttonSelectLogPath.Enabled = !chkLogToCurrentDir.Checked; - buttonRestoreDefaultLogPath.Enabled = !chkLogToCurrentDir.Checked; - textBoxLogPath.Text = Logger.DefaultLogPath; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.resx b/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.resx deleted file mode 100644 index 5324ee22c..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/NotificationsPage.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.cs b/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.cs deleted file mode 100644 index 8360424a4..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.Themes; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public class OptionsPage : UserControl - { - protected OptionsPage() - { - InitializeComponent(); - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - } - - #region Public Properties - - // ReSharper disable once UnusedAutoPropertyAccessor.Global - [Browsable(false)] public virtual string PageName { get; set; } - - public virtual Icon PageIcon { get; protected set; } - public virtual Image IconImage => PageIcon?.ToBitmap(); - - #endregion - - #region Public Methods - - public virtual void ApplyLanguage() - { - } - - public virtual void LoadSettings() - { - } - - public virtual void SaveSettings() - { - } - - public virtual void RevertSettings() - { - } - - #endregion - - protected virtual void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) return; - BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - Invalidate(); - } - - private void InitializeComponent() - { - SuspendLayout(); - // - // OptionsPage - // - AutoScaleDimensions = new SizeF(96F, 96F); - AutoScaleMode = AutoScaleMode.Dpi; - Font = new Font("Segoe UI", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0); - Name = "OptionsPage"; - ResumeLayout(false); - } - } - internal class DropdownList - { - public int Index { get; set; } - public string DisplayString { get; set; } - - public DropdownList(int argIndex, string argDisplay) - { - Index = argIndex; - DisplayString = argDisplay; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.resx b/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/OptionsPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.Designer.cs deleted file mode 100644 index dbe6986af..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.Designer.cs +++ /dev/null @@ -1,223 +0,0 @@ -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - sealed partial class SecurityPage - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.chkEncryptCompleteFile = new MrngCheckBox(); - this.comboBoxEncryptionEngine = new MrngComboBox(); - this.labelEncryptionEngine = new mRemoteNG.UI.Controls.MrngLabel(); - this.labelBlockCipher = new mRemoteNG.UI.Controls.MrngLabel(); - this.comboBoxBlockCipher = new MrngComboBox(); - this.groupAdvancedSecurityOptions = new MrngGroupBox(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.btnTestSettings = new MrngButton(); - this.labelKdfIterations = new mRemoteNG.UI.Controls.MrngLabel(); - this.numberBoxKdfIterations = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.groupAdvancedSecurityOptions.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numberBoxKdfIterations)).BeginInit(); - this.SuspendLayout(); - // - // chkEncryptCompleteFile - // - this.chkEncryptCompleteFile._mice = MrngCheckBox.MouseState.OUT; - this.chkEncryptCompleteFile.AutoSize = true; - this.chkEncryptCompleteFile.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkEncryptCompleteFile.Location = new System.Drawing.Point(3, 3); - this.chkEncryptCompleteFile.Name = "chkEncryptCompleteFile"; - this.chkEncryptCompleteFile.Size = new System.Drawing.Size(194, 17); - this.chkEncryptCompleteFile.TabIndex = 0; - this.chkEncryptCompleteFile.Text = "Encrypt complete connection file"; - this.chkEncryptCompleteFile.UseVisualStyleBackColor = true; - // - // comboBoxEncryptionEngine - // - this.comboBoxEncryptionEngine._mice = MrngComboBox.MouseState.HOVER; - this.comboBoxEncryptionEngine.Dock = System.Windows.Forms.DockStyle.Fill; - this.comboBoxEncryptionEngine.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxEncryptionEngine.FormattingEnabled = true; - this.comboBoxEncryptionEngine.Location = new System.Drawing.Point(190, 3); - this.comboBoxEncryptionEngine.Name = "comboBoxEncryptionEngine"; - this.comboBoxEncryptionEngine.Size = new System.Drawing.Size(131, 21); - this.comboBoxEncryptionEngine.Sorted = true; - this.comboBoxEncryptionEngine.TabIndex = 1; - // - // labelEncryptionEngine - // - this.labelEncryptionEngine.AutoSize = true; - this.labelEncryptionEngine.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelEncryptionEngine.Location = new System.Drawing.Point(3, 0); - this.labelEncryptionEngine.Name = "labelEncryptionEngine"; - this.labelEncryptionEngine.Size = new System.Drawing.Size(181, 27); - this.labelEncryptionEngine.TabIndex = 0; - this.labelEncryptionEngine.Text = "Encryption Engine"; - this.labelEncryptionEngine.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // labelBlockCipher - // - this.labelBlockCipher.AutoSize = true; - this.labelBlockCipher.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelBlockCipher.Location = new System.Drawing.Point(3, 27); - this.labelBlockCipher.Name = "labelBlockCipher"; - this.labelBlockCipher.Size = new System.Drawing.Size(181, 27); - this.labelBlockCipher.TabIndex = 2; - this.labelBlockCipher.Text = "Block Cipher Mode"; - this.labelBlockCipher.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // comboBoxBlockCipher - // - this.comboBoxBlockCipher._mice = MrngComboBox.MouseState.HOVER; - this.comboBoxBlockCipher.Dock = System.Windows.Forms.DockStyle.Fill; - this.comboBoxBlockCipher.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBoxBlockCipher.FormattingEnabled = true; - this.comboBoxBlockCipher.Location = new System.Drawing.Point(190, 30); - this.comboBoxBlockCipher.Name = "comboBoxBlockCipher"; - this.comboBoxBlockCipher.Size = new System.Drawing.Size(131, 21); - this.comboBoxBlockCipher.TabIndex = 2; - // - // groupAdvancedSecurityOptions - // - this.groupAdvancedSecurityOptions.Controls.Add(this.tableLayoutPanel1); - this.groupAdvancedSecurityOptions.Location = new System.Drawing.Point(3, 30); - this.groupAdvancedSecurityOptions.Name = "groupAdvancedSecurityOptions"; - this.groupAdvancedSecurityOptions.Size = new System.Drawing.Size(604, 134); - this.groupAdvancedSecurityOptions.TabIndex = 1; - this.groupAdvancedSecurityOptions.TabStop = false; - this.groupAdvancedSecurityOptions.Text = "Advanced Security Options"; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.AutoSize = true; - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.Controls.Add(this.labelKdfIterations, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.numberBoxKdfIterations, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.labelBlockCipher, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.comboBoxEncryptionEngine, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.labelEncryptionEngine, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.comboBoxBlockCipher, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.btnTestSettings, 1, 3); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Left; - this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 18); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 4; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(324, 113); - this.tableLayoutPanel1.TabIndex = 2; - // - // btnTestSettings - // - this.btnTestSettings._mice = MrngButton.MouseState.OUT; - this.btnTestSettings.AutoSize = true; - this.btnTestSettings.Dock = System.Windows.Forms.DockStyle.Right; - this.btnTestSettings.Location = new System.Drawing.Point(240, 85); - this.btnTestSettings.Name = "btnTestSettings"; - this.btnTestSettings.Size = new System.Drawing.Size(81, 25); - this.btnTestSettings.TabIndex = 4; - this.btnTestSettings.Text = "Test Settings"; - this.btnTestSettings.UseVisualStyleBackColor = true; - this.btnTestSettings.Click += new System.EventHandler(this.BtnTestSettings_Click); - // - // labelKdfIterations - // - this.labelKdfIterations.AutoSize = true; - this.labelKdfIterations.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelKdfIterations.Location = new System.Drawing.Point(3, 54); - this.labelKdfIterations.Name = "labelKdfIterations"; - this.labelKdfIterations.Size = new System.Drawing.Size(181, 28); - this.labelKdfIterations.TabIndex = 4; - this.labelKdfIterations.Text = "Key Derivation Function Iterations"; - this.labelKdfIterations.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // numberBoxKdfIterations - // - this.numberBoxKdfIterations.Dock = System.Windows.Forms.DockStyle.Fill; - this.numberBoxKdfIterations.Increment = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numberBoxKdfIterations.Location = new System.Drawing.Point(190, 57); - this.numberBoxKdfIterations.Maximum = new decimal(new int[] { - 50000, - 0, - 0, - 0}); - this.numberBoxKdfIterations.Minimum = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - this.numberBoxKdfIterations.Name = "numberBoxKdfIterations"; - this.numberBoxKdfIterations.Size = new System.Drawing.Size(131, 22); - this.numberBoxKdfIterations.TabIndex = 3; - this.numberBoxKdfIterations.ThousandsSeparator = true; - this.numberBoxKdfIterations.Value = new decimal(new int[] { - 1000, - 0, - 0, - 0}); - // - // SecurityPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.chkEncryptCompleteFile); - this.Controls.Add(this.groupAdvancedSecurityOptions); - this.Name = "SecurityPage"; - this.Size = new System.Drawing.Size(610, 490); - this.groupAdvancedSecurityOptions.ResumeLayout(false); - this.groupAdvancedSecurityOptions.PerformLayout(); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numberBoxKdfIterations)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - internal MrngCheckBox chkEncryptCompleteFile; - private MrngComboBox comboBoxEncryptionEngine; - private Controls.MrngLabel labelEncryptionEngine; - private Controls.MrngLabel labelBlockCipher; - private MrngComboBox comboBoxBlockCipher; - private MrngGroupBox groupAdvancedSecurityOptions; - private Controls.MrngNumericUpDown numberBoxKdfIterations; - private Controls.MrngLabel labelKdfIterations; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private MrngButton btnTestSettings; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.cs b/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.cs deleted file mode 100644 index f11cc2b80..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; -using mRemoteNG.Properties; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class SecurityPage : OptionsPage - { - public SecurityPage() - { - InitializeComponent(); - PopulateEncryptionEngineDropDown(); - PopulateBlockCipherDropDown(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Lock_16x); - } - - [Browsable(false)] - public override string PageName - { - get => Language.TabSecurity; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - chkEncryptCompleteFile.Text = Language.EncryptCompleteConnectionFile; - labelBlockCipher.Text = Language.EncryptionBlockCipherMode; - labelEncryptionEngine.Text = Language.EncryptionEngine; - labelKdfIterations.Text = Language.EncryptionKeyDerivationIterations; - groupAdvancedSecurityOptions.Text = Language.AdvancedSecurityOptions; - btnTestSettings.Text = Language.TestSettings; - } - - public override void LoadSettings() - { - chkEncryptCompleteFile.Checked = Settings.Default.EncryptCompleteConnectionsFile; - comboBoxEncryptionEngine.Text = Enum.GetName(typeof(BlockCipherEngines), Settings.Default.EncryptionEngine); - comboBoxBlockCipher.Text = - Enum.GetName(typeof(BlockCipherModes), Settings.Default.EncryptionBlockCipherMode); - numberBoxKdfIterations.Value = Settings.Default.EncryptionKeyDerivationIterations; - } - - public override void SaveSettings() - { - Settings.Default.EncryptCompleteConnectionsFile = chkEncryptCompleteFile.Checked; - Settings.Default.EncryptionEngine = (BlockCipherEngines)comboBoxEncryptionEngine.SelectedItem; - Settings.Default.EncryptionBlockCipherMode = (BlockCipherModes)comboBoxBlockCipher.SelectedItem; - Settings.Default.EncryptionKeyDerivationIterations = (int)numberBoxKdfIterations.Value; - } - - public override void RevertSettings() - { - } - - private void PopulateEncryptionEngineDropDown() - { - comboBoxEncryptionEngine.DataSource = Enum.GetValues(typeof(BlockCipherEngines)); - } - - private void PopulateBlockCipherDropDown() - { - comboBoxBlockCipher.DataSource = Enum.GetValues(typeof(BlockCipherModes)); - } - - private void BtnTestSettings_Click(object sender, EventArgs e) - { - var connectionTree = Runtime.ConnectionsService.ConnectionTreeModel; - if (!connectionTree.RootNodes.Any()) - return; - - var engine = (BlockCipherEngines) comboBoxEncryptionEngine.SelectedItem; - var mode = (BlockCipherModes) comboBoxBlockCipher.SelectedItem; - var cryptographyProvider = new CryptoProviderFactory(engine, mode).Build(); - cryptographyProvider.KeyDerivationIterations = (int) numberBoxKdfIterations.Value; - - var serializerFactory = new XmlConnectionSerializerFactory(); - var serializer = serializerFactory.Build(cryptographyProvider, connectionTree, useFullEncryption: chkEncryptCompleteFile.Checked); - var nodeCount = connectionTree.GetRecursiveChildList().Count; - - var timer = Stopwatch.StartNew(); - var rootNode = connectionTree.RootNodes.First(); - serializer.Serialize(rootNode); - timer.Stop(); - - MessageBox.Show(this, - string.Format(Language.EncryptionTestResultMessage, - nodeCount, engine, mode, numberBoxKdfIterations.Value, timer.Elapsed.TotalSeconds), - Language.EncryptionTest, - MessageBoxButtons.OK, - MessageBoxIcon.Information); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.resx b/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/SecurityPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.Designer.cs deleted file mode 100644 index 123b1d76d..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.Designer.cs +++ /dev/null @@ -1,327 +0,0 @@ - - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class SqlServerPage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - } - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()] - private void InitializeComponent() - { - this.lblSQLDatabaseName = new mRemoteNG.UI.Controls.MrngLabel(); - this.txtSQLDatabaseName = new mRemoteNG.UI.Controls.MrngTextBox(); - this.lblExperimental = new mRemoteNG.UI.Controls.MrngLabel(); - this.chkUseSQLServer = new MrngCheckBox(); - this.lblSQLUsername = new mRemoteNG.UI.Controls.MrngLabel(); - this.txtSQLPassword = new mRemoteNG.UI.Controls.MrngTextBox(); - this.lblSQLInfo = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblSQLServer = new mRemoteNG.UI.Controls.MrngLabel(); - this.txtSQLUsername = new mRemoteNG.UI.Controls.MrngTextBox(); - this.txtSQLServer = new mRemoteNG.UI.Controls.MrngTextBox(); - this.lblSQLPassword = new mRemoteNG.UI.Controls.MrngLabel(); - this.btnTestConnection = new MrngButton(); - this.imgConnectionStatus = new System.Windows.Forms.PictureBox(); - this.lblTestConnectionResults = new mRemoteNG.UI.Controls.MrngLabel(); - this.chkSQLReadOnly = new MrngCheckBox(); - this.lblSQLReadOnly = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblSQLType = new mRemoteNG.UI.Controls.MrngLabel(); - this.txtSQLType = new MrngComboBox(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - ((System.ComponentModel.ISupportInitialize)(this.imgConnectionStatus)).BeginInit(); - this.tableLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // lblSQLDatabaseName - // - this.lblSQLDatabaseName.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblSQLDatabaseName.Enabled = false; - this.lblSQLDatabaseName.Location = new System.Drawing.Point(3, 52); - this.lblSQLDatabaseName.Name = "lblSQLDatabaseName"; - this.lblSQLDatabaseName.Size = new System.Drawing.Size(154, 26); - this.lblSQLDatabaseName.TabIndex = 5; - this.lblSQLDatabaseName.Text = "Database:"; - this.lblSQLDatabaseName.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // txtSQLDatabaseName - // - this.txtSQLDatabaseName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtSQLDatabaseName.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtSQLDatabaseName.Enabled = false; - this.txtSQLDatabaseName.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSQLDatabaseName.Location = new System.Drawing.Point(163, 55); - this.txtSQLDatabaseName.Name = "txtSQLDatabaseName"; - this.txtSQLDatabaseName.Size = new System.Drawing.Size(235, 22); - this.txtSQLDatabaseName.TabIndex = 6; - // - // lblExperimental - // - this.lblExperimental.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblExperimental.Font = new System.Drawing.Font("Segoe UI", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.lblExperimental.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.lblExperimental.Location = new System.Drawing.Point(3, 0); - this.lblExperimental.Name = "lblExperimental"; - this.lblExperimental.Size = new System.Drawing.Size(596, 26); - this.lblExperimental.TabIndex = 0; - this.lblExperimental.Text = "EXPERIMENTAL"; - this.lblExperimental.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // chkUseSQLServer - // - this.chkUseSQLServer._mice = MrngCheckBox.MouseState.OUT; - this.chkUseSQLServer.AutoSize = true; - this.chkUseSQLServer.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkUseSQLServer.Location = new System.Drawing.Point(3, 76); - this.chkUseSQLServer.Name = "chkUseSQLServer"; - this.chkUseSQLServer.Size = new System.Drawing.Size(244, 17); - this.chkUseSQLServer.TabIndex = 2; - this.chkUseSQLServer.Text = "Use SQL Server to load && save connections"; - this.chkUseSQLServer.UseVisualStyleBackColor = true; - this.chkUseSQLServer.CheckedChanged += new System.EventHandler(this.chkUseSQLServer_CheckedChanged); - // - // lblSQLUsername - // - this.lblSQLUsername.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblSQLUsername.Enabled = false; - this.lblSQLUsername.Location = new System.Drawing.Point(3, 78); - this.lblSQLUsername.Name = "lblSQLUsername"; - this.lblSQLUsername.Size = new System.Drawing.Size(154, 26); - this.lblSQLUsername.TabIndex = 7; - this.lblSQLUsername.Text = "Username:"; - this.lblSQLUsername.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // txtSQLPassword - // - this.txtSQLPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtSQLPassword.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtSQLPassword.Enabled = false; - this.txtSQLPassword.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSQLPassword.Location = new System.Drawing.Point(163, 107); - this.txtSQLPassword.Name = "txtSQLPassword"; - this.txtSQLPassword.Size = new System.Drawing.Size(235, 22); - this.txtSQLPassword.TabIndex = 10; - this.txtSQLPassword.UseSystemPasswordChar = true; - // - // lblSQLInfo - // - this.lblSQLInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblSQLInfo.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World); - this.lblSQLInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); - this.lblSQLInfo.Location = new System.Drawing.Point(3, 25); - this.lblSQLInfo.Name = "lblSQLInfo"; - this.lblSQLInfo.Size = new System.Drawing.Size(596, 26); - this.lblSQLInfo.TabIndex = 1; - this.lblSQLInfo.Text = "Please see Help - Getting started - SQL Configuration for more Info!"; - this.lblSQLInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // lblSQLServer - // - this.lblSQLServer.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblSQLServer.Enabled = false; - this.lblSQLServer.Location = new System.Drawing.Point(3, 26); - this.lblSQLServer.Name = "lblSQLServer"; - this.lblSQLServer.Size = new System.Drawing.Size(154, 26); - this.lblSQLServer.TabIndex = 3; - this.lblSQLServer.Text = "SQL Server:"; - this.lblSQLServer.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // txtSQLUsername - // - this.txtSQLUsername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtSQLUsername.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtSQLUsername.Enabled = false; - this.txtSQLUsername.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSQLUsername.Location = new System.Drawing.Point(163, 81); - this.txtSQLUsername.Name = "txtSQLUsername"; - this.txtSQLUsername.Size = new System.Drawing.Size(235, 22); - this.txtSQLUsername.TabIndex = 8; - // - // txtSQLServer - // - this.txtSQLServer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtSQLServer.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtSQLServer.Enabled = false; - this.txtSQLServer.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSQLServer.Location = new System.Drawing.Point(163, 29); - this.txtSQLServer.Name = "txtSQLServer"; - this.txtSQLServer.Size = new System.Drawing.Size(235, 22); - this.txtSQLServer.TabIndex = 4; - // - // lblSQLPassword - // - this.lblSQLPassword.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblSQLPassword.Enabled = false; - this.lblSQLPassword.Location = new System.Drawing.Point(3, 104); - this.lblSQLPassword.Name = "lblSQLPassword"; - this.lblSQLPassword.Size = new System.Drawing.Size(154, 26); - this.lblSQLPassword.TabIndex = 9; - this.lblSQLPassword.Text = "Password:"; - this.lblSQLPassword.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // btnTestConnection - // - this.btnTestConnection._mice = MrngButton.MouseState.OUT; - this.btnTestConnection.Enabled = false; - this.btnTestConnection.Location = new System.Drawing.Point(3, 267); - this.btnTestConnection.Name = "btnTestConnection"; - this.btnTestConnection.Size = new System.Drawing.Size(153, 25); - this.btnTestConnection.TabIndex = 11; - this.btnTestConnection.Text = "Test Connection"; - this.btnTestConnection.UseVisualStyleBackColor = true; - this.btnTestConnection.Click += new System.EventHandler(this.btnTestConnection_Click); - // - // imgConnectionStatus - // - this.imgConnectionStatus.Image = global::mRemoteNG.Properties.Resources.F1Help_16x; - this.imgConnectionStatus.Location = new System.Drawing.Point(162, 272); - this.imgConnectionStatus.Name = "imgConnectionStatus"; - this.imgConnectionStatus.Size = new System.Drawing.Size(16, 16); - this.imgConnectionStatus.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.imgConnectionStatus.TabIndex = 12; - this.imgConnectionStatus.TabStop = false; - // - // lblTestConnectionResults - // - this.lblTestConnectionResults.AutoSize = true; - this.lblTestConnectionResults.Location = new System.Drawing.Point(3, 295); - this.lblTestConnectionResults.Name = "lblTestConnectionResults"; - this.lblTestConnectionResults.Size = new System.Drawing.Size(125, 13); - this.lblTestConnectionResults.TabIndex = 13; - this.lblTestConnectionResults.Text = "Test connection details"; - // - // chkSQLReadOnly - // - this.chkSQLReadOnly._mice = MrngCheckBox.MouseState.OUT; - this.chkSQLReadOnly.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.chkSQLReadOnly.AutoSize = true; - this.chkSQLReadOnly.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSQLReadOnly.Location = new System.Drawing.Point(163, 133); - this.chkSQLReadOnly.Name = "chkSQLReadOnly"; - this.chkSQLReadOnly.Size = new System.Drawing.Size(15, 20); - this.chkSQLReadOnly.TabIndex = 14; - this.chkSQLReadOnly.UseVisualStyleBackColor = true; - // - // lblSQLReadOnly - // - this.lblSQLReadOnly.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblSQLReadOnly.Enabled = false; - this.lblSQLReadOnly.Location = new System.Drawing.Point(3, 130); - this.lblSQLReadOnly.Name = "lblSQLReadOnly"; - this.lblSQLReadOnly.Size = new System.Drawing.Size(154, 26); - this.lblSQLReadOnly.TabIndex = 15; - this.lblSQLReadOnly.Text = "Read Only:"; - this.lblSQLReadOnly.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // lblSQLType - // - this.lblSQLType.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblSQLType.Enabled = false; - this.lblSQLType.Location = new System.Drawing.Point(3, 0); - this.lblSQLType.Name = "lblSQLType"; - this.lblSQLType.Size = new System.Drawing.Size(154, 26); - this.lblSQLType.TabIndex = 20; - this.lblSQLType.Text = "SQL Server Type:"; - this.lblSQLType.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // txtSQLType - // - this.txtSQLType._mice = MrngComboBox.MouseState.HOVER; - this.txtSQLType.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtSQLType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.txtSQLType.FormattingEnabled = true; - this.txtSQLType.Items.AddRange(new object[] { - "mssql", - "mysql"}); - this.txtSQLType.Location = new System.Drawing.Point(163, 3); - this.txtSQLType.Name = "txtSQLType"; - this.txtSQLType.Size = new System.Drawing.Size(235, 21); - this.txtSQLType.TabIndex = 21; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 2; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Controls.Add(this.lblSQLType, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.txtSQLType, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.lblSQLServer, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.chkSQLReadOnly, 1, 5); - this.tableLayoutPanel1.Controls.Add(this.lblSQLReadOnly, 0, 5); - this.tableLayoutPanel1.Controls.Add(this.lblSQLDatabaseName, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.txtSQLDatabaseName, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.lblSQLUsername, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.lblSQLPassword, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.txtSQLServer, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.txtSQLPassword, 1, 4); - this.tableLayoutPanel1.Controls.Add(this.txtSQLUsername, 1, 3); - this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 99); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 7; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(401, 162); - this.tableLayoutPanel1.TabIndex = 22; - // - // SqlServerPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.tableLayoutPanel1); - this.Controls.Add(this.lblTestConnectionResults); - this.Controls.Add(this.imgConnectionStatus); - this.Controls.Add(this.btnTestConnection); - this.Controls.Add(this.lblExperimental); - this.Controls.Add(this.chkUseSQLServer); - this.Controls.Add(this.lblSQLInfo); - this.Margin = new System.Windows.Forms.Padding(4); - this.Name = "SqlServerPage"; - this.Size = new System.Drawing.Size(610, 490); - ((System.ComponentModel.ISupportInitialize)(this.imgConnectionStatus)).EndInit(); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - internal Controls.MrngLabel lblSQLDatabaseName; - internal Controls.MrngTextBox txtSQLDatabaseName; - internal Controls.MrngLabel lblExperimental; - internal MrngCheckBox chkUseSQLServer; - internal Controls.MrngLabel lblSQLUsername; - internal Controls.MrngTextBox txtSQLPassword; - internal Controls.MrngLabel lblSQLInfo; - internal Controls.MrngLabel lblSQLServer; - internal Controls.MrngTextBox txtSQLUsername; - internal Controls.MrngTextBox txtSQLServer; - internal Controls.MrngLabel lblSQLPassword; - private MrngButton btnTestConnection; - private System.Windows.Forms.PictureBox imgConnectionStatus; - private Controls.MrngLabel lblTestConnectionResults; - private MrngCheckBox chkSQLReadOnly; - internal Controls.MrngLabel lblSQLReadOnly; - internal Controls.MrngLabel lblSQLType; - private MrngComboBox txtSQLType; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.cs b/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.cs deleted file mode 100644 index b5118bf78..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.cs +++ /dev/null @@ -1,178 +0,0 @@ -using System; -using mRemoteNG.App; -using mRemoteNG.Config.Connections.Multiuser; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Properties; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class SqlServerPage - { - private readonly DatabaseConnectionTester _databaseConnectionTester; - - public SqlServerPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.SQLDatabase_16x); - _databaseConnectionTester = new DatabaseConnectionTester(); - } - - public override string PageName - { - get => Language.SQLServer.TrimEnd(':'); - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - lblExperimental.Text = Language.Experimental.ToUpper(); - lblSQLInfo.Text = Language.SQLInfo; - - chkUseSQLServer.Text = Language.UseSQLServer; - lblSQLServer.Text = Language.Hostname; - lblSQLDatabaseName.Text = Language.Database; - lblSQLUsername.Text = Language.Username; - lblSQLPassword.Text = Language.Password; - lblSQLReadOnly.Text = Language.ReadOnly; - btnTestConnection.Text = Language.TestConnection; - } - - public override void LoadSettings() - { - chkUseSQLServer.Checked = Settings.Default.UseSQLServer; - txtSQLType.Text = Settings.Default.SQLServerType; - txtSQLServer.Text = Settings.Default.SQLHost; - txtSQLDatabaseName.Text = Settings.Default.SQLDatabaseName; - txtSQLUsername.Text = Settings.Default.SQLUser; - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - txtSQLPassword.Text = cryptographyProvider.Decrypt(Settings.Default.SQLPass, Runtime.EncryptionKey); - chkSQLReadOnly.Checked = Settings.Default.SQLReadOnly; - lblTestConnectionResults.Text = ""; - } - - public override void SaveSettings() - { - base.SaveSettings(); - var sqlServerWasPreviouslyEnabled = Settings.Default.UseSQLServer; - - Settings.Default.UseSQLServer = chkUseSQLServer.Checked; - Settings.Default.SQLServerType = txtSQLType.Text; - Settings.Default.SQLHost = txtSQLServer.Text; - Settings.Default.SQLDatabaseName = txtSQLDatabaseName.Text; - Settings.Default.SQLUser = txtSQLUsername.Text; - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - Settings.Default.SQLPass = cryptographyProvider.Encrypt(txtSQLPassword.Text, Runtime.EncryptionKey); - Settings.Default.SQLReadOnly = chkSQLReadOnly.Checked; - - if (Settings.Default.UseSQLServer) - ReinitializeSqlUpdater(); - else if (!Settings.Default.UseSQLServer && sqlServerWasPreviouslyEnabled) - DisableSql(); - } - - private static void ReinitializeSqlUpdater() - { - Runtime.ConnectionsService.RemoteConnectionsSyncronizer?.Dispose(); - Runtime.ConnectionsService.RemoteConnectionsSyncronizer = - new RemoteConnectionsSyncronizer(new SqlConnectionsUpdateChecker()); - Runtime.ConnectionsService.LoadConnections(true, false, ""); - } - - private void DisableSql() - { - Runtime.ConnectionsService.RemoteConnectionsSyncronizer?.Dispose(); - Runtime.ConnectionsService.RemoteConnectionsSyncronizer = null; - Runtime.LoadConnections(true); - } - - private void chkUseSQLServer_CheckedChanged(object sender, EventArgs e) - { - toggleSQLPageControls(chkUseSQLServer.Checked); - } - - private void toggleSQLPageControls(bool useSQLServer) - { - lblSQLType.Enabled = useSQLServer; - lblSQLServer.Enabled = useSQLServer; - lblSQLDatabaseName.Enabled = useSQLServer; - lblSQLUsername.Enabled = useSQLServer; - lblSQLPassword.Enabled = useSQLServer; - lblSQLReadOnly.Enabled = useSQLServer; - txtSQLType.Enabled = useSQLServer; - txtSQLServer.Enabled = useSQLServer; - txtSQLDatabaseName.Enabled = useSQLServer; - txtSQLUsername.Enabled = useSQLServer; - txtSQLPassword.Enabled = useSQLServer; - chkSQLReadOnly.Enabled = useSQLServer; - btnTestConnection.Enabled = useSQLServer; - } - - private async void btnTestConnection_Click(object sender, EventArgs e) - { - var type = txtSQLType.Text; - var server = txtSQLServer.Text; - var database = txtSQLDatabaseName.Text; - var username = txtSQLUsername.Text; - var password = txtSQLPassword.Text; - - lblTestConnectionResults.Text = Language.TestingConnection; - imgConnectionStatus.Image = Properties.Resources.Loading_Spinner; - btnTestConnection.Enabled = false; - - var connectionTestResult = - await _databaseConnectionTester.TestConnectivity(type, server, database, username, password); - - btnTestConnection.Enabled = true; - - switch (connectionTestResult) - { - case ConnectionTestResult.ConnectionSucceded: - UpdateConnectionImage(true); - lblTestConnectionResults.Text = Language.ConnectionSuccessful; - break; - case ConnectionTestResult.ServerNotAccessible: - UpdateConnectionImage(false); - lblTestConnectionResults.Text = - BuildTestFailedMessage(string.Format(Language.ServerNotAccessible, server)); - break; - case ConnectionTestResult.CredentialsRejected: - UpdateConnectionImage(false); - lblTestConnectionResults.Text = - BuildTestFailedMessage(string.Format(Language.LoginFailedForUser, username)); - break; - case ConnectionTestResult.UnknownDatabase: - UpdateConnectionImage(false); - lblTestConnectionResults.Text = - BuildTestFailedMessage(string.Format(Language.DatabaseNotAvailable, database)); - break; - case ConnectionTestResult.UnknownError: - UpdateConnectionImage(false); - lblTestConnectionResults.Text = BuildTestFailedMessage(Language.RdpErrorUnknown); - break; - default: - UpdateConnectionImage(false); - lblTestConnectionResults.Text = BuildTestFailedMessage(Language.RdpErrorUnknown); - break; - } - } - - private void UpdateConnectionImage(bool connectionSuccess) - { - imgConnectionStatus.Image = connectionSuccess - ? Properties.Resources.Test_16x - : Properties.Resources.LogError_16x; - } - - private string BuildTestFailedMessage(string specificMessage) - { - return Language.ConnectionOpenFailed + - Environment.NewLine + - specificMessage; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.resx b/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/SqlServerPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.Designer.cs deleted file mode 100644 index 3b4e7cec2..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.Designer.cs +++ /dev/null @@ -1,127 +0,0 @@ - - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class StartupExitPage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()] - private void InitializeComponent() - { - this.chkReconnectOnStart = new mRemoteNG.UI.Controls.MrngCheckBox(); - this.chkSaveConsOnExit = new mRemoteNG.UI.Controls.MrngCheckBox(); - this.chkSingleInstance = new mRemoteNG.UI.Controls.MrngCheckBox(); - this.chkStartMinimized = new mRemoteNG.UI.Controls.MrngCheckBox(); - this.chkStartFullScreen = new mRemoteNG.UI.Controls.MrngCheckBox(); - this.SuspendLayout(); - // - // chkReconnectOnStart - // - this.chkReconnectOnStart._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT; - this.chkReconnectOnStart.AutoSize = true; - this.chkReconnectOnStart.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkReconnectOnStart.Location = new System.Drawing.Point(3, 26); - this.chkReconnectOnStart.Name = "chkReconnectOnStart"; - this.chkReconnectOnStart.Size = new System.Drawing.Size(295, 17); - this.chkReconnectOnStart.TabIndex = 1; - this.chkReconnectOnStart.Text = "Reconnect to previously opened sessions on startup"; - this.chkReconnectOnStart.UseVisualStyleBackColor = true; - // - // chkSaveConsOnExit - // - this.chkSaveConsOnExit._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT; - this.chkSaveConsOnExit.AutoSize = true; - this.chkSaveConsOnExit.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSaveConsOnExit.Location = new System.Drawing.Point(3, 2); - this.chkSaveConsOnExit.Name = "chkSaveConsOnExit"; - this.chkSaveConsOnExit.Size = new System.Drawing.Size(153, 17); - this.chkSaveConsOnExit.TabIndex = 0; - this.chkSaveConsOnExit.Text = "Save connections on exit"; - this.chkSaveConsOnExit.UseVisualStyleBackColor = true; - // - // chkSingleInstance - // - this.chkSingleInstance._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT; - this.chkSingleInstance.AutoSize = true; - this.chkSingleInstance.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSingleInstance.Location = new System.Drawing.Point(3, 50); - this.chkSingleInstance.Name = "chkSingleInstance"; - this.chkSingleInstance.Size = new System.Drawing.Size(404, 17); - this.chkSingleInstance.TabIndex = 2; - this.chkSingleInstance.Text = "Allow only a single instance of the application (mRemote restart required)"; - this.chkSingleInstance.UseVisualStyleBackColor = true; - // - // chkStartMinimized - // - this.chkStartMinimized._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT; - this.chkStartMinimized.AutoSize = true; - this.chkStartMinimized.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkStartMinimized.Location = new System.Drawing.Point(3, 73); - this.chkStartMinimized.Name = "chkStartMinimized"; - this.chkStartMinimized.Size = new System.Drawing.Size(105, 17); - this.chkStartMinimized.TabIndex = 3; - this.chkStartMinimized.Text = "Start minimized"; - this.chkStartMinimized.UseVisualStyleBackColor = true; - this.chkStartMinimized.CheckedChanged += new System.EventHandler(this.chkStartMinimized_CheckedChanged); - // - // chkStartFullScreen - // - this.chkStartFullScreen._mice = mRemoteNG.UI.Controls.MrngCheckBox.MouseState.OUT; - this.chkStartFullScreen.AutoSize = true; - this.chkStartFullScreen.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkStartFullScreen.Location = new System.Drawing.Point(3, 96); - this.chkStartFullScreen.Name = "chkStartFullScreen"; - this.chkStartFullScreen.Size = new System.Drawing.Size(109, 17); - this.chkStartFullScreen.TabIndex = 4; - this.chkStartFullScreen.Text = "Start Full Screen"; - this.chkStartFullScreen.UseVisualStyleBackColor = true; - this.chkStartFullScreen.CheckedChanged += new System.EventHandler(this.chkStartFullScreen_CheckedChanged); - // - // StartupExitPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.chkStartFullScreen); - this.Controls.Add(this.chkReconnectOnStart); - this.Controls.Add(this.chkSaveConsOnExit); - this.Controls.Add(this.chkSingleInstance); - this.Controls.Add(this.chkStartMinimized); - this.Name = "StartupExitPage"; - this.Size = new System.Drawing.Size(610, 490); - this.Load += new System.EventHandler(this.StartupExitPage_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - internal MrngCheckBox chkReconnectOnStart; - internal MrngCheckBox chkSaveConsOnExit; - internal MrngCheckBox chkSingleInstance; - internal MrngCheckBox chkStartMinimized; - internal MrngCheckBox chkStartFullScreen; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.cs b/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.cs deleted file mode 100644 index 836dbcb88..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class StartupExitPage - { - public StartupExitPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.StartupProject_16x); - } - - public override string PageName - { - get => Language.StartupExit; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - chkReconnectOnStart.Text = Language.ReconnectAtStartup; - chkSingleInstance.Text = Language.AllowOnlySingleInstance; - chkStartMinimized.Text = Language.StartMinimized; - } - - public override void SaveSettings() - { - base.SaveSettings(); - - Settings.Default.OpenConsFromLastSession = chkReconnectOnStart.Checked; - Settings.Default.SingleInstance = chkSingleInstance.Checked; - Settings.Default.StartMinimized = chkStartMinimized.Checked; - Settings.Default.StartFullScreen = chkStartFullScreen.Checked; - } - - private void StartupExitPage_Load(object sender, EventArgs e) - { - chkReconnectOnStart.Checked = Settings.Default.OpenConsFromLastSession; - chkSingleInstance.Checked = Settings.Default.SingleInstance; - chkStartMinimized.Checked = Settings.Default.StartMinimized; - chkStartFullScreen.Checked = Settings.Default.StartFullScreen; - ; - } - - private void chkStartFullScreen_CheckedChanged(object sender, EventArgs e) - { - if (chkStartFullScreen.Checked && chkStartMinimized.Checked) - { - chkStartMinimized.Checked = false; - } - } - - private void chkStartMinimized_CheckedChanged(object sender, EventArgs e) - { - if (chkStartMinimized.Checked && chkStartFullScreen.Checked) - { - chkStartFullScreen.Checked = false; - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.resx b/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/StartupExitPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.Designer.cs deleted file mode 100644 index 404aecb99..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.Designer.cs +++ /dev/null @@ -1,208 +0,0 @@ -using mRemoteNG.UI.Controls; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class TabsPanelsPage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()] - private void InitializeComponent() - { - this.chkAlwaysShowPanelTabs = new MrngCheckBox(); - this.chkAlwaysShowConnectionTabs = new MrngCheckBox(); - this.chkIdentifyQuickConnectTabs = new MrngCheckBox(); - this.chkOpenNewTabRightOfSelected = new MrngCheckBox(); - this.chkAlwaysShowPanelSelectionDlg = new MrngCheckBox(); - this.chkShowLogonInfoOnTabs = new MrngCheckBox(); - this.chkDoubleClickClosesTab = new MrngCheckBox(); - this.chkShowProtocolOnTabs = new MrngCheckBox(); - this.chkCreateEmptyPanelOnStart = new MrngCheckBox(); - this.txtBoxPanelName = new mRemoteNG.UI.Controls.MrngTextBox(); - this.lblPanelName = new mRemoteNG.UI.Controls.MrngLabel(); - this.SuspendLayout(); - // - // chkAlwaysShowPanelTabs - // - this.chkAlwaysShowPanelTabs._mice = MrngCheckBox.MouseState.OUT; - this.chkAlwaysShowPanelTabs.AutoSize = true; - this.chkAlwaysShowPanelTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkAlwaysShowPanelTabs.Location = new System.Drawing.Point(3, 3); - this.chkAlwaysShowPanelTabs.Name = "chkAlwaysShowPanelTabs"; - this.chkAlwaysShowPanelTabs.Size = new System.Drawing.Size(149, 17); - this.chkAlwaysShowPanelTabs.TabIndex = 0; - this.chkAlwaysShowPanelTabs.Text = "Always show panel tabs"; - this.chkAlwaysShowPanelTabs.UseVisualStyleBackColor = true; - // - // chkAlwaysShowConnectionTabs - // - this.chkAlwaysShowConnectionTabs._mice = MrngCheckBox.MouseState.OUT; - this.chkAlwaysShowConnectionTabs.AutoSize = true; - this.chkAlwaysShowConnectionTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkAlwaysShowConnectionTabs.Location = new System.Drawing.Point(3, 26); - this.chkAlwaysShowConnectionTabs.Name = "chkAlwaysShowConnectionTabs"; - this.chkAlwaysShowConnectionTabs.Size = new System.Drawing.Size(178, 17); - this.chkAlwaysShowConnectionTabs.TabIndex = 0; - this.chkAlwaysShowConnectionTabs.Text = "Always show connection tabs"; - this.chkAlwaysShowConnectionTabs.UseVisualStyleBackColor = true; - this.chkAlwaysShowConnectionTabs.Visible = false; - // - // chkIdentifyQuickConnectTabs - // - this.chkIdentifyQuickConnectTabs._mice = MrngCheckBox.MouseState.OUT; - this.chkIdentifyQuickConnectTabs.AutoSize = true; - this.chkIdentifyQuickConnectTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkIdentifyQuickConnectTabs.Location = new System.Drawing.Point(3, 118); - this.chkIdentifyQuickConnectTabs.Name = "chkIdentifyQuickConnectTabs"; - this.chkIdentifyQuickConnectTabs.Size = new System.Drawing.Size(315, 17); - this.chkIdentifyQuickConnectTabs.TabIndex = 4; - this.chkIdentifyQuickConnectTabs.Text = Language.IdentifyQuickConnectTabs; - this.chkIdentifyQuickConnectTabs.UseVisualStyleBackColor = true; - // - // chkOpenNewTabRightOfSelected - // - this.chkOpenNewTabRightOfSelected._mice = MrngCheckBox.MouseState.OUT; - this.chkOpenNewTabRightOfSelected.AutoSize = true; - this.chkOpenNewTabRightOfSelected.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkOpenNewTabRightOfSelected.Location = new System.Drawing.Point(3, 49); - this.chkOpenNewTabRightOfSelected.Name = "chkOpenNewTabRightOfSelected"; - this.chkOpenNewTabRightOfSelected.Size = new System.Drawing.Size(309, 17); - this.chkOpenNewTabRightOfSelected.TabIndex = 1; - this.chkOpenNewTabRightOfSelected.Text = "Open new tab to the right of the currently selected tab"; - this.chkOpenNewTabRightOfSelected.UseVisualStyleBackColor = true; - // - // chkAlwaysShowPanelSelectionDlg - // - this.chkAlwaysShowPanelSelectionDlg._mice = MrngCheckBox.MouseState.OUT; - this.chkAlwaysShowPanelSelectionDlg.AutoSize = true; - this.chkAlwaysShowPanelSelectionDlg.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkAlwaysShowPanelSelectionDlg.Location = new System.Drawing.Point(3, 164); - this.chkAlwaysShowPanelSelectionDlg.Name = "chkAlwaysShowPanelSelectionDlg"; - this.chkAlwaysShowPanelSelectionDlg.Size = new System.Drawing.Size(347, 17); - this.chkAlwaysShowPanelSelectionDlg.TabIndex = 6; - this.chkAlwaysShowPanelSelectionDlg.Text = "Always show panel selection dialog when opening connectins"; - this.chkAlwaysShowPanelSelectionDlg.UseVisualStyleBackColor = true; - // - // chkShowLogonInfoOnTabs - // - this.chkShowLogonInfoOnTabs._mice = MrngCheckBox.MouseState.OUT; - this.chkShowLogonInfoOnTabs.AutoSize = true; - this.chkShowLogonInfoOnTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowLogonInfoOnTabs.Location = new System.Drawing.Point(3, 72); - this.chkShowLogonInfoOnTabs.Name = "chkShowLogonInfoOnTabs"; - this.chkShowLogonInfoOnTabs.Size = new System.Drawing.Size(226, 17); - this.chkShowLogonInfoOnTabs.TabIndex = 2; - this.chkShowLogonInfoOnTabs.Text = "Show logon information on tab names"; - this.chkShowLogonInfoOnTabs.UseVisualStyleBackColor = true; - // - // chkDoubleClickClosesTab - // - this.chkDoubleClickClosesTab._mice = MrngCheckBox.MouseState.OUT; - this.chkDoubleClickClosesTab.AutoSize = true; - this.chkDoubleClickClosesTab.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkDoubleClickClosesTab.Location = new System.Drawing.Point(3, 141); - this.chkDoubleClickClosesTab.Name = "chkDoubleClickClosesTab"; - this.chkDoubleClickClosesTab.Size = new System.Drawing.Size(170, 17); - this.chkDoubleClickClosesTab.TabIndex = 5; - this.chkDoubleClickClosesTab.Text = "Double click on tab closes it"; - this.chkDoubleClickClosesTab.UseVisualStyleBackColor = true; - // - // chkShowProtocolOnTabs - // - this.chkShowProtocolOnTabs._mice = MrngCheckBox.MouseState.OUT; - this.chkShowProtocolOnTabs.AutoSize = true; - this.chkShowProtocolOnTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkShowProtocolOnTabs.Location = new System.Drawing.Point(3, 95); - this.chkShowProtocolOnTabs.Name = "chkShowProtocolOnTabs"; - this.chkShowProtocolOnTabs.Size = new System.Drawing.Size(180, 17); - this.chkShowProtocolOnTabs.TabIndex = 3; - this.chkShowProtocolOnTabs.Text = "Show protocols on tab names"; - this.chkShowProtocolOnTabs.UseVisualStyleBackColor = true; - // - // chkCreateEmptyPanelOnStart - // - this.chkCreateEmptyPanelOnStart._mice = MrngCheckBox.MouseState.OUT; - this.chkCreateEmptyPanelOnStart.AutoSize = true; - this.chkCreateEmptyPanelOnStart.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkCreateEmptyPanelOnStart.Location = new System.Drawing.Point(3, 187); - this.chkCreateEmptyPanelOnStart.Name = "chkCreateEmptyPanelOnStart"; - this.chkCreateEmptyPanelOnStart.Size = new System.Drawing.Size(271, 17); - this.chkCreateEmptyPanelOnStart.TabIndex = 7; - this.chkCreateEmptyPanelOnStart.Text = "Create an empty panel when mRemoteNG starts"; - this.chkCreateEmptyPanelOnStart.UseVisualStyleBackColor = true; - this.chkCreateEmptyPanelOnStart.CheckedChanged += new System.EventHandler(this.chkCreateEmptyPanelOnStart_CheckedChanged); - // - // txtBoxPanelName - // - this.txtBoxPanelName.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtBoxPanelName.Location = new System.Drawing.Point(35, 223); - this.txtBoxPanelName.Name = "txtBoxPanelName"; - this.txtBoxPanelName.Size = new System.Drawing.Size(213, 22); - this.txtBoxPanelName.TabIndex = 8; - // - // lblPanelName - // - this.lblPanelName.AutoSize = true; - this.lblPanelName.Location = new System.Drawing.Point(32, 207); - this.lblPanelName.Name = "lblPanelName"; - this.lblPanelName.Size = new System.Drawing.Size(69, 13); - this.lblPanelName.TabIndex = 9; - this.lblPanelName.Text = "Panel name:"; - // - // TabsPanelsPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.lblPanelName); - this.Controls.Add(this.txtBoxPanelName); - this.Controls.Add(this.chkCreateEmptyPanelOnStart); - this.Controls.Add(this.chkAlwaysShowPanelTabs); - this.Controls.Add(this.chkAlwaysShowConnectionTabs); - this.Controls.Add(this.chkIdentifyQuickConnectTabs); - this.Controls.Add(this.chkOpenNewTabRightOfSelected); - this.Controls.Add(this.chkAlwaysShowPanelSelectionDlg); - this.Controls.Add(this.chkShowLogonInfoOnTabs); - this.Controls.Add(this.chkDoubleClickClosesTab); - this.Controls.Add(this.chkShowProtocolOnTabs); - this.Name = "TabsPanelsPage"; - this.Size = new System.Drawing.Size(610, 490); - this.ResumeLayout(false); - this.PerformLayout(); - - } - internal MrngCheckBox chkAlwaysShowPanelTabs; - internal MrngCheckBox chkAlwaysShowConnectionTabs; - internal MrngCheckBox chkIdentifyQuickConnectTabs; - internal MrngCheckBox chkOpenNewTabRightOfSelected; - internal MrngCheckBox chkAlwaysShowPanelSelectionDlg; - internal MrngCheckBox chkShowLogonInfoOnTabs; - internal MrngCheckBox chkDoubleClickClosesTab; - internal MrngCheckBox chkShowProtocolOnTabs; - private MrngCheckBox chkCreateEmptyPanelOnStart; - private Controls.MrngTextBox txtBoxPanelName; - private Controls.MrngLabel lblPanelName; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.cs b/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.cs deleted file mode 100644 index c89997945..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.cs +++ /dev/null @@ -1,80 +0,0 @@ -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class TabsPanelsPage - { - public TabsPanelsPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Tab_16x); - } - - public override string PageName - { - get => Language.TabsAndPanels.Replace("&&", "&"); - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - chkAlwaysShowPanelTabs.Text = Language.AlwaysShowPanelTabs; - chkAlwaysShowConnectionTabs.Text = Language.AlwaysShowConnectionTabs; - chkOpenNewTabRightOfSelected.Text = Language.OpenNewTabRight; - chkShowLogonInfoOnTabs.Text = Language.ShowLogonInfoOnTabs; - chkShowProtocolOnTabs.Text = Language.ShowProtocolOnTabs; - chkIdentifyQuickConnectTabs.Text = Language.IdentifyQuickConnectTabs; - chkDoubleClickClosesTab.Text = Language.DoubleClickTabClosesIt; - chkAlwaysShowPanelSelectionDlg.Text = Language.AlwaysShowPanelSelection; - chkCreateEmptyPanelOnStart.Text = Language.CreateEmptyPanelOnStartUp; - lblPanelName.Text = $@"{Language.PanelName}:"; - } - - public override void LoadSettings() - { - chkAlwaysShowPanelTabs.Checked = Settings.Default.AlwaysShowPanelTabs; - chkAlwaysShowConnectionTabs.Checked = Settings.Default.AlwaysShowConnectionTabs; - chkOpenNewTabRightOfSelected.Checked = Settings.Default.OpenTabsRightOfSelected; - chkShowLogonInfoOnTabs.Checked = Settings.Default.ShowLogonInfoOnTabs; - chkShowProtocolOnTabs.Checked = Settings.Default.ShowProtocolOnTabs; - chkIdentifyQuickConnectTabs.Checked = Settings.Default.IdentifyQuickConnectTabs; - chkDoubleClickClosesTab.Checked = Settings.Default.DoubleClickOnTabClosesIt; - chkAlwaysShowPanelSelectionDlg.Checked = Settings.Default.AlwaysShowPanelSelectionDlg; - chkCreateEmptyPanelOnStart.Checked = Settings.Default.CreateEmptyPanelOnStartUp; - txtBoxPanelName.Text = Settings.Default.StartUpPanelName; - UpdatePanelNameTextBox(); - } - - public override void SaveSettings() - { - base.SaveSettings(); - - Settings.Default.AlwaysShowPanelTabs = chkAlwaysShowPanelTabs.Checked; - Settings.Default.AlwaysShowConnectionTabs = chkAlwaysShowConnectionTabs.Checked; - FrmMain.Default.ShowHidePanelTabs(); - - Settings.Default.OpenTabsRightOfSelected = chkOpenNewTabRightOfSelected.Checked; - Settings.Default.ShowLogonInfoOnTabs = chkShowLogonInfoOnTabs.Checked; - Settings.Default.ShowProtocolOnTabs = chkShowProtocolOnTabs.Checked; - Settings.Default.IdentifyQuickConnectTabs = chkIdentifyQuickConnectTabs.Checked; - Settings.Default.DoubleClickOnTabClosesIt = chkDoubleClickClosesTab.Checked; - Settings.Default.AlwaysShowPanelSelectionDlg = chkAlwaysShowPanelSelectionDlg.Checked; - Settings.Default.CreateEmptyPanelOnStartUp = chkCreateEmptyPanelOnStart.Checked; - Settings.Default.StartUpPanelName = txtBoxPanelName.Text; - } - - private void UpdatePanelNameTextBox() - { - txtBoxPanelName.Enabled = chkCreateEmptyPanelOnStart.Checked; - } - - private void chkCreateEmptyPanelOnStart_CheckedChanged(object sender, System.EventArgs e) - { - UpdatePanelNameTextBox(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.resx b/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/TabsPanelsPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/ThemePage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/ThemePage.Designer.cs deleted file mode 100644 index 363bfd634..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/ThemePage.Designer.cs +++ /dev/null @@ -1,219 +0,0 @@ - - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class ThemePage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() - { - this.btnThemeDelete = new MrngButton(); - this.btnThemeNew = new MrngButton(); - this.cboTheme = new MrngComboBox(); - this.listPalette = new mRemoteNG.UI.Controls.MrngListView(); - this.keyCol = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.ColorCol = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.ColorNameCol = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.labelRestart = new mRemoteNG.UI.Controls.MrngLabel(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.tlpMain = new System.Windows.Forms.TableLayoutPanel(); - ((System.ComponentModel.ISupportInitialize)(this.listPalette)).BeginInit(); - this.tableLayoutPanel1.SuspendLayout(); - this.tableLayoutPanel2.SuspendLayout(); - this.tlpMain.SuspendLayout(); - this.SuspendLayout(); - // - // btnThemeDelete - // - this.btnThemeDelete._mice = MrngButton.MouseState.OUT; - this.btnThemeDelete.Dock = System.Windows.Forms.DockStyle.Fill; - this.btnThemeDelete.Location = new System.Drawing.Point(507, 3); - this.btnThemeDelete.Name = "btnThemeDelete"; - this.btnThemeDelete.Size = new System.Drawing.Size(94, 23); - this.btnThemeDelete.TabIndex = 2; - this.btnThemeDelete.Text = "&Delete"; - this.btnThemeDelete.UseVisualStyleBackColor = true; - this.btnThemeDelete.Click += new System.EventHandler(this.btnThemeDelete_Click); - // - // btnThemeNew - // - this.btnThemeNew._mice = MrngButton.MouseState.OUT; - this.btnThemeNew.Dock = System.Windows.Forms.DockStyle.Fill; - this.btnThemeNew.Location = new System.Drawing.Point(407, 3); - this.btnThemeNew.Name = "btnThemeNew"; - this.btnThemeNew.Size = new System.Drawing.Size(94, 23); - this.btnThemeNew.TabIndex = 1; - this.btnThemeNew.Text = "&New"; - this.btnThemeNew.UseVisualStyleBackColor = true; - this.btnThemeNew.Click += new System.EventHandler(this.btnThemeNew_Click); - // - // cboTheme - // - this.cboTheme._mice = MrngComboBox.MouseState.HOVER; - this.cboTheme.Dock = System.Windows.Forms.DockStyle.Fill; - this.cboTheme.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboTheme.FormattingEnabled = true; - this.cboTheme.Location = new System.Drawing.Point(3, 3); - this.cboTheme.Name = "cboTheme"; - this.cboTheme.Size = new System.Drawing.Size(398, 21); - this.cboTheme.TabIndex = 0; - this.cboTheme.SelectionChangeCommitted += new System.EventHandler(this.cboTheme_SelectionChangeCommitted); - // - // listPalette - // - this.listPalette.AllColumns.Add(this.keyCol); - this.listPalette.AllColumns.Add(this.ColorCol); - this.listPalette.AllColumns.Add(this.ColorNameCol); - this.listPalette.CellEditUseWholeCell = false; - this.listPalette.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.keyCol, - this.ColorCol, - this.ColorNameCol}); - this.listPalette.Cursor = System.Windows.Forms.Cursors.Default; - this.listPalette.DecorateLines = true; - this.listPalette.Dock = System.Windows.Forms.DockStyle.Fill; - this.listPalette.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.listPalette.HideSelection = false; - this.listPalette.Location = new System.Drawing.Point(3, 37); - this.listPalette.Name = "listPalette"; - this.listPalette.ShowGroups = false; - this.listPalette.Size = new System.Drawing.Size(604, 416); - this.listPalette.TabIndex = 3; - this.listPalette.UseCellFormatEvents = true; - this.listPalette.UseCompatibleStateImageBehavior = false; - this.listPalette.View = System.Windows.Forms.View.Details; - // - // keyCol - // - this.keyCol.AspectName = "Key"; - this.keyCol.IsEditable = false; - this.keyCol.Text = "Element"; - this.keyCol.Width = 262; - // - // ColorCol - // - this.ColorCol.Sortable = false; - this.ColorCol.Text = "Color"; - this.ColorCol.Width = 45; - // - // ColorNameCol - // - this.ColorNameCol.AspectName = "Value"; - this.ColorNameCol.Sortable = false; - this.ColorNameCol.Text = "Color Name"; - this.ColorNameCol.Width = 265; - // - // labelRestart - // - this.labelRestart.AutoSize = true; - this.labelRestart.Dock = System.Windows.Forms.DockStyle.Fill; - this.labelRestart.Location = new System.Drawing.Point(3, 0); - this.labelRestart.Name = "labelRestart"; - this.labelRestart.Size = new System.Drawing.Size(598, 28); - this.labelRestart.TabIndex = 4; - this.labelRestart.Text = "Warning: Restart is required..."; - this.labelRestart.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 3; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 100F)); - this.tableLayoutPanel1.Controls.Add(this.cboTheme, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.btnThemeNew, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.btnThemeDelete, 2, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 1; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(604, 28); - this.tableLayoutPanel1.TabIndex = 6; - // - // tableLayoutPanel2 - // - this.tableLayoutPanel2.ColumnCount = 1; - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel2.Controls.Add(this.labelRestart, 0, 0); - this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 459); - this.tableLayoutPanel2.Name = "tableLayoutPanel2"; - this.tableLayoutPanel2.RowCount = 1; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(604, 28); - this.tableLayoutPanel2.TabIndex = 7; - // - // tlpMain - // - this.tlpMain.ColumnCount = 1; - this.tlpMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tlpMain.Controls.Add(this.tableLayoutPanel2, 0, 2); - this.tlpMain.Controls.Add(this.tableLayoutPanel1, 0, 0); - this.tlpMain.Controls.Add(this.listPalette, 0, 1); - this.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill; - this.tlpMain.Location = new System.Drawing.Point(0, 0); - this.tlpMain.Name = "tlpMain"; - this.tlpMain.RowCount = 3; - this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tlpMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34F)); - this.tlpMain.Size = new System.Drawing.Size(610, 490); - this.tlpMain.TabIndex = 8; - // - // ThemePage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.Controls.Add(this.tlpMain); - this.Name = "ThemePage"; - this.Size = new System.Drawing.Size(610, 490); - ((System.ComponentModel.ISupportInitialize)(this.listPalette)).EndInit(); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel2.ResumeLayout(false); - this.tableLayoutPanel2.PerformLayout(); - this.tlpMain.ResumeLayout(false); - this.ResumeLayout(false); - - } - internal MrngButton btnThemeDelete; - internal MrngButton btnThemeNew; - internal MrngComboBox cboTheme; - private Controls.MrngListView listPalette; - private Controls.MrngLabel labelRestart; - private BrightIdeasSoftware.OLVColumn keyCol; - private BrightIdeasSoftware.OLVColumn ColorCol; - private BrightIdeasSoftware.OLVColumn ColorNameCol; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - private System.Windows.Forms.TableLayoutPanel tlpMain; - } -} diff --git a/mRemoteNG/UI/Forms/OptionsPages/ThemePage.cs b/mRemoteNG/UI/Forms/OptionsPages/ThemePage.cs deleted file mode 100644 index 6266db90b..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/ThemePage.cs +++ /dev/null @@ -1,222 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.Themes; -using System.Linq; -using System.Collections.Generic; -using BrightIdeasSoftware; -using mRemoteNG.Properties; -using mRemoteNG.UI.TaskDialog; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class ThemePage - { - #region Private Fields - - private readonly ThemeManager _themeManager; - private readonly bool _oriActiveTheming; - private readonly List modifiedThemes = new List(); - - #endregion - - public ThemePage() - { - InitializeComponent(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.AppearanceEditor_16x); - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ThemingActive) return; - _themeManager = ThemeManager.getInstance(); - _themeManager.ThemeChanged += ApplyTheme; - _oriActiveTheming = _themeManager.ThemingActive; - } - - public override string PageName - { - get => Language.Theme; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - btnThemeDelete.Text = Language._Delete; - btnThemeNew.Text = Language._New; - labelRestart.Text = Language.OptionsThemeChangeWarning; - } - - private new void ApplyTheme() - { - if (!_themeManager.ThemingActive) - return; - base.ApplyTheme(); - } - - public override void LoadSettings() - { - //At first we cannot create or delete themes, depends later on the type of selected theme - btnThemeNew.Enabled = false; - btnThemeDelete.Enabled = false; - //Load the list of themes - cboTheme.Items.Clear(); - // ReSharper disable once CoVariantArrayConversion - cboTheme.Items.AddRange(_themeManager.LoadThemes().OrderBy(x => x.Name).ToArray()); - cboTheme.SelectedItem = _themeManager.ActiveTheme; - cboTheme_SelectionChangeCommitted(this, new EventArgs()); - cboTheme.DisplayMember = "Name"; - - listPalette.FormatCell += ListPalette_FormatCell; //Color cell formatter - } - - private void ListPalette_FormatCell(object sender, FormatCellEventArgs e) - { - if (e.ColumnIndex != ColorCol.Index) return; - var colorElem = (PseudoKeyColor)e.Model; - e.SubItem.BackColor = colorElem.Value; - } - - - public override void SaveSettings() - { - base.SaveSettings(); - - Settings.Default.ThemingActive = true; - - // Save the theme settings form close so we don't run into unexpected results while modifying... - // Prompt the user that a restart is required to apply the new theme... - if (cboTheme.SelectedItem != null - ) // LoadSettings calls SaveSettings, so these might be null the first time around - { - if (!Settings.Default.ThemeName.Equals(((ThemeInfo)cboTheme.SelectedItem).Name)) - { - Settings.Default.ThemeName = ((ThemeInfo)cboTheme.SelectedItem).Name; - - CTaskDialog.MessageBox("Theme Changed", "Restart Required.", - "Please restart mRemoteNG to apply the selected theme.", - ETaskDialogButtons.Ok, ESysIcons.Information); - } - } - - foreach (var updatedTheme in modifiedThemes) - { - _themeManager.updateTheme(updatedTheme); - } - } - - public override void RevertSettings() - { - base.RevertSettings(); - _themeManager.ThemingActive = _oriActiveTheming; - } - - #region Private Methods - - #region Event Handlers - - private void cboTheme_SelectionChangeCommitted(object sender, EventArgs e) - { - btnThemeNew.Enabled = false; - btnThemeDelete.Enabled = false; - - // don't display listPalette if it's not an Extendable theme... - listPalette.CellClick -= ListPalette_CellClick; - listPalette.Enabled = false; - listPalette.Visible = false; - - if (!_themeManager.ThemingActive) return; - - btnThemeNew.Enabled = true; - - var selectedTheme = (ThemeInfo)cboTheme.SelectedItem; - - if (selectedTheme != null && selectedTheme.IsExtendable) - { - // it's Extendable, so now we can do this more expensive operations... - listPalette.ClearObjects(); - ColorMeList(selectedTheme); - listPalette.Enabled = true; - listPalette.Visible = true; - listPalette.CellClick += ListPalette_CellClick; - } - - if (selectedTheme != null && selectedTheme.IsThemeBase) return; - - btnThemeDelete.Enabled = true; - } - - /// - /// Edit an object, since KeyValuePair value cannot be set without creating a new object, a parallel object model exist in the list - /// besides the one in the active theme, so any modification must be done to the two models - /// - /// - /// - private void ListPalette_CellClick(object sender, CellClickEventArgs e) - { - var colorElem = (PseudoKeyColor)e.Model; - - var colorDlg = new ColorDialog - { - AllowFullOpen = true, - FullOpen = true, - AnyColor = true, - SolidColorOnly = false, - Color = colorElem.Value - }; - - if (colorDlg.ShowDialog() != DialogResult.OK) return; - modifiedThemes.Add(_themeManager.ActiveTheme); - _themeManager.ActiveTheme.ExtendedPalette.replaceColor(colorElem.Key, colorDlg.Color); - colorElem.Value = colorDlg.Color; - listPalette.RefreshObject(e.Model); - _themeManager.refreshUI(); - } - - private void ColorMeList(ThemeInfo ti) - { - foreach (var colorElem in ti.ExtendedPalette.ExtColorPalette) - listPalette.AddObject(new PseudoKeyColor(colorElem.Key, colorElem.Value)); - } - - private void btnThemeNew_Click(object sender, EventArgs e) - { - using (var frmInputBox = new FrmInputBox(Language.OptionsThemeNewThemeCaption, - Language.OptionsThemeNewThemeText, - _themeManager.ActiveTheme.Name)) - { - var dr = frmInputBox.ShowDialog(); - if (dr != DialogResult.OK) return; - if (_themeManager.isThemeNameOk(frmInputBox.returnValue)) - { - var addedTheme = _themeManager.addTheme(_themeManager.ActiveTheme, frmInputBox.returnValue); - _themeManager.ActiveTheme = addedTheme; - LoadSettings(); - } - else - { - CTaskDialog.ShowTaskDialogBox(this, Language.Errors, Language.OptionsThemeNewThemeError, "", - "", "", "", "", "", ETaskDialogButtons.Ok, ESysIcons.Error, - ESysIcons.Information, 0); - } - } - } - - private void btnThemeDelete_Click(object sender, EventArgs e) - { - var res = CTaskDialog.ShowTaskDialogBox(this, Language.Warnings, - Language.OptionsThemeDeleteConfirmation, "", "", "", "", "", "", - ETaskDialogButtons.YesNo, - ESysIcons.Question, ESysIcons.Information, 0); - - if (res != DialogResult.Yes) return; - if (modifiedThemes.Contains(_themeManager.ActiveTheme)) - modifiedThemes.Remove(_themeManager.ActiveTheme); - _themeManager.deleteTheme(_themeManager.ActiveTheme); - LoadSettings(); - } - - #endregion - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/ThemePage.resx b/mRemoteNG/UI/Forms/OptionsPages/ThemePage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/ThemePage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.Designer.cs deleted file mode 100644 index 6fe7fbc9c..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.Designer.cs +++ /dev/null @@ -1,383 +0,0 @@ - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - - public sealed partial class UpdatesPage : OptionsPage - { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() - { - this.lblUpdatesExplanation = new mRemoteNG.UI.Controls.MrngLabel(); - this.pnlUpdateCheck = new System.Windows.Forms.Panel(); - this.btnUpdateCheckNow = new MrngButton(); - this.chkCheckForUpdatesOnStartup = new MrngCheckBox(); - this.cboUpdateCheckFrequency = new MrngComboBox(); - this.lblReleaseChannelExplanation = new mRemoteNG.UI.Controls.MrngTextBox(); - this.cboReleaseChannel = new MrngComboBox(); - this.pnlProxy = new System.Windows.Forms.Panel(); - this.tblProxyBasic = new System.Windows.Forms.TableLayoutPanel(); - this.numProxyPort = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.lblProxyAddress = new mRemoteNG.UI.Controls.MrngLabel(); - this.txtProxyAddress = new mRemoteNG.UI.Controls.MrngTextBox(); - this.lblProxyPort = new mRemoteNG.UI.Controls.MrngLabel(); - this.tblProxyAuthentication = new System.Windows.Forms.TableLayoutPanel(); - this.lblProxyPassword = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblProxyUsername = new mRemoteNG.UI.Controls.MrngLabel(); - this.txtProxyUsername = new mRemoteNG.UI.Controls.MrngTextBox(); - this.txtProxyPassword = new mRemoteNG.UI.Controls.MrngTextBox(); - this.chkUseProxyForAutomaticUpdates = new MrngCheckBox(); - this.chkUseProxyAuthentication = new MrngCheckBox(); - this.btnTestProxy = new MrngButton(); - this.groupBoxReleaseChannel = new MrngGroupBox(); - this.pnlUpdateCheck.SuspendLayout(); - this.pnlProxy.SuspendLayout(); - this.tblProxyBasic.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numProxyPort)).BeginInit(); - this.tblProxyAuthentication.SuspendLayout(); - this.groupBoxReleaseChannel.SuspendLayout(); - this.SuspendLayout(); - // - // lblUpdatesExplanation - // - this.lblUpdatesExplanation.Location = new System.Drawing.Point(3, 3); - this.lblUpdatesExplanation.Name = "lblUpdatesExplanation"; - this.lblUpdatesExplanation.Size = new System.Drawing.Size(595, 32); - this.lblUpdatesExplanation.TabIndex = 0; - this.lblUpdatesExplanation.Text = "mRemoteNG can periodically connect to the mRemoteNG website to check for updates." + - ""; - // - // pnlUpdateCheck - // - this.pnlUpdateCheck.Controls.Add(this.btnUpdateCheckNow); - this.pnlUpdateCheck.Controls.Add(this.chkCheckForUpdatesOnStartup); - this.pnlUpdateCheck.Controls.Add(this.cboUpdateCheckFrequency); - this.pnlUpdateCheck.Location = new System.Drawing.Point(3, 38); - this.pnlUpdateCheck.Name = "pnlUpdateCheck"; - this.pnlUpdateCheck.Size = new System.Drawing.Size(604, 99); - this.pnlUpdateCheck.TabIndex = 1; - // - // btnUpdateCheckNow - // - this.btnUpdateCheckNow._mice = MrngButton.MouseState.OUT; - this.btnUpdateCheckNow.Location = new System.Drawing.Point(5, 63); - this.btnUpdateCheckNow.Name = "btnUpdateCheckNow"; - this.btnUpdateCheckNow.Size = new System.Drawing.Size(122, 25); - this.btnUpdateCheckNow.TabIndex = 2; - this.btnUpdateCheckNow.Text = "Check Now"; - this.btnUpdateCheckNow.UseVisualStyleBackColor = true; - this.btnUpdateCheckNow.Click += new System.EventHandler(this.btnUpdateCheckNow_Click); - // - // chkCheckForUpdatesOnStartup - // - this.chkCheckForUpdatesOnStartup._mice = MrngCheckBox.MouseState.OUT; - this.chkCheckForUpdatesOnStartup.AutoSize = true; - this.chkCheckForUpdatesOnStartup.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkCheckForUpdatesOnStartup.Location = new System.Drawing.Point(6, 11); - this.chkCheckForUpdatesOnStartup.Name = "chkCheckForUpdatesOnStartup"; - this.chkCheckForUpdatesOnStartup.Size = new System.Drawing.Size(120, 17); - this.chkCheckForUpdatesOnStartup.TabIndex = 0; - this.chkCheckForUpdatesOnStartup.Text = "Check for updates"; - this.chkCheckForUpdatesOnStartup.UseVisualStyleBackColor = true; - this.chkCheckForUpdatesOnStartup.CheckedChanged += new System.EventHandler(this.chkCheckForUpdatesOnStartup_CheckedChanged); - // - // cboUpdateCheckFrequency - // - this.cboUpdateCheckFrequency._mice = MrngComboBox.MouseState.HOVER; - this.cboUpdateCheckFrequency.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboUpdateCheckFrequency.FormattingEnabled = true; - this.cboUpdateCheckFrequency.Location = new System.Drawing.Point(6, 34); - this.cboUpdateCheckFrequency.Name = "cboUpdateCheckFrequency"; - this.cboUpdateCheckFrequency.Size = new System.Drawing.Size(120, 21); - this.cboUpdateCheckFrequency.TabIndex = 1; - // - // lblReleaseChannelExplanation - // - this.lblReleaseChannelExplanation.BackColor = System.Drawing.SystemColors.Control; - this.lblReleaseChannelExplanation.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.lblReleaseChannelExplanation.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblReleaseChannelExplanation.Location = new System.Drawing.Point(6, 48); - this.lblReleaseChannelExplanation.Multiline = true; - this.lblReleaseChannelExplanation.Name = "lblReleaseChannelExplanation"; - this.lblReleaseChannelExplanation.ReadOnly = true; - this.lblReleaseChannelExplanation.Size = new System.Drawing.Size(595, 44); - this.lblReleaseChannelExplanation.TabIndex = 2; - this.lblReleaseChannelExplanation.Text = "Stable channel includes final releases only.\r\nBeta channel includes Betas & Relea" + - "se Candidates.\r\nDevelopment Channel includes Alphas, Betas & Release Candidates." + - ""; - // - // cboReleaseChannel - // - this.cboReleaseChannel._mice = MrngComboBox.MouseState.HOVER; - this.cboReleaseChannel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cboReleaseChannel.FormattingEnabled = true; - this.cboReleaseChannel.Location = new System.Drawing.Point(7, 21); - this.cboReleaseChannel.Name = "cboReleaseChannel"; - this.cboReleaseChannel.Size = new System.Drawing.Size(120, 21); - this.cboReleaseChannel.TabIndex = 1; - // - // pnlProxy - // - this.pnlProxy.Controls.Add(this.tblProxyBasic); - this.pnlProxy.Controls.Add(this.tblProxyAuthentication); - this.pnlProxy.Controls.Add(this.chkUseProxyForAutomaticUpdates); - this.pnlProxy.Controls.Add(this.chkUseProxyAuthentication); - this.pnlProxy.Controls.Add(this.btnTestProxy); - this.pnlProxy.Location = new System.Drawing.Point(3, 253); - this.pnlProxy.Name = "pnlProxy"; - this.pnlProxy.Size = new System.Drawing.Size(604, 223); - this.pnlProxy.TabIndex = 3; - // - // tblProxyBasic - // - this.tblProxyBasic.ColumnCount = 2; - this.tblProxyBasic.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F)); - this.tblProxyBasic.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tblProxyBasic.Controls.Add(this.numProxyPort, 1, 1); - this.tblProxyBasic.Controls.Add(this.lblProxyAddress, 0, 0); - this.tblProxyBasic.Controls.Add(this.txtProxyAddress, 1, 0); - this.tblProxyBasic.Controls.Add(this.lblProxyPort, 0, 1); - this.tblProxyBasic.Location = new System.Drawing.Point(6, 28); - this.tblProxyBasic.Name = "tblProxyBasic"; - this.tblProxyBasic.RowCount = 3; - this.tblProxyBasic.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tblProxyBasic.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tblProxyBasic.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tblProxyBasic.Size = new System.Drawing.Size(350, 57); - this.tblProxyBasic.TabIndex = 6; - // - // numProxyPort - // - this.numProxyPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.numProxyPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.numProxyPort.Location = new System.Drawing.Point(163, 29); - this.numProxyPort.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.numProxyPort.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numProxyPort.Name = "numProxyPort"; - this.numProxyPort.Size = new System.Drawing.Size(64, 22); - this.numProxyPort.TabIndex = 3; - this.numProxyPort.Value = new decimal(new int[] { - 80, - 0, - 0, - 0}); - // - // lblProxyAddress - // - this.lblProxyAddress.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblProxyAddress.Location = new System.Drawing.Point(3, 0); - this.lblProxyAddress.Name = "lblProxyAddress"; - this.lblProxyAddress.Size = new System.Drawing.Size(154, 26); - this.lblProxyAddress.TabIndex = 0; - this.lblProxyAddress.Text = "Address:"; - this.lblProxyAddress.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // txtProxyAddress - // - this.txtProxyAddress.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtProxyAddress.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtProxyAddress.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtProxyAddress.Location = new System.Drawing.Point(163, 3); - this.txtProxyAddress.Name = "txtProxyAddress"; - this.txtProxyAddress.Size = new System.Drawing.Size(184, 22); - this.txtProxyAddress.TabIndex = 1; - // - // lblProxyPort - // - this.lblProxyPort.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblProxyPort.Location = new System.Drawing.Point(3, 26); - this.lblProxyPort.Name = "lblProxyPort"; - this.lblProxyPort.Size = new System.Drawing.Size(154, 26); - this.lblProxyPort.TabIndex = 2; - this.lblProxyPort.Text = "Port:"; - this.lblProxyPort.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // tblProxyAuthentication - // - this.tblProxyAuthentication.ColumnCount = 2; - this.tblProxyAuthentication.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 160F)); - this.tblProxyAuthentication.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tblProxyAuthentication.Controls.Add(this.lblProxyPassword, 0, 1); - this.tblProxyAuthentication.Controls.Add(this.lblProxyUsername, 0, 0); - this.tblProxyAuthentication.Controls.Add(this.txtProxyUsername, 1, 0); - this.tblProxyAuthentication.Controls.Add(this.txtProxyPassword, 1, 1); - this.tblProxyAuthentication.Location = new System.Drawing.Point(6, 124); - this.tblProxyAuthentication.Name = "tblProxyAuthentication"; - this.tblProxyAuthentication.RowCount = 3; - this.tblProxyAuthentication.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tblProxyAuthentication.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tblProxyAuthentication.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tblProxyAuthentication.Size = new System.Drawing.Size(350, 57); - this.tblProxyAuthentication.TabIndex = 5; - // - // lblProxyPassword - // - this.lblProxyPassword.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblProxyPassword.Location = new System.Drawing.Point(3, 26); - this.lblProxyPassword.Name = "lblProxyPassword"; - this.lblProxyPassword.Size = new System.Drawing.Size(154, 26); - this.lblProxyPassword.TabIndex = 2; - this.lblProxyPassword.Text = "Password:"; - this.lblProxyPassword.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // lblProxyUsername - // - this.lblProxyUsername.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblProxyUsername.Location = new System.Drawing.Point(3, 0); - this.lblProxyUsername.Name = "lblProxyUsername"; - this.lblProxyUsername.Size = new System.Drawing.Size(154, 26); - this.lblProxyUsername.TabIndex = 0; - this.lblProxyUsername.Text = "Username:"; - this.lblProxyUsername.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // txtProxyUsername - // - this.txtProxyUsername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtProxyUsername.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtProxyUsername.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtProxyUsername.Location = new System.Drawing.Point(163, 3); - this.txtProxyUsername.Name = "txtProxyUsername"; - this.txtProxyUsername.Size = new System.Drawing.Size(184, 22); - this.txtProxyUsername.TabIndex = 1; - // - // txtProxyPassword - // - this.txtProxyPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtProxyPassword.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtProxyPassword.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtProxyPassword.Location = new System.Drawing.Point(163, 29); - this.txtProxyPassword.Name = "txtProxyPassword"; - this.txtProxyPassword.Size = new System.Drawing.Size(184, 22); - this.txtProxyPassword.TabIndex = 3; - this.txtProxyPassword.UseSystemPasswordChar = true; - // - // chkUseProxyForAutomaticUpdates - // - this.chkUseProxyForAutomaticUpdates._mice = MrngCheckBox.MouseState.OUT; - this.chkUseProxyForAutomaticUpdates.AutoSize = true; - this.chkUseProxyForAutomaticUpdates.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkUseProxyForAutomaticUpdates.Location = new System.Drawing.Point(6, 5); - this.chkUseProxyForAutomaticUpdates.Name = "chkUseProxyForAutomaticUpdates"; - this.chkUseProxyForAutomaticUpdates.Size = new System.Drawing.Size(176, 17); - this.chkUseProxyForAutomaticUpdates.TabIndex = 0; - this.chkUseProxyForAutomaticUpdates.Text = "Use a proxy server to connect"; - this.chkUseProxyForAutomaticUpdates.UseVisualStyleBackColor = true; - this.chkUseProxyForAutomaticUpdates.CheckedChanged += new System.EventHandler(this.chkUseProxyForAutomaticUpdates_CheckedChanged); - // - // chkUseProxyAuthentication - // - this.chkUseProxyAuthentication._mice = MrngCheckBox.MouseState.OUT; - this.chkUseProxyAuthentication.AutoSize = true; - this.chkUseProxyAuthentication.Enabled = false; - this.chkUseProxyAuthentication.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkUseProxyAuthentication.Location = new System.Drawing.Point(6, 101); - this.chkUseProxyAuthentication.Name = "chkUseProxyAuthentication"; - this.chkUseProxyAuthentication.Size = new System.Drawing.Size(235, 17); - this.chkUseProxyAuthentication.TabIndex = 2; - this.chkUseProxyAuthentication.Text = "This proxy server requires authentication"; - this.chkUseProxyAuthentication.UseVisualStyleBackColor = true; - this.chkUseProxyAuthentication.CheckedChanged += new System.EventHandler(this.chkUseProxyAuthentication_CheckedChanged); - // - // btnTestProxy - // - this.btnTestProxy._mice = MrngButton.MouseState.OUT; - this.btnTestProxy.Location = new System.Drawing.Point(6, 187); - this.btnTestProxy.Name = "btnTestProxy"; - this.btnTestProxy.Size = new System.Drawing.Size(120, 25); - this.btnTestProxy.TabIndex = 4; - this.btnTestProxy.Text = "Test Proxy"; - this.btnTestProxy.UseVisualStyleBackColor = true; - this.btnTestProxy.Click += new System.EventHandler(this.btnTestProxy_Click); - // - // groupBoxReleaseChannel - // - this.groupBoxReleaseChannel.Controls.Add(this.lblReleaseChannelExplanation); - this.groupBoxReleaseChannel.Controls.Add(this.cboReleaseChannel); - this.groupBoxReleaseChannel.Location = new System.Drawing.Point(3, 143); - this.groupBoxReleaseChannel.Name = "groupBoxReleaseChannel"; - this.groupBoxReleaseChannel.Size = new System.Drawing.Size(604, 104); - this.groupBoxReleaseChannel.TabIndex = 3; - this.groupBoxReleaseChannel.TabStop = false; - this.groupBoxReleaseChannel.Text = "Release Channel"; - // - // UpdatesPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.Controls.Add(this.groupBoxReleaseChannel); - this.Controls.Add(this.lblUpdatesExplanation); - this.Controls.Add(this.pnlUpdateCheck); - this.Controls.Add(this.pnlProxy); - this.Margin = new System.Windows.Forms.Padding(4); - this.Name = "UpdatesPage"; - this.Size = new System.Drawing.Size(610, 490); - this.pnlUpdateCheck.ResumeLayout(false); - this.pnlUpdateCheck.PerformLayout(); - this.pnlProxy.ResumeLayout(false); - this.pnlProxy.PerformLayout(); - this.tblProxyBasic.ResumeLayout(false); - this.tblProxyBasic.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numProxyPort)).EndInit(); - this.tblProxyAuthentication.ResumeLayout(false); - this.tblProxyAuthentication.PerformLayout(); - this.groupBoxReleaseChannel.ResumeLayout(false); - this.groupBoxReleaseChannel.PerformLayout(); - this.ResumeLayout(false); - - } - internal Controls.MrngLabel lblUpdatesExplanation; - internal System.Windows.Forms.Panel pnlUpdateCheck; - internal MrngButton btnUpdateCheckNow; - internal MrngCheckBox chkCheckForUpdatesOnStartup; - internal MrngComboBox cboUpdateCheckFrequency; - internal System.Windows.Forms.Panel pnlProxy; - internal Controls.MrngLabel lblProxyAddress; - internal Controls.MrngTextBox txtProxyAddress; - internal Controls.MrngLabel lblProxyPort; - internal Controls.MrngNumericUpDown numProxyPort; - internal MrngCheckBox chkUseProxyForAutomaticUpdates; - internal MrngCheckBox chkUseProxyAuthentication; - internal Controls.MrngLabel lblProxyUsername; - internal Controls.MrngTextBox txtProxyUsername; - internal Controls.MrngLabel lblProxyPassword; - internal Controls.MrngTextBox txtProxyPassword; - internal MrngButton btnTestProxy; - private MrngComboBox cboReleaseChannel; - private Controls.MrngTextBox lblReleaseChannelExplanation; - private MrngGroupBox groupBoxReleaseChannel; - private System.Windows.Forms.TableLayoutPanel tblProxyBasic; - private System.Windows.Forms.TableLayoutPanel tblProxyAuthentication; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.cs b/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.cs deleted file mode 100644 index d269b31e6..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.cs +++ /dev/null @@ -1,244 +0,0 @@ -using System; -using System.ComponentModel; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.App.Update; -using mRemoteNG.Properties; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools; -using mRemoteNG.UI.TaskDialog; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms.OptionsPages -{ - public sealed partial class UpdatesPage - { - #region Private Fields - - private AppUpdater _appUpdate; - - #endregion - - public UpdatesPage() - { - InitializeComponent(); - ApplyTheme(); - PageIcon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.RunUpdate_16x); - } - - #region Public Methods - - public override string PageName - { - get => Language.Updates; - set { } - } - - public override void ApplyLanguage() - { - base.ApplyLanguage(); - - lblUpdatesExplanation.Text = Language.UpdateCheck; - - chkCheckForUpdatesOnStartup.Text = Language.CheckForUpdatesOnStartup; - btnUpdateCheckNow.Text = Language.CheckNow; - - groupBoxReleaseChannel.Text = Language.ReleaseChannel; - lblReleaseChannelExplanation.Text = Language.ReleaseChannelExplanation; - - chkUseProxyForAutomaticUpdates.Text = Language.CheckboxUpdateUseProxy; - lblProxyAddress.Text = Language.Address; - lblProxyPort.Text = Language.Port; - - chkUseProxyAuthentication.Text = Language.CheckboxProxyAuthentication; - lblProxyUsername.Text = Language.Username; - lblProxyPassword.Text = Language.Password; - - btnTestProxy.Text = Language.TestProxy; - } - - public override void LoadSettings() - { - chkCheckForUpdatesOnStartup.Checked = Settings.Default.CheckForUpdatesOnStartup; - cboUpdateCheckFrequency.Enabled = chkCheckForUpdatesOnStartup.Checked; - cboUpdateCheckFrequency.Items.Clear(); - var nDaily = cboUpdateCheckFrequency.Items.Add(Language.Daily); - var nWeekly = cboUpdateCheckFrequency.Items.Add(Language.Weekly); - var nMonthly = cboUpdateCheckFrequency.Items.Add(Language.Monthly); - if (Settings.Default.CheckForUpdatesFrequencyDays < 1) - { - chkCheckForUpdatesOnStartup.Checked = false; - cboUpdateCheckFrequency.SelectedIndex = nDaily; - } // Daily - else - switch (Settings.Default.CheckForUpdatesFrequencyDays) - { - case 1: - cboUpdateCheckFrequency.SelectedIndex = nDaily; - break; - case 7: - cboUpdateCheckFrequency.SelectedIndex = nWeekly; - break; - case 31: - cboUpdateCheckFrequency.SelectedIndex = nMonthly; - break; - default: - var nCustom = - cboUpdateCheckFrequency.Items.Add(string.Format(Language.UpdateFrequencyCustom, - Settings - .Default.CheckForUpdatesFrequencyDays)); - cboUpdateCheckFrequency.SelectedIndex = nCustom; - break; - } - - var stable = cboReleaseChannel.Items.Add(UpdateChannelInfo.STABLE); - var beta = cboReleaseChannel.Items.Add(UpdateChannelInfo.PREVIEW); - var dev = cboReleaseChannel.Items.Add(UpdateChannelInfo.NIGHTLY); - switch (Settings.Default.UpdateChannel) - { - case UpdateChannelInfo.STABLE: - cboReleaseChannel.SelectedIndex = stable; - break; - case UpdateChannelInfo.PREVIEW: - cboReleaseChannel.SelectedIndex = beta; - break; - case UpdateChannelInfo.NIGHTLY: - cboReleaseChannel.SelectedIndex = dev; - break; - default: - cboReleaseChannel.SelectedIndex = stable; - break; - } - - chkUseProxyForAutomaticUpdates.Checked = Settings.Default.UpdateUseProxy; - tblProxyBasic.Enabled = Settings.Default.UpdateUseProxy; - txtProxyAddress.Text = Settings.Default.UpdateProxyAddress; - numProxyPort.Value = Convert.ToDecimal(Settings.Default.UpdateProxyPort); - - chkUseProxyAuthentication.Checked = Settings.Default.UpdateProxyUseAuthentication; - tblProxyAuthentication.Enabled = Settings.Default.UpdateProxyUseAuthentication; - txtProxyUsername.Text = Settings.Default.UpdateProxyAuthUser; - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - txtProxyPassword.Text = - cryptographyProvider.Decrypt(Settings.Default.UpdateProxyAuthPass, Runtime.EncryptionKey); - - btnTestProxy.Enabled = Settings.Default.UpdateUseProxy; - } - - public override void SaveSettings() - { - base.SaveSettings(); - - Settings.Default.CheckForUpdatesOnStartup = chkCheckForUpdatesOnStartup.Checked; - if (cboUpdateCheckFrequency.SelectedItem.ToString() == Language.Daily) - { - Settings.Default.CheckForUpdatesFrequencyDays = 1; - } - else if (cboUpdateCheckFrequency.SelectedItem.ToString() == Language.Weekly) - { - Settings.Default.CheckForUpdatesFrequencyDays = 7; - } - else if (cboUpdateCheckFrequency.SelectedItem.ToString() == Language.Monthly) - { - Settings.Default.CheckForUpdatesFrequencyDays = 31; - } - - Settings.Default.UpdateChannel = cboReleaseChannel.Text; - - Settings.Default.UpdateUseProxy = chkUseProxyForAutomaticUpdates.Checked; - Settings.Default.UpdateProxyAddress = txtProxyAddress.Text; - Settings.Default.UpdateProxyPort = (int)numProxyPort.Value; - - Settings.Default.UpdateProxyUseAuthentication = chkUseProxyAuthentication.Checked; - Settings.Default.UpdateProxyAuthUser = txtProxyUsername.Text; - var cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - Settings.Default.UpdateProxyAuthPass = - cryptographyProvider.Encrypt(txtProxyPassword.Text, Runtime.EncryptionKey); - } - - #endregion - - #region Event Handlers - - private void chkCheckForUpdatesOnStartup_CheckedChanged(object sender, EventArgs e) - { - cboUpdateCheckFrequency.Enabled = chkCheckForUpdatesOnStartup.Checked; - } - - private void btnUpdateCheckNow_Click(object sender, EventArgs e) - { - Windows.Show(WindowType.Update); - } - - private void chkUseProxyForAutomaticUpdates_CheckedChanged(object sender, EventArgs e) - { - tblProxyBasic.Enabled = chkUseProxyForAutomaticUpdates.Checked; - btnTestProxy.Enabled = chkUseProxyForAutomaticUpdates.Checked; - - if (chkUseProxyForAutomaticUpdates.Checked) - { - chkUseProxyAuthentication.Enabled = true; - - if (chkUseProxyAuthentication.Checked) - { - tblProxyAuthentication.Enabled = true; - } - } - else - { - chkUseProxyAuthentication.Enabled = false; - tblProxyAuthentication.Enabled = false; - } - } - - private async void btnTestProxy_Click(object sender, EventArgs e) - { - if (_appUpdate != null) - { - if (_appUpdate.IsGetUpdateInfoRunning) - { - return; - } - } - - _appUpdate = new AppUpdater(); - //_appUpdate.Load += _appUpdate.Update_Load; - _appUpdate.SetProxySettings(chkUseProxyForAutomaticUpdates.Checked, txtProxyAddress.Text, - (int)numProxyPort.Value, chkUseProxyAuthentication.Checked, - txtProxyUsername.Text, - txtProxyPassword.Text); - try - { - btnTestProxy.Enabled = false; - btnTestProxy.Text = Language.OptionsProxyTesting; - - await _appUpdate.GetUpdateInfoAsync(); - - btnTestProxy.Enabled = true; - btnTestProxy.Text = Language.TestProxy; - CTaskDialog.ShowCommandBox(this, Application.ProductName, Language.ProxyTestSucceeded, "", - Language._Ok, false); - } - catch (Exception ex) - { - CTaskDialog.ShowCommandBox(this, Application.ProductName, Language.ProxyTestFailed, - MiscTools.GetExceptionMessageRecursive(ex), "", "", "", Language._Ok, - false, - ESysIcons.Error, - 0); - } - - } - - private void chkUseProxyAuthentication_CheckedChanged(object sender, EventArgs e) - { - if (chkUseProxyForAutomaticUpdates.Checked) - { - tblProxyAuthentication.Enabled = chkUseProxyAuthentication.Checked; - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.resx b/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Forms/OptionsPages/UpdatesPage.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/frmChoosePanel.Designer.cs b/mRemoteNG/UI/Forms/frmChoosePanel.Designer.cs deleted file mode 100644 index 4f6b341ec..000000000 --- a/mRemoteNG/UI/Forms/frmChoosePanel.Designer.cs +++ /dev/null @@ -1,109 +0,0 @@ -using mRemoteNG.UI.Controls; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms -{ - - public partial class FrmChoosePanel : System.Windows.Forms.Form - { - //Form overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) - { - try - { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); - } - } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() - { - this.cbPanels = new MrngComboBox(); - this.btnOK = new MrngButton(); - this.lblDescription = new mRemoteNG.UI.Controls.MrngLabel(); - this.btnNew = new MrngButton(); - this.SuspendLayout(); - // - // cbPanels - // - this.cbPanels._mice = MrngComboBox.MouseState.HOVER; - this.cbPanels.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbPanels.FormattingEnabled = true; - this.cbPanels.Location = new System.Drawing.Point(12, 42); - this.cbPanels.Name = "cbPanels"; - this.cbPanels.Size = new System.Drawing.Size(224, 21); - this.cbPanels.TabIndex = 10; - // - // btnOK - // - this.btnOK._mice = MrngButton.MouseState.HOVER; - this.btnOK.Location = new System.Drawing.Point(167, 72); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(75, 24); - this.btnOK.TabIndex = 20; - this.btnOK.Text = Language._Ok; - this.btnOK.UseVisualStyleBackColor = true; - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - // - // lblDescription - // - this.lblDescription.Location = new System.Drawing.Point(7, 8); - this.lblDescription.Name = "lblDescription"; - this.lblDescription.Size = new System.Drawing.Size(229, 29); - this.lblDescription.TabIndex = 0; - this.lblDescription.Text = "Select a panel from the list below or click New to add a new one. Click OK to con" + - "tinue."; - // - // btnNew - // - this.btnNew._mice = MrngButton.MouseState.HOVER; - this.btnNew.Image = global::mRemoteNG.Properties.Resources.InsertPanel_16x; - this.btnNew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnNew.Location = new System.Drawing.Point(86, 72); - this.btnNew.Name = "btnNew"; - this.btnNew.Size = new System.Drawing.Size(75, 24); - this.btnNew.TabIndex = 40; - this.btnNew.Text = Language._New; - this.btnNew.UseVisualStyleBackColor = true; - this.btnNew.Click += new System.EventHandler(this.btnNew_Click); - // - // FrmChoosePanel - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(245, 107); - this.Controls.Add(this.lblDescription); - this.Controls.Add(this.btnNew); - this.Controls.Add(this.btnOK); - this.Controls.Add(this.cbPanels); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FrmChoosePanel"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Select Panel"; - this.Load += new System.EventHandler(this.frmChoosePanel_Load); - this.ResumeLayout(false); - - } - internal MrngComboBox cbPanels; - internal MrngButton btnOK; - internal Controls.MrngLabel lblDescription; - internal MrngButton btnNew; - } -} diff --git a/mRemoteNG/UI/Forms/frmChoosePanel.cs b/mRemoteNG/UI/Forms/frmChoosePanel.cs deleted file mode 100644 index 432b782fa..000000000 --- a/mRemoteNG/UI/Forms/frmChoosePanel.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Themes; -using mRemoteNG.UI.Panels; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmChoosePanel - { - private readonly PanelAdder _panelAdder; - - public FrmChoosePanel() - { - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Panel_16x); - _panelAdder = new PanelAdder(); - } - - public string Panel - { - get => cbPanels.SelectedItem.ToString(); - set => cbPanels.SelectedItem = value; - } - - private void frmChoosePanel_Load(object sender, System.EventArgs e) - { - ApplyLanguage(); - ApplyTheme(); - AddAvailablePanels(); - } - - private void ApplyLanguage() - { - btnOK.Text = Language._Ok; - lblDescription.Text = Language.SelectPanel; - btnNew.Text = Language._New; - Text = Language.TitleSelectPanel; - } - - private void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) return; - BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - lblDescription.BackColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - lblDescription.ForeColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - private void AddAvailablePanels() - { - cbPanels.Items.Clear(); - - for (var i = 0; i <= Runtime.WindowList.Count - 1; i++) - { - cbPanels.Items.Add(Runtime.WindowList[i].Text.Replace("&&", "&")); - } - - if (cbPanels.Items.Count > 0) - { - cbPanels.SelectedItem = cbPanels.Items[0]; - cbPanels.Enabled = true; - btnOK.Enabled = true; - } - else - { - cbPanels.Enabled = false; - btnOK.Enabled = false; - } - } - - private void btnNew_Click(object sender, System.EventArgs e) - { - using (var frmInputBox = - new FrmInputBox(Language.NewPanel, Language.PanelName + ":", Language.NewPanel)) - { - var dr = frmInputBox.ShowDialog(); - if (dr != DialogResult.OK || string.IsNullOrEmpty(frmInputBox.returnValue)) return; - _panelAdder.AddPanel(frmInputBox.returnValue); - AddAvailablePanels(); - cbPanels.SelectedItem = frmInputBox.returnValue; - cbPanels.Focus(); - } - } - - private void btnOK_Click(object sender, System.EventArgs e) - { - DialogResult = DialogResult.OK; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/frmChoosePanel.resx b/mRemoteNG/UI/Forms/frmChoosePanel.resx deleted file mode 100644 index d58980a38..000000000 --- a/mRemoteNG/UI/Forms/frmChoosePanel.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/frmMain.Designer.cs b/mRemoteNG/UI/Forms/frmMain.Designer.cs deleted file mode 100644 index 5a26f2cfc..000000000 --- a/mRemoteNG/UI/Forms/frmMain.Designer.cs +++ /dev/null @@ -1,234 +0,0 @@ -namespace mRemoteNG.UI.Forms -{ - public partial class FrmMain : System.Windows.Forms.Form - { - - //Form overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()] - protected override void Dispose(bool disposing) - { - try - { - if (disposing) - { - if(components != null) - components.Dispose(); - - if(_advancedWindowMenu != null) - _advancedWindowMenu.Dispose(); - - } - } - finally - { - base.Dispose(disposing); - } - } - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()] - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); - this.pnlDock = new WeifenLuo.WinFormsUI.Docking.DockPanel(); - this.msMain = new System.Windows.Forms.MenuStrip(); - this.fileMenu = new mRemoteNG.UI.Menu.FileMenu(); - this.viewMenu = new mRemoteNG.UI.Menu.ViewMenu(); - this.toolsMenu = new mRemoteNG.UI.Menu.ToolsMenu(); - this.helpMenu = new mRemoteNG.UI.Menu.HelpMenu(); - this.mMenSep3 = new System.Windows.Forms.ToolStripSeparator(); - this.tsContainer = new System.Windows.Forms.ToolStripContainer(); - this._quickConnectToolStrip = new mRemoteNG.UI.Controls.QuickConnectToolStrip(); - this._multiSshToolStrip = new mRemoteNG.UI.Controls.MultiSshToolStrip(); - this._externalToolsToolStrip = new mRemoteNG.UI.Controls.ExternalToolsToolStrip(); - this.tmrAutoSave = new System.Windows.Forms.Timer(this.components); - this.vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components); - this.msMain.SuspendLayout(); - this.tsContainer.ContentPanel.SuspendLayout(); - this.tsContainer.TopToolStripPanel.SuspendLayout(); - this.tsContainer.SuspendLayout(); - this.SuspendLayout(); - // - // pnlDock - // - this.pnlDock.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlDock.DockBackColor = System.Drawing.SystemColors.Control; - this.pnlDock.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingSdi; - this.pnlDock.Location = new System.Drawing.Point(0, 0); - this.pnlDock.Name = "pnlDock"; - this.pnlDock.Size = new System.Drawing.Size(1129, 496); - this.pnlDock.TabIndex = 13; - this.pnlDock.ActiveDocumentChanged += new System.EventHandler(this.pnlDock_ActiveDocumentChanged); - // - // msMain - // - this.msMain.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.msMain.Dock = System.Windows.Forms.DockStyle.None; - this.msMain.GripMargin = new System.Windows.Forms.Padding(2); - this.msMain.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible; - this.msMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileMenu, - this.viewMenu, - this.toolsMenu, - this.helpMenu}); - this.msMain.Location = new System.Drawing.Point(3, 50); - this.msMain.Name = "msMain"; - this.msMain.Padding = new System.Windows.Forms.Padding(0, 0, 1, 0); - this.msMain.Size = new System.Drawing.Size(303, 25); - this.msMain.Stretch = false; - this.msMain.TabIndex = 0; - this.msMain.Text = "Main Toolbar"; - // - // fileMenu - // - this.fileMenu.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.fileMenu.Name = "mMenFile"; - this.fileMenu.Size = new System.Drawing.Size(37, 19); - this.fileMenu.Text = "&File"; - this.fileMenu.TreeWindow = null; - // - // viewMenu - // - this.viewMenu.FullscreenHandler = null; - this.viewMenu.MainForm = null; - this.viewMenu.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.viewMenu.Name = "mMenView"; - this.viewMenu.Size = new System.Drawing.Size(44, 19); - this.viewMenu.Text = "&View"; - this.viewMenu.TsExternalTools = null; - this.viewMenu.TsMultiSsh = null; - this.viewMenu.TsQuickConnect = null; - this.viewMenu.DropDownOpening += new System.EventHandler(this.ViewMenu_Opening); - // - // toolsMenu - // - this.toolsMenu.CredentialProviderCatalog = null; - this.toolsMenu.MainForm = null; - this.toolsMenu.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.toolsMenu.Name = "mMenTools"; - this.toolsMenu.Size = new System.Drawing.Size(46, 19); - this.toolsMenu.Text = "&Tools"; - // - // helpMenu - // - this.helpMenu.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); - this.helpMenu.Name = "mMenInfo"; - this.helpMenu.Size = new System.Drawing.Size(44, 19); - this.helpMenu.Text = "&Help"; - this.helpMenu.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; - // - // mMenSep3 - // - this.mMenSep3.Name = "mMenSep3"; - this.mMenSep3.Size = new System.Drawing.Size(211, 6); - // - // tsContainer - // - // - // tsContainer.ContentPanel - // - this.tsContainer.ContentPanel.Controls.Add(this.pnlDock); - this.tsContainer.ContentPanel.Size = new System.Drawing.Size(1129, 496); - this.tsContainer.Dock = System.Windows.Forms.DockStyle.Fill; - this.tsContainer.Location = new System.Drawing.Point(0, 0); - this.tsContainer.Name = "tsContainer"; - this.tsContainer.Size = new System.Drawing.Size(1129, 571); - this.tsContainer.TabIndex = 17; - this.tsContainer.Text = "ToolStripContainer1"; - // - // tsContainer.TopToolStripPanel - // - this.tsContainer.TopToolStripPanel.Controls.Add(this.msMain); - this.tsContainer.TopToolStripPanel.Controls.Add(this._quickConnectToolStrip); - this.tsContainer.TopToolStripPanel.Controls.Add(this._multiSshToolStrip); - this.tsContainer.TopToolStripPanel.Controls.Add(this._externalToolsToolStrip); - this.tsContainer.TopToolStripPanel.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; - // - // _quickConnectToolStrip - // - this._quickConnectToolStrip.BackColor = System.Drawing.SystemColors.Control; - this._quickConnectToolStrip.Dock = System.Windows.Forms.DockStyle.None; - this._quickConnectToolStrip.ForeColor = System.Drawing.SystemColors.ControlText; - this._quickConnectToolStrip.Location = new System.Drawing.Point(114, 25); - this._quickConnectToolStrip.Name = "_quickConnectToolStrip"; - this._quickConnectToolStrip.Size = new System.Drawing.Size(395, 25); - this._quickConnectToolStrip.TabIndex = 18; - // - // _multiSshToolStrip - // - this._multiSshToolStrip.Dock = System.Windows.Forms.DockStyle.None; - this._multiSshToolStrip.Location = new System.Drawing.Point(3, 0); - this._multiSshToolStrip.MinimumSize = new System.Drawing.Size(300, 0); - this._multiSshToolStrip.Name = "_multiSshToolStrip"; - this._multiSshToolStrip.Size = new System.Drawing.Size(376, 25); - this._multiSshToolStrip.TabIndex = 1; - // - // _externalToolsToolStrip - // - this._externalToolsToolStrip.BackColor = System.Drawing.SystemColors.Control; - this._externalToolsToolStrip.Dock = System.Windows.Forms.DockStyle.None; - this._externalToolsToolStrip.ForeColor = System.Drawing.SystemColors.ControlText; - this._externalToolsToolStrip.Location = new System.Drawing.Point(3, 25); - this._externalToolsToolStrip.Name = "_externalToolsToolStrip"; - this._externalToolsToolStrip.Size = new System.Drawing.Size(111, 25); - this._externalToolsToolStrip.TabIndex = 17; - // - // tmrAutoSave - // - this.tmrAutoSave.Interval = 10000; - this.tmrAutoSave.Tick += new System.EventHandler(this.tmrAutoSave_Tick); - // - // vsToolStripExtender - // - this.vsToolStripExtender.DefaultRenderer = null; - // - // FrmMain - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(1129, 571); - this.Controls.Add(this.tsContainer); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MainMenuStrip = this.msMain; - this.MinimumSize = new System.Drawing.Size(400, 400); - this.Name = "FrmMain"; - this.Opacity = 0D; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = " "; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing); - this.Load += new System.EventHandler(this.FrmMain_Load); - this.Shown += new System.EventHandler(this.frmMain_Shown); - this.ResizeBegin += new System.EventHandler(this.frmMain_ResizeBegin); - this.ResizeEnd += new System.EventHandler(this.frmMain_ResizeEnd); - this.Resize += new System.EventHandler(this.frmMain_Resize); - this.msMain.ResumeLayout(false); - this.msMain.PerformLayout(); - this.tsContainer.ContentPanel.ResumeLayout(false); - this.tsContainer.TopToolStripPanel.ResumeLayout(false); - this.tsContainer.TopToolStripPanel.PerformLayout(); - this.tsContainer.ResumeLayout(false); - this.tsContainer.PerformLayout(); - this.ResumeLayout(false); - - } - internal WeifenLuo.WinFormsUI.Docking.DockPanel pnlDock; - internal System.Windows.Forms.MenuStrip msMain; - internal System.Windows.Forms.ToolStripContainer tsContainer; - internal System.Windows.Forms.Timer tmrAutoSave; - internal System.Windows.Forms.ToolStripSeparator mMenSep3; - private System.ComponentModel.IContainer components; - private Menu.FileMenu fileMenu; - private Menu.ViewMenu viewMenu; - private Menu.ToolsMenu toolsMenu; - private Menu.HelpMenu helpMenu; - internal mRemoteNG.UI.Controls.QuickConnectToolStrip _quickConnectToolStrip; - internal mRemoteNG.UI.Controls.ExternalToolsToolStrip _externalToolsToolStrip; - internal mRemoteNG.UI.Controls.MultiSshToolStrip _multiSshToolStrip; - //theming support - private WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender vsToolStripExtender; - } -} diff --git a/mRemoteNG/UI/Forms/frmMain.cs b/mRemoteNG/UI/Forms/frmMain.cs deleted file mode 100644 index d914cffab..000000000 --- a/mRemoteNG/UI/Forms/frmMain.cs +++ /dev/null @@ -1,833 +0,0 @@ -using Microsoft.Win32; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.App.Initialization; -using mRemoteNG.Config; -using mRemoteNG.Config.Connections; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Putty; -using mRemoteNG.Config.Settings; -using mRemoteNG.Connection; -using mRemoteNG.Messages; -using mRemoteNG.Messages.MessageWriters; -using mRemoteNG.Themes; -using mRemoteNG.Tools; -using mRemoteNG.UI.Menu; -using mRemoteNG.UI.Tabs; -using mRemoteNG.UI.TaskDialog; -using mRemoteNG.UI.Window; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Drawing; -using System.Globalization; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using mRemoteNG.UI.Panels; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.UI.Controls; -using Settings = mRemoteNG.Properties.Settings; -using mRemoteNG.Resources.Language; - -// ReSharper disable MemberCanBePrivate.Global - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmMain - { - public static FrmMain Default { get; } = new FrmMain(); - - private static ClipboardchangeEventHandler _clipboardChangedEvent; - private bool _inSizeMove; - private bool _inMouseActivate; - private IntPtr _fpChainedWindowHandle; - private bool _usingSqlServer; - private string _connectionsFileName; - private bool _showFullPathInTitle; - private readonly AdvancedWindowMenu _advancedWindowMenu; - private ConnectionInfo _selectedConnection; - private readonly IList _messageWriters = new List(); - private readonly ThemeManager _themeManager; - private readonly FileBackupPruner _backupPruner = new FileBackupPruner(); - - internal FullscreenHandler Fullscreen { get; set; } - - //Added theming support - private readonly ToolStripRenderer _toolStripProfessionalRenderer = new ToolStripProfessionalRenderer(); - - private FrmMain() - { - _showFullPathInTitle = Settings.Default.ShowCompleteConsPathInTitle; - InitializeComponent(); - Fullscreen = new FullscreenHandler(this); - - //Theming support - _themeManager = ThemeManager.getInstance(); - vsToolStripExtender.DefaultRenderer = _toolStripProfessionalRenderer; - ApplyTheme(); - - _advancedWindowMenu = new AdvancedWindowMenu(this); - } - - #region Properties - - public FormWindowState PreviousWindowState { get; set; } - - public bool IsClosing { get; private set; } - - public bool AreWeUsingSqlServerForSavingConnections - { - get => _usingSqlServer; - set - { - if (_usingSqlServer == value) - { - return; - } - - _usingSqlServer = value; - UpdateWindowTitle(); - } - } - - public string ConnectionsFileName - { - get => _connectionsFileName; - set - { - if (_connectionsFileName == value) - { - return; - } - - _connectionsFileName = value; - UpdateWindowTitle(); - } - } - - public bool ShowFullPathInTitle - { - get => _showFullPathInTitle; - set - { - if (_showFullPathInTitle == value) - { - return; - } - - _showFullPathInTitle = value; - UpdateWindowTitle(); - } - } - - public ConnectionInfo SelectedConnection - { - get => _selectedConnection; - set - { - if (_selectedConnection == value) - { - return; - } - - _selectedConnection = value; - UpdateWindowTitle(); - } - } - - #endregion - - #region Startup & Shutdown - - private void FrmMain_Load(object sender, EventArgs e) - { - var messageCollector = Runtime.MessageCollector; - - var settingsLoader = new SettingsLoader(this, messageCollector, _quickConnectToolStrip, - _externalToolsToolStrip, _multiSshToolStrip, msMain); - settingsLoader.LoadSettings(); - - MessageCollectorSetup.SetupMessageCollector(messageCollector, _messageWriters); - MessageCollectorSetup.BuildMessageWritersFromSettings(_messageWriters); - - Startup.Instance.InitializeProgram(messageCollector); - - SetMenuDependencies(); - - var uiLoader = new DockPanelLayoutLoader(this, messageCollector); - uiLoader.LoadPanelsFromXml(); - - LockToolbarPositions(Settings.Default.LockToolbars); - Settings.Default.PropertyChanged += OnApplicationSettingChanged; - - _themeManager.ThemeChanged += ApplyTheme; - - _fpChainedWindowHandle = NativeMethods.SetClipboardViewer(Handle); - - Runtime.WindowList = new WindowList(); - - if (Settings.Default.ResetPanels) - SetDefaultLayout(); - else - SetLayout(); - - Runtime.ConnectionsService.ConnectionsLoaded += ConnectionsServiceOnConnectionsLoaded; - Runtime.ConnectionsService.ConnectionsSaved += ConnectionsServiceOnConnectionsSaved; - var credsAndConsSetup = new CredsAndConsSetup(); - credsAndConsSetup.LoadCredsAndCons(); - - Windows.TreeForm.Focus(); - - PuttySessionsManager.Instance.StartWatcher(); - - Startup.Instance.CreateConnectionsProvider(messageCollector); - - _advancedWindowMenu.BuildAdditionalMenuItems(); - SystemEvents.DisplaySettingsChanged += _advancedWindowMenu.OnDisplayChanged; - ApplyLanguage(); - - Opacity = 1; - //Fix MagicRemove , revision on panel strategy for mdi - - pnlDock.ShowDocumentIcon = true; - - FrmSplashScreen.getInstance().Close(); - - if (Settings.Default.StartMinimized) - { - WindowState = FormWindowState.Minimized; - if (Settings.Default.MinimizeToTray) - ShowInTaskbar = false; - } - if (Settings.Default.StartFullScreen) - { - Fullscreen.Value = true; - } - - if (!Settings.Default.CreateEmptyPanelOnStartUp) return; - var panelName = !string.IsNullOrEmpty(Settings.Default.StartUpPanelName) - ? Settings.Default.StartUpPanelName - : Language.NewPanel; - - var panelAdder = new PanelAdder(); - if (!panelAdder.DoesPanelExist(panelName)) - panelAdder.AddPanel(panelName); - } - - private void ApplyLanguage() - { - fileMenu.ApplyLanguage(); - viewMenu.ApplyLanguage(); - toolsMenu.ApplyLanguage(); - helpMenu.ApplyLanguage(); - } - - private void OnApplicationSettingChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs) - { - switch (propertyChangedEventArgs.PropertyName) - { - case nameof(Settings.LockToolbars): - LockToolbarPositions(Settings.Default.LockToolbars); - break; - case nameof(Settings.ViewMenuExternalTools): - LockToolbarPositions(Settings.Default.LockToolbars); - break; - case nameof(Settings.ViewMenuMessages): - LockToolbarPositions(Settings.Default.LockToolbars); - break; - case nameof(Settings.ViewMenuMultiSSH): - LockToolbarPositions(Settings.Default.LockToolbars); - break; - case nameof(Settings.ViewMenuQuickConnect): - LockToolbarPositions(Settings.Default.LockToolbars); - break; - default: - return; - } - } - - private void LockToolbarPositions(bool shouldBeLocked) - { - var toolbars = new ToolStrip[] - {_quickConnectToolStrip, _multiSshToolStrip, _externalToolsToolStrip, msMain}; - foreach (var toolbar in toolbars) - { - toolbar.GripStyle = shouldBeLocked - ? ToolStripGripStyle.Hidden - : ToolStripGripStyle.Visible; - } - } - - private void ConnectionsServiceOnConnectionsLoaded(object sender, - ConnectionsLoadedEventArgs connectionsLoadedEventArgs) - { - UpdateWindowTitle(); - } - - private void ConnectionsServiceOnConnectionsSaved(object sender, - ConnectionsSavedEventArgs connectionsSavedEventArgs) - { - if (connectionsSavedEventArgs.UsingDatabase) - return; - - _backupPruner.PruneBackupFiles(connectionsSavedEventArgs.ConnectionFileName, - Settings.Default.BackupFileKeepCount); - } - - private void SetMenuDependencies() - { - fileMenu.TreeWindow = Windows.TreeForm; - - viewMenu.TsExternalTools = _externalToolsToolStrip; - viewMenu.TsQuickConnect = _quickConnectToolStrip; - viewMenu.TsMultiSsh = _multiSshToolStrip; - viewMenu.FullscreenHandler = Fullscreen; - viewMenu.MainForm = this; - - toolsMenu.MainForm = this; - toolsMenu.CredentialProviderCatalog = Runtime.CredentialProviderCatalog; - } - - //Theming support - private void ApplyTheme() - { - if (!_themeManager.ThemingActive) - { - pnlDock.Theme = _themeManager.DefaultTheme.Theme; - return; - } - - try - { - // this will always throw when turning themes on from - // the options menu. - pnlDock.Theme = _themeManager.ActiveTheme.Theme; - } - catch (Exception) - { - // intentionally ignore exception - } - - // Persist settings when rebuilding UI - try - { - vsToolStripExtender.SetStyle(msMain, _themeManager.ActiveTheme.Version, - _themeManager.ActiveTheme.Theme); - vsToolStripExtender.SetStyle(_quickConnectToolStrip, _themeManager.ActiveTheme.Version, - _themeManager.ActiveTheme.Theme); - vsToolStripExtender.SetStyle(_externalToolsToolStrip, _themeManager.ActiveTheme.Version, - _themeManager.ActiveTheme.Theme); - vsToolStripExtender.SetStyle(_multiSshToolStrip, _themeManager.ActiveTheme.Version, - _themeManager.ActiveTheme.Theme); - - if (!_themeManager.ActiveAndExtended) return; - tsContainer.TopToolStripPanel.BackColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("CommandBarMenuDefault_Background"); - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("Error applying theme", ex, MessageClass.WarningMsg); - } - } - - private async void frmMain_Shown(object sender, EventArgs e) - { - PromptForUpdatesPreference(); - await CheckForUpdates(); - } - - private void PromptForUpdatesPreference() - { - if (Settings.Default.CheckForUpdatesAsked) return; - string[] commandButtons = - { - Language.AskUpdatesCommandRecommended, - Language.AskUpdatesCommandCustom, - Language.AskUpdatesCommandAskLater - }; - - CTaskDialog.ShowTaskDialogBox(this, GeneralAppInfo.ProductName, Language.AskUpdatesMainInstruction, - string.Format(Language.AskUpdatesContent, GeneralAppInfo.ProductName), - "", "", "", "", string.Join(" | ", commandButtons), ETaskDialogButtons.None, - ESysIcons.Question, - ESysIcons.Question); - - if (CTaskDialog.CommandButtonResult == 0 | CTaskDialog.CommandButtonResult == 1) - { - Settings.Default.CheckForUpdatesAsked = true; - } - - if (CTaskDialog.CommandButtonResult != 1) return; - - using (var optionsForm = new FrmOptions(Language.Updates)) - { - optionsForm.ShowDialog(this); - } - } - - private async Task CheckForUpdates() - { - if (!Settings.Default.CheckForUpdatesOnStartup) return; - - var nextUpdateCheck = - Convert.ToDateTime(Settings.Default.CheckForUpdatesLastCheck.Add(TimeSpan.FromDays(Convert.ToDouble(Settings.Default.CheckForUpdatesFrequencyDays)))); - - if (!Settings.Default.UpdatePending && DateTime.UtcNow <= nextUpdateCheck) return; - if (!IsHandleCreated) - CreateHandle(); // Make sure the handle is created so that InvokeRequired returns the correct result - - await Startup.Instance.CheckForUpdate(); - } - - private void frmMain_FormClosing(object sender, FormClosingEventArgs e) - { - if (Runtime.WindowList != null) - { - foreach (BaseWindow window in Runtime.WindowList) - { - window.Close(); - } - } - - IsClosing = true; - - Hide(); - - if (Settings.Default.CloseToTray) - { - if (Runtime.NotificationAreaIcon == null) - Runtime.NotificationAreaIcon = new NotificationAreaIcon(); - - if (WindowState == FormWindowState.Normal || WindowState == FormWindowState.Maximized) - { - Hide(); - WindowState = FormWindowState.Minimized; - e.Cancel = true; - return; - } - } - - if (!(Runtime.WindowList == null || Runtime.WindowList.Count == 0)) - { - var openConnections = 0; - if (pnlDock.Contents.Count > 0) - { - foreach (var dc in pnlDock.Contents) - { - if (!(dc is ConnectionWindow cw)) continue; - if (cw.Controls.Count < 1) continue; - if (!(cw.Controls[0] is DockPanel dp)) continue; - if (dp.Contents.Count > 0) - openConnections += dp.Contents.Count; - } - } - - if (openConnections > 0 && - (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.All | - (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.Multiple & - openConnections > 1) || Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.Exit)) - { - var result = CTaskDialog.MessageBox(this, Application.ProductName, - Language.ConfirmExitMainInstruction, "", "", "", - Language.CheckboxDoNotShowThisMessageAgain, - ETaskDialogButtons.YesNo, ESysIcons.Question, - ESysIcons.Question); - if (CTaskDialog.VerificationChecked) - { - Settings.Default.ConfirmCloseConnection--; - } - - if (result == DialogResult.No) - { - e.Cancel = true; - return; - } - } - } - - NativeMethods.ChangeClipboardChain(Handle, _fpChainedWindowHandle); - Shutdown.Cleanup(_quickConnectToolStrip, _externalToolsToolStrip, _multiSshToolStrip, this); - - Shutdown.StartUpdate(); - - Debug.Print("[END] - " + Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture)); - } - - #endregion - - #region Timer - - private void tmrAutoSave_Tick(object sender, EventArgs e) - { - Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Doing AutoSave"); - Runtime.ConnectionsService.SaveConnectionsAsync(); - } - - #endregion - - #region Window Overrides and DockPanel Stuff - - private void frmMain_ResizeBegin(object sender, EventArgs e) - { - _inSizeMove = true; - } - - private void frmMain_Resize(object sender, EventArgs e) - { - if (WindowState == FormWindowState.Minimized) - { - if (!Settings.Default.MinimizeToTray) return; - if (Runtime.NotificationAreaIcon == null) - { - Runtime.NotificationAreaIcon = new NotificationAreaIcon(); - } - - Hide(); - } - else - { - PreviousWindowState = WindowState; - } - } - - private void frmMain_ResizeEnd(object sender, EventArgs e) - { - _inSizeMove = false; - // This handles activations from clicks that started a size/move operation - ActivateConnection(); - } - - protected override void WndProc(ref System.Windows.Forms.Message m) - { - // Listen for and handle operating system messages - try - { - // ReSharper disable once SwitchStatementMissingSomeCases - switch (m.Msg) - { - case NativeMethods.WM_MOUSEACTIVATE: - _inMouseActivate = true; - break; - case NativeMethods.WM_ACTIVATEAPP: - var candidateTabToFocus = FromChildHandle(NativeMethods.WindowFromPoint(MousePosition)) - ?? GetChildAtPoint(MousePosition); - if (candidateTabToFocus is InterfaceControl) candidateTabToFocus.Parent.Focus(); - _inMouseActivate = false; - break; - case NativeMethods.WM_ACTIVATE: - // Only handle this msg if it was triggered by a click - if (NativeMethods.LOWORD(m.WParam) == NativeMethods.WA_CLICKACTIVE) - { - var controlThatWasClicked = FromChildHandle(NativeMethods.WindowFromPoint(MousePosition)) - ?? GetChildAtPoint(MousePosition); - if (controlThatWasClicked != null) - { - if (controlThatWasClicked is TreeView || - controlThatWasClicked is ComboBox || - controlThatWasClicked is MrngTextBox || - controlThatWasClicked is FrmMain) - { - controlThatWasClicked.Focus(); - } - else if (controlThatWasClicked.CanSelect || - controlThatWasClicked is MenuStrip || - controlThatWasClicked is ToolStrip) - { - // Simulate a mouse event since one wasn't generated by Windows - SimulateClick(controlThatWasClicked); - controlThatWasClicked.Focus(); - } - else if (controlThatWasClicked is AutoHideStripBase) - { - // only focus the autohide toolstrip - controlThatWasClicked.Focus(); - } - else - { - // This handles activations from clicks that did not start a size/move operation - ActivateConnection(); - } - } - } - break; - case NativeMethods.WM_WINDOWPOSCHANGED: - // Ignore this message if the window wasn't activated - var windowPos = - (NativeMethods.WINDOWPOS)Marshal.PtrToStructure(m.LParam, typeof(NativeMethods.WINDOWPOS)); - if ((windowPos.flags & NativeMethods.SWP_NOACTIVATE) == 0) - { - if (!_inMouseActivate && !_inSizeMove) - ActivateConnection(); - } - break; - case NativeMethods.WM_SYSCOMMAND: - if (m.WParam == new IntPtr(0)) - ShowHideMenu(); - var screen = _advancedWindowMenu.GetScreenById(m.WParam.ToInt32()); - if (screen != null) - { - Screens.SendFormToScreen(screen); - Console.WriteLine(_advancedWindowMenu.GetScreenById(m.WParam.ToInt32()).ToString()); - } - break; - case NativeMethods.WM_DRAWCLIPBOARD: - NativeMethods.SendMessage(_fpChainedWindowHandle, m.Msg, m.LParam, m.WParam); - _clipboardChangedEvent?.Invoke(); - break; - case NativeMethods.WM_CHANGECBCHAIN: - // When a clipboard viewer window receives the WM_CHANGECBCHAIN message, - // it should call the SendMessage function to pass the message to the - // next window in the chain, unless the next window is the window - // being removed. In this case, the clipboard viewer should save - // the handle specified by the lParam parameter as the next window in the chain. - // - // wParam is the Handle to the window being removed from - // the clipboard viewer chain - // lParam is the Handle to the next window in the chain - // following the window being removed. - if (m.WParam == _fpChainedWindowHandle) { - // If wParam is the next clipboard viewer then it - // is being removed so update pointer to the next - // window in the clipboard chain - _fpChainedWindowHandle = m.LParam; - } else { - //Send to the next window - NativeMethods.SendMessage(_fpChainedWindowHandle, m.Msg, m.LParam, m.WParam); - } - break; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("frmMain WndProc failed", ex); - } - - base.WndProc(ref m); - } - - private void SimulateClick(Control control) - { - var clientMousePosition = control.PointToClient(MousePosition); - var temp_wLow = clientMousePosition.X; - var temp_wHigh = clientMousePosition.Y; - NativeMethods.SendMessage(control.Handle, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, - (IntPtr)NativeMethods.MAKELPARAM(ref temp_wLow, ref temp_wHigh)); - clientMousePosition.X = temp_wLow; - clientMousePosition.Y = temp_wHigh; - } - - private void ActivateConnection() - { - var cw = pnlDock.ActiveDocument as ConnectionWindow; - var dp = cw?.ActiveControl as DockPane; - - if (!(dp?.ActiveContent is ConnectionTab tab)) return; - var ifc = InterfaceControl.FindInterfaceControl(tab); - if (ifc == null) return; - - ifc.Protocol.Focus(); - var conFormWindow = ifc.FindForm(); - ((ConnectionTab)conFormWindow)?.RefreshInterfaceController(); - } - - private void pnlDock_ActiveDocumentChanged(object sender, EventArgs e) - { - ActivateConnection(); - } - - internal void UpdateWindowTitle() - { - if (InvokeRequired) - { - Invoke(new MethodInvoker(UpdateWindowTitle)); - return; - } - - var titleBuilder = new StringBuilder(Application.ProductName); - const string separator = " - "; - - if (Runtime.ConnectionsService.IsConnectionsFileLoaded) - { - if (Runtime.ConnectionsService.UsingDatabase) - { - titleBuilder.Append(separator); - titleBuilder.Append(Language.SQLServer.TrimEnd(':')); - } - else - { - if (!string.IsNullOrEmpty(Runtime.ConnectionsService.ConnectionFileName)) - { - titleBuilder.Append(separator); - titleBuilder.Append(Settings.Default.ShowCompleteConsPathInTitle - ? Runtime.ConnectionsService.ConnectionFileName - : Path.GetFileName(Runtime.ConnectionsService.ConnectionFileName)); - } - } - } - - if (!string.IsNullOrEmpty(SelectedConnection?.Name)) - { - titleBuilder.Append(separator); - titleBuilder.Append(SelectedConnection.Name); - - if (Settings.Default.TrackActiveConnectionInConnectionTree) - Windows.TreeForm.JumpToNode(SelectedConnection); - } - - Text = titleBuilder.ToString(); - } - - public void ShowHidePanelTabs(DockContent closingDocument = null) - { - DocumentStyle newDocumentStyle; - - if (Settings.Default.AlwaysShowPanelTabs) - { - newDocumentStyle = DocumentStyle.DockingWindow; // Show the panel tabs - } - else - { - var nonConnectionPanelCount = 0; - foreach (var dockContent in pnlDock.Documents) - { - var document = (DockContent)dockContent; - if ((closingDocument == null || document != closingDocument) && !(document is ConnectionWindow)) - { - nonConnectionPanelCount++; - } - } - - newDocumentStyle = nonConnectionPanelCount == 0 - ? DocumentStyle.DockingSdi - : DocumentStyle.DockingWindow; - } - - // TODO: See if we can get this to work with DPS -#if false - foreach (var dockContent in pnlDock.Documents) - { - var document = (DockContent)dockContent; - if (document is ConnectionWindow) - { - var connectionWindow = (ConnectionWindow)document; - if (Settings.Default.AlwaysShowConnectionTabs == false) - { - connectionWindow.TabController.HideTabsMode = TabControl.HideTabsModes.HidepnlDock.DockLeftPortion = Always; - } - else - { - connectionWindow.TabController.HideTabsMode = TabControl.HideTabsModes.ShowAlways; - } - } - } -#endif - - if (pnlDock.DocumentStyle == newDocumentStyle) return; - pnlDock.DocumentStyle = newDocumentStyle; - pnlDock.Size = new Size(1, 1); - } - - public void SetDefaultLayout() - { - pnlDock.Visible = false; - - Windows.TreeForm.Show(pnlDock, DockState.DockLeft); - Windows.ConfigForm.Show(pnlDock, DockState.DockLeft); - Windows.ErrorsForm.Show(pnlDock, DockState.DockBottomAutoHide); - viewMenu._mMenViewErrorsAndInfos.Checked = true; - - pnlDock.Visible = true; - } - - public void SetLayout() - { - pnlDock.Visible = false; - - if (Settings.Default.ViewMenuMessages == true) - { - Windows.ErrorsForm.Show(pnlDock, DockState.DockBottomAutoHide); - viewMenu._mMenViewErrorsAndInfos.Checked = true; - } - else - viewMenu._mMenViewErrorsAndInfos.Checked = false; - - - if (Settings.Default.ViewMenuExternalTools == true) - { - viewMenu.TsExternalTools.Visible = true; - viewMenu._mMenViewExtAppsToolbar.Checked = true; - } - else - { - viewMenu.TsExternalTools.Visible = false; - viewMenu._mMenViewExtAppsToolbar.Checked = false; - } - - if (Settings.Default.ViewMenuMultiSSH == true) - { - viewMenu.TsMultiSsh.Visible = true; - viewMenu._mMenViewMultiSshToolbar.Checked = true; - } - else - { - viewMenu.TsMultiSsh.Visible = false; - viewMenu._mMenViewMultiSshToolbar.Checked = false; - } - - if (Settings.Default.ViewMenuQuickConnect == true) - { - viewMenu.TsQuickConnect.Visible = true; - viewMenu._mMenViewQuickConnectToolbar.Checked = true; - } - else - { - viewMenu.TsQuickConnect.Visible = false; - viewMenu._mMenViewQuickConnectToolbar.Checked = false; - } - - if (Settings.Default.LockToolbars == true) - { - Settings.Default.LockToolbars = true; - viewMenu._mMenViewLockToolbars.Checked = true; - } - else - { - Settings.Default.LockToolbars = false; - viewMenu._mMenViewLockToolbars.Checked = false; - } - - pnlDock.Visible = true; - } - - public void ShowHideMenu() => tsContainer.TopToolStripPanelVisible = !tsContainer.TopToolStripPanelVisible; - - #endregion - - #region Events - - public delegate void ClipboardchangeEventHandler(); - - public static event ClipboardchangeEventHandler ClipboardChanged - { - add => - _clipboardChangedEvent = - (ClipboardchangeEventHandler)Delegate.Combine(_clipboardChangedEvent, value); - remove => - _clipboardChangedEvent = - (ClipboardchangeEventHandler)Delegate.Remove(_clipboardChangedEvent, value); - } - - #endregion - - private void ViewMenu_Opening(object sender, EventArgs e) - { - viewMenu.mMenView_DropDownOpening(sender, e); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/frmMain.resx b/mRemoteNG/UI/Forms/frmMain.resx deleted file mode 100644 index e30234e9b..000000000 --- a/mRemoteNG/UI/Forms/frmMain.resx +++ /dev/null @@ -1,1135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 688, 17 - - - 17, 17 - - - 197, 17 - - - 510, 17 - - - 783, 17 - - - 350, 17 - - - - - AAABAA0AICAQAAEABADoAgAA1gAAABAQEAABAAQAKAEAAL4DAAAwMAAAAQAIAKgOAADmBAAAICAAAAEA - CACoCAAAjhMAABAQAAABAAgAaAUAADYcAAAAAAAAAQAgAEIfAACeIQAAQEAAAAEAIAAoQgAA4EAAADAw - AAABACAAqCUAAAiDAAAoKAAAAQAgAGgaAACwqAAAICAAAAEAIACoEAAAGMMAABgYAAABACAAiAkAAMDT - AAAUFAAAAQAgALgGAABI3QAAEBAAAAEAIABoBAAAAOQAACgAAAAgAAAAQAAAAAEABAAAAAAAgAIAAAAA - AAAAAAAAEAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD/ - /wD/AAAA/wD/AP//AAD///8AAHd3ZWdHdHR3R3R2V2V4AAdCUGFhYWBwcENCUlJDQnC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W1ZQAF5ZVABjXlkAbGdiAG1nZABtaWQAdG9qAHhz - bgB7dnEAfHdzAIZXPgCVXkAAnGBBAKNkQgCtZ0MArWhDALVrRAC6bUUAvG5FAIF8dwCDfnkA0ndJANp6 - SgDdfEoA435LAJCBdwDpgUwAkIuHAJaOiACempUAppSKAKqmogCsqKQAubWxAL25tQDCvroAxsK+AMnG - wgDLyMQAzcrGANHOygDU0c0A19PQANnW0gDc2dUA4N3aAOfk4AAAsDYAAM9AAADwSgAR/1sAMf9xAFH/ - hwBx/50Akf+yALH/yQDR/98A////AAAAAAACLwAABFAAAAZwAAAIkAAACrAAAAvPAAAO8AAAIP8SAD3/ - MQBb/1EAef9xAJj/kQC1/7EA1P/RAP///wAAAAAAFC8AACJQAAAwcAAAPZAAAEywAABZzwAAZ/AAAHj/ - EQCK/zEAnP9RAK7/cQDA/5EA0v+xAOT/0QD///8AAAAAACYvAABAUAAAWnAAAHSQAACOsAAAqc8AAMLw - AADR/xEA2P8xAN7/UQDj/3EA6f+RAO//sQD2/9EA////AAAAAAAvJgAAUEEAAHBbAACQdAAAsI4AAM+p - AADwwwAA/9IRAP/YMQD/3VEA/+RxAP/qkQD/8LEA//bRAP///wAAAAAALxQAAFAiAABwMAAAkD4AALBN - AADPWwAA8GkAAP95EQD/ijEA/51RAP+vcQD/wZEA/9KxAP/l0QD///8AAAAAAC8DAABQBAAAcAYAAJAJ - AACwCgAAzwwAAPAOAAD/IBIA/z4xAP9cUQD/enEA/5eRAP+2sQD/1NEA////AAAAAAAvAA4AUAAXAHAA - IQCQACsAsAA2AM8AQADwAEkA/xFaAP8xcAD/UYYA/3GcAP+RsgD/scgA/9HfAP///wAAAAAALwAgAFAA - NgBwAEwAkABiALAAeADPAI4A8ACkAP8RswD/Mb4A/1HHAP9x0QD/kdwA/7HlAP/R8AD///8AAAAAACwA - LwBLAFAAaQBwAIcAkAClALAAxADPAOEA8ADwEf8A8jH/APRR/wD2cf8A95H/APmx/wD70f8A////AAAA - AAAbAC8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P//+KT///ik// - /4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik// - /4pP//+KT///ik///4pP//+KT//pgUz/Zko5/0A6NP9IQj3/xMG9/+/s6f/v7On/7+zp/+7r6P+Ggn3/ - QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/11YUv/X1ND/7+zp/+/s6f/v7On/ - 7+zp/6ahnf9CPDb/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjPfPjo04EA6NP9AOjT/QDo0/0A6NP97Uzz/ - +ohO//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik///4pP//+KT///ik// - /4pP//+KT///ik///4pP//+KT///ik///4pP//+KT//vg03/i1k+/0M7NP9AOjT/SEI9/8TBvf/v7On/ - 7+zp/+/s6f/u6+j/hoJ9/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9EPjj/ - tbGt/+/s6f/v7On/7+zp/+/s6f/AvLj/R0E7/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDoz3z46NOBAOjT/ - QDo0/0A6NP9AOjT/dlE7//WGTf/9iU///YlP//2JT//9iU///YlP//2JT//9iU///YlP//2JT//9iU// - /YlP//2JT//9iU///YlP//2JT//9iU///YlP//yJT//7iE7/+IdO/++DTf/KdEf/eVI8/0Q8NP9AOjT/ - QDo0/0hCPf/Ewb3/7+zp/+/s6f/v7On/7uvo/4aCff9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/QTs2/6qmov/v7On/7+zp/+/s6f/v7On/x8PA/0lEPv9AOjT/QDo0/0A6NP9AOjT/ - QDo0/0A6M98+OjTgQDo0/0A6NP9AOjT/QDo0/0w/Nv9/VD3/iFg+/4hYPv+IWD7/iFg+/4hYPv+IWD7/ - iFg+/4hYPv+IWD7/iFg+/4hYPv+IWD7/iFg+/4hYPv+IWD7/iF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U0I3/2JIOf9iSDn/Ykg5/2JIOf9eRjj/ST41/5CLh//U0c3/e3Zx/3Rvav+empX/ - 2dbS/15ZVP9AOTLeQDoz30A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP98d3P/xsK+/8K/u//Cvrr/ - u7ez/4N+ef9EPjj/QDky3kA6M99AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/RD44/0lDPf9JQz3/ - SUM9/0ZAOv9BOzX/QDo0/0A5Mt5AOTPeQDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/QDo0/0A6NP8/OTLdQDk0w0A6NP9AOjT/QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/ - QDo0/0A6NP9AOjT/QDo0/0A6NP9AOjT/QDgzwkA9NUdAOTTDQDky3kA6M99AOjPfQDoz30A6M99AOjPf - QDoz30A6M99AOjPfQDoz30A6M99AOTLeQDk0wz47M0UAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - - - \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/frmOptions.Designer.cs b/mRemoteNG/UI/Forms/frmOptions.Designer.cs deleted file mode 100644 index f8c12440b..000000000 --- a/mRemoteNG/UI/Forms/frmOptions.Designer.cs +++ /dev/null @@ -1,192 +0,0 @@ -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Forms -{ - partial class FrmOptions - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmOptions)); - this.pnlBottom = new System.Windows.Forms.Panel(); - this.btnApply = new MrngButton(); - this.btnCancel = new MrngButton(); - this.btnOK = new MrngButton(); - this.splitter1 = new System.Windows.Forms.Splitter(); - this.splitter2 = new System.Windows.Forms.Splitter(); - this.pnlMain = new System.Windows.Forms.Panel(); - this.lstOptionPages = new mRemoteNG.UI.Controls.MrngListView(); - this.PageName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.pnlBottom.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.lstOptionPages)).BeginInit(); - this.SuspendLayout(); - // - // pnlBottom - // - this.pnlBottom.Controls.Add(this.btnApply); - this.pnlBottom.Controls.Add(this.btnCancel); - this.pnlBottom.Controls.Add(this.btnOK); - this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlBottom.Location = new System.Drawing.Point(0, 492); - this.pnlBottom.Name = "pnlBottom"; - this.pnlBottom.Size = new System.Drawing.Size(764, 35); - this.pnlBottom.TabIndex = 0; - // - // btnApply - // - this.btnApply._mice = MrngButton.MouseState.OUT; - this.btnApply.Location = new System.Drawing.Point(677, 5); - this.btnApply.Name = "btnApply"; - this.btnApply.Size = new System.Drawing.Size(75, 23); - this.btnApply.TabIndex = 2; - this.btnApply.Text = "Apply"; - this.btnApply.UseVisualStyleBackColor = true; - this.btnApply.Click += new System.EventHandler(this.BtnOK_Click); - // - // btnCancel - // - this.btnCancel._mice = MrngButton.MouseState.OUT; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(596, 5); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 1; - this.btnCancel.Text = "Cancel"; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click); - // - // btnOK - // - this.btnOK._mice = MrngButton.MouseState.OUT; - this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Location = new System.Drawing.Point(515, 5); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(75, 23); - this.btnOK.TabIndex = 0; - this.btnOK.Text = "OK"; - this.btnOK.UseVisualStyleBackColor = true; - this.btnOK.Click += new System.EventHandler(this.BtnOK_Click); - // - // splitter1 - // - this.splitter1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.splitter1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.splitter1.Location = new System.Drawing.Point(0, 491); - this.splitter1.Name = "splitter1"; - this.splitter1.Size = new System.Drawing.Size(764, 1); - this.splitter1.TabIndex = 1; - this.splitter1.TabStop = false; - // - // splitter2 - // - this.splitter2.Location = new System.Drawing.Point(151, 0); - this.splitter2.Name = "splitter2"; - this.splitter2.Size = new System.Drawing.Size(1, 491); - this.splitter2.TabIndex = 3; - this.splitter2.TabStop = false; - // - // pnlMain - // - this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlMain.Location = new System.Drawing.Point(152, 0); - this.pnlMain.Name = "pnlMain"; - this.pnlMain.Size = new System.Drawing.Size(612, 491); - this.pnlMain.TabIndex = 4; - // - // lstOptionPages - // - this.lstOptionPages.AllColumns.Add(this.PageName); - this.lstOptionPages.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.lstOptionPages.CellEditUseWholeCell = false; - this.lstOptionPages.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.PageName}); - this.lstOptionPages.Cursor = System.Windows.Forms.Cursors.Default; - this.lstOptionPages.DecorateLines = true; - this.lstOptionPages.Dock = System.Windows.Forms.DockStyle.Left; - this.lstOptionPages.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lstOptionPages.FullRowSelect = true; - this.lstOptionPages.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.lstOptionPages.HideSelection = false; - this.lstOptionPages.LabelWrap = false; - this.lstOptionPages.Location = new System.Drawing.Point(0, 0); - this.lstOptionPages.MultiSelect = false; - this.lstOptionPages.Name = "lstOptionPages"; - this.lstOptionPages.RowHeight = 25; - this.lstOptionPages.ShowGroups = false; - this.lstOptionPages.ShowImagesOnSubItems = true; - this.lstOptionPages.Size = new System.Drawing.Size(151, 491); - this.lstOptionPages.TabIndex = 2; - this.lstOptionPages.TileSize = new System.Drawing.Size(168, 40); - this.lstOptionPages.UseCompatibleStateImageBehavior = false; - this.lstOptionPages.View = System.Windows.Forms.View.Details; - // - // PageName - // - this.PageName.AspectName = "PageName"; - this.PageName.FillsFreeSpace = true; - this.PageName.Groupable = false; - this.PageName.ImageAspectName = "IconImage"; - this.PageName.IsEditable = false; - // - // FrmOptions - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(764, 527); - this.Controls.Add(this.pnlMain); - this.Controls.Add(this.splitter2); - this.Controls.Add(this.lstOptionPages); - this.Controls.Add(this.splitter1); - this.Controls.Add(this.pnlBottom); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "FrmOptions"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "mRemoteNG Options"; - this.Load += new System.EventHandler(this.FrmOptions_Load); - this.pnlBottom.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.lstOptionPages)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel pnlBottom; - private System.Windows.Forms.Splitter splitter1; - private Controls.MrngListView lstOptionPages; - private System.Windows.Forms.Splitter splitter2; - private System.Windows.Forms.Panel pnlMain; - private MrngButton btnOK; - private MrngButton btnCancel; - private BrightIdeasSoftware.OLVColumn PageName; - private MrngButton btnApply; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/frmOptions.cs b/mRemoteNG/UI/Forms/frmOptions.cs deleted file mode 100644 index 0ed14f957..000000000 --- a/mRemoteNG/UI/Forms/frmOptions.cs +++ /dev/null @@ -1,156 +0,0 @@ -using mRemoteNG.UI.Forms.OptionsPages; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.Themes; -using System.Configuration; -using mRemoteNG.Properties; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Forms -{ - public partial class FrmOptions : Form - { - private Dictionary _pages; - private readonly string _pageName; - private readonly DisplayProperties _display = new DisplayProperties(); - - public FrmOptions() : this(Language.StartupExit) - { - } - - public FrmOptions(string pn) - { - Cursor.Current = Cursors.WaitCursor; - Application.DoEvents(); - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Settings_16x); - _pageName = pn; - Cursor.Current = Cursors.Default; - } - - private void FrmOptions_Load(object sender, EventArgs e) - { - CompileListOfOptionsPages(); - FontOverrider.FontOverride(this); - AddOptionsPagesToListView(); - SetInitiallyActivatedPage(); - // ApplyLanguage(); - // Handle the main page here and the individual pages in - // AddOptionsPagesToListView() -- one less foreach loop.... - Text = Language.OptionsPageTitle; - btnOK.Text = Language._Ok; - btnCancel.Text = Language._Cancel; - btnApply.Text = Language.Apply; - ApplyTheme(); - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - lstOptionPages.SelectedIndexChanged += LstOptionPages_SelectedIndexChanged; - lstOptionPages.SelectedIndex = 0; - } - - private void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) return; - BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - -#if false - private void ApplyLanguage() - { - Text = Language.OptionsPageTitle; - foreach (var optionPage in _pages.Values) - { - optionPage.ApplyLanguage(); - } - } -#endif - private void CompileListOfOptionsPages() - { - _pages = new Dictionary - { - {typeof(StartupExitPage).Name, new StartupExitPage {Dock = DockStyle.Fill}}, - {typeof(AppearancePage).Name, new AppearancePage {Dock = DockStyle.Fill}}, - {typeof(TabsPanelsPage).Name, new TabsPanelsPage {Dock = DockStyle.Fill}}, - {typeof(NotificationsPage).Name, new NotificationsPage {Dock = DockStyle.Fill}}, - {typeof(ConnectionsPage).Name, new ConnectionsPage {Dock = DockStyle.Fill}}, - {typeof(CredentialsPage).Name, new CredentialsPage {Dock = DockStyle.Fill}}, - {typeof(SqlServerPage).Name, new SqlServerPage {Dock = DockStyle.Fill}}, - {typeof(UpdatesPage).Name, new UpdatesPage {Dock = DockStyle.Fill}}, - {typeof(ThemePage).Name, new ThemePage {Dock = DockStyle.Fill}}, - {typeof(SecurityPage).Name, new SecurityPage {Dock = DockStyle.Fill}}, - {typeof(AdvancedPage).Name, new AdvancedPage {Dock = DockStyle.Fill}}, - {typeof(BackupPage).Name, new BackupPage {Dock = DockStyle.Fill}}, - //{typeof(ComponentsPage).Name, new ComponentsPage {Dock = DockStyle.Fill}}, - }; - } - - private void AddOptionsPagesToListView() - { - lstOptionPages.RowHeight = _display.ScaleHeight(lstOptionPages.RowHeight); - lstOptionPages.AllColumns.First().ImageGetter = ImageGetter; - - foreach (var page in _pages.Select(keyValuePair => keyValuePair.Value)) - { - page.ApplyLanguage(); - page.LoadSettings(); - lstOptionPages.AddObject(page); - } - } - - private object ImageGetter(object rowobject) - { - var page = rowobject as OptionsPage; - return page?.PageIcon == null ? _display.ScaleImage(Properties.Resources.F1Help_16x) : _display.ScaleImage(page.PageIcon); - } - - private void SetInitiallyActivatedPage() - { - var isSet = false; - for (var i = 0; i < lstOptionPages.Items.Count; i++) - { - if (!lstOptionPages.Items[i].Text.Equals(_pageName)) continue; - lstOptionPages.Items[i].Selected = true; - isSet = true; - break; - } - - if (!isSet) - lstOptionPages.Items[0].Selected = true; - } - - /* - * This gets called by both OK and Apply buttons. - * OK sets DialogResult = OK, Apply does not (None). - * Apply will no close the dialog. - */ - private void BtnOK_Click(object sender, EventArgs e) - { - foreach (var page in _pages.Values) - { - Debug.WriteLine(page.PageName); - page.SaveSettings(); - } - - Debug.WriteLine((ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)).FilePath); - Settings.Default.Save(); - } - - - private void LstOptionPages_SelectedIndexChanged(object sender, EventArgs e) - { - pnlMain.Controls.Clear(); - - var page = (OptionsPage)lstOptionPages.SelectedObject; - if (page != null) - pnlMain.Controls.Add(page); - } - - private void BtnCancel_Click(object sender, EventArgs e) - { - Close(); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Forms/frmOptions.resx b/mRemoteNG/UI/Forms/frmOptions.resx deleted file mode 100644 index 68916e6bf..000000000 --- a/mRemoteNG/UI/Forms/frmOptions.resx +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsbGxjWFhYv1FRUb9SUlJjAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAb29vKW1tbQ5/f38CgICA6r29vf+ysrL/W1tb6n9/fwJbW1sOUFBQKQAA - AAAAAAAAAAAAAAAAAAAA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O////AsfHx+rl5eX/5OTk/6ysrOp/f38Ctra2Dq6urikAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADLy8tjxsbGv8TExL++vr5jAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAA/n8AAPw/AADEIwAAwAMAAMADAADAAwAAAYAAAAPAAAADwAAAAYAAAMADAADAAwAAwAMAAMQj - AAD8PwAA/n8AAA== - - - \ No newline at end of file diff --git a/mRemoteNG/UI/FullscreenHandler.cs b/mRemoteNG/UI/FullscreenHandler.cs deleted file mode 100644 index 0863f468b..000000000 --- a/mRemoteNG/UI/FullscreenHandler.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; - -namespace mRemoteNG.UI -{ - public class FullscreenHandler - { - private readonly Form _handledForm; - private FormWindowState _savedWindowState; - private FormBorderStyle _savedBorderStyle; - private Rectangle _savedBounds; - private bool _value; - - public bool Value - { - get => _value; - set - { - if (_value == value) return; - if (!_value) - EnterFullscreen(); - else - ExitFullscreen(); - _value = value; - } - } - - public FullscreenHandler(Form handledForm) - { - _handledForm = handledForm; - } - - private void EnterFullscreen() - { - _savedBorderStyle = _handledForm.FormBorderStyle; - _savedWindowState = _handledForm.WindowState; - _savedBounds = _handledForm.Bounds; - - _handledForm.FormBorderStyle = FormBorderStyle.None; - if (_handledForm.WindowState == FormWindowState.Maximized) - { - _handledForm.WindowState = FormWindowState.Normal; - } - - _handledForm.WindowState = FormWindowState.Maximized; - } - - private void ExitFullscreen() - { - _handledForm.FormBorderStyle = _savedBorderStyle; - _handledForm.WindowState = _savedWindowState; - _handledForm.Bounds = _savedBounds; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/GraphicsUtilities/GdiPlusGraphicsProvider.cs b/mRemoteNG/UI/GraphicsUtilities/GdiPlusGraphicsProvider.cs deleted file mode 100644 index 074093c0e..000000000 --- a/mRemoteNG/UI/GraphicsUtilities/GdiPlusGraphicsProvider.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Drawing; -using System.Windows.Forms; - -namespace mRemoteNG.UI.GraphicsUtilities -{ - /// - /// Gets environment graphics information using the Windows GDI+ API. - /// - public class GdiPlusGraphicsProvider : IGraphicsProvider - { - // Dpi of a 'normal' definition screen - private const int BaselineDpi = 96; - - - public SizeF GetResolutionScalingFactor() - { - //This method could be optimized, as it is called for every control / subcontrol - //and causes overhead for 100s in the options page - using (var f = new Form()) - { - var g = f.CreateGraphics(); - return new SizeF(g.DpiX / BaselineDpi, g.DpiY / BaselineDpi); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/GraphicsUtilities/IGraphicsProvider.cs b/mRemoteNG/UI/GraphicsUtilities/IGraphicsProvider.cs deleted file mode 100644 index ac9451a3c..000000000 --- a/mRemoteNG/UI/GraphicsUtilities/IGraphicsProvider.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Drawing; - -namespace mRemoteNG.UI.GraphicsUtilities -{ - public interface IGraphicsProvider - { - SizeF GetResolutionScalingFactor(); - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/ISelectionTarget.cs b/mRemoteNG/UI/ISelectionTarget.cs deleted file mode 100644 index 919189b86..000000000 --- a/mRemoteNG/UI/ISelectionTarget.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Drawing; - -namespace mRemoteNG.UI -{ - public interface ISelectionTarget - { - string Text { get; set; } - Image Image { get; } - T Config { get; } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Menu/AdvancedWindowMenu.cs b/mRemoteNG/UI/Menu/AdvancedWindowMenu.cs deleted file mode 100644 index 965502453..000000000 --- a/mRemoteNG/UI/Menu/AdvancedWindowMenu.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.Tools; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Menu -{ - // This class creates new menu items to menu that appears when you right click the top of the app (where the window title is) - public class AdvancedWindowMenu : IDisposable - { - private readonly WindowMenu _windowMenu; - private readonly int[] _sysMenSubItems = new int[51]; - - public AdvancedWindowMenu(IWin32Window boundControl) - { - _windowMenu = new WindowMenu(boundControl.Handle); - } - - public Screen GetScreenById(int id) - { - for (var i = 0; i <= _sysMenSubItems.Length - 1; i++) - { - if (_sysMenSubItems[i] != id) continue; - return Screen.AllScreens[i]; - } - - return null; - } - - public void OnDisplayChanged(object sender, EventArgs e) - { - ResetScreenList(); - BuildAdditionalMenuItems(); - } - - private void ResetScreenList() - { - _windowMenu.Reset(); - } - - public void BuildAdditionalMenuItems() - { - // option to send main form to another screen - var popMen = _windowMenu.CreatePopupMenuItem(); - for (var i = 0; i <= Screen.AllScreens.Length - 1; i++) - { - _sysMenSubItems[i] = 200 + i; - _windowMenu.AppendMenuItem(popMen, WindowMenu.Flags.MF_STRING, new IntPtr(_sysMenSubItems[i]), - Language.Screen + " " + Convert.ToString(i + 1)); - } - _windowMenu.InsertMenuItem(_windowMenu.SystemMenuHandle, 0, - WindowMenu.Flags.MF_POPUP | WindowMenu.Flags.MF_BYPOSITION, popMen, - Language.SendTo); - // option to show/hide menu strips - _windowMenu.InsertMenuItem(_windowMenu.SystemMenuHandle, 1, - WindowMenu.Flags.MF_BYPOSITION, new IntPtr(0), - Language.ShowHideMenu); - // separator - _windowMenu.InsertMenuItem(_windowMenu.SystemMenuHandle, 2, - WindowMenu.Flags.MF_BYPOSITION | WindowMenu.Flags.MF_SEPARATOR, IntPtr.Zero, - null); - } - - private void Dispose(bool disposing) - { - if (!disposing) return; - - _windowMenu?.Dispose(); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Menu/FileMenu.cs b/mRemoteNG/UI/Menu/FileMenu.cs deleted file mode 100644 index f12cdea87..000000000 --- a/mRemoteNG/UI/Menu/FileMenu.cs +++ /dev/null @@ -1,210 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Properties; -using mRemoteNG.Security; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Window; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Menu -{ - public class FileMenu : ToolStripMenuItem - { - private ToolStripMenuItem _mMenToolsOptions; - private ToolStripMenuItem _mMenFileNew; - private ToolStripMenuItem _mMenFileLoad; - private ToolStripMenuItem _mMenFileSave; - private ToolStripMenuItem _mMenFileSaveAs; - private ToolStripMenuItem _mMenFileExit; - private ToolStripSeparator _mMenFileSep2; - private ToolStripSeparator _mMenFileSep1; - - public ConnectionTreeWindow TreeWindow { get; set; } - - public FileMenu() - { - Initialize(); - } - - private void Initialize() - { - _mMenFileNew = new ToolStripMenuItem(); - _mMenFileLoad = new ToolStripMenuItem(); - _mMenFileSave = new ToolStripMenuItem(); - _mMenFileSaveAs = new ToolStripMenuItem(); - _mMenFileSep2 = new ToolStripSeparator(); - _mMenFileSep1 = new ToolStripSeparator(); - _mMenFileExit = new ToolStripMenuItem(); - _mMenToolsOptions = new ToolStripMenuItem(); - - // - // mMenFile - // - DropDownItems.AddRange(new ToolStripItem[] - { - _mMenFileNew, - _mMenFileLoad, - _mMenFileSave, - _mMenFileSaveAs, - _mMenFileSep1, - _mMenToolsOptions, - _mMenFileSep2, - _mMenFileExit - }); - Name = "mMenFile"; - Size = new System.Drawing.Size(37, 20); - Text = Language._File; - // - // mMenFileNew - // - _mMenFileNew.Image = Properties.Resources.NewFile_16x; - _mMenFileNew.Name = "mMenFileNew"; - _mMenFileLoad.ShortcutKeys = Keys.Control | Keys.N; - _mMenFileNew.Size = new System.Drawing.Size(281, 22); - _mMenFileNew.Text = Language.NewConnectionFile; - _mMenFileNew.Click += mMenFileNew_Click; - // - // mMenFileLoad - // - _mMenFileLoad.Image = Properties.Resources.OpenFile_16x; - _mMenFileLoad.Name = "mMenFileLoad"; - _mMenFileLoad.ShortcutKeys = Keys.Control | Keys.O; - _mMenFileLoad.Size = new System.Drawing.Size(281, 22); - _mMenFileLoad.Text = Language.OpenConnectionFile; - _mMenFileLoad.Click += mMenFileLoad_Click; - // - // mMenFileSave - // - _mMenFileSave.Name = "mMenFileSave"; - _mMenFileSave.ShortcutKeys = Keys.Control | Keys.S; - _mMenFileSave.Size = new System.Drawing.Size(281, 22); - _mMenFileSave.Text = Language.SaveConnectionFile; - _mMenFileSave.Click += mMenFileSave_Click; - // - // mMenFileSaveAs - // - _mMenFileSaveAs.Name = "mMenFileSaveAs"; - _mMenFileSaveAs.ShortcutKeys = (Keys.Control | Keys.Shift) - | Keys.S; - _mMenFileSaveAs.Size = new System.Drawing.Size(281, 22); - _mMenFileSaveAs.Text = Language.SaveConnectionFileAs; - _mMenFileSaveAs.Click += mMenFileSaveAs_Click; - // - // mMenFileSep2 - // - _mMenFileSep2.Name = "mMenFileSep2"; - _mMenFileSep2.Size = new System.Drawing.Size(278, 6); - // - // mMenFileSep1 - // - _mMenFileSep1.Name = "mMenFileSep3"; - _mMenFileSep1.Size = new System.Drawing.Size(278, 6); - // - // mMenToolsOptions - // - _mMenToolsOptions.Image = Properties.Resources.Settings_16x; - _mMenToolsOptions.Name = "mMenToolsOptions"; - _mMenToolsOptions.Size = new System.Drawing.Size(184, 22); - _mMenToolsOptions.Text = Language.Options; - _mMenToolsOptions.Click += mMenToolsOptions_Click; - // - // mMenFileExit - // - _mMenFileExit.Image = Properties.Resources.CloseSolution_16x; - _mMenFileExit.Name = "mMenFileExit"; - _mMenFileExit.ShortcutKeys = Keys.Alt | Keys.F4; - _mMenFileExit.Size = new System.Drawing.Size(281, 22); - _mMenFileExit.Text = Language.Exit; - _mMenFileExit.Click += mMenFileExit_Click; - } - - public void ApplyLanguage() - { - Text = Language._File; - _mMenFileNew.Text = Language.NewConnectionFile; - _mMenFileLoad.Text = Language.OpenConnectionFile; - _mMenFileSave.Text = Language.SaveConnectionFile; - _mMenFileSaveAs.Text = Language.SaveConnectionFileAs; - _mMenToolsOptions.Text = Language.Options; - _mMenFileExit.Text = Language.Exit; - } - - #region File - - private void mMenFileNew_Click(object sender, EventArgs e) - { - using (var saveFileDialog = DialogFactory.ConnectionsSaveAsDialog()) - { - if (saveFileDialog.ShowDialog() != DialogResult.OK) - { - return; - } - - Runtime.ConnectionsService.NewConnectionsFile(saveFileDialog.FileName); - } - } - - private void mMenFileLoad_Click(object sender, EventArgs e) - { - if (Runtime.ConnectionsService.IsConnectionsFileLoaded) - { - var msgBoxResult = MessageBox.Show(Language.SaveConnectionsFileBeforeOpeningAnother, - Language.Save, MessageBoxButtons.YesNoCancel); - // ReSharper disable once SwitchStatementMissingSomeCases - switch (msgBoxResult) - { - case DialogResult.Yes: - Runtime.ConnectionsService.SaveConnections(); - break; - case DialogResult.Cancel: - return; - } - } - - Runtime.LoadConnections(true); - } - - private void mMenFileSave_Click(object sender, EventArgs e) - { - Runtime.ConnectionsService.SaveConnectionsAsync(); - } - - private void mMenFileSaveAs_Click(object sender, EventArgs e) - { - using (var saveFileDialog = DialogFactory.ConnectionsSaveAsDialog()) - { - if (saveFileDialog.ShowDialog(FrmMain.Default) != DialogResult.OK) - return; - - var newFileName = saveFileDialog.FileName; - - Runtime.ConnectionsService.SaveConnections(Runtime.ConnectionsService.ConnectionTreeModel, false, - new SaveFilter(), newFileName); - - if (newFileName == Runtime.ConnectionsService.GetDefaultStartupConnectionFileName()) - { - Settings.Default.LoadConsFromCustomLocation = false; - } - else - { - Settings.Default.LoadConsFromCustomLocation = true; - Settings.Default.CustomConsPath = newFileName; - } - } - } - - private void mMenFileExit_Click(object sender, EventArgs e) - { - Shutdown.Quit(); - } - - private void mMenToolsOptions_Click(object sender, EventArgs e) - { - Windows.Show(WindowType.Options); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Menu/HelpMenu.cs b/mRemoteNG/UI/Menu/HelpMenu.cs deleted file mode 100644 index 5c78cdeb7..000000000 --- a/mRemoteNG/UI/Menu/HelpMenu.cs +++ /dev/null @@ -1,157 +0,0 @@ -using System; -using System.Diagnostics; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.UI.Forms; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Menu -{ - public class HelpMenu : ToolStripMenuItem - { - private ToolStripMenuItem _mMenInfoHelp; - private ToolStripMenuItem _mMenInfoWebsite; - private ToolStripSeparator _mMenInfoSep1; - private ToolStripMenuItem _mMenInfoAbout; - private ToolStripMenuItem _mMenInfoDonate; - private ToolStripSeparator _mMenInfoSep2; - private ToolStripSeparator _mMenInfoSep3; - private ToolStripSeparator _mMenInfoSep4; - private ToolStripMenuItem _mMenInfoForum; - private ToolStripMenuItem _mMenToolsUpdate; - - public HelpMenu() - { - Initialize(); - } - - private void Initialize() - { - _mMenInfoHelp = new ToolStripMenuItem(); - _mMenInfoSep1 = new ToolStripSeparator(); - _mMenInfoWebsite = new ToolStripMenuItem(); - _mMenInfoDonate = new ToolStripMenuItem(); - _mMenInfoForum = new ToolStripMenuItem(); - _mMenToolsUpdate = new ToolStripMenuItem(); - _mMenInfoSep2 = new ToolStripSeparator(); - _mMenInfoSep3 = new ToolStripSeparator(); - _mMenInfoSep4 = new ToolStripSeparator(); - _mMenInfoAbout = new ToolStripMenuItem(); - - // - // mMenInfo - // - DropDownItems.AddRange(new ToolStripItem[] - { - _mMenInfoHelp, - _mMenInfoSep1, - _mMenInfoWebsite, - _mMenInfoForum, - _mMenInfoSep2, - _mMenToolsUpdate, - _mMenInfoSep3, - _mMenInfoDonate, - _mMenInfoSep4, - _mMenInfoAbout - }); - Name = "mMenInfo"; - Size = new System.Drawing.Size(44, 20); - Text = Language._Help; - TextDirection = ToolStripTextDirection.Horizontal; - // - // mMenInfoHelp - // - _mMenInfoHelp.Image = Properties.Resources.F1Help_16x; - _mMenInfoHelp.Name = "mMenInfoHelp"; - _mMenInfoHelp.ShortcutKeys = Keys.F1; - _mMenInfoHelp.Size = new System.Drawing.Size(190, 22); - _mMenInfoHelp.Text = Language.HelpContents; - _mMenInfoHelp.Click += mMenInfoHelp_Click; - // - // mMenToolsUpdate - // - _mMenToolsUpdate.Image = Properties.Resources.RunUpdate_16x; - _mMenToolsUpdate.Name = "mMenToolsUpdate"; - _mMenToolsUpdate.Size = new System.Drawing.Size(190, 22); - _mMenToolsUpdate.Text = Language.CheckForUpdates; - _mMenToolsUpdate.Click += mMenToolsUpdate_Click; - // - // mMenInfoSep1 - // - _mMenInfoSep1.Name = "mMenInfoSep1"; - _mMenInfoSep1.Size = new System.Drawing.Size(187, 6); - // - // mMenInfoWebsite - // - _mMenInfoWebsite.Name = "mMenInfoWebsite"; - _mMenInfoWebsite.Size = new System.Drawing.Size(190, 22); - _mMenInfoWebsite.Text = Language.Website; - _mMenInfoWebsite.Click += mMenInfoWebsite_Click; - // - // mMenInfoDonate - // - _mMenInfoDonate.Name = "mMenInfoDonate"; - _mMenInfoDonate.Size = new System.Drawing.Size(190, 22); - _mMenInfoDonate.Text = Language.Donate; - _mMenInfoDonate.Click += mMenInfoDonate_Click; - // - // mMenInfoForum - // - _mMenInfoForum.Name = "mMenInfoForum"; - _mMenInfoForum.Size = new System.Drawing.Size(190, 22); - _mMenInfoForum.Text = Language.SupportForum; - _mMenInfoForum.Click += mMenInfoForum_Click; - // - // mMenInfoSep2 - // - _mMenInfoSep2.Name = "mMenInfoSep2"; - _mMenInfoSep2.Size = new System.Drawing.Size(187, 6); - // - // mMenInfoSep3 - // - _mMenInfoSep3.Name = "mMenInfoSep2"; - _mMenInfoSep3.Size = new System.Drawing.Size(187, 6); - // - // mMenInfoSep4 - // - _mMenInfoSep4.Name = "mMenInfoSep2"; - _mMenInfoSep4.Size = new System.Drawing.Size(187, 6); - // - // mMenInfoAbout - // - _mMenInfoAbout.Image = Properties.Resources.UIAboutBox_16x; - _mMenInfoAbout.Name = "mMenInfoAbout"; - _mMenInfoAbout.Size = new System.Drawing.Size(190, 22); - _mMenInfoAbout.Text = Language.About; - _mMenInfoAbout.Click += mMenInfoAbout_Click; - } - - public void ApplyLanguage() - { - Text = Language._Help; - _mMenInfoHelp.Text = Language.HelpContents; - _mMenInfoWebsite.Text = Language.Website; - _mMenInfoDonate.Text = Language.Donate; - _mMenInfoForum.Text = Language.SupportForum; - _mMenInfoAbout.Text = Language.About; - _mMenToolsUpdate.Text = Language.CheckForUpdates; - } - - #region Info - - private void mMenToolsUpdate_Click(object sender, EventArgs e) => Windows.Show(WindowType.Update); - - private void mMenInfoHelp_Click(object sender, EventArgs e) => Process.Start("explorer.exe", GeneralAppInfo.UrlDocumentation); - - private void mMenInfoForum_Click(object sender, EventArgs e) => Process.Start("explorer.exe", GeneralAppInfo.UrlForum); - - private void mMenInfoWebsite_Click(object sender, EventArgs e) => Process.Start("explorer.exe", GeneralAppInfo.UrlHome); - - private void mMenInfoDonate_Click(object sender, EventArgs e) => Process.Start("explorer.exe", GeneralAppInfo.UrlDonate); - - private void mMenInfoAbout_Click(object sender, EventArgs e) => FrmAbout.Instance.Show(); - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Menu/ToolsMenu.cs b/mRemoteNG/UI/Menu/ToolsMenu.cs deleted file mode 100644 index 32f83022e..000000000 --- a/mRemoteNG/UI/Menu/ToolsMenu.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Credential; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Menu -{ - public class ToolsMenu : ToolStripMenuItem - { - private ToolStripMenuItem _mMenToolsSshTransfer; - private ToolStripMenuItem _mMenToolsExternalApps; - private ToolStripMenuItem _mMenToolsPortScan; - private ToolStripMenuItem _mMenToolsUvncsc; - - public Form MainForm { get; set; } - public ICredentialRepositoryList CredentialProviderCatalog { get; set; } - - public ToolsMenu() - { - Initialize(); - } - - private void Initialize() - { - _mMenToolsSshTransfer = new ToolStripMenuItem(); - _mMenToolsUvncsc = new ToolStripMenuItem(); - _mMenToolsExternalApps = new ToolStripMenuItem(); - _mMenToolsPortScan = new ToolStripMenuItem(); - // - // mMenTools - // - DropDownItems.AddRange(new ToolStripItem[] - { - _mMenToolsSshTransfer, - _mMenToolsUvncsc, - _mMenToolsExternalApps, - _mMenToolsPortScan - }); - Name = "mMenTools"; - Size = new System.Drawing.Size(48, 20); - Text = Language._Tools; - // - // mMenToolsSSHTransfer - // - _mMenToolsSshTransfer.Image = Properties.Resources.SyncArrow_16x; - _mMenToolsSshTransfer.Name = "mMenToolsSSHTransfer"; - _mMenToolsSshTransfer.Size = new System.Drawing.Size(184, 22); - _mMenToolsSshTransfer.Text = Language.SshFileTransfer; - _mMenToolsSshTransfer.Click += mMenToolsSSHTransfer_Click; - // - // mMenToolsUVNCSC - // - _mMenToolsUvncsc.Name = "mMenToolsUVNCSC"; - _mMenToolsUvncsc.Size = new System.Drawing.Size(184, 22); - _mMenToolsUvncsc.Text = Language.UltraVNCSingleClick; - _mMenToolsUvncsc.Visible = false; - _mMenToolsUvncsc.Click += mMenToolsUVNCSC_Click; - // - // mMenToolsExternalApps - // - _mMenToolsExternalApps.Image = Properties.Resources.Console_16x; - _mMenToolsExternalApps.Name = "mMenToolsExternalApps"; - _mMenToolsExternalApps.Size = new System.Drawing.Size(184, 22); - _mMenToolsExternalApps.Text = Language.ExternalTool; - _mMenToolsExternalApps.Click += mMenToolsExternalApps_Click; - // - // mMenToolsPortScan - // - _mMenToolsPortScan.Image = Properties.Resources.SearchAndApps_16x; - _mMenToolsPortScan.Name = "mMenToolsPortScan"; - _mMenToolsPortScan.Size = new System.Drawing.Size(184, 22); - _mMenToolsPortScan.Text = Language.PortScan; - _mMenToolsPortScan.Click += mMenToolsPortScan_Click; - } - - public void ApplyLanguage() - { - Text = Language._Tools; - _mMenToolsSshTransfer.Text = Language.SshFileTransfer; - _mMenToolsExternalApps.Text = Language.ExternalTool; - _mMenToolsPortScan.Text = Language.PortScan; - } - - #region Tools - - private void mMenToolsSSHTransfer_Click(object sender, EventArgs e) - { - Windows.Show(WindowType.SSHTransfer); - } - - private void mMenToolsUVNCSC_Click(object sender, EventArgs e) - { - Windows.Show(WindowType.UltraVNCSC); - } - - private void mMenToolsExternalApps_Click(object sender, EventArgs e) - { - Windows.Show(WindowType.ExternalApps); - } - - private void mMenToolsPortScan_Click(object sender, EventArgs e) - { - Windows.Show(WindowType.PortScan); - } - - private void mMenToolsOptions_Click(object sender, EventArgs e) - { - Windows.Show(WindowType.Options); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Menu/ViewMenu.cs b/mRemoteNG/UI/Menu/ViewMenu.cs deleted file mode 100644 index 3ae4b5404..000000000 --- a/mRemoteNG/UI/Menu/ViewMenu.cs +++ /dev/null @@ -1,325 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Properties; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Panels; -using mRemoteNG.UI.Window; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Menu -{ - public class ViewMenu : ToolStripMenuItem - { - private ToolStripMenuItem _mMenViewConnectionPanels; - private ToolStripMenuItem _mMenReconnectAll; - private ToolStripSeparator _mMenViewSep1; - public ToolStripMenuItem _mMenViewErrorsAndInfos; - private ToolStripMenuItem _mMenViewAddConnectionPanel; - private ToolStripSeparator _mMenViewSep2; - private ToolStripMenuItem _mMenViewFullscreen; - public ToolStripMenuItem _mMenViewExtAppsToolbar; - public ToolStripMenuItem _mMenViewQuickConnectToolbar; - public ToolStripMenuItem _mMenViewMultiSshToolbar; - private ToolStripMenuItem _mMenViewResetLayout; - public ToolStripMenuItem _mMenViewLockToolbars; - private readonly PanelAdder _panelAdder; - - - public ToolStrip TsExternalTools { get; set; } - public ToolStrip TsQuickConnect { get; set; } - public ToolStrip TsMultiSsh { get; set; } - public FullscreenHandler FullscreenHandler { get; set; } - public FrmMain MainForm { get; set; } - - - public ViewMenu() - { - Initialize(); - _panelAdder = new PanelAdder(); - } - - private void Initialize() - { - _mMenViewAddConnectionPanel = new ToolStripMenuItem(); - _mMenViewConnectionPanels = new ToolStripMenuItem(); - _mMenViewSep1 = new ToolStripSeparator(); - _mMenViewErrorsAndInfos = new ToolStripMenuItem(); - _mMenViewResetLayout = new ToolStripMenuItem(); - _mMenViewLockToolbars = new ToolStripMenuItem(); - _mMenViewSep2 = new ToolStripSeparator(); - _mMenViewQuickConnectToolbar = new ToolStripMenuItem(); - _mMenReconnectAll = new ToolStripMenuItem(); - _mMenViewExtAppsToolbar = new ToolStripMenuItem(); - _mMenViewMultiSshToolbar = new ToolStripMenuItem(); - _mMenViewFullscreen = new ToolStripMenuItem(); - - // - // mMenView - // - DropDownItems.AddRange(new ToolStripItem[] - { - _mMenViewErrorsAndInfos, - _mMenViewQuickConnectToolbar, - _mMenViewExtAppsToolbar, - _mMenViewMultiSshToolbar, - _mMenViewSep1, - _mMenReconnectAll, - _mMenViewAddConnectionPanel, - _mMenViewConnectionPanels, - _mMenViewResetLayout, - _mMenViewLockToolbars, - _mMenViewSep2, - _mMenViewFullscreen - }); - Name = "mMenView"; - Size = new System.Drawing.Size(44, 20); - Text = Language._View; - //DropDownOpening += mMenView_DropDownOpening; - // - // mMenViewAddConnectionPanel - // - _mMenViewAddConnectionPanel.Image = Properties.Resources.InsertPanel_16x; - _mMenViewAddConnectionPanel.Name = "mMenViewAddConnectionPanel"; - _mMenViewAddConnectionPanel.Size = new System.Drawing.Size(228, 22); - _mMenViewAddConnectionPanel.Text = Language.AddConnectionPanel; - _mMenViewAddConnectionPanel.Click += mMenViewAddConnectionPanel_Click; - // - // mMenReconnectAll - // - _mMenReconnectAll.Image = Properties.Resources.Refresh_16x; - _mMenReconnectAll.Name = "mMenReconnectAll"; - _mMenReconnectAll.Size = new System.Drawing.Size(281, 22); - _mMenReconnectAll.Text = Language.ReconnectAllConnections; - _mMenReconnectAll.Click += mMenReconnectAll_Click; - // - // mMenViewConnectionPanels - // - _mMenViewConnectionPanels.Image = Properties.Resources.Panel_16x; - _mMenViewConnectionPanels.Name = "mMenViewConnectionPanels"; - _mMenViewConnectionPanels.Size = new System.Drawing.Size(228, 22); - _mMenViewConnectionPanels.Text = Language.ConnectionPanels; - // - // mMenViewSep1 - // - _mMenViewSep1.Name = "mMenViewSep1"; - _mMenViewSep1.Size = new System.Drawing.Size(225, 6); - // - // mMenViewErrorsAndInfos - // - _mMenViewErrorsAndInfos.Checked = true; - _mMenViewErrorsAndInfos.CheckState = CheckState.Checked; - _mMenViewErrorsAndInfos.Name = "mMenViewErrorsAndInfos"; - _mMenViewErrorsAndInfos.Size = new System.Drawing.Size(228, 22); - _mMenViewErrorsAndInfos.Text = Language.Notifications; - _mMenViewErrorsAndInfos.Click += mMenViewErrorsAndInfos_Click; - // - // mMenViewResetLayout - // - _mMenViewResetLayout.Name = "mMenViewResetLayout"; - _mMenViewResetLayout.Size = new System.Drawing.Size(228, 22); - _mMenViewResetLayout.Text = Language.ResetLayout; - _mMenViewResetLayout.Click += mMenViewResetLayout_Click; - // - // mMenViewLockToolbars - // - _mMenViewLockToolbars.Name = "mMenViewLockToolbars"; - _mMenViewLockToolbars.Size = new System.Drawing.Size(228, 22); - _mMenViewLockToolbars.Text = Language.LockToolbars; - _mMenViewLockToolbars.Click += mMenViewLockToolbars_Click; - // - // mMenViewSep2 - // - _mMenViewSep2.Name = "mMenViewSep2"; - _mMenViewSep2.Size = new System.Drawing.Size(225, 6); - // - // mMenViewQuickConnectToolbar - // - _mMenViewQuickConnectToolbar.Name = "mMenViewQuickConnectToolbar"; - _mMenViewQuickConnectToolbar.Size = new System.Drawing.Size(228, 22); - _mMenViewQuickConnectToolbar.Text = Language.QuickConnectToolbar; - _mMenViewQuickConnectToolbar.Click += mMenViewQuickConnectToolbar_Click; - // - // mMenViewExtAppsToolbar - // - _mMenViewExtAppsToolbar.Name = "mMenViewExtAppsToolbar"; - _mMenViewExtAppsToolbar.Size = new System.Drawing.Size(228, 22); - _mMenViewExtAppsToolbar.Text = Language.ExternalToolsToolbar; - _mMenViewExtAppsToolbar.Click += mMenViewExtAppsToolbar_Click; - // - // mMenViewMultiSSHToolbar - // - _mMenViewMultiSshToolbar.Name = "mMenViewMultiSSHToolbar"; - _mMenViewMultiSshToolbar.Size = new System.Drawing.Size(279, 26); - _mMenViewMultiSshToolbar.Text = Language.MultiSshToolbar; - _mMenViewMultiSshToolbar.Click += mMenViewMultiSSHToolbar_Click; - // - // mMenViewFullscreen - // - _mMenViewFullscreen.Image = Properties.Resources.FullScreen_16x; - _mMenViewFullscreen.Name = "mMenViewFullscreen"; - _mMenViewFullscreen.ShortcutKeys = Keys.F11; - _mMenViewFullscreen.Size = new System.Drawing.Size(228, 22); - _mMenViewFullscreen.Text = Language.Fullscreen; - _mMenViewFullscreen.Checked = Settings.Default.MainFormKiosk; - _mMenViewFullscreen.Click += mMenViewFullscreen_Click; - } - - - public void ApplyLanguage() - { - Text = Language._View; - _mMenViewAddConnectionPanel.Text = Language.AddConnectionPanel; - _mMenViewConnectionPanels.Text = Language.ConnectionPanels; - _mMenViewErrorsAndInfos.Text = Language.Notifications; - _mMenViewResetLayout.Text = Language.ResetLayout; - _mMenViewLockToolbars.Text = Language.LockToolbars; - _mMenViewQuickConnectToolbar.Text = Language.QuickConnectToolbar; - _mMenViewExtAppsToolbar.Text = Language.ExternalToolsToolbar; - _mMenViewMultiSshToolbar.Text = Language.MultiSshToolbar; - _mMenViewFullscreen.Text = Language.Fullscreen; - } - - #region View - - internal void mMenView_DropDownOpening(object sender, EventArgs e) - { - _mMenViewErrorsAndInfos.Checked = !Windows.ErrorsForm.IsHidden; - _mMenViewLockToolbars.Checked = Settings.Default.LockToolbars; - - _mMenViewExtAppsToolbar.Checked = TsExternalTools.Visible; - _mMenViewQuickConnectToolbar.Checked = TsQuickConnect.Visible; - _mMenViewMultiSshToolbar.Checked = TsMultiSsh.Visible; - - _mMenViewConnectionPanels.DropDownItems.Clear(); - - for (var i = 0; i <= Runtime.WindowList.Count - 1; i++) - { - var tItem = new ToolStripMenuItem(Runtime.WindowList[i].Text, - Runtime.WindowList[i].Icon.ToBitmap(), ConnectionPanelMenuItem_Click) - { Tag = Runtime.WindowList[i] }; - _mMenViewConnectionPanels.DropDownItems.Add(tItem); - } - - _mMenViewConnectionPanels.Visible = _mMenViewConnectionPanels.DropDownItems.Count > 0; - } - - private void ConnectionPanelMenuItem_Click(object sender, EventArgs e) - { - ((BaseWindow)((ToolStripMenuItem)sender).Tag).Show(MainForm.pnlDock); - ((BaseWindow)((ToolStripMenuItem)sender).Tag).Focus(); - } - - private void mMenViewErrorsAndInfos_Click(object sender, EventArgs e) - { - if (_mMenViewErrorsAndInfos.Checked == false) - { - Windows.ErrorsForm.Show(MainForm.pnlDock); - _mMenViewErrorsAndInfos.Checked = true; - } - else - { - Windows.ErrorsForm.Hide(); - _mMenViewErrorsAndInfos.Checked = false; - } - } - - private void mMenViewResetLayout_Click(object sender, EventArgs e) - { - var msgBoxResult = MessageBox.Show(Language.ConfirmResetLayout, string.Empty, MessageBoxButtons.YesNo, - MessageBoxIcon.Question); - if (msgBoxResult == DialogResult.Yes) - { - MainForm.SetDefaultLayout(); - } - } - - private void mMenViewLockToolbars_Click(object sender, EventArgs eventArgs) - { - if (_mMenViewLockToolbars.Checked) - { - Settings.Default.LockToolbars = false; - _mMenViewLockToolbars.Checked = false; - } - else - { - Settings.Default.LockToolbars = true; - _mMenViewLockToolbars.Checked = true; - } - } - - private void mMenViewAddConnectionPanel_Click(object sender, EventArgs e) - { - _panelAdder.AddPanel(); - } - - private void mMenViewExtAppsToolbar_Click(object sender, EventArgs e) - { - if (_mMenViewExtAppsToolbar.Checked) - { - Settings.Default.ViewMenuExternalTools = false; - _mMenViewExtAppsToolbar.Checked = false; - TsExternalTools.Visible = false; - } - else - { - Settings.Default.ViewMenuExternalTools = true; - _mMenViewExtAppsToolbar.Checked = true; - TsExternalTools.Visible = true; - } - } - - private void mMenViewQuickConnectToolbar_Click(object sender, EventArgs e) - { - if (_mMenViewQuickConnectToolbar.Checked) - { - Settings.Default.ViewMenuQuickConnect = false; - _mMenViewQuickConnectToolbar.Checked = false; - TsQuickConnect.Visible = false; - } - else - { - Settings.Default.ViewMenuQuickConnect = true; - _mMenViewQuickConnectToolbar.Checked = true; - TsQuickConnect.Visible = true; - } - } - - private void mMenViewMultiSSHToolbar_Click(object sender, EventArgs e) - { - if (_mMenViewMultiSshToolbar.Checked) - { - Settings.Default.ViewMenuMultiSSH = false; - _mMenViewMultiSshToolbar.Checked = false; - TsMultiSsh.Visible = false; - } - else - { - Settings.Default.ViewMenuMultiSSH = true; - _mMenViewMultiSshToolbar.Checked = true; - TsMultiSsh.Visible = true; - } - } - - private void mMenViewFullscreen_Click(object sender, EventArgs e) - { - FullscreenHandler.Value = !FullscreenHandler.Value; - _mMenViewFullscreen.Checked = FullscreenHandler.Value; - } - - private void mMenReconnectAll_Click(object sender, EventArgs e) - { - if (Runtime.WindowList == null || Runtime.WindowList.Count == 0) return; - foreach (BaseWindow window in Runtime.WindowList) - { - if (!(window is ConnectionWindow connectionWindow)) - return; - - connectionWindow.reconnectAll(Runtime.ConnectionInitiator); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/NotificationMessageListViewItem.cs b/mRemoteNG/UI/NotificationMessageListViewItem.cs deleted file mode 100644 index 9cb9569f1..000000000 --- a/mRemoteNG/UI/NotificationMessageListViewItem.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.Messages; - -namespace mRemoteNG.UI -{ - public class NotificationMessageListViewItem : ListViewItem - { - public NotificationMessageListViewItem(IMessage message) - { - if (message == null) - throw new ArgumentNullException(nameof(message)); - - ImageIndex = Convert.ToInt32(message.Class); - Text = message.Text.Replace(Environment.NewLine, " "); - Tag = message; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Panels/PanelAdder.cs b/mRemoteNG/UI/Panels/PanelAdder.cs deleted file mode 100644 index 239b0df46..000000000 --- a/mRemoteNG/UI/Panels/PanelAdder.cs +++ /dev/null @@ -1,193 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Window; -using System; -using System.Collections; -using System.Linq; -using System.Windows.Forms; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Panels -{ - public class PanelAdder - { - public ConnectionWindow AddPanel(string title = "") - { - try - { - var connectionForm = new ConnectionWindow(new DockContent()); - BuildConnectionWindowContextMenu(connectionForm); - SetConnectionWindowTitle(title, connectionForm); - ShowConnectionWindow(connectionForm); - PrepareTabSupport(connectionForm); - return connectionForm; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "Couldn\'t add panel" + Environment.NewLine + ex.Message); - return null; - } - } - - public bool DoesPanelExist(string panelName) - { - return Runtime.WindowList?.OfType().Any(w => w.TabText == panelName) - ?? false; - } - - private static void ShowConnectionWindow(ConnectionWindow connectionForm) - { - connectionForm.Show(FrmMain.Default.pnlDock, DockState.Document); - } - - private static void PrepareTabSupport(ConnectionWindow connectionForm) - { - Runtime.WindowList.Add(connectionForm); - } - - private static void SetConnectionWindowTitle(string title, ConnectionWindow connectionForm) - { - if (string.IsNullOrEmpty(title)) - title = Language.NewPanel; - connectionForm.SetFormText(title.Replace("&", "&&")); - } - - private static void BuildConnectionWindowContextMenu(DockContent pnlcForm) - { - var cMen = new ContextMenuStrip(); - var cMenRen = CreateRenameMenuItem(pnlcForm); - var cMenScreens = CreateScreensMenuItem(pnlcForm); - var cMenClose = CreateCloseMenuItem(pnlcForm); - cMen.Items.AddRange(new ToolStripItem[] {cMenRen, cMenScreens, cMenClose}); - pnlcForm.TabPageContextMenuStrip = cMen; - } - - private static ToolStripMenuItem CreateScreensMenuItem(DockContent pnlcForm) - { - var cMenScreens = new ToolStripMenuItem - { - Text = Language.SendTo, - Image = Properties.Resources.Monitor_16x, - Tag = pnlcForm - }; - cMenScreens.DropDownItems.Add("Dummy"); - cMenScreens.DropDownOpening += cMenConnectionPanelScreens_DropDownOpening; - return cMenScreens; - } - - private static ToolStripMenuItem CreateRenameMenuItem(DockContent pnlcForm) - { - var cMenRen = new ToolStripMenuItem - { - Text = Language.Rename, - Image = Properties.Resources.Rename_16x, - Tag = pnlcForm - }; - cMenRen.Click += cMenConnectionPanelRename_Click; - return cMenRen; - } - - private static ToolStripMenuItem CreateCloseMenuItem(DockContent pnlcForm) - { - var cMenClose = new ToolStripMenuItem - { - Text = Language._Close, - Image = Properties.Resources.Close_16x, - Tag = pnlcForm - }; - cMenClose.Click += cMenConnectionPanelClose_Click; - return cMenClose; - } - - private static void cMenConnectionPanelRename_Click(object sender, EventArgs e) - { - try - { - var conW = (ConnectionWindow)((ToolStripMenuItem)sender).Tag; - - using (var newTitle = new FrmInputBox(Language.NewTitle, Language.NewTitle + ":", "")) - if (newTitle.ShowDialog() == DialogResult.OK && !string.IsNullOrEmpty(newTitle.returnValue)) - conW.SetFormText(newTitle.returnValue.Replace("&", "&&")); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("cMenConnectionPanelRename_Click: Caught Exception: ", - ex); - } - } - - private static void cMenConnectionPanelClose_Click(object sender, EventArgs e) - { - try - { - var conW = (ConnectionWindow)((ToolStripMenuItem)sender).Tag; - conW.Close(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("cMenConnectionPanelClose_Click: Caught Exception: ", - ex); - } - } - - private static void cMenConnectionPanelScreens_DropDownOpening(object sender, EventArgs e) - { - try - { - var cMenScreens = (ToolStripMenuItem)sender; - cMenScreens.DropDownItems.Clear(); - - for (var i = 0; i <= Screen.AllScreens.Length - 1; i++) - { - var cMenScreen = new ToolStripMenuItem(Language.Screen + " " + Convert.ToString(i + 1)) - { - Tag = new ArrayList(), - Image = Properties.Resources.Monitor_16x - }; - ((ArrayList)cMenScreen.Tag).Add(Screen.AllScreens[i]); - ((ArrayList)cMenScreen.Tag).Add(cMenScreens.Tag); - cMenScreen.Click += cMenConnectionPanelScreen_Click; - cMenScreens.DropDownItems.Add(cMenScreen); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "cMenConnectionPanelScreens_DropDownOpening: Caught Exception: ", - ex); - } - } - - private static void cMenConnectionPanelScreen_Click(object sender, EventArgs e) - { - Screen screen = null; - DockContent panel = null; - try - { - var tagEnumeration = (IEnumerable)((ToolStripMenuItem)sender).Tag; - if (tagEnumeration == null) return; - foreach (var obj in tagEnumeration) - { - if (obj is Screen screen1) - { - screen = screen1; - } - else if (obj is DockContent) - { - panel = (DockContent)obj; - } - } - - Screens.SendPanelToScreen(panel, screen); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("cMenConnectionPanelScreen_Click: Caught Exception: ", - ex); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/StatusImageList.cs b/mRemoteNG/UI/StatusImageList.cs deleted file mode 100644 index 69f987bf7..000000000 --- a/mRemoteNG/UI/StatusImageList.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree.Root; - -namespace mRemoteNG.UI -{ - public class StatusImageList : IDisposable - { - public ImageList ImageList { get; } - - public StatusImageList() - { - var display = new DisplayProperties(); - - ImageList = new ImageList - { - ColorDepth = ColorDepth.Depth32Bit, - ImageSize = new Size( - (int)Math.Round(16 * display.ResolutionScalingFactor.Width), - (int)Math.Round(16 * display.ResolutionScalingFactor.Height)), - TransparentColor = Color.Transparent - }; - - FillImageList(ImageList); - } - - public object ImageGetter(object rowObject) - { - return GetKey(rowObject as ConnectionInfo); - } - - public Image GetImage(ConnectionInfo connectionInfo) - { - var key = GetKey(connectionInfo); - return ImageList.Images.ContainsKey(key) - ? ImageList.Images[key] - : null; - } - - public string GetKey(ConnectionInfo connectionInfo) - { - if (connectionInfo == null) return ""; - if (connectionInfo is RootPuttySessionsNodeInfo) return "PuttySessions"; - if (connectionInfo is RootNodeInfo) return "Root"; - if (connectionInfo is ContainerInfo) return "Folder"; - - return GetConnectionIcon(connectionInfo); - } - - private static string BuildConnectionIconName(string icon, bool connected) - { - var status = connected ? "Play" : "Default"; - return $"Connection_{icon}_{status}"; - } - - private const string DefaultConnectionIcon = ""; - - private string GetConnectionIcon(ConnectionInfo connection) - { - if (string.IsNullOrEmpty(connection.Icon)) - { - return DefaultConnectionIcon; - } - - var connected = connection.OpenConnections.Count > 0; - var name = BuildConnectionIconName(connection.Icon, connected); - if (ImageList.Images.ContainsKey(name)) return name; - var image = ConnectionIcon.FromString(connection.Icon); - if (image == null) - { - return DefaultConnectionIcon; - } - - ImageList.Images.Add(BuildConnectionIconName(connection.Icon, false), image); - ImageList.Images.Add(BuildConnectionIconName(connection.Icon, true), - Overlay(image, Properties.Resources.ConnectedOverlay)); - return name; - } - - private static Bitmap Overlay(Icon background, Image foreground) - { - var result = new Bitmap(background.ToBitmap(), new Size(16, 16)); - using (var gr = Graphics.FromImage(result)) - { - gr.DrawImage(foreground, new Rectangle(0, 0, foreground.Width, foreground.Height)); - } - - return result; - } - - private static void FillImageList(ImageList imageList) - { - try - { - imageList.Images.Add("Root", Properties.Resources.ASPWebSite_16x); - imageList.Images.Add("Folder", Properties.Resources.FolderClosed_16x); - imageList.Images.Add("PuttySessions", Properties.Resources.PuttySessions); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - $"Unable to fill the image list of type {nameof(StatusImageList)}", - ex); - } - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - ImageList?.Dispose(); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Tabs/ConnectionTab.Designer.cs b/mRemoteNG/UI/Tabs/ConnectionTab.Designer.cs deleted file mode 100644 index 52f077020..000000000 --- a/mRemoteNG/UI/Tabs/ConnectionTab.Designer.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace mRemoteNG.UI.Tabs -{ - partial class ConnectionTab - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // ConnectionTab - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(284, 261); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "ConnectionTab"; - this.Text = "ConnectionTab"; - this.ResumeLayout(false); - - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Tabs/ConnectionTab.cs b/mRemoteNG/UI/Tabs/ConnectionTab.cs deleted file mode 100644 index 31c9faffa..000000000 --- a/mRemoteNG/UI/Tabs/ConnectionTab.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Properties; -using mRemoteNG.UI.TaskDialog; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Tabs -{ - public partial class ConnectionTab : DockContent - { - /// - ///Silent close ignores the popup asking for confirmation - /// - public bool silentClose { get; set; } - - /// - /// Protocol close ignores the interface controller cleanup and the user confirmation dialog - /// - public bool protocolClose { get; set; } - - public ConnectionTab() - { - InitializeComponent(); - GotFocus += ConnectionTab_GotFocus; - } - - private void ConnectionTab_GotFocus(object sender, EventArgs e) - { - TabHelper.Instance.CurrentTab = this; - } - - protected override void OnFormClosing(FormClosingEventArgs e) - { - if (!protocolClose) - { - if (!silentClose) - { - if (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.All) - { - var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, - string - .Format(Language.ConfirmCloseConnectionPanelMainInstruction, - TabText), "", "", "", - Language.CheckboxDoNotShowThisMessageAgain, - ETaskDialogButtons.YesNo, ESysIcons.Question, - ESysIcons.Question); - if (CTaskDialog.VerificationChecked) - { - Settings.Default.ConfirmCloseConnection--; - } - - if (result == DialogResult.No) - { - e.Cancel = true; - } - else - { - ((InterfaceControl)Tag)?.Protocol.Close(); - } - } - else - { - // close without the confirmation prompt... - ((InterfaceControl)Tag)?.Protocol.Close(); - } - } - else - { - ((InterfaceControl)Tag)?.Protocol.Close(); - } - } - - base.OnFormClosing(e); - } - - - #region HelperFunctions - - public void RefreshInterfaceController() - { - try - { - var interfaceControl = Tag as InterfaceControl; - if (interfaceControl?.Info.Protocol == ProtocolType.VNC) - ((ProtocolVNC)interfaceControl.Protocol).RefreshScreen(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("RefreshIC (UI.Window.Connection) failed", ex); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Tabs/ConnectionTab.resx b/mRemoteNG/UI/Tabs/ConnectionTab.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Tabs/ConnectionTab.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Tabs/DockPaneStripNG.cs b/mRemoteNG/UI/Tabs/DockPaneStripNG.cs deleted file mode 100644 index 999cf1685..000000000 --- a/mRemoteNG/UI/Tabs/DockPaneStripNG.cs +++ /dev/null @@ -1,1415 +0,0 @@ -using System; -using System.ComponentModel; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Security.Permissions; -using System.Windows.Forms; -using mRemoteNG.Connection; -using mRemoteNG.Properties; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Tabs -{ - /// - /// This class is lifted from VS2013DockPaneStrip from DockPanelSuite and customized for MremoteNG - /// - [ToolboxItem(false)] - internal class DockPaneStripNG : DockPaneStripBase - { - private class MremoteNGTab : Tab - { - public MremoteNGTab(IDockContent content) - : base(content) - { - } - - public int TabX { get; set; } - - public int TabWidth { get; set; } - - public int MaxWidth { get; set; } - - protected internal bool Flag { get; set; } - } - - protected override Tab CreateTab(IDockContent content) - { - return new MremoteNGTab(content); - } - - [ToolboxItem(false)] - private sealed class InertButton : InertButtonBase - { - public InertButton(Bitmap hovered, Bitmap normal, Bitmap pressed) - { - HoverImage = hovered; - Image = normal; - PressImage = pressed; - } - - public override Bitmap Image { get; } - - public override Bitmap HoverImage { get; } - - public override Bitmap PressImage { get; } - } - - #region Constants - - private const int _ToolWindowStripGapTop = 0; - private const int _ToolWindowStripGapBottom = 0; - private const int _ToolWindowStripGapLeft = 0; - private const int _ToolWindowStripGapRight = 0; - private const int _ToolWindowImageHeight = 16; - private const int _ToolWindowImageWidth = 0; //16; - private const int _ToolWindowImageGapTop = 3; - private const int _ToolWindowImageGapBottom = 1; - private const int _ToolWindowImageGapLeft = 2; - private const int _ToolWindowImageGapRight = 0; - private const int _ToolWindowTextGapRight = 3; - private const int _ToolWindowTabSeperatorGapTop = 3; - private const int _ToolWindowTabSeperatorGapBottom = 3; - - private const int _DocumentStripGapTop = 0; - private const int _DocumentStripGapBottom = 1; - private const int _DocumentTabMaxWidth = 200; - private const int _DocumentButtonGapTop = 3; - private const int _DocumentButtonGapBottom = 3; - private const int _DocumentButtonGapBetween = 0; - private const int _DocumentButtonGapRight = 3; - private const int _DocumentTabGapTop = 0; //3; - private const int _DocumentTabGapLeft = 0; //3; - private const int _DocumentTabGapRight = 0; //3; - private const int _DocumentIconGapBottom = 2; //2; - private const int _DocumentIconGapLeft = 8; - private const int _DocumentIconGapRight = 0; - private const int _DocumentIconHeight = 16; - private const int _DocumentIconWidth = 16; - private const int _DocumentTextGapRight = 6; - - #endregion - - #region Members - - private InertButton m_buttonOverflow; - private InertButton m_buttonWindowList; - private ToolTip m_toolTip; - private Font m_font; - private Font m_boldFont; - private int m_startDisplayingTab; - private bool m_documentTabsOverflow; - private static string m_toolTipSelect; - private bool m_suspendDrag; - - #endregion - - #region Properties - - private Rectangle TabStripRectangle => - Appearance == DockPane.AppearanceStyle.Document - ? TabStripRectangle_Document - : TabStripRectangle_ToolWindow; - - private Rectangle TabStripRectangle_ToolWindow - { - get - { - var rect = ClientRectangle; - return new Rectangle(rect.X, rect.Top + ToolWindowStripGapTop, rect.Width, - rect.Height - ToolWindowStripGapTop - ToolWindowStripGapBottom); - } - } - - private Rectangle TabStripRectangle_Document - { - get - { - var rect = ClientRectangle; - return new Rectangle(rect.X, rect.Top + DocumentStripGapTop, rect.Width, - rect.Height + DocumentStripGapTop - DocumentStripGapBottom); - } - } - - private Rectangle TabsRectangle - { - get - { - if (Appearance == DockPane.AppearanceStyle.ToolWindow) - return TabStripRectangle; - - var rectWindow = TabStripRectangle; - var x = rectWindow.X; - var y = rectWindow.Y; - var width = rectWindow.Width; - var height = rectWindow.Height; - - x += DocumentTabGapLeft; - width -= DocumentTabGapLeft + - DocumentTabGapRight + - DocumentButtonGapRight + - ButtonOverflow.Width + - ButtonWindowList.Width + - 2 * DocumentButtonGapBetween; - - return new Rectangle(x, y, width, height); - } - } - - private ContextMenuStrip SelectMenu { get; } - - public int SelectMenuMargin { get; set; } = 5; - - private InertButton ButtonOverflow - { - get - { - if (m_buttonOverflow != null) return m_buttonOverflow; - m_buttonOverflow = new InertButton( - DockPane.DockPanel.Theme.ImageService.DockPaneHover_OptionOverflow, - DockPane.DockPanel.Theme.ImageService.DockPane_OptionOverflow, - DockPane.DockPanel.Theme.ImageService.DockPanePress_OptionOverflow); - m_buttonOverflow.Click += WindowList_Click; - Controls.Add(m_buttonOverflow); - - return m_buttonOverflow; - } - } - - private InertButton ButtonWindowList - { - get - { - if (m_buttonWindowList != null) return m_buttonWindowList; - m_buttonWindowList = new InertButton( - DockPane.DockPanel.Theme.ImageService.DockPaneHover_List, - DockPane.DockPanel.Theme.ImageService.DockPane_List, - DockPane.DockPanel.Theme.ImageService.DockPanePress_List); - m_buttonWindowList.Click += WindowList_Click; - Controls.Add(m_buttonWindowList); - - return m_buttonWindowList; - } - } - - private static GraphicsPath GraphicsPath => MremoteNGAutoHideStrip.GraphicsPath; - - private IContainer Components { get; } - - public Font TextFont => DockPane.DockPanel.Theme.Skin.DockPaneStripSkin.TextFont; - - private Font BoldFont - { - get - { - if (IsDisposed) - return null; - - if (m_boldFont == null) - { - m_font = TextFont; - m_boldFont = new Font(TextFont, FontStyle.Bold); - } - else if (!Equals(m_font, TextFont)) - { - m_boldFont.Dispose(); - m_font = TextFont; - m_boldFont = new Font(TextFont, FontStyle.Bold); - } - - return m_boldFont; - } - } - - private int StartDisplayingTab - { - get => m_startDisplayingTab; - set - { - m_startDisplayingTab = value; - Invalidate(); - } - } - - private int EndDisplayingTab { get; set; } - - private int FirstDisplayingTab { get; set; } - - private bool DocumentTabsOverflow - { - set - { - if (m_documentTabsOverflow == value) - return; - - m_documentTabsOverflow = value; - SetInertButtons(); - } - } - - #region Customizable Properties - - private static int ToolWindowStripGapTop => _ToolWindowStripGapTop; - - private static int ToolWindowStripGapBottom => _ToolWindowStripGapBottom; - - private static int ToolWindowStripGapLeft => _ToolWindowStripGapLeft; - - private static int ToolWindowStripGapRight => _ToolWindowStripGapRight; - - private static int ToolWindowImageHeight => _ToolWindowImageHeight; - - private static int ToolWindowImageWidth => _ToolWindowImageWidth; - - private static int ToolWindowImageGapTop => _ToolWindowImageGapTop; - - private static int ToolWindowImageGapBottom => _ToolWindowImageGapBottom; - - private static int ToolWindowImageGapLeft => _ToolWindowImageGapLeft; - - private static int ToolWindowImageGapRight => _ToolWindowImageGapRight; - - private static int ToolWindowTextGapRight => _ToolWindowTextGapRight; - - private static int ToolWindowTabSeperatorGapTop => _ToolWindowTabSeperatorGapTop; - - private static int ToolWindowTabSeperatorGapBottom => _ToolWindowTabSeperatorGapBottom; - - private static string ToolTipSelect => m_toolTipSelect ?? (m_toolTipSelect = Language.TabsAndPanels); - - private TextFormatFlags ToolWindowTextFormat - { - get - { - const TextFormatFlags textFormat = TextFormatFlags.EndEllipsis | - TextFormatFlags.HorizontalCenter | - TextFormatFlags.SingleLine | - TextFormatFlags.VerticalCenter; - if (RightToLeft == RightToLeft.Yes) - return textFormat | TextFormatFlags.RightToLeft | TextFormatFlags.Right; - return textFormat; - } - } - - private static int DocumentStripGapTop => _DocumentStripGapTop; - - private static int DocumentStripGapBottom => _DocumentStripGapBottom; - - private TextFormatFlags DocumentTextFormat - { - get - { - const TextFormatFlags textFormat = TextFormatFlags.EndEllipsis | - TextFormatFlags.SingleLine | - TextFormatFlags.VerticalCenter | - TextFormatFlags.HorizontalCenter; - if (RightToLeft == RightToLeft.Yes) - return textFormat | TextFormatFlags.RightToLeft; - return textFormat; - } - } - - private static int DocumentTabMaxWidth => _DocumentTabMaxWidth; - - private static int DocumentButtonGapTop => _DocumentButtonGapTop; - - private static int DocumentButtonGapBottom => _DocumentButtonGapBottom; - - private static int DocumentButtonGapBetween => _DocumentButtonGapBetween; - - private static int DocumentButtonGapRight => _DocumentButtonGapRight; - - private static int DocumentTabGapTop => _DocumentTabGapTop; - - private static int DocumentTabGapLeft => _DocumentTabGapLeft; - - private static int DocumentTabGapRight => _DocumentTabGapRight; - - private static int DocumentIconGapBottom => _DocumentIconGapBottom; - - private static int DocumentIconGapLeft => _DocumentIconGapLeft; - - private static int DocumentIconGapRight => _DocumentIconGapRight; - - private static int DocumentIconWidth => _DocumentIconWidth; - - private static int DocumentIconHeight => _DocumentIconHeight; - - private static int DocumentTextGapRight => _DocumentTextGapRight; - - #endregion - - #endregion - - public DockPaneStripNG(DockPane pane) - : base(pane) - { - SetStyle(ControlStyles.ResizeRedraw | - ControlStyles.UserPaint | - ControlStyles.AllPaintingInWmPaint | - ControlStyles.OptimizedDoubleBuffer, true); - - SuspendLayout(); - - Components = new System.ComponentModel.Container(); - m_toolTip = new ToolTip(Components); - SelectMenu = new ContextMenuStrip(Components); - pane.DockPanel.Theme.ApplyTo(SelectMenu); - - ResumeLayout(); - } - - // This seems like a bogus warning - suppressing since Components is being disposed... - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2213:DisposableFieldsShouldBeDisposed", MessageId = "k__BackingField")] - protected override void Dispose(bool disposing) - { - if (disposing) - { - if(Components != null) - Components.Dispose(); - - if (m_boldFont != null) - { - m_boldFont.Dispose(); - m_boldFont = null; - } - - } - - base.Dispose(disposing); - } - - protected override int MeasureHeight() - { - if (Appearance == DockPane.AppearanceStyle.ToolWindow) - return MeasureHeight_ToolWindow(); - return MeasureHeight_Document(); - } - - private int MeasureHeight_ToolWindow() - { - if (DockPane.IsAutoHide || Tabs.Count <= 1) - return 0; - - var height = Math.Max(TextFont.Height + (PatchController.EnableHighDpi == true ? DocumentIconGapBottom : 0), - ToolWindowImageHeight + ToolWindowImageGapTop + ToolWindowImageGapBottom) - + ToolWindowStripGapTop + ToolWindowStripGapBottom; - - return height; - } - - private int MeasureHeight_Document() - { - var height = - Math.Max( - TextFont.Height + DocumentTabGapTop + - (PatchController.EnableHighDpi == true ? DocumentIconGapBottom : 0), - ButtonOverflow.Height + DocumentButtonGapTop + DocumentButtonGapBottom) - + DocumentStripGapBottom + DocumentStripGapTop; - - return height; - } - - protected override void OnPaint(PaintEventArgs e) - { - base.OnPaint(e); - CalculateTabs(); - if (Appearance == DockPane.AppearanceStyle.Document && DockPane.ActiveContent != null) - { - if (EnsureDocumentTabVisible(DockPane.ActiveContent, false)) - CalculateTabs(); - } - - DrawTabStrip(e.Graphics); - } - - protected override void OnRefreshChanges() - { - SetInertButtons(); - Invalidate(); - } - - public override GraphicsPath GetOutline(int index) - { - return Appearance == DockPane.AppearanceStyle.Document - ? GetOutline_Document(index) - : GetOutline_ToolWindow(index); - } - - private GraphicsPath GetOutline_Document(int index) - { - var rectangle = Tabs[index].Rectangle; - if (rectangle == null) return null; - var rectTab = rectangle.Value; - rectTab.X -= rectTab.Height / 2; - rectTab.Intersect(TabsRectangle); - rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab)); - var rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle); - - var path = new GraphicsPath(); - var pathTab = GetTabOutline_Document(Tabs[index], true, true, true); - path.AddPath(pathTab, true); - - if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) - { - path.AddLine(rectTab.Right, rectTab.Top, rectPaneClient.Right, rectTab.Top); - path.AddLine(rectPaneClient.Right, rectTab.Top, rectPaneClient.Right, rectPaneClient.Top); - path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Left, rectPaneClient.Top); - path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Left, rectTab.Top); - path.AddLine(rectPaneClient.Left, rectTab.Top, rectTab.Right, rectTab.Top); - } - else - { - path.AddLine(rectTab.Right, rectTab.Bottom, rectPaneClient.Right, rectTab.Bottom); - path.AddLine(rectPaneClient.Right, rectTab.Bottom, rectPaneClient.Right, rectPaneClient.Bottom); - path.AddLine(rectPaneClient.Right, rectPaneClient.Bottom, rectPaneClient.Left, rectPaneClient.Bottom); - path.AddLine(rectPaneClient.Left, rectPaneClient.Bottom, rectPaneClient.Left, rectTab.Bottom); - path.AddLine(rectPaneClient.Left, rectTab.Bottom, rectTab.Right, rectTab.Bottom); - } - - return path; - } - - private GraphicsPath GetOutline_ToolWindow(int index) - { - var rectangle = Tabs[index].Rectangle; - if (rectangle == null) return null; - var rectTab = rectangle.Value; - rectTab.Intersect(TabsRectangle); - rectTab = RectangleToScreen(DrawHelper.RtlTransform(this, rectTab)); - var rectPaneClient = DockPane.RectangleToScreen(DockPane.ClientRectangle); - - var path = new GraphicsPath(); - var pathTab = GetTabOutline(Tabs[index], true, true); - path.AddPath(pathTab, true); - path.AddLine(rectTab.Left, rectTab.Top, rectPaneClient.Left, rectTab.Top); - path.AddLine(rectPaneClient.Left, rectTab.Top, rectPaneClient.Left, rectPaneClient.Top); - path.AddLine(rectPaneClient.Left, rectPaneClient.Top, rectPaneClient.Right, rectPaneClient.Top); - path.AddLine(rectPaneClient.Right, rectPaneClient.Top, rectPaneClient.Right, rectTab.Top); - path.AddLine(rectPaneClient.Right, rectTab.Top, rectTab.Right, rectTab.Top); - return path; - } - - private void CalculateTabs() - { - if (Appearance == DockPane.AppearanceStyle.ToolWindow) - CalculateTabs_ToolWindow(); - else - CalculateTabs_Document(); - } - - private void CalculateTabs_ToolWindow() - { - if (Tabs.Count <= 1 || DockPane.IsAutoHide) - return; - - var rectTabStrip = TabStripRectangle; - - // Calculate tab widths - var countTabs = Tabs.Count; - foreach (var tab1 in Tabs) - { - var tab = (MremoteNGTab)tab1; - tab.MaxWidth = GetMaxTabWidth(Tabs.IndexOf(tab)); - tab.Flag = false; - } - - // Set tab whose max width less than average width - bool anyWidthWithinAverage; - var totalWidth = rectTabStrip.Width - ToolWindowStripGapLeft - ToolWindowStripGapRight; - var totalAllocatedWidth = 0; - var averageWidth = totalWidth / countTabs; - var remainedTabs = countTabs; - for (anyWidthWithinAverage = true; anyWidthWithinAverage && remainedTabs > 0;) - { - anyWidthWithinAverage = false; - foreach (var tab1 in Tabs) - { - var tab = (MremoteNGTab)tab1; - if (tab.Flag) - continue; - - if (tab.MaxWidth > averageWidth) continue; - tab.Flag = true; - tab.TabWidth = tab.MaxWidth; - totalAllocatedWidth += tab.TabWidth; - anyWidthWithinAverage = true; - remainedTabs--; - } - - if (remainedTabs != 0) - averageWidth = (totalWidth - totalAllocatedWidth) / remainedTabs; - } - - // If any tab width not set yet, set it to the average width - if (remainedTabs > 0) - { - var roundUpWidth = (totalWidth - totalAllocatedWidth) - (averageWidth * remainedTabs); - foreach (var tab1 in Tabs) - { - var tab = (MremoteNGTab)tab1; - if (tab.Flag) - continue; - - tab.Flag = true; - if (roundUpWidth > 0) - { - tab.TabWidth = averageWidth + 1; - roundUpWidth--; - } - else - tab.TabWidth = averageWidth; - } - } - - // Set the X position of the tabs - var x = rectTabStrip.X + ToolWindowStripGapLeft; - foreach (var tab1 in Tabs) - { - var tab = (MremoteNGTab)tab1; - tab.TabX = x; - x += tab.TabWidth; - } - } - - private bool CalculateDocumentTab(Rectangle rectTabStrip, ref int x, int index) - { - var overflow = false; - - if (!(Tabs[index] is MremoteNGTab tab)) return false; - tab.MaxWidth = GetMaxTabWidth(index); - var width = Math.Min(tab.MaxWidth, DocumentTabMaxWidth); - if (x + width < rectTabStrip.Right || index == StartDisplayingTab) - { - tab.TabX = x; - tab.TabWidth = width; - EndDisplayingTab = index; - } - else - { - tab.TabX = 0; - tab.TabWidth = 0; - overflow = true; - } - - x += width; - - return overflow; - } - - /// - /// Calculate which tabs are displayed and in what order. - /// - private void CalculateTabs_Document() - { - if (m_startDisplayingTab >= Tabs.Count) - m_startDisplayingTab = 0; - - var rectTabStrip = TabsRectangle; - - var x = rectTabStrip.X; //+ rectTabStrip.Height / 2; - var overflow = false; - - // Originally all new documents that were considered overflow - // (not enough pane strip space to show all tabs) were added to - // the far left (assuming not right to left) and the tabs on the - // right were dropped from view. If StartDisplayingTab is not 0 - // then we are dealing with making sure a specific tab is kept in focus. - if (m_startDisplayingTab > 0) - { - var tempX = x; - if (Tabs[m_startDisplayingTab] is MremoteNGTab tab) - tab.MaxWidth = GetMaxTabWidth(m_startDisplayingTab); - - // Add the active tab and tabs to the left - for (var i = StartDisplayingTab; i >= 0; i--) - CalculateDocumentTab(rectTabStrip, ref tempX, i); - - // Store which tab is the first one displayed so that it - // will be drawn correctly (without part of the tab cut off) - FirstDisplayingTab = EndDisplayingTab; - - tempX = x; // Reset X location because we are starting over - - // Start with the first tab displayed - name is a little misleading. - // Loop through each tab and set its location. If there is not enough - // room for all of them overflow will be returned. - for (var i = EndDisplayingTab; i < Tabs.Count; i++) - overflow = CalculateDocumentTab(rectTabStrip, ref tempX, i); - - // If not all tabs are shown then we have an overflow. - if (FirstDisplayingTab != 0) - overflow = true; - } - else - { - for (var i = StartDisplayingTab; i < Tabs.Count; i++) - overflow = CalculateDocumentTab(rectTabStrip, ref x, i); - for (var i = 0; i < StartDisplayingTab; i++) - overflow = CalculateDocumentTab(rectTabStrip, ref x, i); - - FirstDisplayingTab = StartDisplayingTab; - } - - if (!overflow) - { - m_startDisplayingTab = 0; - FirstDisplayingTab = 0; - x = rectTabStrip.X; - foreach (var tab1 in Tabs) - { - var tab = (MremoteNGTab)tab1; - tab.TabX = x; - x += tab.TabWidth; - } - } - - DocumentTabsOverflow = overflow; - } - - protected override void EnsureTabVisible(IDockContent content) - { - if (Appearance != DockPane.AppearanceStyle.Document || !Tabs.Contains(content)) - return; - - CalculateTabs(); - EnsureDocumentTabVisible(content, true); - } - - private bool EnsureDocumentTabVisible(IDockContent content, bool repaint) - { - var index = Tabs.IndexOf(content); - if (index == -1) // TODO: should prevent it from being -1; - return false; - - if (Tabs[index] is MremoteNGTab tab && tab.TabWidth != 0) - return false; - - StartDisplayingTab = index; - if (repaint) - Invalidate(); - - return true; - } - - private int GetMaxTabWidth(int index) - { - if (Appearance == DockPane.AppearanceStyle.ToolWindow) - return GetMaxTabWidth_ToolWindow(index); - return GetMaxTabWidth_Document(index); - } - - private int GetMaxTabWidth_ToolWindow(int index) - { - var content = Tabs[index].Content; - var sizeString = TextRenderer.MeasureText(content.DockHandler.TabText, TextFont); - return ToolWindowImageWidth + sizeString.Width + ToolWindowImageGapLeft - + ToolWindowImageGapRight + ToolWindowTextGapRight; - } - - private const int TAB_CLOSE_BUTTON_WIDTH = 30; - - private int GetMaxTabWidth_Document(int index) - { - var content = Tabs[index].Content; - var height = GetTabRectangle_Document(index).Height; - var sizeText = TextRenderer.MeasureText(content.DockHandler.TabText, BoldFont, - new Size(DocumentTabMaxWidth, height), DocumentTextFormat); - - int width; - if (DockPane.DockPanel.ShowDocumentIcon) - width = sizeText.Width + DocumentIconWidth + DocumentIconGapLeft + DocumentIconGapRight + - DocumentTextGapRight; - else - width = sizeText.Width + DocumentIconGapLeft + DocumentTextGapRight; - - width += TAB_CLOSE_BUTTON_WIDTH; - return width; - } - - private void DrawTabStrip(Graphics g) - { - // IMPORTANT: fill background. - var rectTabStrip = TabStripRectangle; - g.FillRectangle( - DockPane.DockPanel.Theme.PaintingService.GetBrush(DockPane.DockPanel.Theme.ColorPalette - .MainWindowActive - .Background), rectTabStrip); - - if (Appearance == DockPane.AppearanceStyle.Document) - DrawTabStrip_Document(g); - else - DrawTabStrip_ToolWindow(g); - } - - private void DrawTabStrip_Document(Graphics g) - { - var count = Tabs.Count; - if (count == 0) - return; - - var rectTabStrip = new Rectangle(TabStripRectangle.Location, TabStripRectangle.Size); - rectTabStrip.Height += 1; - - // Draw the tabs - var rectTabOnly = TabsRectangle; - Rectangle rectTab; - MremoteNGTab tabActive = null; - g.SetClip(DrawHelper.RtlTransform(this, rectTabOnly)); - for (var i = 0; i < count; i++) - { - rectTab = GetTabRectangle(i); - if (Tabs[i].Content == DockPane.ActiveContent) - { - tabActive = Tabs[i] as MremoteNGTab; - if (tabActive != null) tabActive.Rectangle = rectTab; - continue; - } - - if (!rectTab.IntersectsWith(rectTabOnly)) continue; - if (!(Tabs[i] is MremoteNGTab tab)) continue; - tab.Rectangle = rectTab; - DrawTab(g, tab); - } - - g.SetClip(rectTabStrip); - - if (DockPane.DockPanel.DocumentTabStripLocation != DocumentTabStripLocation.Bottom) - { - Color tabUnderLineColor; - if (tabActive != null && DockPane.IsActiveDocumentPane) - tabUnderLineColor = DockPane.DockPanel.Theme.ColorPalette.TabSelectedActive.Background; - else - tabUnderLineColor = DockPane.DockPanel.Theme.ColorPalette.TabSelectedInactive.Background; - - g.DrawLine(DockPane.DockPanel.Theme.PaintingService.GetPen(tabUnderLineColor, 4), rectTabStrip.Left, - rectTabStrip.Bottom, rectTabStrip.Right, rectTabStrip.Bottom); - } - - g.SetClip(DrawHelper.RtlTransform(this, rectTabOnly)); - if (tabActive == null) return; - rectTab = tabActive.Rectangle.Value; - if (!rectTab.IntersectsWith(rectTabOnly)) return; - rectTab.Intersect(rectTabOnly); - tabActive.Rectangle = rectTab; - DrawTab(g, tabActive); - } - - private void DrawTabStrip_ToolWindow(Graphics g) - { - var rect = TabStripRectangle_ToolWindow; - var borderColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowBorder; - - g.DrawLine(DockPane.DockPanel.Theme.PaintingService.GetPen(borderColor), rect.Left, rect.Top, - rect.Right, rect.Top); - - for (var i = 0; i < Tabs.Count; i++) - { - if (!(Tabs[i] is MremoteNGTab tab)) continue; - tab.Rectangle = GetTabRectangle(i); - DrawTab(g, tab); - } - } - - private Rectangle GetTabRectangle(int index) - { - return Appearance == DockPane.AppearanceStyle.ToolWindow - ? GetTabRectangle_ToolWindow(index) - : GetTabRectangle_Document(index); - } - - private Rectangle GetTabRectangle_ToolWindow(int index) - { - var rectTabStrip = TabStripRectangle; - - var tab = (MremoteNGTab)Tabs[index]; - return new Rectangle(tab.TabX, rectTabStrip.Y, tab.TabWidth, rectTabStrip.Height); - } - - private Rectangle GetTabRectangle_Document(int index) - { - var rectTabStrip = TabStripRectangle; - var tab = (MremoteNGTab)Tabs[index]; - - var rect = new Rectangle - { - X = tab.TabX, Width = tab.TabWidth, Height = rectTabStrip.Height - DocumentTabGapTop - }; - - if (DockPane.DockPanel.DocumentTabStripLocation == DocumentTabStripLocation.Bottom) - rect.Y = rectTabStrip.Y + DocumentStripGapBottom; - else - rect.Y = rectTabStrip.Y + DocumentTabGapTop; - - return rect; - } - - private void DrawTab(Graphics g, MremoteNGTab tab) - { - if (Appearance == DockPane.AppearanceStyle.ToolWindow) - DrawTab_ToolWindow(g, tab); - else - DrawTab_Document(g, tab); - } - - private GraphicsPath GetTabOutline(Tab tab, bool rtlTransform, bool toScreen) - { - return Appearance == DockPane.AppearanceStyle.ToolWindow - ? GetTabOutline_ToolWindow(tab, rtlTransform, toScreen) - : GetTabOutline_Document(tab, rtlTransform, toScreen, false); - } - - private GraphicsPath GetTabOutline_ToolWindow(Tab tab, bool rtlTransform, bool toScreen) - { - var rect = GetTabRectangle(Tabs.IndexOf(tab)); - if (rtlTransform) - rect = DrawHelper.RtlTransform(this, rect); - if (toScreen) - rect = RectangleToScreen(rect); - - DrawHelper.GetRoundedCornerTab(GraphicsPath, rect, false); - return GraphicsPath; - } - - private GraphicsPath GetTabOutline_Document(Tab tab, bool rtlTransform, bool toScreen, bool full) - { - GraphicsPath.Reset(); - var rect = GetTabRectangle(Tabs.IndexOf(tab)); - - // Shorten TabOutline so it doesn't get overdrawn by icons next to it - rect.Intersect(TabsRectangle); - rect.Width--; - - if (rtlTransform) - rect = DrawHelper.RtlTransform(this, rect); - if (toScreen) - rect = RectangleToScreen(rect); - - GraphicsPath.AddRectangle(rect); - return GraphicsPath; - } - - private void DrawTab_ToolWindow(Graphics g, MremoteNGTab tab) - { - if (tab.Rectangle == null) return; - var rect = tab.Rectangle.Value; - var rectIcon = new Rectangle( - rect.X + ToolWindowImageGapLeft, - rect.Y + rect.Height - ToolWindowImageGapBottom - ToolWindowImageHeight, - ToolWindowImageWidth, ToolWindowImageHeight); - var rectText = PatchController.EnableHighDpi == true - ? new Rectangle( - rect.X + ToolWindowImageGapLeft, - rect.Y + rect.Height - ToolWindowImageGapBottom - TextFont.Height, - ToolWindowImageWidth, TextFont.Height) - : rectIcon; - rectText.X += rectIcon.Width + ToolWindowImageGapRight; - rectText.Width = rect.Width - rectIcon.Width - ToolWindowImageGapLeft - - ToolWindowImageGapRight - ToolWindowTextGapRight; - - var rectTab = DrawHelper.RtlTransform(this, rect); - rectText = DrawHelper.RtlTransform(this, rectText); - rectIcon = DrawHelper.RtlTransform(this, rectIcon); - var borderColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowBorder; - - var separatorColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowSeparator; - if (DockPane.ActiveContent == tab.Content) - { - Color textColor; - Color backgroundColor; - if (DockPane.IsActiveDocumentPane) - { - textColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowTabSelectedActive.Text; - backgroundColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowTabSelectedActive.Background; - } - else - { - textColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowTabSelectedInactive.Text; - backgroundColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowTabSelectedInactive.Background; - } - - g.FillRectangle(DockPane.DockPanel.Theme.PaintingService.GetBrush(backgroundColor), rect); - g.DrawLine(DockPane.DockPanel.Theme.PaintingService.GetPen(borderColor), rect.Left, rect.Top, - rect.Left, rect.Bottom); - g.DrawLine(DockPane.DockPanel.Theme.PaintingService.GetPen(borderColor), rect.Left, rect.Bottom - 1, - rect.Right, rect.Bottom - 1); - g.DrawLine(DockPane.DockPanel.Theme.PaintingService.GetPen(borderColor), rect.Right - 1, rect.Top, - rect.Right - 1, rect.Bottom); - TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, - ToolWindowTextFormat); - } - else - { - Color textColor; - Color backgroundColor; - if (tab.Content == DockPane.MouseOverTab) - { - textColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowTabUnselectedHovered.Text; - backgroundColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowTabUnselectedHovered.Background; - } - else - { - textColor = DockPane.DockPanel.Theme.ColorPalette.ToolWindowTabUnselected.Text; - backgroundColor = DockPane.DockPanel.Theme.ColorPalette.MainWindowActive.Background; - } - - g.FillRectangle(DockPane.DockPanel.Theme.PaintingService.GetBrush(backgroundColor), rect); - g.DrawLine(DockPane.DockPanel.Theme.PaintingService.GetPen(borderColor), rect.Left, rect.Top, - rect.Right, rect.Top); - TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, textColor, - ToolWindowTextFormat); - } - - if (rectTab.Contains(rectIcon)) - g.DrawIcon(tab.Content.DockHandler.Icon, rectIcon); - } - - private void DrawTab_Document(Graphics g, MremoteNGTab tab) - { - if (tab.Rectangle == null) return; - var rect = tab.Rectangle.Value; - if (tab.TabWidth == 0) - return; - - var rectCloseButton = GetCloseButtonRect(rect); - var rectIcon = new Rectangle( - rect.X + DocumentIconGapLeft, - rect.Y + rect.Height - DocumentIconGapBottom - DocumentIconHeight, - DocumentIconWidth, DocumentIconHeight); - var rectText = PatchController.EnableHighDpi == true - ? new Rectangle( - rect.X + DocumentIconGapLeft, - rect.Y + rect.Height - DocumentIconGapBottom - TextFont.Height, - DocumentIconWidth, TextFont.Height) - : rectIcon; - if (DockPane.DockPanel.ShowDocumentIcon) - { - rectText.X += rectIcon.Width + DocumentIconGapRight; - rectText.Y = rect.Y; - rectText.Width = rect.Width - rectIcon.Width - DocumentIconGapLeft - DocumentIconGapRight - - DocumentTextGapRight - rectCloseButton.Width; - rectText.Height = rect.Height; - } - else - rectText.Width = rect.Width - DocumentIconGapLeft - DocumentTextGapRight - rectCloseButton.Width; - - var rectTab = DrawHelper.RtlTransform(this, rect); - var rectBack = DrawHelper.RtlTransform(this, rect); - rectBack.Width += DocumentIconGapLeft; - rectBack.X -= DocumentIconGapLeft; - - rectText = DrawHelper.RtlTransform(this, rectText); - rectIcon = DrawHelper.RtlTransform(this, rectIcon); - - var activeColor = DockPane.DockPanel.Theme.ColorPalette.TabSelectedActive.Background; - var lostFocusColor = DockPane.DockPanel.Theme.ColorPalette.TabSelectedInactive.Background; - var inactiveColor = DockPane.DockPanel.Theme.ColorPalette.MainWindowActive.Background; - var mouseHoverColor = DockPane.DockPanel.Theme.ColorPalette.TabUnselectedHovered.Background; - - var activeText = DockPane.DockPanel.Theme.ColorPalette.TabSelectedActive.Text; - var lostFocusText = DockPane.DockPanel.Theme.ColorPalette.TabSelectedInactive.Text; - var inactiveText = DockPane.DockPanel.Theme.ColorPalette.TabUnselected.Text; - var mouseHoverText = DockPane.DockPanel.Theme.ColorPalette.TabUnselectedHovered.Text; - - Color text; - Image image = null; - Color paint; - var imageService = DockPane.DockPanel.Theme.ImageService; - if (DockPane.ActiveContent == tab.Content) - { - if (DockPane.IsActiveDocumentPane) - { - paint = activeColor; - text = activeText; - image = IsMouseDown - ? imageService.TabPressActive_Close - : rectCloseButton == ActiveClose - ? imageService.TabHoverActive_Close - : imageService.TabActive_Close; - } - else - { - paint = lostFocusColor; - text = lostFocusText; - image = IsMouseDown - ? imageService.TabPressLostFocus_Close - : rectCloseButton == ActiveClose - ? imageService.TabHoverLostFocus_Close - : imageService.TabLostFocus_Close; - } - } - else - { - if (tab.Content == DockPane.MouseOverTab) - { - paint = mouseHoverColor; - text = mouseHoverText; - image = IsMouseDown - ? imageService.TabPressInactive_Close - : rectCloseButton == ActiveClose - ? imageService.TabHoverInactive_Close - : imageService.TabInactive_Close; - } - else - { - paint = inactiveColor; - text = inactiveText; - } - } - - g.FillRectangle(DockPane.DockPanel.Theme.PaintingService.GetBrush(paint), rect); - TextRenderer.DrawText(g, tab.Content.DockHandler.TabText, TextFont, rectText, text, DocumentTextFormat); - if (image != null) - g.DrawImage(image, rectCloseButton); - - if (rectTab.Contains(rectIcon) && DockPane.DockPanel.ShowDocumentIcon) - g.DrawIcon(tab.Content.DockHandler.Icon, rectIcon); - } - - private bool m_isMouseDown; - - protected bool IsMouseDown - { - get => m_isMouseDown; - private set - { - if (m_isMouseDown == value) - return; - - m_isMouseDown = value; - Invalidate(); - } - } - - protected override void OnMouseUp(MouseEventArgs e) - { - base.OnMouseUp(e); - if (IsMouseDown) - IsMouseDown = false; - } - - protected override void OnMouseDown(MouseEventArgs e) - { - base.OnMouseDown(e); - // suspend drag if mouse is down on active close button. - m_suspendDrag = ActiveCloseHitTest(e.Location); - if (!IsMouseDown) - IsMouseDown = true; - } - - protected override void OnMouseMove(MouseEventArgs e) - { - if (!m_suspendDrag) - base.OnMouseMove(e); - - var index = HitTest(PointToClient(MousePosition)); - var toolTip = string.Empty; - - var tabUpdate = false; - var buttonUpdate = false; - if (index != -1) - { - if (Tabs[index] is MremoteNGTab tab) - { - if (Appearance == DockPane.AppearanceStyle.ToolWindow || - Appearance == DockPane.AppearanceStyle.Document) - { - tabUpdate = SetMouseOverTab(tab.Content == DockPane.ActiveContent ? null : tab.Content); - } - - if (!string.IsNullOrEmpty(tab.Content.DockHandler.ToolTipText)) - toolTip = tab.Content.DockHandler.ToolTipText; - else if (tab.MaxWidth > tab.TabWidth) - toolTip = tab.Content.DockHandler.TabText; - - var mousePos = PointToClient(MousePosition); - if (tab.Rectangle != null) - { - var tabRect = tab.Rectangle.Value; - var closeButtonRect = GetCloseButtonRect(tabRect); - var mouseRect = new Rectangle(mousePos, new Size(1, 1)); - buttonUpdate = SetActiveClose(closeButtonRect.IntersectsWith(mouseRect) - ? closeButtonRect - : Rectangle.Empty); - } - } - } - else - { - tabUpdate = SetMouseOverTab(null); - buttonUpdate = SetActiveClose(Rectangle.Empty); - } - - if (tabUpdate || buttonUpdate) - Invalidate(); - - if (m_toolTip.GetToolTip(this) == toolTip) return; - m_toolTip.Active = false; - m_toolTip.SetToolTip(this, toolTip); - m_toolTip.Active = true; - } - - protected override void OnMouseClick(MouseEventArgs e) - { - base.OnMouseClick(e); - if (e.Button != MouseButtons.Left || Appearance != DockPane.AppearanceStyle.Document) - return; - - var indexHit = HitTest(); - if (indexHit > -1) - TabCloseButtonHit(indexHit); - } - - private void TabCloseButtonHit(int index) - { - var mousePos = PointToClient(MousePosition); - var tabRect = GetTabBounds(Tabs[index]); - if (tabRect.Contains(ActiveClose) && ActiveCloseHitTest(mousePos)) - TryCloseTab(index); - } - - private Rectangle GetCloseButtonRect(Rectangle rectTab) - { - if (Appearance != DockPane.AppearanceStyle.Document) - { - return Rectangle.Empty; - } - - const int gap = 3; - var imageSize = PatchController.EnableHighDpi == true ? rectTab.Height - gap * 2 : 15; - return new Rectangle(rectTab.X + rectTab.Width - imageSize - gap - 1, rectTab.Y + gap, imageSize, - imageSize); - } - - private void WindowList_Click(object sender, EventArgs e) - { - SelectMenu.Items.Clear(); - foreach (var tab1 in Tabs) - { - var tab = (MremoteNGTab)tab1; - var content = tab.Content; - var item = SelectMenu.Items.Add(content.DockHandler.TabText, content.DockHandler.Icon.ToBitmap()); - item.Tag = tab.Content; - item.Click += ContextMenuItem_Click; - } - - var workingArea = - Screen.GetWorkingArea(ButtonWindowList.PointToScreen(new Point(ButtonWindowList.Width / 2, - ButtonWindowList.Height / 2))); - var menu = new Rectangle( - ButtonWindowList.PointToScreen(new Point(0, - ButtonWindowList.Location.Y + - ButtonWindowList.Height)), - SelectMenu.Size); - var menuMargined = new Rectangle(menu.X - SelectMenuMargin, menu.Y - SelectMenuMargin, - menu.Width + SelectMenuMargin, menu.Height + SelectMenuMargin); - if (workingArea.Contains(menuMargined)) - { - SelectMenu.Show(menu.Location); - } - else - { - var newPoint = menu.Location; - newPoint.X = DrawHelper.Balance(SelectMenu.Width, SelectMenuMargin, newPoint.X, workingArea.Left, - workingArea.Right); - newPoint.Y = DrawHelper.Balance(SelectMenu.Size.Height, SelectMenuMargin, newPoint.Y, workingArea.Top, - workingArea.Bottom); - var button = ButtonWindowList.PointToScreen(new Point(0, ButtonWindowList.Height)); - if (newPoint.Y < button.Y) - { - // flip the menu up to be above the button. - newPoint.Y = button.Y - ButtonWindowList.Height; - SelectMenu.Show(newPoint, ToolStripDropDownDirection.AboveRight); - } - else - { - SelectMenu.Show(newPoint); - } - } - } - - private void ContextMenuItem_Click(object sender, EventArgs e) - { - if (!(sender is ToolStripMenuItem item)) return; - var content = (IDockContent)item.Tag; - DockPane.ActiveContent = content; - } - - private void SetInertButtons() - { - if (Appearance == DockPane.AppearanceStyle.ToolWindow) - { - if (m_buttonOverflow != null) - m_buttonOverflow.Left = -m_buttonOverflow.Width; - - if (m_buttonWindowList != null) - m_buttonWindowList.Left = -m_buttonWindowList.Width; - } - else - { - ButtonOverflow.Visible = m_documentTabsOverflow; - ButtonOverflow.RefreshChanges(); - - ButtonWindowList.Visible = !m_documentTabsOverflow; - ButtonWindowList.RefreshChanges(); - } - } - - protected override void OnLayout(LayoutEventArgs levent) - { - if (Appearance == DockPane.AppearanceStyle.Document) - { - LayoutButtons(); - OnRefreshChanges(); - } - - base.OnLayout(levent); - } - - private void LayoutButtons() - { - var rectTabStrip = TabStripRectangle; - - // Set position and size of the buttons - var buttonWidth = ButtonOverflow.Image.Width; - var buttonHeight = ButtonOverflow.Image.Height; - var height = rectTabStrip.Height - DocumentButtonGapTop - DocumentButtonGapBottom; - if (buttonHeight < height) - { - buttonWidth = buttonWidth * height / buttonHeight; - buttonHeight = height; - } - - var buttonSize = new Size(buttonWidth, buttonHeight); - - var x = rectTabStrip.X + rectTabStrip.Width - DocumentTabGapLeft - - DocumentButtonGapRight - buttonWidth; - var y = rectTabStrip.Y + DocumentButtonGapTop; - var point = new Point(x, y); - ButtonOverflow.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize)); - - // If the close button is not visible draw the window list button overtop. - // Otherwise it is drawn to the left of the close button. - ButtonWindowList.Bounds = DrawHelper.RtlTransform(this, new Rectangle(point, buttonSize)); - } - - private void Close_Click(object sender, EventArgs e) - { - CloseProtocol(); - - if (PatchController.EnableMemoryLeakFix == true) - { - ContentClosed(); - } - } - - protected override int HitTest(Point point) - { - if (!TabsRectangle.Contains(point)) - return -1; - - foreach (var tab in Tabs) - { - var path = GetTabOutline(tab, true, false); - if (path.IsVisible(point)) - return Tabs.IndexOf(tab); - } - - return -1; - } - - protected override bool MouseDownActivateTest(MouseEventArgs e) - { - var result = base.MouseDownActivateTest(e); - if (result && (e.Button == MouseButtons.Left) && (Appearance == DockPane.AppearanceStyle.Document)) - { - // don't activate if mouse is down on active close button - result = !ActiveCloseHitTest(e.Location); - } - - return result; - } - - private bool ActiveCloseHitTest(Point ptMouse) - { - if (ActiveClose.IsEmpty) return false; - var mouseRect = new Rectangle(ptMouse, new Size(1, 1)); - return ActiveClose.IntersectsWith(mouseRect); - } - - protected override Rectangle GetTabBounds(Tab tab) - { - var path = GetTabOutline(tab, true, false); - var rectangle = path.GetBounds(); - return new Rectangle((int)rectangle.Left, (int)rectangle.Top, (int)rectangle.Width, (int)rectangle.Height); - } - - private Rectangle ActiveClose { get; set; } - - private bool SetActiveClose(Rectangle rectangle) - { - if (ActiveClose == rectangle) - return false; - - ActiveClose = rectangle; - return true; - } - - private bool SetMouseOverTab(IDockContent content) - { - if (DockPane.MouseOverTab == content) - return false; - - DockPane.MouseOverTab = content; - return true; - } - - protected override void OnMouseLeave(EventArgs e) - { - var tabUpdate = SetMouseOverTab(null); - var buttonUpdate = SetActiveClose(Rectangle.Empty); - if (tabUpdate || buttonUpdate) - Invalidate(); - - base.OnMouseLeave(e); - } - - protected override void OnRightToLeftChanged(EventArgs e) - { - base.OnRightToLeftChanged(e); - PerformLayout(); - } - - private void CloseProtocol() - { - var ic = InterfaceControl.FindInterfaceControl(DockPane.DockPanel); - ic?.Protocol.Close(); - } - - #region Native Methods - - protected override void WndProc(ref Message m) - { - if (m.Msg == (int)Msgs.WM_LBUTTONDBLCLK) - { - // If the option is not set, do nothing. Do not send the message to base. - if (!Settings.Default.DoubleClickOnTabClosesIt) return; - - // Option is set, close the tab, then send to base. - //DockPane.CloseActiveContent(); - CloseProtocol(); - - if (PatchController.EnableMemoryLeakFix == true) - { - ContentClosed(); - } - - return; - } - - base.WndProc(ref m); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Tabs/Enums.cs b/mRemoteNG/UI/Tabs/Enums.cs deleted file mode 100644 index 30367ce0c..000000000 --- a/mRemoteNG/UI/Tabs/Enums.cs +++ /dev/null @@ -1,371 +0,0 @@ -using System; - -namespace mRemoteNG.UI.Tabs -{ - [Flags] - internal enum FlagsSetWindowPos : uint - { - SWP_NOSIZE = 0x0001, - SWP_NOMOVE = 0x0002, - SWP_NOZORDER = 0x0004, - SWP_NOREDRAW = 0x0008, - SWP_NOACTIVATE = 0x0010, - SWP_FRAMECHANGED = 0x0020, - SWP_SHOWWINDOW = 0x0040, - SWP_HIDEWINDOW = 0x0080, - SWP_NOCOPYBITS = 0x0100, - SWP_NOOWNERZORDER = 0x0200, - SWP_NOSENDCHANGING = 0x0400, - SWP_DRAWFRAME = 0x0020, - SWP_NOREPOSITION = 0x0200, - SWP_DEFERERASE = 0x2000, - SWP_ASYNCWINDOWPOS = 0x4000 - } - - internal enum ShowWindowStyles : short - { - SW_HIDE = 0, - SW_SHOWNORMAL = 1, - SW_NORMAL = 1, - SW_SHOWMINIMIZED = 2, - SW_SHOWMAXIMIZED = 3, - SW_MAXIMIZE = 3, - SW_SHOWNOACTIVATE = 4, - SW_SHOW = 5, - SW_MINIMIZE = 6, - SW_SHOWMINNOACTIVE = 7, - SW_SHOWNA = 8, - SW_RESTORE = 9, - SW_SHOWDEFAULT = 10, - SW_FORCEMINIMIZE = 11, - SW_MAX = 11 - } - - internal enum WindowStyles : uint - { - WS_OVERLAPPED = 0x00000000, - WS_POPUP = 0x80000000, - WS_CHILD = 0x40000000, - WS_MINIMIZE = 0x20000000, - WS_VISIBLE = 0x10000000, - WS_DISABLED = 0x08000000, - WS_CLIPSIBLINGS = 0x04000000, - WS_CLIPCHILDREN = 0x02000000, - WS_MAXIMIZE = 0x01000000, - WS_CAPTION = 0x00C00000, - WS_BORDER = 0x00800000, - WS_DLGFRAME = 0x00400000, - WS_VSCROLL = 0x00200000, - WS_HSCROLL = 0x00100000, - WS_SYSMENU = 0x00080000, - WS_THICKFRAME = 0x00040000, - WS_GROUP = 0x00020000, - WS_TABSTOP = 0x00010000, - WS_MINIMIZEBOX = 0x00020000, - WS_MAXIMIZEBOX = 0x00010000, - WS_TILED = 0x00000000, - WS_ICONIC = 0x20000000, - WS_SIZEBOX = 0x00040000, - WS_POPUPWINDOW = 0x80880000, - WS_OVERLAPPEDWINDOW = 0x00CF0000, - WS_TILEDWINDOW = 0x00CF0000, - WS_CHILDWINDOW = 0x40000000 - } - - [Flags] - internal enum WindowExStyles - { - WS_EX_DLGMODALFRAME = 0x00000001, - WS_EX_NOPARENTNOTIFY = 0x00000004, - WS_EX_TOPMOST = 0x00000008, - WS_EX_ACCEPTFILES = 0x00000010, - WS_EX_TRANSPARENT = 0x00000020, - WS_EX_MDICHILD = 0x00000040, - WS_EX_TOOLWINDOW = 0x00000080, - WS_EX_WINDOWEDGE = 0x00000100, - WS_EX_CLIENTEDGE = 0x00000200, - WS_EX_CONTEXTHELP = 0x00000400, - WS_EX_RIGHT = 0x00001000, - WS_EX_LEFT = 0x00000000, - WS_EX_RTLREADING = 0x00002000, - WS_EX_LTRREADING = 0x00000000, - WS_EX_LEFTSCROLLBAR = 0x00004000, - WS_EX_RIGHTSCROLLBAR = 0x00000000, - WS_EX_CONTROLPARENT = 0x00010000, - WS_EX_STATICEDGE = 0x00020000, - WS_EX_APPWINDOW = 0x00040000, - WS_EX_OVERLAPPEDWINDOW = 0x00000300, - WS_EX_PALETTEWINDOW = 0x00000188, - WS_EX_LAYERED = 0x00080000, - WS_EX_NOACTIVATE = 0x08000000 - } - - internal enum Msgs - { - WM_NULL = 0x0000, - WM_CREATE = 0x0001, - WM_DESTROY = 0x0002, - WM_MOVE = 0x0003, - WM_SIZE = 0x0005, - WM_ACTIVATE = 0x0006, - WM_SETFOCUS = 0x0007, - WM_KILLFOCUS = 0x0008, - WM_ENABLE = 0x000A, - WM_SETREDRAW = 0x000B, - WM_SETTEXT = 0x000C, - WM_GETTEXT = 0x000D, - WM_GETTEXTLENGTH = 0x000E, - WM_PAINT = 0x000F, - WM_CLOSE = 0x0010, - WM_QUERYENDSESSION = 0x0011, - WM_QUIT = 0x0012, - WM_QUERYOPEN = 0x0013, - WM_ERASEBKGND = 0x0014, - WM_SYSCOLORCHANGE = 0x0015, - WM_ENDSESSION = 0x0016, - WM_SHOWWINDOW = 0x0018, - WM_WININICHANGE = 0x001A, - WM_SETTINGCHANGE = 0x001A, - WM_DEVMODECHANGE = 0x001B, - WM_ACTIVATEAPP = 0x001C, - WM_FONTCHANGE = 0x001D, - WM_TIMECHANGE = 0x001E, - WM_CANCELMODE = 0x001F, - WM_SETCURSOR = 0x0020, - WM_MOUSEACTIVATE = 0x0021, - WM_CHILDACTIVATE = 0x0022, - WM_QUEUESYNC = 0x0023, - WM_GETMINMAXINFO = 0x0024, - WM_PAINTICON = 0x0026, - WM_ICONERASEBKGND = 0x0027, - WM_NEXTDLGCTL = 0x0028, - WM_SPOOLERSTATUS = 0x002A, - WM_DRAWITEM = 0x002B, - WM_MEASUREITEM = 0x002C, - WM_DELETEITEM = 0x002D, - WM_VKEYTOITEM = 0x002E, - WM_CHARTOITEM = 0x002F, - WM_SETFONT = 0x0030, - WM_GETFONT = 0x0031, - WM_SETHOTKEY = 0x0032, - WM_GETHOTKEY = 0x0033, - WM_QUERYDRAGICON = 0x0037, - WM_COMPAREITEM = 0x0039, - WM_GETOBJECT = 0x003D, - WM_COMPACTING = 0x0041, - WM_COMMNOTIFY = 0x0044, - WM_WINDOWPOSCHANGING = 0x0046, - WM_WINDOWPOSCHANGED = 0x0047, - WM_POWER = 0x0048, - WM_COPYDATA = 0x004A, - WM_CANCELJOURNAL = 0x004B, - WM_NOTIFY = 0x004E, - WM_INPUTLANGCHANGEREQUEST = 0x0050, - WM_INPUTLANGCHANGE = 0x0051, - WM_TCARD = 0x0052, - WM_HELP = 0x0053, - WM_USERCHANGED = 0x0054, - WM_NOTIFYFORMAT = 0x0055, - WM_CONTEXTMENU = 0x007B, - WM_STYLECHANGING = 0x007C, - WM_STYLECHANGED = 0x007D, - WM_DISPLAYCHANGE = 0x007E, - WM_GETICON = 0x007F, - WM_SETICON = 0x0080, - WM_NCCREATE = 0x0081, - WM_NCDESTROY = 0x0082, - WM_NCCALCSIZE = 0x0083, - WM_NCHITTEST = 0x0084, - WM_NCPAINT = 0x0085, - WM_NCACTIVATE = 0x0086, - WM_GETDLGCODE = 0x0087, - WM_SYNCPAINT = 0x0088, - WM_NCMOUSEMOVE = 0x00A0, - WM_NCLBUTTONDOWN = 0x00A1, - WM_NCLBUTTONUP = 0x00A2, - WM_NCLBUTTONDBLCLK = 0x00A3, - WM_NCRBUTTONDOWN = 0x00A4, - WM_NCRBUTTONUP = 0x00A5, - WM_NCRBUTTONDBLCLK = 0x00A6, - WM_NCMBUTTONDOWN = 0x00A7, - WM_NCMBUTTONUP = 0x00A8, - WM_NCMBUTTONDBLCLK = 0x00A9, - WM_KEYDOWN = 0x0100, - WM_KEYUP = 0x0101, - WM_CHAR = 0x0102, - WM_DEADCHAR = 0x0103, - WM_SYSKEYDOWN = 0x0104, - WM_SYSKEYUP = 0x0105, - WM_SYSCHAR = 0x0106, - WM_SYSDEADCHAR = 0x0107, - WM_KEYLAST = 0x0108, - WM_IME_STARTCOMPOSITION = 0x010D, - WM_IME_ENDCOMPOSITION = 0x010E, - WM_IME_COMPOSITION = 0x010F, - WM_IME_KEYLAST = 0x010F, - WM_INITDIALOG = 0x0110, - WM_COMMAND = 0x0111, - WM_SYSCOMMAND = 0x0112, - WM_TIMER = 0x0113, - WM_HSCROLL = 0x0114, - WM_VSCROLL = 0x0115, - WM_INITMENU = 0x0116, - WM_INITMENUPOPUP = 0x0117, - WM_MENUSELECT = 0x011F, - WM_MENUCHAR = 0x0120, - WM_ENTERIDLE = 0x0121, - WM_MENURBUTTONUP = 0x0122, - WM_MENUDRAG = 0x0123, - WM_MENUGETOBJECT = 0x0124, - WM_UNINITMENUPOPUP = 0x0125, - WM_MENUCOMMAND = 0x0126, - WM_CTLCOLORMSGBOX = 0x0132, - WM_CTLCOLOREDIT = 0x0133, - WM_CTLCOLORLISTBOX = 0x0134, - WM_CTLCOLORBTN = 0x0135, - WM_CTLCOLORDLG = 0x0136, - WM_CTLCOLORSCROLLBAR = 0x0137, - WM_CTLCOLORSTATIC = 0x0138, - WM_MOUSEMOVE = 0x0200, - WM_LBUTTONDOWN = 0x0201, - WM_LBUTTONUP = 0x0202, - WM_LBUTTONDBLCLK = 0x0203, - WM_RBUTTONDOWN = 0x0204, - WM_RBUTTONUP = 0x0205, - WM_RBUTTONDBLCLK = 0x0206, - WM_MBUTTONDOWN = 0x0207, - WM_MBUTTONUP = 0x0208, - WM_MBUTTONDBLCLK = 0x0209, - WM_MOUSEWHEEL = 0x020A, - WM_PARENTNOTIFY = 0x0210, - WM_ENTERMENULOOP = 0x0211, - WM_EXITMENULOOP = 0x0212, - WM_NEXTMENU = 0x0213, - WM_SIZING = 0x0214, - WM_CAPTURECHANGED = 0x0215, - WM_MOVING = 0x0216, - WM_DEVICECHANGE = 0x0219, - WM_MDICREATE = 0x0220, - WM_MDIDESTROY = 0x0221, - WM_MDIACTIVATE = 0x0222, - WM_MDIRESTORE = 0x0223, - WM_MDINEXT = 0x0224, - WM_MDIMAXIMIZE = 0x0225, - WM_MDITILE = 0x0226, - WM_MDICASCADE = 0x0227, - WM_MDIICONARRANGE = 0x0228, - WM_MDIGETACTIVE = 0x0229, - WM_MDISETMENU = 0x0230, - WM_ENTERSIZEMOVE = 0x0231, - WM_EXITSIZEMOVE = 0x0232, - WM_DROPFILES = 0x0233, - WM_MDIREFRESHMENU = 0x0234, - WM_IME_SETCONTEXT = 0x0281, - WM_IME_NOTIFY = 0x0282, - WM_IME_CONTROL = 0x0283, - WM_IME_COMPOSITIONFULL = 0x0284, - WM_IME_SELECT = 0x0285, - WM_IME_CHAR = 0x0286, - WM_IME_REQUEST = 0x0288, - WM_IME_KEYDOWN = 0x0290, - WM_IME_KEYUP = 0x0291, - WM_MOUSEHOVER = 0x02A1, - WM_MOUSELEAVE = 0x02A3, - WM_CUT = 0x0300, - WM_COPY = 0x0301, - WM_PASTE = 0x0302, - WM_CLEAR = 0x0303, - WM_UNDO = 0x0304, - WM_RENDERFORMAT = 0x0305, - WM_RENDERALLFORMATS = 0x0306, - WM_DESTROYCLIPBOARD = 0x0307, - WM_DRAWCLIPBOARD = 0x0308, - WM_PAINTCLIPBOARD = 0x0309, - WM_VSCROLLCLIPBOARD = 0x030A, - WM_SIZECLIPBOARD = 0x030B, - WM_ASKCBFORMATNAME = 0x030C, - WM_CHANGECBCHAIN = 0x030D, - WM_HSCROLLCLIPBOARD = 0x030E, - WM_QUERYNEWPALETTE = 0x030F, - WM_PALETTEISCHANGING = 0x0310, - WM_PALETTECHANGED = 0x0311, - WM_HOTKEY = 0x0312, - WM_PRINT = 0x0317, - WM_PRINTCLIENT = 0x0318, - WM_HANDHELDFIRST = 0x0358, - WM_HANDHELDLAST = 0x035F, - WM_AFXFIRST = 0x0360, - WM_AFXLAST = 0x037F, - WM_PENWINFIRST = 0x0380, - WM_PENWINLAST = 0x038F, - WM_APP = 0x8000, - WM_USER = 0x0400 - } - - internal enum HitTest - { - HTERROR = -2, - HTTRANSPARENT = -1, - HTNOWHERE = 0, - HTCLIENT = 1, - HTCAPTION = 2, - HTSYSMENU = 3, - HTGROWBOX = 4, - HTSIZE = 4, - HTMENU = 5, - HTHSCROLL = 6, - HTVSCROLL = 7, - HTMINBUTTON = 8, - HTMAXBUTTON = 9, - HTLEFT = 10, - HTRIGHT = 11, - HTTOP = 12, - HTTOPLEFT = 13, - HTTOPRIGHT = 14, - HTBOTTOM = 15, - HTBOTTOMLEFT = 16, - HTBOTTOMRIGHT = 17, - HTBORDER = 18, - HTREDUCE = 8, - HTZOOM = 9, - HTSIZEFIRST = 10, - HTSIZELAST = 17, - HTOBJECT = 19, - HTCLOSE = 20, - HTHELP = 21 - } - - internal enum ScrollBars : uint - { - SB_HORZ = 0, - SB_VERT = 1, - SB_CTL = 2, - SB_BOTH = 3 - } - - internal enum GetWindowLongIndex - { - GWL_STYLE = -16, - GWL_EXSTYLE = -20 - } - - // Hook Types - internal enum HookType - { - WH_JOURNALRECORD = 0, - WH_JOURNALPLAYBACK = 1, - WH_KEYBOARD = 2, - WH_GETMESSAGE = 3, - WH_CALLWNDPROC = 4, - WH_CBT = 5, - WH_SYSMSGFILTER = 6, - WH_MOUSE = 7, - WH_HARDWARE = 8, - WH_DEBUG = 9, - WH_SHELL = 10, - WH_FOREGROUNDIDLE = 11, - WH_CALLWNDPROCRET = 12, - WH_KEYBOARD_LL = 13, - WH_MOUSE_LL = 14 - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Tabs/FloatWindowNG.cs b/mRemoteNG/UI/Tabs/FloatWindowNG.cs deleted file mode 100644 index b749df962..000000000 --- a/mRemoteNG/UI/Tabs/FloatWindowNG.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Drawing; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.UI.Tabs -{ - class FloatWindowNG : FloatWindow - { - public FloatWindowNG(DockPanel dockPanel, DockPane pane) - : base(dockPanel, pane) - { - } - - public FloatWindowNG(DockPanel dockPanel, DockPane pane, Rectangle bounds) - : base(dockPanel, pane, bounds) - { - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Tabs/MremoteNGAutoHideStrip.cs b/mRemoteNG/UI/Tabs/MremoteNGAutoHideStrip.cs deleted file mode 100644 index 38088ad37..000000000 --- a/mRemoteNG/UI/Tabs/MremoteNGAutoHideStrip.cs +++ /dev/null @@ -1,501 +0,0 @@ -using System; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Windows.Forms; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.UI.Tabs -{ - internal sealed class MremoteNGAutoHideStrip : AutoHideStripBase - { - private class TabNG : Tab - { - internal TabNG(IDockContent content) - : base(content) - { - } - - public int TabX { get; set; } - - public int TabWidth { get; set; } - } - - private const int _ImageHeight = 16; - private const int _ImageWidth = 16; - private const int _ImageGapTop = 2; - private const int _ImageGapLeft = 4; - private const int _ImageGapRight = 2; - private const int _ImageGapBottom = 2; - private const int _TextGapLeft = 0; - private const int _TextGapRight = 0; - private const int _TabGapTop = 3; - private const int _TabGapLeft = 4; - private const int _TabGapBetween = 10; - - #region Customizable Properties - - public Font TextFont => DockPanel.Theme.Skin.AutoHideStripSkin.TextFont; - - private static StringFormat _stringFormatTabHorizontal; - - private StringFormat StringFormatTabHorizontal - { - get - { - if (_stringFormatTabHorizontal == null) - { - _stringFormatTabHorizontal = new StringFormat - { - Alignment = StringAlignment.Near, - LineAlignment = StringAlignment.Center, - FormatFlags = StringFormatFlags.NoWrap, - Trimming = StringTrimming.None - }; - } - - if (RightToLeft == RightToLeft.Yes) - _stringFormatTabHorizontal.FormatFlags |= StringFormatFlags.DirectionRightToLeft; - else - _stringFormatTabHorizontal.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft; - - return _stringFormatTabHorizontal; - } - } - - private static StringFormat _stringFormatTabVertical; - - private StringFormat StringFormatTabVertical - { - get - { - if (_stringFormatTabVertical == null) - { - _stringFormatTabVertical = new StringFormat(); - _stringFormatTabVertical.Alignment = StringAlignment.Near; - _stringFormatTabVertical.LineAlignment = StringAlignment.Center; - _stringFormatTabVertical.FormatFlags = - StringFormatFlags.NoWrap | StringFormatFlags.DirectionVertical; - _stringFormatTabVertical.Trimming = StringTrimming.None; - } - - if (RightToLeft == RightToLeft.Yes) - _stringFormatTabVertical.FormatFlags |= StringFormatFlags.DirectionRightToLeft; - else - _stringFormatTabVertical.FormatFlags &= ~StringFormatFlags.DirectionRightToLeft; - - return _stringFormatTabVertical; - } - } - - private static int ImageHeight => _ImageHeight; - - private static int ImageWidth => _ImageWidth; - - private static int ImageGapTop => _ImageGapTop; - - private static int ImageGapLeft => _ImageGapLeft; - - private static int ImageGapRight => _ImageGapRight; - - private static int ImageGapBottom => _ImageGapBottom; - - private static int TextGapLeft => _TextGapLeft; - - private static int TextGapRight => _TextGapRight; - - private static int TabGapTop => _TabGapTop; - - private static int TabGapLeft => _TabGapLeft; - - private static int TabGapBetween => _TabGapBetween; - - private static Pen PenTabBorder => SystemPens.GrayText; - - #endregion - - private static Matrix MatrixIdentity { get; } = new Matrix(); - - private static DockState[] _dockStates; - - private static DockState[] DockStates - { - get - { - if (_dockStates == null) - { - _dockStates = new DockState[4]; - _dockStates[0] = DockState.DockLeftAutoHide; - _dockStates[1] = DockState.DockRightAutoHide; - _dockStates[2] = DockState.DockTopAutoHide; - _dockStates[3] = DockState.DockBottomAutoHide; - } - - return _dockStates; - } - } - - private static GraphicsPath _graphicsPath; - - internal static GraphicsPath GraphicsPath - { - get - { - if (_graphicsPath == null) - _graphicsPath = new GraphicsPath(); - - return _graphicsPath; - } - } - - public MremoteNGAutoHideStrip(DockPanel panel) - : base(panel) - { - SetStyle(ControlStyles.ResizeRedraw | - ControlStyles.UserPaint | - ControlStyles.AllPaintingInWmPaint | - ControlStyles.OptimizedDoubleBuffer, true); - BackColor = SystemColors.ControlLight; - } - - protected override void OnPaint(PaintEventArgs e) - { - base.OnPaint(e); - var g = e.Graphics; - - var startColor = DockPanel.Theme.Skin.AutoHideStripSkin.DockStripGradient.StartColor; - var endColor = DockPanel.Theme.Skin.AutoHideStripSkin.DockStripGradient.EndColor; - var gradientMode = DockPanel.Theme.Skin.AutoHideStripSkin.DockStripGradient.LinearGradientMode; - using (var brush = new LinearGradientBrush(ClientRectangle, startColor, endColor, gradientMode)) - { - g.FillRectangle(brush, ClientRectangle); - } - - DrawTabStrip(g); - } - - protected override void OnLayout(LayoutEventArgs levent) - { - CalculateTabs(); - base.OnLayout(levent); - } - - private void DrawTabStrip(Graphics g) - { - DrawTabStrip(g, DockState.DockTopAutoHide); - DrawTabStrip(g, DockState.DockBottomAutoHide); - DrawTabStrip(g, DockState.DockLeftAutoHide); - DrawTabStrip(g, DockState.DockRightAutoHide); - } - - private void DrawTabStrip(Graphics g, DockState dockState) - { - var rectTabStrip = GetLogicalTabStripRectangle(dockState); - - if (rectTabStrip.IsEmpty) - return; - - var matrixIdentity = g.Transform; - if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide) - { - var matrixRotated = new Matrix(); - matrixRotated.RotateAt(90, new PointF(rectTabStrip.X + (float)rectTabStrip.Height / 2, - rectTabStrip.Y + (float)rectTabStrip.Height / 2)); - g.Transform = matrixRotated; - } - - foreach (var pane in GetPanes(dockState)) - { - foreach (TabNG tab in pane.AutoHideTabs) - DrawTab(g, tab); - } - - g.Transform = matrixIdentity; - } - - private void CalculateTabs() - { - CalculateTabs(DockState.DockTopAutoHide); - CalculateTabs(DockState.DockBottomAutoHide); - CalculateTabs(DockState.DockLeftAutoHide); - CalculateTabs(DockState.DockRightAutoHide); - } - - private void CalculateTabs(DockState dockState) - { - var rectTabStrip = GetLogicalTabStripRectangle(dockState); - - var imageHeight = rectTabStrip.Height - ImageGapTop - ImageGapBottom; - var imageWidth = ImageWidth; - if (imageHeight > ImageHeight) - imageWidth = ImageWidth * (imageHeight / ImageHeight); - - var x = TabGapLeft + rectTabStrip.X; - foreach (var pane in GetPanes(dockState)) - { - foreach (TabNG tab in pane.AutoHideTabs) - { - var width = imageWidth + ImageGapLeft + ImageGapRight + - TextRenderer.MeasureText(tab.Content.DockHandler.TabText, TextFont).Width + - TextGapLeft + TextGapRight; - tab.TabX = x; - tab.TabWidth = width; - x += width; - } - - x += TabGapBetween; - } - } - - private Rectangle RtlTransform(Rectangle rect, DockState dockState) - { - Rectangle rectTransformed; - if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide) - rectTransformed = rect; - else - rectTransformed = DrawHelper.RtlTransform(this, rect); - - return rectTransformed; - } - - private GraphicsPath GetTabOutline(TabNG tab, bool transformed, bool rtlTransform) - { - var dockState = tab.Content.DockHandler.DockState; - var rectTab = GetTabRectangle(tab, transformed); - if (rtlTransform) - rectTab = RtlTransform(rectTab, dockState); - var upTab = (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockBottomAutoHide); - DrawHelper.GetRoundedCornerTab(GraphicsPath, rectTab, upTab); - - return GraphicsPath; - } - - private void DrawTab(Graphics g, TabNG tab) - { - var rectTabOrigin = GetTabRectangle(tab); - if (rectTabOrigin.IsEmpty) - return; - - var dockState = tab.Content.DockHandler.DockState; - var content = tab.Content; - - var path = GetTabOutline(tab, false, true); - var startColor = DockPanel.Theme.Skin.AutoHideStripSkin.TabGradient.StartColor; - var endColor = DockPanel.Theme.Skin.AutoHideStripSkin.TabGradient.EndColor; - var gradientMode = DockPanel.Theme.Skin.AutoHideStripSkin.TabGradient.LinearGradientMode; - g.FillPath(new LinearGradientBrush(rectTabOrigin, startColor, endColor, gradientMode), path); - g.DrawPath(PenTabBorder, path); - - // Set no rotate for drawing icon and text - using (var matrixRotate = g.Transform) - { - g.Transform = MatrixIdentity; - - // Draw the icon - var rectImage = rectTabOrigin; - rectImage.X += ImageGapLeft; - rectImage.Y += ImageGapTop; - var imageHeight = rectTabOrigin.Height - ImageGapTop - ImageGapBottom; - var imageWidth = ImageWidth; - if (imageHeight > ImageHeight) - imageWidth = ImageWidth * (imageHeight / ImageHeight); - rectImage.Height = imageHeight; - rectImage.Width = imageWidth; - rectImage = GetTransformedRectangle(dockState, rectImage); - - if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide) - { - // The DockState is DockLeftAutoHide or DockRightAutoHide, so rotate the image 90 degrees to the right. - var rectTransform = RtlTransform(rectImage, dockState); - Point[] rotationPoints = - { - new Point(rectTransform.X + rectTransform.Width, rectTransform.Y), - new Point(rectTransform.X + rectTransform.Width, rectTransform.Y + rectTransform.Height), - new Point(rectTransform.X, rectTransform.Y) - }; - - using (var rotatedIcon = new Icon(((Form)content).Icon, 16, 16)) - { - g.DrawImage(rotatedIcon.ToBitmap(), rotationPoints); - } - } - else - { - // Draw the icon normally without any rotation. - g.DrawIcon(((Form)content).Icon, RtlTransform(rectImage, dockState)); - } - - // Draw the text - var rectText = rectTabOrigin; - rectText.X += ImageGapLeft + imageWidth + ImageGapRight + TextGapLeft; - rectText.Width -= ImageGapLeft + imageWidth + ImageGapRight + TextGapLeft; - rectText = RtlTransform(GetTransformedRectangle(dockState, rectText), dockState); - - var textColor = DockPanel.Theme.Skin.AutoHideStripSkin.TabGradient.TextColor; - - if (dockState == DockState.DockLeftAutoHide || dockState == DockState.DockRightAutoHide) - g.DrawString(content.DockHandler.TabText, TextFont, new SolidBrush(textColor), rectText, - StringFormatTabVertical); - else - g.DrawString(content.DockHandler.TabText, TextFont, new SolidBrush(textColor), rectText, - StringFormatTabHorizontal); - - // Set rotate back - g.Transform = matrixRotate; - } - } - - private Rectangle GetLogicalTabStripRectangle(DockState dockState) - { - return GetLogicalTabStripRectangle(dockState, false); - } - - private Rectangle GetLogicalTabStripRectangle(DockState dockState, bool transformed) - { - if (!DockHelper.IsDockStateAutoHide(dockState)) - return Rectangle.Empty; - - var leftPanes = GetPanes(DockState.DockLeftAutoHide).Count; - var rightPanes = GetPanes(DockState.DockRightAutoHide).Count; - var topPanes = GetPanes(DockState.DockTopAutoHide).Count; - var bottomPanes = GetPanes(DockState.DockBottomAutoHide).Count; - - int x, y, width, height; - - height = MeasureHeight(); - if (dockState == DockState.DockLeftAutoHide && leftPanes > 0) - { - x = 0; - y = (topPanes == 0) ? 0 : height; - width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 : height); - } - else if (dockState == DockState.DockRightAutoHide && rightPanes > 0) - { - x = Width - height; - if (leftPanes != 0 && x < height) - x = height; - y = (topPanes == 0) ? 0 : height; - width = Height - (topPanes == 0 ? 0 : height) - (bottomPanes == 0 ? 0 : height); - } - else if (dockState == DockState.DockTopAutoHide && topPanes > 0) - { - x = leftPanes == 0 ? 0 : height; - y = 0; - width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height); - } - else if (dockState == DockState.DockBottomAutoHide && bottomPanes > 0) - { - x = leftPanes == 0 ? 0 : height; - y = Height - height; - if (topPanes != 0 && y < height) - y = height; - width = Width - (leftPanes == 0 ? 0 : height) - (rightPanes == 0 ? 0 : height); - } - else - return Rectangle.Empty; - - if (width == 0 || height == 0) - { - return Rectangle.Empty; - } - - var rect = new Rectangle(x, y, width, height); - return transformed ? GetTransformedRectangle(dockState, rect) : rect; - } - - private Rectangle GetTabRectangle(TabNG tab) - { - return GetTabRectangle(tab, false); - } - - private Rectangle GetTabRectangle(TabNG tab, bool transformed) - { - var dockState = tab.Content.DockHandler.DockState; - var rectTabStrip = GetLogicalTabStripRectangle(dockState); - - if (rectTabStrip.IsEmpty) - return Rectangle.Empty; - - var x = tab.TabX; - var y = rectTabStrip.Y + - (dockState == DockState.DockTopAutoHide || dockState == DockState.DockRightAutoHide - ? 0 - : TabGapTop); - var width = tab.TabWidth; - var height = rectTabStrip.Height - TabGapTop; - - if (!transformed) - return new Rectangle(x, y, width, height); - else - return GetTransformedRectangle(dockState, new Rectangle(x, y, width, height)); - } - - private Rectangle GetTransformedRectangle(DockState dockState, Rectangle rect) - { - if (dockState != DockState.DockLeftAutoHide && dockState != DockState.DockRightAutoHide) - return rect; - - var pts = new PointF[1]; - // the center of the rectangle - pts[0].X = rect.X + (float)rect.Width / 2; - pts[0].Y = rect.Y + (float)rect.Height / 2; - var rectTabStrip = GetLogicalTabStripRectangle(dockState); - using (var matrix = new Matrix()) - { - matrix.RotateAt(90, new PointF(rectTabStrip.X + (float)rectTabStrip.Height / 2, - rectTabStrip.Y + (float)rectTabStrip.Height / 2)); - matrix.TransformPoints(pts); - } - - return new Rectangle((int)(pts[0].X - (float)rect.Height / 2 + .5F), - (int)(pts[0].Y - (float)rect.Width / 2 + .5F), - rect.Height, rect.Width); - } - - protected override IDockContent HitTest(Point point) - { - foreach (var state in DockStates) - { - var rectTabStrip = GetLogicalTabStripRectangle(state, true); - if (!rectTabStrip.Contains(point)) - continue; - - foreach (var pane in GetPanes(state)) - { - foreach (TabNG tab in pane.AutoHideTabs) - { - var path = GetTabOutline(tab, true, true); - if (path.IsVisible(point)) - return tab.Content; - } - } - } - - return null; - } - - protected override Rectangle GetTabBounds(Tab tab) - { - var path = GetTabOutline((TabNG)tab, true, true); - var bounds = path.GetBounds(); - return new Rectangle((int)bounds.Left, (int)bounds.Top, (int)bounds.Width, (int)bounds.Height); - } - - protected override int MeasureHeight() - { - return Math.Max(ImageGapBottom + - ImageGapTop + ImageHeight, - TextFont.Height) + TabGapTop; - } - - protected override void OnRefreshChanges() - { - CalculateTabs(); - Invalidate(); - } - - protected override Tab CreateTab(IDockContent content) - { - return new TabNG(content); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Tabs/TabHelper.cs b/mRemoteNG/UI/Tabs/TabHelper.cs deleted file mode 100644 index 62e102d86..000000000 --- a/mRemoteNG/UI/Tabs/TabHelper.cs +++ /dev/null @@ -1,56 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.UI.Window; -using System; - -namespace mRemoteNG.UI.Tabs -{ - class TabHelper - { - private static readonly Lazy lazyHelper = new Lazy(() => new TabHelper()); - - public static TabHelper Instance => lazyHelper.Value; - - private TabHelper() - { - } - - private ConnectionTab currentTab; - - public ConnectionTab CurrentTab - { - get => currentTab; - set - { - currentTab = value; - findCurrentPanel(); - Runtime.MessageCollector.AddMessage(Messages.MessageClass.DebugMsg, - "Tab got focused: " + currentTab.TabText); - } - } - - private void findCurrentPanel() - { - var currentForm = currentTab.Parent; - while (currentForm != null && !(currentForm is ConnectionWindow)) - { - currentForm = currentForm.Parent; - } - - if (currentForm != null) - CurrentPanel = (ConnectionWindow)currentForm; - } - - private ConnectionWindow currentPanel; - - public ConnectionWindow CurrentPanel - { - get => currentPanel; - set - { - currentPanel = value; - Runtime.MessageCollector.AddMessage(Messages.MessageClass.DebugMsg, - "Panel got focused: " + currentPanel.TabText); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/TaskDialog/CommandButton.cs b/mRemoteNG/UI/TaskDialog/CommandButton.cs deleted file mode 100644 index e94de6243..000000000 --- a/mRemoteNG/UI/TaskDialog/CommandButton.cs +++ /dev/null @@ -1,296 +0,0 @@ -using mRemoteNG.Themes; -using System; -using System.ComponentModel; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Windows.Forms; - -namespace mRemoteNG.UI.TaskDialog -{ - public sealed partial class CommandButton : Button - { - //-------------------------------------------------------------------------------- - - #region PRIVATE MEMBERS - - //-------------------------------------------------------------------------------- - private Image imgArrow1; - private Image imgArrow2; - private readonly ThemeManager _themeManager; - private const int LEFT_MARGIN = 10; - private const int TOP_MARGIN = 10; - private const int ARROW_WIDTH = 19; - - enum eButtonState - { - Normal, - MouseOver, - Down - } - - eButtonState m_State = eButtonState.Normal; - - #endregion - - //-------------------------------------------------------------------------------- - - #region PUBLIC PROPERTIES - - //-------------------------------------------------------------------------------- - // Override this to make sure the control is invalidated (repainted) when 'Text' is changed - public override string Text - { - get => base.Text; - set - { - base.Text = value; - if (m_autoHeight) - Height = GetBestHeight(); - Invalidate(); - } - } - - // SmallFont is the font used for secondary lines - private Font SmallFont { get; set; } - - // AutoHeight determines whether the button automatically resizes itself to fit the Text - bool m_autoHeight = true; - - [Browsable(true)] - [Category("Behavior")] - [DefaultValue(true)] - public bool AutoHeight - { - get => m_autoHeight; - set - { - m_autoHeight = value; - if (m_autoHeight) Invalidate(); - } - } - - #endregion - - //-------------------------------------------------------------------------------- - - #region CONSTRUCTOR - - //-------------------------------------------------------------------------------- - public CommandButton() - { - InitializeComponent(); - Font = new Font("Segoe UI", 11.75F, FontStyle.Regular, GraphicsUnit.Point, 0); - SmallFont = new Font("Segoe UI", 8F, FontStyle.Regular, GraphicsUnit.Point, 0); - _themeManager = ThemeManager.getInstance(); - } - - #endregion - - //-------------------------------------------------------------------------------- - - #region PUBLIC ROUTINES - - //-------------------------------------------------------------------------------- - public int GetBestHeight() - { - return (TOP_MARGIN * 2) + (int)GetSmallTextSizeF().Height + (int)GetLargeTextSizeF().Height; - } - - #endregion - - //-------------------------------------------------------------------------------- - - #region PRIVATE ROUTINES - - //-------------------------------------------------------------------------------- - string GetLargeText() - { - var lines = Text.Split('\n'); - return lines[0]; - } - - string GetSmallText() - { - if (Text.IndexOf('\n') < 0) - return ""; - - var s = Text; - var lines = s.Split('\n'); - s = ""; - for (var i = 1; i < lines.Length; i++) - s += lines[i] + "\n"; - return s.Trim('\n'); - } - - SizeF GetLargeTextSizeF() - { - var x = LEFT_MARGIN + ARROW_WIDTH + 5; - var mzSize = new SizeF(Width - x - LEFT_MARGIN, 5000.0F); // presume RIGHT_MARGIN = LEFT_MARGIN - var g = Graphics.FromHwnd(Handle); - var textSize = g.MeasureString(GetLargeText(), Font, mzSize); - return textSize; - } - - SizeF GetSmallTextSizeF() - { - var s = GetSmallText(); - if (s == "") return new SizeF(0, 0); - var x = LEFT_MARGIN + ARROW_WIDTH + 8; // <- indent small text slightly more - var mzSize = new SizeF(Width - x - LEFT_MARGIN, 5000.0F); // presume RIGHT_MARGIN = LEFT_MARGIN - var g = Graphics.FromHwnd(Handle); - var textSize = g.MeasureString(s, SmallFont, mzSize); - return textSize; - } - - #endregion - - //-------------------------------------------------------------------------------- - - #region OVERRIDES - - //-------------------------------------------------------------------------------- - protected override void OnCreateControl() - { - base.OnCreateControl(); - imgArrow1 = Properties.Resources.GlyphRight_16x; - imgArrow2 = Properties.Resources.GlyphRight_16x; - } - - //-------------------------------------------------------------------------------- - protected override void OnPaint(PaintEventArgs e) - { - if (!_themeManager.ActiveAndExtended) - { - base.OnPaint(e); - return; - } - - e.Graphics.SmoothingMode = SmoothingMode.HighQuality; - e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; - - const LinearGradientMode mode = LinearGradientMode.Vertical; - - var newRect = new Rectangle(ClientRectangle.X, ClientRectangle.Y, ClientRectangle.Width - 1, - ClientRectangle.Height - 1); - - var img = imgArrow1; - - - Color back; - Color fore; - Color border; - if (Enabled) - { - switch (m_State) - { - case eButtonState.MouseOver: - back = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Hover_Background"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Hover_Foreground"); - border = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Hover_Border"); - break; - case eButtonState.Down: - back = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Pressed_Background"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Pressed_Foreground"); - border = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Pressed_Border"); - break; - default: - back = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Background"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Foreground"); - border = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Border"); - break; - } - } - else - { - back = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Disabled_Background"); - fore = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Disabled_Foreground"); - border = _themeManager.ActiveTheme.ExtendedPalette.getColor("Button_Disabled_Border"); - } - - if (Enabled) - { - e.Graphics.FillRectangle(new SolidBrush(back), newRect); - e.Graphics.DrawRectangle(new Pen(border, 1), newRect); - } - else - { - var brush = new LinearGradientBrush(newRect, back, back, mode); - e.Graphics.FillRectangle(brush, newRect); - e.Graphics.DrawRectangle(new Pen(border, 1), newRect); - } - - var largetext = GetLargeText(); - var smalltext = GetSmallText(); - - var szL = GetLargeTextSizeF(); - //e.Graphics.DrawString(largetext, base.Font, new SolidBrush(text_color), new RectangleF(new PointF(LEFT_MARGIN + imgArrow1.Width + 5, TOP_MARGIN), szL)); - TextRenderer.DrawText(e.Graphics, largetext, Font, - new Rectangle(LEFT_MARGIN + imgArrow1.Width + 5, TOP_MARGIN, (int)szL.Width, - (int)szL.Height), fore, - TextFormatFlags.Default); - - if (smalltext != "") - { - var szS = GetSmallTextSizeF(); - e.Graphics.DrawString(smalltext, SmallFont, new SolidBrush(fore), - new - RectangleF(new PointF(LEFT_MARGIN + imgArrow1.Width + 8, TOP_MARGIN + (int)szL.Height), - szS)); - } - - e.Graphics.DrawImage(img, new Point(LEFT_MARGIN, TOP_MARGIN + (int)(szL.Height / 2) - img.Height / 2)); - } - - //-------------------------------------------------------------------------------- - protected override void OnMouseLeave(EventArgs e) - { - m_State = eButtonState.Normal; - Invalidate(); - base.OnMouseLeave(e); - } - - //-------------------------------------------------------------------------------- - protected override void OnMouseEnter(EventArgs e) - { - m_State = eButtonState.MouseOver; - Invalidate(); - base.OnMouseEnter(e); - } - - //-------------------------------------------------------------------------------- - protected override void OnMouseUp(MouseEventArgs e) - { - m_State = eButtonState.MouseOver; - Invalidate(); - base.OnMouseUp(e); - } - - //-------------------------------------------------------------------------------- - protected override void OnMouseDown(MouseEventArgs e) - { - m_State = eButtonState.Down; - Invalidate(); - base.OnMouseDown(e); - } - - //-------------------------------------------------------------------------------- - protected override void OnSizeChanged(EventArgs e) - { - if (m_autoHeight) - { - var h = GetBestHeight(); - if (Height != h) - { - Height = h; - return; - } - } - - base.OnSizeChanged(e); - } - - #endregion - - //-------------------------------------------------------------------------------- - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/TaskDialog/CommandButton.designer.cs b/mRemoteNG/UI/TaskDialog/CommandButton.designer.cs deleted file mode 100644 index 6aa327f75..000000000 --- a/mRemoteNG/UI/TaskDialog/CommandButton.designer.cs +++ /dev/null @@ -1,42 +0,0 @@ -namespace mRemoteNG.UI.TaskDialog -{ - sealed partial class CommandButton - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // CommandButton - // - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ResumeLayout(false); - - } - - #endregion - } -} diff --git a/mRemoteNG/UI/TaskDialog/CommandButton.resx b/mRemoteNG/UI/TaskDialog/CommandButton.resx deleted file mode 100644 index e5858cc29..000000000 --- a/mRemoteNG/UI/TaskDialog/CommandButton.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - False - - \ No newline at end of file diff --git a/mRemoteNG/UI/TaskDialog/cTaskDialog.cs b/mRemoteNG/UI/TaskDialog/cTaskDialog.cs deleted file mode 100644 index 241430889..000000000 --- a/mRemoteNG/UI/TaskDialog/cTaskDialog.cs +++ /dev/null @@ -1,365 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace mRemoteNG.UI.TaskDialog -{ - //-------------------------------------------------------------------------------- - - #region PUBLIC enums - - //-------------------------------------------------------------------------------- - public enum ESysIcons - { - Information, - Question, - Warning, - Error - } - - public enum ETaskDialogButtons - { - YesNo, - YesNoCancel, - OkCancel, - Ok, - Close, - Cancel, - None - } - - #endregion - - //-------------------------------------------------------------------------------- - public static class CTaskDialog - { - // PUBLIC static values... - public static bool VerificationChecked; - public static int RadioButtonResult = -1; - public static int CommandButtonResult = -1; - public static int EmulatedFormWidth = 450; - public static bool ForceEmulationMode = false; - public static bool UseToolWindowOnXp = true; - public static bool PlaySystemSounds = true; - public static EventHandler OnTaskDialogShown = null; - public static EventHandler OnTaskDialogClosed = null; - - //-------------------------------------------------------------------------------- - - //-------------------------------------------------------------------------------- - - #region ShowTaskDialogBox - - //-------------------------------------------------------------------------------- - public static DialogResult ShowTaskDialogBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - string radioButtons, - string commandButtons, - ETaskDialogButtons buttons, - ESysIcons mainIcon, - ESysIcons footerIcon, - int defaultIndex) - - { - DialogResult result; - OnTaskDialogShown?.Invoke(null, EventArgs.Empty); - - using (var td = new frmTaskDialog()) - { - var display = new DisplayProperties(); - td.Title = title; - td.MainInstruction = mainInstruction; - td.Content = content; - td.ExpandedInfo = expandedInfo; - td.Footer = footer; - td.RadioButtons = radioButtons; - td.CommandButtons = commandButtons; - td.Buttons = buttons; - td.MainIcon = mainIcon; - td.FooterIcon = footerIcon; - td.VerificationText = verificationText; - td.Width = display.ScaleWidth(EmulatedFormWidth); - td.DefaultButtonIndex = defaultIndex; - td.BuildForm(); - result = td.ShowDialog(owner); - - RadioButtonResult = td.RadioButtonIndex; - CommandButtonResult = td.CommandButtonClickedIndex; - VerificationChecked = td.VerificationCheckBoxChecked; - } - - OnTaskDialogClosed?.Invoke(null, EventArgs.Empty); - return result; - } - - //-------------------------------------------------------------------------------- - // Overloaded versions... - //-------------------------------------------------------------------------------- - public static DialogResult ShowTaskDialogBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - string radioButtons, - string commandButtons, - ETaskDialogButtons buttons, - ESysIcons mainIcon, - ESysIcons footerIcon) - { - return ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, - radioButtons, commandButtons, buttons, mainIcon, footerIcon, 0); - } - - public static DialogResult ShowTaskDialogBox(string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - string radioButtons, - string commandButtons, - ETaskDialogButtons buttons, - ESysIcons mainIcon, - ESysIcons footerIcon) - { - return ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText, - radioButtons, commandButtons, buttons, mainIcon, footerIcon, 0); - } - - #endregion - - //-------------------------------------------------------------------------------- - - #region MessageBox - - //-------------------------------------------------------------------------------- - public static DialogResult MessageBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - ETaskDialogButtons buttons, - ESysIcons mainIcon, - ESysIcons footerIcon) - { - return ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, "", - "", buttons, mainIcon, footerIcon); - } - - //-------------------------------------------------------------------------------- - // Overloaded versions... - //-------------------------------------------------------------------------------- - public static DialogResult MessageBox(string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - ETaskDialogButtons buttons, - ESysIcons mainIcon, - ESysIcons footerIcon) - { - return ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText, "", - "", buttons, mainIcon, footerIcon); - } - - public static DialogResult MessageBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - ETaskDialogButtons buttons, - ESysIcons mainIcon) - { - return MessageBox(owner, title, mainInstruction, content, "", "", "", buttons, mainIcon, - ESysIcons.Information); - } - - public static DialogResult MessageBox(string title, - string mainInstruction, - string content, - ETaskDialogButtons buttons, - ESysIcons mainIcon) - { - return MessageBox(null, title, mainInstruction, content, "", "", "", buttons, mainIcon, - ESysIcons.Information); - } - - //-------------------------------------------------------------------------------- - - #endregion - - //-------------------------------------------------------------------------------- - - #region ShowRadioBox - - //-------------------------------------------------------------------------------- - public static int ShowRadioBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - string radioButtons, - ESysIcons mainIcon, - ESysIcons footerIcon, - int defaultIndex) - { - var res = ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, - radioButtons, "", ETaskDialogButtons.OkCancel, mainIcon, footerIcon, - defaultIndex); - if (res == DialogResult.OK) - return RadioButtonResult; - return -1; - } - - //-------------------------------------------------------------------------------- - // Overloaded versions... - //-------------------------------------------------------------------------------- - public static int ShowRadioBox(string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - string radioButtons, - ESysIcons mainIcon, - ESysIcons footerIcon, - int defaultIndex) - { - var res = ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText, - radioButtons, "", ETaskDialogButtons.OkCancel, mainIcon, footerIcon, - defaultIndex); - if (res == DialogResult.OK) - return RadioButtonResult; - return -1; - } - - public static int ShowRadioBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - string radioButtons, - ESysIcons mainIcon, - ESysIcons footerIcon) - { - return ShowRadioBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, - radioButtons, ESysIcons.Question, ESysIcons.Information, 0); - } - - public static int ShowRadioBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string radioButtons, - int defaultIndex) - { - return ShowRadioBox(owner, title, mainInstruction, content, "", "", "", radioButtons, ESysIcons.Question, - ESysIcons.Information, defaultIndex); - } - - public static int ShowRadioBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string radioButtons) - { - return ShowRadioBox(owner, title, mainInstruction, content, "", "", "", radioButtons, ESysIcons.Question, - ESysIcons.Information, 0); - } - - public static int ShowRadioBox(string title, - string mainInstruction, - string content, - string radioButtons) - { - return ShowRadioBox(null, title, mainInstruction, content, "", "", "", radioButtons, ESysIcons.Question, - ESysIcons.Information, 0); - } - - #endregion - - //-------------------------------------------------------------------------------- - - #region ShowCommandBox - - //-------------------------------------------------------------------------------- - public static int ShowCommandBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - string commandButtons, - bool showCancelButton, - ESysIcons mainIcon, - ESysIcons footerIcon) - { - var res = ShowTaskDialogBox(owner, title, mainInstruction, content, expandedInfo, footer, verificationText, - "", commandButtons, - showCancelButton ? ETaskDialogButtons.Cancel : ETaskDialogButtons.None, - mainIcon, footerIcon); - if (res == DialogResult.OK) - return CommandButtonResult; - return -1; - } - - //-------------------------------------------------------------------------------- - // Overloaded versions... - //-------------------------------------------------------------------------------- - public static int ShowCommandBox(string title, - string mainInstruction, - string content, - string expandedInfo, - string footer, - string verificationText, - string commandButtons, - bool showCancelButton, - ESysIcons mainIcon, - ESysIcons footerIcon) - { - var res = ShowTaskDialogBox(null, title, mainInstruction, content, expandedInfo, footer, verificationText, - "", commandButtons, - showCancelButton ? ETaskDialogButtons.Cancel : ETaskDialogButtons.None, - mainIcon, footerIcon); - if (res == DialogResult.OK) - return CommandButtonResult; - return -1; - } - - public static int ShowCommandBox(IWin32Window owner, - string title, - string mainInstruction, - string content, - string commandButtons, - bool showCancelButton) - { - return ShowCommandBox(owner, title, mainInstruction, content, "", "", "", commandButtons, showCancelButton, - ESysIcons.Question, ESysIcons.Information); - } - - public static int ShowCommandBox(string title, - string mainInstruction, - string content, - string commandButtons, - bool showCancelButton) - { - return ShowCommandBox(null, title, mainInstruction, content, "", "", "", commandButtons, showCancelButton, - ESysIcons.Question, ESysIcons.Information); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/TaskDialog/frmTaskDialog.cs b/mRemoteNG/UI/TaskDialog/frmTaskDialog.cs deleted file mode 100644 index 38eef4a6c..000000000 --- a/mRemoteNG/UI/TaskDialog/frmTaskDialog.cs +++ /dev/null @@ -1,525 +0,0 @@ -using mRemoteNG.Themes; -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Windows.Forms; -using mRemoteNG.UI.Controls; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.TaskDialog -{ - public partial class frmTaskDialog : Form - { - //-------------------------------------------------------------------------------- - - #region PRIVATE members - - //-------------------------------------------------------------------------------- - - private string _mainInstruction = "Main Instruction Text"; - - private readonly Font _mainInstructionFont = - new Font("Segoe UI", 11.75F, FontStyle.Regular, GraphicsUnit.Point, 0); - - private readonly List _radioButtonCtrls = new List(); - private readonly DisplayProperties _display = new DisplayProperties(); - private Control _focusControl; - - private bool _isVista = false; - - private int _mainInstructionLeftMargin; - private int _mainInstructionRightMargin; - - #endregion - - //-------------------------------------------------------------------------------- - - #region PROPERTIES - - //-------------------------------------------------------------------------------- - public ESysIcons MainIcon { get; set; } = ESysIcons.Question; - public ESysIcons FooterIcon { get; set; } = ESysIcons.Warning; - - public string Title - { - get => Text; - set => Text = value; - } - - public string MainInstruction - { - get => _mainInstruction; - set - { - _mainInstruction = value; - Invalidate(); - } - } - - public string Content - { - get => lbContent.Text; - set => lbContent.Text = value; - } - - public string ExpandedInfo - { - get => lbExpandedInfo.Text; - set => lbExpandedInfo.Text = value; - } - - public string Footer - { - get => lbFooter.Text; - set => lbFooter.Text = value; - } - - public int DefaultButtonIndex { get; set; } - - public string RadioButtons { get; set; } = ""; - - public int RadioButtonIndex - { - get - { - foreach (var rb in _radioButtonCtrls) - if (rb.Checked) - return (int)rb.Tag; - return -1; - } - } - - public string CommandButtons { get; set; } = ""; - public int CommandButtonClickedIndex { get; private set; } = -1; - - public ETaskDialogButtons Buttons { get; set; } = ETaskDialogButtons.YesNoCancel; - - public string VerificationText - { - get => cbVerify.Text; - set => cbVerify.Text = value; - } - - public bool VerificationCheckBoxChecked - { - get => cbVerify.Checked; - set => cbVerify.Checked = value; - } - - private bool Expanded { get; set; } - - #endregion - - //-------------------------------------------------------------------------------- - - #region CONSTRUCTOR - - //-------------------------------------------------------------------------------- - public frmTaskDialog() - { - InitializeComponent(); - - // _isVista = VistaTaskDialog.IsAvailableOnThisOS; - if (!_isVista && CTaskDialog.UseToolWindowOnXp) // <- shall we use the smaller toolbar? - FormBorderStyle = FormBorderStyle.FixedToolWindow; - - MainInstruction = "Main Instruction"; - Content = ""; - ExpandedInfo = ""; - Footer = ""; - VerificationText = ""; - } - - #endregion - - //-------------------------------------------------------------------------------- - - #region BuildForm - - // This is the main routine that should be called before .ShowDialog() - //-------------------------------------------------------------------------------- - private bool _formBuilt; - - public void BuildForm() - { - var formHeight = 0; - imgMain.Width = _display.ScaleWidth(imgMain.Width); - imgMain.Height = _display.ScaleHeight(imgMain.Height); - - // Setup Main Instruction - switch (MainIcon) - { - case ESysIcons.Information: - imgMain.Image = SystemIcons.Information.ToBitmap(); - break; - case ESysIcons.Question: - imgMain.Image = SystemIcons.Question.ToBitmap(); - break; - case ESysIcons.Warning: - imgMain.Image = SystemIcons.Warning.ToBitmap(); - break; - case ESysIcons.Error: - imgMain.Image = SystemIcons.Error.ToBitmap(); - break; - default: - throw new ArgumentOutOfRangeException(); - } - - lbMainInstruction.Text = _mainInstruction; - lbMainInstruction.Font = _mainInstructionFont; - AdjustLabelHeight(lbMainInstruction); - pnlMainInstruction.Height = Math.Max(41, lbMainInstruction.Height + _display.ScaleHeight(16)); - - _mainInstructionLeftMargin = imgMain.Left + imgMain.Width + _display.ScaleWidth(imgMain.Padding.Right); - _mainInstructionRightMargin = _display.ScaleWidth(8); - formHeight += pnlMainInstruction.Height; - - // Setup Content - pnlContent.Visible = Content != ""; - if (Content != "") - { - AdjustLabelHeight(lbContent); - pnlContent.Height = lbContent.Height + _display.ScaleHeight(4); - formHeight += pnlContent.Height; - } - - var showVerifyCheckbox = cbVerify.Text != ""; - cbVerify.Visible = showVerifyCheckbox; - - // Setup Expanded Info and Buttons panels - if (ExpandedInfo == "") - { - pnlExpandedInfo.Visible = false; - lbShowHideDetails.Visible = false; - cbVerify.Top = _display.ScaleHeight(12); - pnlButtons.Height = _display.ScaleHeight(40); - } - else - { - AdjustLabelHeight(lbExpandedInfo); - pnlExpandedInfo.Height = lbExpandedInfo.Height + _display.ScaleHeight(4); - pnlExpandedInfo.Visible = Expanded; - lbShowHideDetails.Text = Expanded ? " Hide details" : " Show details"; - lbShowHideDetails.ImageIndex = Expanded ? 0 : 3; - if (!showVerifyCheckbox) - pnlButtons.Height = _display.ScaleHeight(40); - if (Expanded) - formHeight += pnlExpandedInfo.Height; - } - - // Setup RadioButtons - pnlRadioButtons.Visible = RadioButtons != ""; - if (RadioButtons != "") - { - var arr = RadioButtons.Split('|'); - var pnlHeight = _display.ScaleHeight(12); - for (var i = 0; i < arr.Length; i++) - { - var rb = new MrngRadioButton {Parent = pnlRadioButtons}; - rb.Location = new Point(_display.ScaleWidth(60), _display.ScaleHeight(4) + i * rb.Height); - rb.Text = arr[i]; - rb.Tag = i; - rb.Checked = DefaultButtonIndex == i; - rb.Width = Width - rb.Left - _display.ScaleWidth(15); - pnlHeight += rb.Height; - _radioButtonCtrls.Add(rb); - } - - pnlRadioButtons.Height = pnlHeight; - formHeight += pnlRadioButtons.Height; - } - - // Setup CommandButtons - pnlCommandButtons.Visible = CommandButtons != ""; - if (CommandButtons != "") - { - var arr = CommandButtons.Split('|'); - var t = _display.ScaleHeight(8); - var pnlHeight = _display.ScaleHeight(16); - for (var i = 0; i < arr.Length; i++) - { - var btn = new CommandButton - { - Parent = pnlCommandButtons, Location = new Point(_display.ScaleWidth(50), t) - }; - if (_isVista) // <- tweak font if vista - btn.Font = new Font(btn.Font, FontStyle.Regular); - btn.Text = arr[i]; - btn.Size = new Size(Width - btn.Left - _display.ScaleWidth(15), btn.GetBestHeight()); - t += btn.Height; - pnlHeight += btn.Height; - btn.Tag = i; - btn.Click += CommandButton_Click; - if (i == DefaultButtonIndex) - _focusControl = btn; - } - - pnlCommandButtons.Height = pnlHeight; - formHeight += pnlCommandButtons.Height; - } - - // Setup Buttons - switch (Buttons) - { - case ETaskDialogButtons.YesNo: - bt1.Visible = false; - bt2.Text = Language.Yes; - bt2.DialogResult = DialogResult.Yes; - bt3.Text = Language.No; - bt3.DialogResult = DialogResult.No; - AcceptButton = bt2; - CancelButton = bt3; - break; - case ETaskDialogButtons.YesNoCancel: - bt1.Text = Language.Yes; - bt1.DialogResult = DialogResult.Yes; - bt2.Text = Language.No; - bt2.DialogResult = DialogResult.No; - bt3.Text = Language._Cancel; - bt3.DialogResult = DialogResult.Cancel; - AcceptButton = bt1; - CancelButton = bt3; - break; - case ETaskDialogButtons.OkCancel: - bt1.Visible = false; - bt2.Text = Language._Ok; - bt2.DialogResult = DialogResult.OK; - bt3.Text = Language._Cancel; - bt3.DialogResult = DialogResult.Cancel; - AcceptButton = bt2; - CancelButton = bt3; - break; - case ETaskDialogButtons.Ok: - bt1.Visible = false; - bt2.Visible = false; - bt3.Text = Language._Ok; - bt3.DialogResult = DialogResult.OK; - AcceptButton = bt3; - CancelButton = bt3; - break; - case ETaskDialogButtons.Close: - bt1.Visible = false; - bt2.Visible = false; - bt3.Text = Language._Close; - bt3.DialogResult = DialogResult.Cancel; - CancelButton = bt3; - break; - case ETaskDialogButtons.Cancel: - bt1.Visible = false; - bt2.Visible = false; - bt3.Text = Language._Cancel; - bt3.DialogResult = DialogResult.Cancel; - CancelButton = bt3; - break; - case ETaskDialogButtons.None: - bt1.Visible = false; - bt2.Visible = false; - bt3.Visible = false; - break; - default: - throw new ArgumentOutOfRangeException(); - } - - ControlBox = Buttons == ETaskDialogButtons.Cancel || - Buttons == ETaskDialogButtons.Close || - Buttons == ETaskDialogButtons.OkCancel || - Buttons == ETaskDialogButtons.YesNoCancel; - - if (!showVerifyCheckbox && ExpandedInfo == "" && Buttons == ETaskDialogButtons.None) - pnlButtons.Visible = false; - else - formHeight += pnlButtons.Height; - - pnlFooter.Visible = Footer != ""; - if (Footer != "") - { - AdjustLabelHeight(lbFooter); - pnlFooter.Height = Math.Max(_display.ScaleHeight(28), lbFooter.Height + _display.ScaleHeight(16)); - switch (FooterIcon) - { - case ESysIcons.Information: - imgFooter.Image = ResizeBitmap(SystemIcons.Information.ToBitmap(), 16, 16); - break; - case ESysIcons.Question: - imgFooter.Image = ResizeBitmap(SystemIcons.Question.ToBitmap(), 16, 16); - break; - case ESysIcons.Warning: - imgFooter.Image = ResizeBitmap(SystemIcons.Warning.ToBitmap(), 16, 16); - break; - case ESysIcons.Error: - imgFooter.Image = ResizeBitmap(SystemIcons.Error.ToBitmap(), 16, 16); - break; - default: - throw new ArgumentOutOfRangeException(); - } - - formHeight += pnlFooter.Height; - } - - ClientSize = new Size(ClientSize.Width, formHeight); - - _formBuilt = true; - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - ApplyTheme(); - } - - private void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) return; - - pnlButtons.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlButtons.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - panel2.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - panel2.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlFooter.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlFooter.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - panel5.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - panel5.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - panel3.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - panel3.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlCommandButtons.BackColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlCommandButtons.ForeColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlMainInstruction.BackColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlMainInstruction.ForeColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlContent.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlContent.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlExpandedInfo.BackColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlExpandedInfo.ForeColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlRadioButtons.BackColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlRadioButtons.ForeColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - //-------------------------------------------------------------------------------- - private Image ResizeBitmap(Image srcImg, int newWidth, int newHeight) - { - var percentWidth = _display.ScaleWidth(newWidth) / (float)srcImg.Width; - var percentHeight = _display.ScaleHeight(newHeight) / (float)srcImg.Height; - - var resizePercent = percentHeight < percentWidth ? percentHeight : percentWidth; - - var w = (int)(srcImg.Width * resizePercent); - var h = (int)(srcImg.Height * resizePercent); - var b = new Bitmap(w, h); - - using (var g = Graphics.FromImage(b)) - { - g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic; - g.DrawImage(srcImg, 0, 0, w, h); - } - - return b; - } - - //-------------------------------------------------------------------------------- - // utility function for setting a Label's height - private static void AdjustLabelHeight(Control lb) - { - var text = lb.Text; - var textFont = lb.Font; - var layoutSize = new SizeF(lb.ClientSize.Width, 5000.0F); - - using (var g = Graphics.FromHwnd(lb.Handle)) - { - var stringSize = g.MeasureString(text, textFont, layoutSize); - lb.Height = (int)stringSize.Height + 4; - } - } - - #endregion - - //-------------------------------------------------------------------------------- - - #region EVENTS - - //-------------------------------------------------------------------------------- - private void CommandButton_Click(object sender, EventArgs e) - { - CommandButtonClickedIndex = (int)((CommandButton)sender).Tag; - DialogResult = DialogResult.OK; - } - - - //-------------------------------------------------------------------------------- - protected override void OnShown(EventArgs e) - { - if (!_formBuilt) - throw new Exception("frmTaskDialog : Please call .BuildForm() before showing the TaskDialog"); - base.OnShown(e); - } - - //-------------------------------------------------------------------------------- - private void lbDetails_MouseEnter(object sender, EventArgs e) - { - lbShowHideDetails.ImageIndex = Expanded ? 1 : 4; - } - - //-------------------------------------------------------------------------------- - private void lbDetails_MouseLeave(object sender, EventArgs e) - { - lbShowHideDetails.ImageIndex = Expanded ? 0 : 3; - } - - //-------------------------------------------------------------------------------- - private void lbDetails_MouseUp(object sender, MouseEventArgs e) - { - lbShowHideDetails.ImageIndex = Expanded ? 1 : 4; - } - - //-------------------------------------------------------------------------------- - private void lbDetails_MouseDown(object sender, MouseEventArgs e) - { - lbShowHideDetails.ImageIndex = Expanded ? 2 : 5; - } - - //-------------------------------------------------------------------------------- - private void lbDetails_Click(object sender, EventArgs e) - { - Expanded = !Expanded; - pnlExpandedInfo.Visible = Expanded; - lbShowHideDetails.Text = Expanded ? " Hide details" : " Show details"; - if (Expanded) - Height += pnlExpandedInfo.Height; - else - Height -= pnlExpandedInfo.Height; - } - - //-------------------------------------------------------------------------------- - private void frmTaskDialog_Shown(object sender, EventArgs e) - { - if (CTaskDialog.PlaySystemSounds) - { - switch (MainIcon) - { - case ESysIcons.Error: - System.Media.SystemSounds.Hand.Play(); - break; - case ESysIcons.Information: - System.Media.SystemSounds.Asterisk.Play(); - break; - case ESysIcons.Question: - System.Media.SystemSounds.Asterisk.Play(); - break; - case ESysIcons.Warning: - System.Media.SystemSounds.Exclamation.Play(); - break; - default: - throw new ArgumentOutOfRangeException(); - } - } - - _focusControl?.Focus(); - } - - #endregion - - //-------------------------------------------------------------------------------- - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/TaskDialog/frmTaskDialog.designer.cs b/mRemoteNG/UI/TaskDialog/frmTaskDialog.designer.cs deleted file mode 100644 index 3f40e1228..000000000 --- a/mRemoteNG/UI/TaskDialog/frmTaskDialog.designer.cs +++ /dev/null @@ -1,345 +0,0 @@ -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.TaskDialog -{ - partial class frmTaskDialog - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing) - { - if(components != null) - components.Dispose(); - if(_mainInstructionFont != null) - _mainInstructionFont.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmTaskDialog)); - this.imgMain = new System.Windows.Forms.PictureBox(); - this.pnlButtons = new System.Windows.Forms.Panel(); - this.imageList1 = new System.Windows.Forms.ImageList(this.components); - this.panel2 = new System.Windows.Forms.Panel(); - this.pnlFooter = new System.Windows.Forms.Panel(); - this.imgFooter = new System.Windows.Forms.PictureBox(); - this.panel5 = new System.Windows.Forms.Panel(); - this.panel3 = new System.Windows.Forms.Panel(); - this.pnlCommandButtons = new System.Windows.Forms.Panel(); - this.pnlMainInstruction = new System.Windows.Forms.Panel(); - this.pnlContent = new System.Windows.Forms.Panel(); - this.pnlExpandedInfo = new System.Windows.Forms.Panel(); - this.pnlRadioButtons = new System.Windows.Forms.Panel(); - this.lbFooter = new mRemoteNG.UI.Controls.MrngLabel(); - this.bt1 = new MrngButton(); - this.bt2 = new MrngButton(); - this.bt3 = new MrngButton(); - this.cbVerify = new MrngCheckBox(); - this.lbShowHideDetails = new mRemoteNG.UI.Controls.MrngLabel(); - this.lbExpandedInfo = new mRemoteNG.UI.Controls.MrngLabel(); - this.lbContent = new mRemoteNG.UI.Controls.MrngLabel(); - this.lbMainInstruction = new mRemoteNG.UI.Controls.MrngLabel(); - ((System.ComponentModel.ISupportInitialize)(this.imgMain)).BeginInit(); - this.pnlButtons.SuspendLayout(); - this.pnlFooter.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.imgFooter)).BeginInit(); - this.pnlMainInstruction.SuspendLayout(); - this.pnlContent.SuspendLayout(); - this.pnlExpandedInfo.SuspendLayout(); - this.SuspendLayout(); - // - // imgMain - // - this.imgMain.Location = new System.Drawing.Point(8, 8); - this.imgMain.Name = "imgMain"; - this.imgMain.Size = new System.Drawing.Size(32, 32); - this.imgMain.TabIndex = 0; - this.imgMain.TabStop = false; - // - // pnlButtons - // - this.pnlButtons.Controls.Add(this.bt1); - this.pnlButtons.Controls.Add(this.bt2); - this.pnlButtons.Controls.Add(this.bt3); - this.pnlButtons.Controls.Add(this.cbVerify); - this.pnlButtons.Controls.Add(this.lbShowHideDetails); - this.pnlButtons.Controls.Add(this.panel2); - this.pnlButtons.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlButtons.Location = new System.Drawing.Point(0, 301); - this.pnlButtons.Name = "pnlButtons"; - this.pnlButtons.Size = new System.Drawing.Size(464, 58); - this.pnlButtons.TabIndex = 0; - // - // imageList1 - // - this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream"))); - this.imageList1.TransparentColor = System.Drawing.Color.Transparent; - this.imageList1.Images.SetKeyName(0, "arrow_up_bw.bmp"); - this.imageList1.Images.SetKeyName(1, "arrow_up_color.bmp"); - this.imageList1.Images.SetKeyName(2, "arrow_up_color_pressed.bmp"); - this.imageList1.Images.SetKeyName(3, "arrow_down_bw.bmp"); - this.imageList1.Images.SetKeyName(4, "arrow_down_color.bmp"); - this.imageList1.Images.SetKeyName(5, "arrow_down_color_pressed.bmp"); - this.imageList1.Images.SetKeyName(6, "green_arrow.bmp"); - // - // panel2 - // - this.panel2.Dock = System.Windows.Forms.DockStyle.Top; - this.panel2.Location = new System.Drawing.Point(0, 0); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(464, 1); - this.panel2.TabIndex = 0; - // - // pnlFooter - // - this.pnlFooter.Controls.Add(this.lbFooter); - this.pnlFooter.Controls.Add(this.imgFooter); - this.pnlFooter.Controls.Add(this.panel5); - this.pnlFooter.Controls.Add(this.panel3); - this.pnlFooter.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlFooter.Location = new System.Drawing.Point(0, 359); - this.pnlFooter.Name = "pnlFooter"; - this.pnlFooter.Size = new System.Drawing.Size(464, 36); - this.pnlFooter.TabIndex = 2; - // - // imgFooter - // - this.imgFooter.Location = new System.Drawing.Point(8, 10); - this.imgFooter.Name = "imgFooter"; - this.imgFooter.Size = new System.Drawing.Size(16, 16); - this.imgFooter.TabIndex = 4; - this.imgFooter.TabStop = false; - // - // panel5 - // - this.panel5.Dock = System.Windows.Forms.DockStyle.Top; - this.panel5.Location = new System.Drawing.Point(0, 1); - this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(464, 1); - this.panel5.TabIndex = 2; - // - // panel3 - // - this.panel3.Dock = System.Windows.Forms.DockStyle.Top; - this.panel3.Location = new System.Drawing.Point(0, 0); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(464, 1); - this.panel3.TabIndex = 1; - // - // pnlCommandButtons - // - this.pnlCommandButtons.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlCommandButtons.Location = new System.Drawing.Point(0, 202); - this.pnlCommandButtons.Name = "pnlCommandButtons"; - this.pnlCommandButtons.Size = new System.Drawing.Size(464, 99); - this.pnlCommandButtons.TabIndex = 4; - // - // pnlMainInstruction - // - this.pnlMainInstruction.Controls.Add(this.lbMainInstruction); - this.pnlMainInstruction.Controls.Add(this.imgMain); - this.pnlMainInstruction.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlMainInstruction.Location = new System.Drawing.Point(0, 0); - this.pnlMainInstruction.Name = "pnlMainInstruction"; - this.pnlMainInstruction.Size = new System.Drawing.Size(464, 41); - this.pnlMainInstruction.TabIndex = 1; - // - // pnlContent - // - this.pnlContent.Controls.Add(this.lbContent); - this.pnlContent.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlContent.Location = new System.Drawing.Point(0, 41); - this.pnlContent.Name = "pnlContent"; - this.pnlContent.Size = new System.Drawing.Size(464, 30); - this.pnlContent.TabIndex = 2; - // - // pnlExpandedInfo - // - this.pnlExpandedInfo.Controls.Add(this.lbExpandedInfo); - this.pnlExpandedInfo.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlExpandedInfo.Location = new System.Drawing.Point(0, 71); - this.pnlExpandedInfo.Name = "pnlExpandedInfo"; - this.pnlExpandedInfo.Size = new System.Drawing.Size(464, 30); - this.pnlExpandedInfo.TabIndex = 10; - // - // pnlRadioButtons - // - this.pnlRadioButtons.Dock = System.Windows.Forms.DockStyle.Top; - this.pnlRadioButtons.Location = new System.Drawing.Point(0, 101); - this.pnlRadioButtons.Name = "pnlRadioButtons"; - this.pnlRadioButtons.Size = new System.Drawing.Size(464, 101); - this.pnlRadioButtons.TabIndex = 3; - // - // lbFooter - // - this.lbFooter.Location = new System.Drawing.Point(30, 11); - this.lbFooter.Name = "lbFooter"; - this.lbFooter.Size = new System.Drawing.Size(409, 15); - this.lbFooter.TabIndex = 4; - this.lbFooter.Text = "lbFooter"; - // - // bt1 - // - this.bt1._mice = MrngButton.MouseState.HOVER; - this.bt1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bt1.Location = new System.Drawing.Point(218, 8); - this.bt1.Name = "bt1"; - this.bt1.Size = new System.Drawing.Size(75, 23); - this.bt1.TabIndex = 0; - this.bt1.Text = "bt1"; - // - // bt2 - // - this.bt2._mice = MrngButton.MouseState.HOVER; - this.bt2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bt2.Location = new System.Drawing.Point(299, 8); - this.bt2.Name = "bt2"; - this.bt2.Size = new System.Drawing.Size(75, 23); - this.bt2.TabIndex = 1; - this.bt2.Text = "bt2"; - // - // bt3 - // - this.bt3._mice = MrngButton.MouseState.HOVER; - this.bt3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bt3.Location = new System.Drawing.Point(380, 8); - this.bt3.Name = "bt3"; - this.bt3.Size = new System.Drawing.Size(75, 23); - this.bt3.TabIndex = 2; - this.bt3.Text = "bt3"; - // - // cbVerify - // - this.cbVerify._mice = MrngCheckBox.MouseState.HOVER; - this.cbVerify.AutoSize = true; - this.cbVerify.Location = new System.Drawing.Point(13, 34); - this.cbVerify.Name = "cbVerify"; - this.cbVerify.Size = new System.Drawing.Size(147, 17); - this.cbVerify.TabIndex = 4; - this.cbVerify.Text = "Don\'t ask me this again"; - this.cbVerify.Visible = false; - // - // lbShowHideDetails - // - this.lbShowHideDetails.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.lbShowHideDetails.ImageIndex = 3; - this.lbShowHideDetails.ImageList = this.imageList1; - this.lbShowHideDetails.Location = new System.Drawing.Point(8, 6); - this.lbShowHideDetails.Name = "lbShowHideDetails"; - this.lbShowHideDetails.Size = new System.Drawing.Size(94, 23); - this.lbShowHideDetails.TabIndex = 3; - this.lbShowHideDetails.Text = " Show details"; - this.lbShowHideDetails.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.lbShowHideDetails.Click += new System.EventHandler(this.lbDetails_Click); - this.lbShowHideDetails.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lbDetails_MouseDown); - this.lbShowHideDetails.MouseEnter += new System.EventHandler(this.lbDetails_MouseEnter); - this.lbShowHideDetails.MouseLeave += new System.EventHandler(this.lbDetails_MouseLeave); - this.lbShowHideDetails.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lbDetails_MouseUp); - // - // lbExpandedInfo - // - this.lbExpandedInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbExpandedInfo.Location = new System.Drawing.Point(50, 0); - this.lbExpandedInfo.Name = "lbExpandedInfo"; - this.lbExpandedInfo.Size = new System.Drawing.Size(409, 19); - this.lbExpandedInfo.TabIndex = 0; - this.lbExpandedInfo.Text = "lbExpandedInfo"; - // - // lbContent - // - this.lbContent.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbContent.Location = new System.Drawing.Point(50, 0); - this.lbContent.Name = "lbContent"; - this.lbContent.Size = new System.Drawing.Size(409, 19); - this.lbContent.TabIndex = 0; - this.lbContent.Text = "lbContent"; - // - // lbMainInstruction - // - this.lbMainInstruction.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lbMainInstruction.Location = new System.Drawing.Point(50, 9); - this.lbMainInstruction.Name = "lbMainInstruction"; - this.lbMainInstruction.Size = new System.Drawing.Size(409, 19); - this.lbMainInstruction.TabIndex = 1; - this.lbMainInstruction.Text = "lbMainInstruction"; - // - // frmTaskDialog - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(464, 593); - this.Controls.Add(this.pnlFooter); - this.Controls.Add(this.pnlButtons); - this.Controls.Add(this.pnlCommandButtons); - this.Controls.Add(this.pnlRadioButtons); - this.Controls.Add(this.pnlExpandedInfo); - this.Controls.Add(this.pnlContent); - this.Controls.Add(this.pnlMainInstruction); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "frmTaskDialog"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "frmTaskDialog"; - this.Shown += new System.EventHandler(this.frmTaskDialog_Shown); - ((System.ComponentModel.ISupportInitialize)(this.imgMain)).EndInit(); - this.pnlButtons.ResumeLayout(false); - this.pnlButtons.PerformLayout(); - this.pnlFooter.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.imgFooter)).EndInit(); - this.pnlMainInstruction.ResumeLayout(false); - this.pnlContent.ResumeLayout(false); - this.pnlExpandedInfo.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.PictureBox imgMain; - private Controls.MrngLabel lbContent; - private System.Windows.Forms.Panel pnlButtons; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Panel pnlFooter; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.Panel panel5; - private System.Windows.Forms.PictureBox imgFooter; - private Controls.MrngLabel lbFooter; - private System.Windows.Forms.ImageList imageList1; - private Controls.MrngLabel lbShowHideDetails; - private System.Windows.Forms.Panel pnlCommandButtons; - private MrngCheckBox cbVerify; - private System.Windows.Forms.Panel pnlMainInstruction; - private System.Windows.Forms.Panel pnlContent; - private System.Windows.Forms.Panel pnlExpandedInfo; - private Controls.MrngLabel lbExpandedInfo; - private System.Windows.Forms.Panel pnlRadioButtons; - private MrngButton bt1; - private MrngButton bt2; - private MrngButton bt3; - private Controls.MrngLabel lbMainInstruction; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/TaskDialog/frmTaskDialog.resx b/mRemoteNG/UI/TaskDialog/frmTaskDialog.resx deleted file mode 100644 index 2110ff737..000000000 --- a/mRemoteNG/UI/TaskDialog/frmTaskDialog.resx +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAC - MgAAAk1TRnQBSQFMAgEBBwEAAVwBAAFcAQABEwEAARMBAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFM - AwABJgMAAQEBAAEgBQABIAEtKgAB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AByAEBFgAD/wEAAfwBBwH/AYAD/wGABAAB8AEB - Af4BAAE/Av8BgAQAAeABAAH8AQABHwL/AYAEAAHAAQABeAEAAQ8C/wGABAABgAEAATABAAEHAfwBfwGA - BAABgAEAATABAAEHAfgBPwGACAABAwH8AR8BgAgAAQMB/gEPAYAIAAEDAcABBwGACAABAwGAAQMBgAgA - AQMBgAEDAYAIAAEDAcABBwGACAABAwH+AQ8BgAQAAYABAAEwAQABBwH8AR8BgAQAAYABAAEwAQABBwH4 - AT8BgAQAAcABAAF4AQABDwH8AX8BgAQAAeABAAH8AQABHwL/AYAEAAHwAQEB/gEAAT8C/wGABAAB/AEH - Af8BgAP/AYAEAAH8AQcB/wGAAf8B8AEfAf4BAwHwAgAB8AEBAf4BAAE/AcABBwH4AQAB8AIAAeABAAH8 - AQABHwGAAQMB8AEAAXACAAHAAQABeAEAAQ8BAAEBAeABAAEwAgABgAEAATABAAEGAgABwAEAARACAAGA - AQABMAEAAQYCAAHAAQABEFYAAYABAAEwAQABBgIAAcABAAEQAgABgAEAATABAAEGAgABwAEAARACAAHA - AQABeAEAAQ8BAAEBAeABAAEwAgAB4AEAAfwBAAEfAYABAwHwAQABcAIAAfABAQH+AQABPwHAAQcB+AEA - AfACAAH8AQcB/wGAAf8B8AEfAf4BAwHwAgAL - - - \ No newline at end of file diff --git a/mRemoteNG/UI/TextBoxExtensions.cs b/mRemoteNG/UI/TextBoxExtensions.cs deleted file mode 100644 index 9aa91ece9..000000000 --- a/mRemoteNG/UI/TextBoxExtensions.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Text; -using System.Windows.Forms; -using mRemoteNG.App; - -namespace mRemoteNG.UI -{ - public static class TextBoxExtensions - { - public static bool SetCueBannerText(this TextBox textBox, string cueText, bool showCueWhenFocused = false) - { - if (!textBox.IsHandleCreated || cueText == null) return false; - var result = NativeMethods.SendMessage(textBox.Handle, NativeMethods.EM_SETCUEBANNER, - (IntPtr)Convert.ToInt32(showCueWhenFocused), cueText); - return result.ToInt64() == NativeMethods.TRUE; - } - - public static string GetCueBannerText(this TextBox textBox) - { - var cueBannerText = new StringBuilder(256); - var result = NativeMethods.SendMessage(textBox.Handle, NativeMethods.EM_GETCUEBANNER, cueBannerText, - new IntPtr(cueBannerText.Capacity)); - return result.ToInt64() != 0 ? cueBannerText.ToString() : null; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.Designer.cs b/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.Designer.cs deleted file mode 100644 index 9f18cdafc..000000000 --- a/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.Designer.cs +++ /dev/null @@ -1,136 +0,0 @@ - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Window -{ - public partial class ActiveDirectoryImportWindow - { - #region Windows Form Designer generated code - private void InitializeComponent() - { - this.btnImport = new MrngButton(); - this.txtDomain = new mRemoteNG.UI.Controls.MrngTextBox(); - this.lblDomain = new mRemoteNG.UI.Controls.MrngLabel(); - this.btnChangeDomain = new MrngButton(); - this.activeDirectoryTree = new mRemoteNG.UI.Controls.MrngAdTree(); - this.btnClose = new MrngButton(); - this.chkSubOU = new MrngCheckBox(); - this.SuspendLayout(); - // - // btnImport - // - this.btnImport._mice = MrngButton.MouseState.HOVER; - this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnImport.Location = new System.Drawing.Point(126, 345); - this.btnImport.Name = "btnImport"; - this.btnImport.Size = new System.Drawing.Size(75, 23); - this.btnImport.TabIndex = 4; - this.btnImport.Text = "&Import"; - this.btnImport.UseVisualStyleBackColor = true; - this.btnImport.Click += new System.EventHandler(this.BtnImport_Click); - // - // txtDomain - // - this.txtDomain.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtDomain.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtDomain.Location = new System.Drawing.Point(12, 25); - this.txtDomain.Name = "txtDomain"; - this.txtDomain.Size = new System.Drawing.Size(406, 22); - this.txtDomain.TabIndex = 1; - this.txtDomain.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtDomain_KeyDown); - // - // lblDomain - // - this.lblDomain.AutoSize = true; - this.lblDomain.Location = new System.Drawing.Point(9, 9); - this.lblDomain.Name = "lblDomain"; - this.lblDomain.Size = new System.Drawing.Size(50, 13); - this.lblDomain.TabIndex = 0; - this.lblDomain.Text = "Domain:"; - // - // btnChangeDomain - // - this.btnChangeDomain._mice = MrngButton.MouseState.HOVER; - this.btnChangeDomain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnChangeDomain.Location = new System.Drawing.Point(422, 23); - this.btnChangeDomain.Name = "btnChangeDomain"; - this.btnChangeDomain.Size = new System.Drawing.Size(100, 24); - this.btnChangeDomain.TabIndex = 2; - this.btnChangeDomain.Text = "Change"; - this.btnChangeDomain.UseVisualStyleBackColor = true; - this.btnChangeDomain.Click += new System.EventHandler(this.BtnChangeDomain_Click); - // - // ActiveDirectoryTree - // - this.activeDirectoryTree.AdPath = null; - this.activeDirectoryTree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.activeDirectoryTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.activeDirectoryTree.Location = new System.Drawing.Point(12, 52); - this.activeDirectoryTree.Margin = new System.Windows.Forms.Padding(4); - this.activeDirectoryTree.Name = "ActiveDirectoryTree"; - this.activeDirectoryTree.SelectedNode = null; - this.activeDirectoryTree.Size = new System.Drawing.Size(510, 285); - this.activeDirectoryTree.TabIndex = 3; - this.activeDirectoryTree.AdPathChanged += new mRemoteNG.UI.Controls.MrngAdTree.AdPathChangedEventHandler(this.ActiveDirectoryTree_ADPathChanged); - // - // btnClose - // - this.btnClose._mice = MrngButton.MouseState.HOVER; - this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnClose.Location = new System.Drawing.Point(422, 344); - this.btnClose.Name = "btnClose"; - this.btnClose.Size = new System.Drawing.Size(100, 24); - this.btnClose.TabIndex = 5; - this.btnClose.Text = "Close"; - this.btnClose.UseVisualStyleBackColor = true; - this.btnClose.Click += new System.EventHandler(this.BtnClose_Click); - // - // chkSubOU - // - this.chkSubOU._mice = MrngCheckBox.MouseState.HOVER; - this.chkSubOU.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.chkSubOU.AutoSize = true; - this.chkSubOU.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.chkSubOU.Location = new System.Drawing.Point(12, 349); - this.chkSubOU.Name = "chkSubOU"; - this.chkSubOU.Size = new System.Drawing.Size(108, 17); - this.chkSubOU.TabIndex = 6; - this.chkSubOU.Text = "Import Sub OUs"; - this.chkSubOU.UseVisualStyleBackColor = true; - // - // ActiveDirectoryImportWindow - // - this.AcceptButton = this.btnImport; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.BackColor = System.Drawing.SystemColors.Control; - this.ClientSize = new System.Drawing.Size(534, 381); - this.Controls.Add(this.chkSubOU); - this.Controls.Add(this.btnClose); - this.Controls.Add(this.activeDirectoryTree); - this.Controls.Add(this.lblDomain); - this.Controls.Add(this.txtDomain); - this.Controls.Add(this.btnChangeDomain); - this.Controls.Add(this.btnImport); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "ActiveDirectoryImportWindow"; - this.TabText = "Active Directory Import"; - this.Text = "Active Directory Import"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - private MrngButton btnImport; - private Controls.MrngTextBox txtDomain; - private Controls.MrngLabel lblDomain; - private MrngButton btnChangeDomain; - private mRemoteNG.UI.Controls.MrngAdTree activeDirectoryTree; - #endregion - - private MrngButton btnClose; - private MrngCheckBox chkSubOU; - } -} diff --git a/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.cs b/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.cs deleted file mode 100644 index 96383d38a..000000000 --- a/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Linq; -using System.Windows.Forms; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.App; -using mRemoteNG.Container; -using mRemoteNG.Themes; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Window -{ - public partial class ActiveDirectoryImportWindow : BaseWindow - { - private string _currentDomain; - - public ActiveDirectoryImportWindow() - { - WindowType = WindowType.ActiveDirectoryImport; - DockPnl = new DockContent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Schema_16x); - InitializeComponent(); - FontOverrider.FontOverride(this); - ApplyTheme(); - ApplyLanguage(); - txtDomain.Text = _currentDomain; - EnableDisableImportButton(); - // Domain doesn't refresh on load, so it defaults to DOMAIN without this... - _currentDomain = Environment.UserDomainName; - ChangeDomain(); - } - - #region Private Methods - - private new void ApplyTheme() - { - if (!ThemeManager.getInstance().ThemingActive) return; - base.ApplyTheme(); - if (!ThemeManager.getInstance().ActiveAndExtended) return; - activeDirectoryTree.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("List_Background"); - activeDirectoryTree.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("List_Item_Foreground"); - } - - private void BtnImport_Click(object sender, EventArgs e) - { - var selectedNode = Windows.TreeForm.SelectedNode; - ContainerInfo importDestination; - if (selectedNode != null) - importDestination = selectedNode as ContainerInfo ?? selectedNode.Parent; - else - importDestination = Runtime.ConnectionsService.ConnectionTreeModel.RootNodes.First(); - - Import.ImportFromActiveDirectory(activeDirectoryTree.AdPath, importDestination, chkSubOU.Checked); - } - - private void TxtDomain_KeyDown(object sender, KeyEventArgs e) - { - if (e.KeyCode != Keys.Enter) return; - ChangeDomain(); - e.SuppressKeyPress = true; - } - - private void BtnChangeDomain_Click(object sender, EventArgs e) - { - ChangeDomain(); - } - - private void ActiveDirectoryTree_ADPathChanged(object sender) - { - EnableDisableImportButton(); - } - - private void ApplyLanguage() - { - btnImport.Text = Language._Import; - lblDomain.Text = Language.Domain; - chkSubOU.Text = Language.ImportSubOUs; - btnChangeDomain.Text = Language.Change; - btnClose.Text = Language._Close; - } - - private void ChangeDomain() - { - _currentDomain = txtDomain.Text; - activeDirectoryTree.Domain = _currentDomain; - activeDirectoryTree.Refresh(); - } - - private void EnableDisableImportButton() - { - btnImport.Enabled = !string.IsNullOrEmpty(activeDirectoryTree.AdPath); - } - private void BtnClose_Click(object sender, EventArgs e) - { - Close(); - } - - #endregion Private Methods - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.resx b/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.resx deleted file mode 100644 index d58980a38..000000000 --- a/mRemoteNG/UI/Window/ActiveDirectoryImportWindow.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Window/BaseWindow.cs b/mRemoteNG/UI/Window/BaseWindow.cs deleted file mode 100644 index 993c2c0c5..000000000 --- a/mRemoteNG/UI/Window/BaseWindow.cs +++ /dev/null @@ -1,77 +0,0 @@ -using mRemoteNG.Themes; -using WeifenLuo.WinFormsUI.Docking; - -// ReSharper disable UnusedAutoPropertyAccessor.Global - - -namespace mRemoteNG.UI.Window -{ - public class BaseWindow : DockContent - { - #region Private Variables - - //private WindowType _WindowType; - //private DockContent _DockPnl; - private ThemeManager _themeManager; - - #endregion - - #region Public Properties - - protected WindowType WindowType { get; set; } - - protected DockContent DockPnl { get; set; } - - #endregion - - #region Public Methods - - public void SetFormText(string t) - { - Text = t; - TabText = t; - } - - #endregion - - internal void ApplyTheme() - { - _themeManager = ThemeManager.getInstance(); - if (!_themeManager.ActiveAndExtended) return; - BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - - #region Private Methods - - /* - private void Base_Load(object sender, EventArgs e) - { - FrmMain.Default.ShowHidePanelTabs(); - } - */ - - /* - private void Base_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) - { - FrmMain.Default.ShowHidePanelTabs(this); - } - */ - - #endregion - - private void InitializeComponent() - { - this.SuspendLayout(); - // - // BaseWindow - // - this.ClientSize = new System.Drawing.Size(284, 261); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "BaseWindow"; - this.ResumeLayout(false); - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/BaseWindow.resx b/mRemoteNG/UI/Window/BaseWindow.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNG/UI/Window/BaseWindow.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ConfigWindow.cs b/mRemoteNG/UI/Window/ConfigWindow.cs deleted file mode 100644 index 54b4b6f2b..000000000 --- a/mRemoteNG/UI/Window/ConfigWindow.cs +++ /dev/null @@ -1,716 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Drawing; -using System.Net.NetworkInformation; -using System.Threading; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.Themes; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI.Controls.ConnectionInfoPropertyGrid; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.UI.Window -{ - public class ConfigWindow : BaseWindow - { - private bool _originalPropertyGridToolStripItemCountValid; - private int _originalPropertyGridToolStripItemCount; - private System.ComponentModel.Container _components; - private ToolStripButton _btnShowProperties; - private ToolStripButton _btnShowDefaultProperties; - private ToolStripButton _btnShowInheritance; - private ToolStripButton _btnShowDefaultInheritance; - private ToolStripButton _btnIcon; - private ToolStripButton _btnHostStatus; - internal ContextMenuStrip CMenIcons; - internal ContextMenuStrip PropertyGridContextMenu; - private ToolStripMenuItem _propertyGridContextMenuShowHelpText; - private ToolStripMenuItem _propertyGridContextMenuReset; - private ToolStripSeparator _toolStripSeparator1; - private ConnectionInfoPropertyGrid _pGrid; - private ThemeManager _themeManager; - - private ConnectionInfo _selectedTreeNode; - - public ConnectionInfo SelectedTreeNode - { - get => _selectedTreeNode; - set - { - _selectedTreeNode = value; - _pGrid.SelectedConnectionInfo = value; - UpdateTopRow(); - } - } - - private void InitializeComponent() - { - _components = new System.ComponentModel.Container(); - Load += Config_Load; - SystemColorsChanged += Config_SystemColorsChanged; - _pGrid = new ConnectionInfoPropertyGrid(); - _pGrid.PropertyValueChanged += pGrid_PropertyValueChanged; - _pGrid.PropertySortChanged += pGrid_PropertySortChanged; - PropertyGridContextMenu = new ContextMenuStrip(_components); - PropertyGridContextMenu.Opening += propertyGridContextMenu_Opening; - _propertyGridContextMenuReset = new ToolStripMenuItem(); - _propertyGridContextMenuReset.Click += propertyGridContextMenuReset_Click; - _toolStripSeparator1 = new ToolStripSeparator(); - _propertyGridContextMenuShowHelpText = new ToolStripMenuItem(); - _propertyGridContextMenuShowHelpText.Click += propertyGridContextMenuShowHelpText_Click; - _propertyGridContextMenuShowHelpText.CheckedChanged += propertyGridContextMenuShowHelpText_CheckedChanged; - _btnShowInheritance = new ToolStripButton(); - _btnShowInheritance.Click += btnShowInheritance_Click; - _btnShowDefaultInheritance = new ToolStripButton(); - _btnShowDefaultInheritance.Click += btnShowDefaultInheritance_Click; - _btnShowProperties = new ToolStripButton(); - _btnShowProperties.Click += btnShowProperties_Click; - _btnShowDefaultProperties = new ToolStripButton(); - _btnShowDefaultProperties.Click += btnShowDefaultProperties_Click; - _btnIcon = new ToolStripButton(); - _btnIcon.MouseUp += btnIcon_Click; - _btnHostStatus = new ToolStripButton(); - _btnHostStatus.Click += btnHostStatus_Click; - CMenIcons = new ContextMenuStrip(_components); - PropertyGridContextMenu.SuspendLayout(); - SuspendLayout(); - // - //pGrid - // - _pGrid.Anchor = ((AnchorStyles.Top | AnchorStyles.Bottom) - | AnchorStyles.Left) - | AnchorStyles.Right; - _pGrid.BrowsableProperties = null; - _pGrid.ContextMenuStrip = PropertyGridContextMenu; - _pGrid.Font = new Font("Segoe UI", 8.25F, FontStyle.Regular, GraphicsUnit.Point, Convert.ToByte(0)); - _pGrid.HiddenAttributes = null; - _pGrid.HiddenProperties = null; - _pGrid.Location = new Point(0, 0); - _pGrid.Name = "_pGrid"; - _pGrid.PropertySort = PropertySort.Categorized; - _pGrid.Size = new Size(226, 530); - _pGrid.TabIndex = 0; - _pGrid.UseCompatibleTextRendering = true; - // - //propertyGridContextMenu - // - PropertyGridContextMenu.Items.AddRange(new ToolStripItem[] - { - _propertyGridContextMenuReset, _toolStripSeparator1, _propertyGridContextMenuShowHelpText - }); - PropertyGridContextMenu.Name = "PropertyGridContextMenu"; - PropertyGridContextMenu.Size = new Size(157, 76); - // - //propertyGridContextMenuReset - // - _propertyGridContextMenuReset.Name = "_propertyGridContextMenuReset"; - _propertyGridContextMenuReset.Size = new Size(156, 22); - _propertyGridContextMenuReset.Text = @"&Reset"; - // - //ToolStripSeparator1 - // - _toolStripSeparator1.Name = "_toolStripSeparator1"; - _toolStripSeparator1.Size = new Size(153, 6); - // - //propertyGridContextMenuShowHelpText - // - _propertyGridContextMenuShowHelpText.Name = "_propertyGridContextMenuShowHelpText"; - _propertyGridContextMenuShowHelpText.Size = new Size(156, 22); - _propertyGridContextMenuShowHelpText.Text = @"&Show Help Text"; - // - //btnShowInheritance - // - _btnShowInheritance.DisplayStyle = ToolStripItemDisplayStyle.Image; - _btnShowInheritance.Image = Properties.Resources.Schema_16x; - _btnShowInheritance.ImageTransparentColor = Color.Magenta; - _btnShowInheritance.Name = "_btnShowInheritance"; - _btnShowInheritance.Size = new Size(23, 22); - _btnShowInheritance.Text = @"Inheritance"; - // - //btnShowDefaultInheritance - // - _btnShowDefaultInheritance.DisplayStyle = ToolStripItemDisplayStyle.Image; - _btnShowDefaultInheritance.Image = Properties.Resources.ViewDownBySchema_16x; - _btnShowDefaultInheritance.ImageTransparentColor = Color.Magenta; - _btnShowDefaultInheritance.Name = "_btnShowDefaultInheritance"; - _btnShowDefaultInheritance.Size = new Size(23, 22); - _btnShowDefaultInheritance.Text = @"Default Inheritance"; - // - //btnShowProperties - // - _btnShowProperties.Checked = true; - _btnShowProperties.CheckState = CheckState.Checked; - _btnShowProperties.DisplayStyle = ToolStripItemDisplayStyle.Image; - _btnShowProperties.Image = Properties.Resources.Property_16x; - _btnShowProperties.ImageTransparentColor = Color.Magenta; - _btnShowProperties.Name = "_btnShowProperties"; - _btnShowProperties.Size = new Size(23, 22); - _btnShowProperties.Text = @"Properties"; - // - //btnShowDefaultProperties - // - _btnShowDefaultProperties.DisplayStyle = ToolStripItemDisplayStyle.Image; - _btnShowDefaultProperties.Image = Properties.Resources.ExtendedProperty_16x; - _btnShowDefaultProperties.ImageTransparentColor = Color.Magenta; - _btnShowDefaultProperties.Name = "_btnShowDefaultProperties"; - _btnShowDefaultProperties.Size = new Size(23, 22); - _btnShowDefaultProperties.Text = @"Default Properties"; - // - //btnIcon - // - _btnIcon.Alignment = ToolStripItemAlignment.Right; - _btnIcon.DisplayStyle = ToolStripItemDisplayStyle.Image; - _btnIcon.ImageTransparentColor = Color.Magenta; - _btnIcon.Name = "_btnIcon"; - _btnIcon.Size = new Size(23, 22); - _btnIcon.Text = @"Icon"; - // - //btnHostStatus - // - _btnHostStatus.Alignment = ToolStripItemAlignment.Right; - _btnHostStatus.DisplayStyle = ToolStripItemDisplayStyle.Image; - _btnHostStatus.Image = Properties.Resources.HostStatus_Check; - _btnHostStatus.ImageTransparentColor = Color.Magenta; - _btnHostStatus.Name = "_btnHostStatus"; - _btnHostStatus.Size = new Size(23, 22); - _btnHostStatus.Tag = "checking"; - _btnHostStatus.Text = @"Status"; - // - //cMenIcons - // - CMenIcons.Name = "CMenIcons"; - CMenIcons.Size = new Size(61, 4); - // - //Config - // - ClientSize = new Size(226, 530); - Controls.Add(_pGrid); - Font = new Font("Segoe UI", 8.25F, FontStyle.Regular, GraphicsUnit.Point, Convert.ToByte(0)); - HideOnClose = true; - Name = "ConfigWindow"; - TabText = @"Config"; - Text = @"Config"; - PropertyGridContextMenu.ResumeLayout(false); - ResumeLayout(false); - } - - #region Public Properties - - public bool PropertiesVisible => _btnShowProperties.Checked; - public bool CanShowProperties => SelectedTreeNode != null; - - public bool InheritanceVisible => _btnShowInheritance.Checked; - public bool CanShowInheritance => SelectedTreeNode != null && - _pGrid.SelectedConnectionInfo?.Parent != null; - - public bool DefaultPropertiesVisible => _btnShowDefaultProperties.Checked; - public bool CanShowDefaultProperties => true; - - public bool DefaultInheritanceVisible => _btnShowDefaultInheritance.Checked; - public bool CanShowDefaultInheritance => true; - - /// - /// A list of properties being shown for the current object. - /// - public IEnumerable VisibleObjectProperties => _pGrid.VisibleProperties; - - #endregion - - #region Constructors - - public ConfigWindow() : this(new DockContent()) - { - } - - public ConfigWindow(DockContent panel) - { - WindowType = WindowType.Config; - DockPnl = panel; - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Settings_16x); - ApplyLanguage(); - } - - #endregion - - #region Public Methods - - public void ShowConnectionProperties() - { - _pGrid.PropertyMode = PropertyMode.Connection; - UpdateTopRow(); - } - - public void ShowInheritanceProperties() - { - _pGrid.PropertyMode = PropertyMode.Inheritance; - UpdateTopRow(); - } - - public void ShowDefaultConnectionProperties() - { - _pGrid.PropertyMode = PropertyMode.DefaultConnection; - UpdateTopRow(); - } - - public void ShowDefaultInheritanceProperties() - { - _pGrid.PropertyMode = PropertyMode.DefaultInheritance; - UpdateTopRow(); - } - - protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, Keys keyData) - { - // Main form handle command key events - // Adapted from http://kiwigis.blogspot.com/2009/05/adding-tab-key-support-to-propertygrid.html - if ((keyData & Keys.KeyCode) != Keys.Tab) - return base.ProcessCmdKey(ref msg, keyData); - - // ReSharper disable once SwitchStatementMissingSomeCases - switch (keyData) - { - case (Keys.Tab | Keys.Shift): - _pGrid.SelectPreviousGridItem(); - break; - case Keys.Tab: - _pGrid.SelectNextGridItem(); - break; - } - - return true; // Handled - } - #endregion - - #region Private Methods - private void ApplyLanguage() - { - _btnShowInheritance.Text = Language.Inheritance; - _btnShowDefaultInheritance.Text = Language.ButtonDefaultInheritance; - _btnShowProperties.Text = Language.Properties; - _btnShowDefaultProperties.Text = Language.ButtonDefaultProperties; - _btnIcon.Text = Language.Icon; - _btnHostStatus.Text = Language.Status; - Text = Language.Config; - TabText = Language.Config; - _propertyGridContextMenuShowHelpText.Text = Language.ShowHelpText; - } - - private new void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) return; - _pGrid.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - _pGrid.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - _pGrid.ViewBackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Background"); - _pGrid.ViewForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Foreground"); - _pGrid.LineColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Border"); - _pGrid.HelpBackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - _pGrid.HelpForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - _pGrid.CategoryForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Header_Foreground"); - _pGrid.CommandsDisabledLinkColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Disabled_Foreground"); - _pGrid.CommandsBackColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Disabled_Background"); - _pGrid.CommandsForeColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("List_Item_Disabled_Foreground"); - } - - private void UpdateTopRow() - { - try - { - // if we are on the show inheritance tab but it isn't a - // valid choice, switch to the properties tab - if (_pGrid.PropertyMode == PropertyMode.Inheritance && !CanShowInheritance) - { - ShowConnectionProperties(); - return; - } - - UpdatePropertiesButton(); - UpdateShowInheritanceButton(); - UpdateShowDefaultPropertiesButton(); - UpdateShowDefaultInheritanceButton(); - UpdateHostStatusButton(); - UpdateIconButton(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage( - MessageClass.ErrorMsg, - Language.ConfigPropertyGridObjectFailed + Environment.NewLine + - ex.Message, true); - } - } - - private void UpdatePropertiesButton() - { - _btnShowProperties.Enabled = CanShowProperties; - _btnShowProperties.Checked = - _pGrid.PropertyMode == PropertyMode.Connection; - } - - private void UpdateShowInheritanceButton() - { - _btnShowInheritance.Enabled = CanShowInheritance; - _btnShowInheritance.Checked = - _pGrid.PropertyMode == PropertyMode.Inheritance; - } - - private void UpdateShowDefaultPropertiesButton() - { - _btnShowDefaultProperties.Enabled = CanShowDefaultProperties; - _btnShowDefaultProperties.Checked = - _pGrid.PropertyMode == PropertyMode.DefaultConnection; - } - - private void UpdateShowDefaultInheritanceButton() - { - _btnShowDefaultInheritance.Enabled = CanShowDefaultInheritance; - _btnShowDefaultInheritance.Checked = - _pGrid.PropertyMode == PropertyMode.DefaultInheritance; - } - - private void UpdateHostStatusButton() - { - _btnHostStatus.Enabled = - !_pGrid.RootNodeSelected && - !_pGrid.IsShowingDefaultProperties && - !(_pGrid.SelectedConnectionInfo is ContainerInfo); - - SetHostStatus(_pGrid.SelectedObject); - } - - private void UpdateIconButton() - { - _btnIcon.Enabled = - _pGrid.SelectedConnectionInfo != null && - !_pGrid.IsShowingDefaultProperties && - !_pGrid.RootNodeSelected; - - _btnIcon.Image = _btnIcon.Enabled - ? ConnectionIcon - .FromString(_pGrid.SelectedConnectionInfo?.Icon)? - .ToBitmap() - : null; - } - - private void AddToolStripItems() - { - try - { - var customToolStrip = new ToolStrip(); - customToolStrip.Items.Add(_btnShowProperties); - customToolStrip.Items.Add(_btnShowInheritance); - customToolStrip.Items.Add(_btnShowDefaultProperties); - customToolStrip.Items.Add(_btnShowDefaultInheritance); - customToolStrip.Items.Add(_btnHostStatus); - customToolStrip.Items.Add(_btnIcon); - customToolStrip.Show(); - - var propertyGridToolStrip = new ToolStrip(); - - ToolStrip toolStrip = null; - foreach (Control control in _pGrid.Controls) - { - toolStrip = control as ToolStrip; - if (toolStrip == null) continue; - propertyGridToolStrip = toolStrip; - break; - } - - if (toolStrip == null) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.CouldNotFindToolStripInFilteredPropertyGrid, true); - return; - } - - if (!_originalPropertyGridToolStripItemCountValid) - { - _originalPropertyGridToolStripItemCount = propertyGridToolStrip.Items.Count; - _originalPropertyGridToolStripItemCountValid = true; - } - - Debug.Assert(_originalPropertyGridToolStripItemCount == 5); - - // Hide the "Property Pages" button - propertyGridToolStrip.Items[_originalPropertyGridToolStripItemCount - 1].Visible = false; - - var expectedToolStripItemCount = _originalPropertyGridToolStripItemCount + customToolStrip.Items.Count; - if (propertyGridToolStrip.Items.Count == expectedToolStripItemCount) return; - propertyGridToolStrip.AllowMerge = true; - ToolStripManager.Merge(customToolStrip, propertyGridToolStrip); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ConfigUiLoadFailed + Environment.NewLine + ex.Message, - true); - } - } - - private void Config_Load(object sender, EventArgs e) - { - _themeManager = ThemeManager.getInstance(); - _themeManager.ThemeChanged += ApplyTheme; - ApplyTheme(); - AddToolStripItems(); - _pGrid.HelpVisible = Settings.Default.ShowConfigHelpText; - } - - private void Config_SystemColorsChanged(object sender, EventArgs e) - { - AddToolStripItems(); - } - - private void pGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) - { - try - { - if (e.ChangedItem.Label == Language.Icon) - { - var conIcon = ConnectionIcon.FromString(_pGrid.SelectedConnectionInfo.Icon); - if (conIcon != null) - _btnIcon.Image = conIcon.ToBitmap(); - } - else if (e.ChangedItem.Label == Language.HostnameIp) - { - SetHostStatus(_pGrid.SelectedConnectionInfo); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ConfigPropertyGridValueFailed + Environment.NewLine + - ex.Message, true); - } - } - - private void pGrid_PropertySortChanged(object sender, EventArgs e) - { - if (_pGrid.PropertySort == PropertySort.CategorizedAlphabetical) - _pGrid.PropertySort = PropertySort.Categorized; - } - - private void btnShowProperties_Click(object sender, EventArgs e) - { - ShowConnectionProperties(); - } - - private void btnShowInheritance_Click(object sender, EventArgs e) - { - ShowInheritanceProperties(); - } - - private void btnShowDefaultProperties_Click(object sender, EventArgs e) - { - ShowDefaultConnectionProperties(); - } - - private void btnShowDefaultInheritance_Click(object sender, EventArgs e) - { - ShowDefaultInheritanceProperties(); - } - - private void btnHostStatus_Click(object sender, EventArgs e) - { - SetHostStatus(_pGrid.SelectedObject); - } - - private void btnIcon_Click(object sender, MouseEventArgs e) - { - try - { - if (!(_pGrid.SelectedObject is ConnectionInfo) || _pGrid.SelectedObject is PuttySessionInfo) return; - CMenIcons.Items.Clear(); - - foreach (var iStr in ConnectionIcon.Icons) - { - var tI = new ToolStripMenuItem - { - Text = iStr, - Image = ConnectionIcon.FromString(iStr).ToBitmap() - }; - tI.Click += IconMenu_Click; - - CMenIcons.Items.Add(tI); - } - - var mPos = new Point( - new Size(PointToScreen(new Point(e.Location.X + _pGrid.Width - 100, - e.Location.Y)))); - CMenIcons.Show(mPos); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ConfigPropertyGridButtonIconClickFailed + - Environment.NewLine + ex.Message, true); - } - } - - private void IconMenu_Click(object sender, EventArgs e) - { - try - { - var connectionInfo = (ConnectionInfo)_pGrid.SelectedObject; - if (connectionInfo == null) return; - - var selectedMenuItem = (ToolStripMenuItem)sender; - - var iconName = selectedMenuItem?.Text; - if (string.IsNullOrEmpty(iconName)) return; - - var connectionIcon = ConnectionIcon.FromString(iconName); - if (connectionIcon == null) return; - - _btnIcon.Image = connectionIcon.ToBitmap(); - - connectionInfo.Icon = iconName; - _pGrid.Refresh(); - - Runtime.ConnectionsService.SaveConnectionsAsync(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ConfigPropertyGridMenuClickFailed + - Environment.NewLine + ex.Message, true); - } - } - - #endregion - - #region Host Status (Ping) - - private Thread _pThread; - - private void CheckHostAlive(object hostName) - { - if (string.IsNullOrEmpty(hostName as string)) - { - ShowStatusImage(Properties.Resources.HostStatus_Off); - return; - } - - var pingSender = new Ping(); - - try - { - var pReply = pingSender.Send((string)hostName); - if (pReply?.Status == IPStatus.Success) - { - if ((string)_btnHostStatus.Tag == "checking") - ShowStatusImage(Properties.Resources.HostStatus_On); - } - else - { - if ((string)_btnHostStatus.Tag == "checking") - ShowStatusImage(Properties.Resources.HostStatus_Off); - } - } - catch (Exception) - { - if ((string)_btnHostStatus.Tag == "checking") - ShowStatusImage(Properties.Resources.HostStatus_Off); - } - } - - private delegate void ShowStatusImageCb(Image image); - - private void ShowStatusImage(Image image) - { - if (_pGrid.InvokeRequired) - { - ShowStatusImageCb d = ShowStatusImage; - _pGrid.Invoke(d, image); - } - else - { - _btnHostStatus.Image = image; - _btnHostStatus.Tag = "checkfinished"; - } - } - - private void SetHostStatus(object connectionInfo) - { - try - { - _btnHostStatus.Image = Properties.Resources.HostStatus_Check; - // To check status, ConnectionInfo must be an mRemoteNG.Connection.Info that is not a container - if (!(connectionInfo is ConnectionInfo info)) return; - if (info.IsContainer) return; - - _btnHostStatus.Tag = "checking"; - _pThread = new Thread(CheckHostAlive); - _pThread.SetApartmentState(ApartmentState.STA); - _pThread.IsBackground = true; - _pThread.Start(((ConnectionInfo)connectionInfo).Hostname); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - Language.ConfigPropertyGridSetHostStatusFailed + - Environment.NewLine + ex.Message, true); - } - } - - #endregion - - #region Event Handlers - - private void propertyGridContextMenu_Opening(object sender, System.ComponentModel.CancelEventArgs e) - { - try - { - _propertyGridContextMenuShowHelpText.Checked = Settings.Default.ShowConfigHelpText; - var gridItem = _pGrid.SelectedGridItem; - _propertyGridContextMenuReset.Enabled = Convert.ToBoolean(_pGrid.SelectedObject != null && - gridItem?.PropertyDescriptor != null && - gridItem.PropertyDescriptor.CanResetValue(_pGrid.SelectedObject)); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.Config.propertyGridContextMenu_Opening() failed.", ex); - } - } - - private void propertyGridContextMenuReset_Click(object sender, EventArgs e) - { - try - { - var gridItem = _pGrid.SelectedGridItem; - if (_pGrid.SelectedObject != null && gridItem?.PropertyDescriptor != null && - gridItem.PropertyDescriptor.CanResetValue(_pGrid.SelectedObject)) - { - _pGrid.ResetSelectedProperty(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.Config.propertyGridContextMenuReset_Click() failed.", ex); - } - } - - private void propertyGridContextMenuShowHelpText_Click(object sender, EventArgs e) - { - _propertyGridContextMenuShowHelpText.Checked = !_propertyGridContextMenuShowHelpText.Checked; - } - - private void propertyGridContextMenuShowHelpText_CheckedChanged(object sender, EventArgs e) - { - Settings.Default.ShowConfigHelpText = _propertyGridContextMenuShowHelpText.Checked; - _pGrid.HelpVisible = _propertyGridContextMenuShowHelpText.Checked; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ConfigWindow.resx b/mRemoteNG/UI/Window/ConfigWindow.resx deleted file mode 100644 index c0a25806b..000000000 --- a/mRemoteNG/UI/Window/ConfigWindow.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 131, 14 - - - 21, 14 - - - 44 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ConnectionTreeWindow.Designer.cs b/mRemoteNG/UI/Window/ConnectionTreeWindow.Designer.cs deleted file mode 100644 index b293ffb23..000000000 --- a/mRemoteNG/UI/Window/ConnectionTreeWindow.Designer.cs +++ /dev/null @@ -1,223 +0,0 @@ -using mRemoteNG.Tree.ClickHandlers; -using mRemoteNG.UI.Controls; -using mRemoteNG.UI.Controls.ConnectionTree; - -namespace mRemoteNG.UI.Window -{ - public partial class ConnectionTreeWindow : BaseWindow - { - #region Windows Form Designer generated code - internal System.Windows.Forms.MenuStrip msMain; - internal System.Windows.Forms.ToolStripMenuItem mMenViewExpandAllFolders; - internal System.Windows.Forms.ToolStripMenuItem mMenViewCollapseAllFolders; - internal System.Windows.Forms.ToolStripMenuItem mMenSort; - internal System.Windows.Forms.ToolStripMenuItem mMenAddConnection; - internal System.Windows.Forms.ToolStripMenuItem mMenAddFolder; - public System.Windows.Forms.TreeView tvConnections; - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - mRemoteNG.Tree.ConnectionTreeModel connectionTreeModel2 = new mRemoteNG.Tree.ConnectionTreeModel(); - TreeNodeCompositeClickHandler treeNodeCompositeClickHandler3 = new TreeNodeCompositeClickHandler(); - mRemoteNG.Tree.AlwaysConfirmYes alwaysConfirmYes2 = new mRemoteNG.Tree.AlwaysConfirmYes(); - TreeNodeCompositeClickHandler treeNodeCompositeClickHandler4 = new TreeNodeCompositeClickHandler(); - this.ConnectionTree = new ConnectionTree(); - this.msMain = new System.Windows.Forms.MenuStrip(); - this.mMenAddConnection = new System.Windows.Forms.ToolStripMenuItem(); - this.mMenAddFolder = new System.Windows.Forms.ToolStripMenuItem(); - this.mMenViewExpandAllFolders = new System.Windows.Forms.ToolStripMenuItem(); - this.mMenViewCollapseAllFolders = new System.Windows.Forms.ToolStripMenuItem(); - this.mMenSort = new System.Windows.Forms.ToolStripMenuItem(); - this.mMenFavorites = new System.Windows.Forms.ToolStripMenuItem(); - this.vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components); - this.pbSearch = new MrngPictureBox(this.components); - this.txtSearch = new mRemoteNG.UI.Controls.MrngSearchBox(); - this.searchBoxLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); - ((System.ComponentModel.ISupportInitialize)(this.ConnectionTree)).BeginInit(); - this.msMain.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbSearch)).BeginInit(); - this.searchBoxLayoutPanel.SuspendLayout(); - this.SuspendLayout(); - // - // olvConnections - // - this.ConnectionTree.AllowDrop = true; - this.ConnectionTree.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.ConnectionTree.CellEditUseWholeCell = false; - this.ConnectionTree.ConnectionTreeModel = connectionTreeModel2; - this.ConnectionTree.Cursor = System.Windows.Forms.Cursors.Default; - this.ConnectionTree.Dock = System.Windows.Forms.DockStyle.Fill; - treeNodeCompositeClickHandler3.ClickHandlers = new ITreeNodeClickHandler[0]; - this.ConnectionTree.DoubleClickHandler = treeNodeCompositeClickHandler3; - this.ConnectionTree.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ConnectionTree.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.ConnectionTree.HideSelection = false; - this.ConnectionTree.IsSimpleDragSource = true; - this.ConnectionTree.LabelEdit = true; - this.ConnectionTree.Location = new System.Drawing.Point(0, 24); - this.ConnectionTree.MultiSelect = true; - this.ConnectionTree.Name = "ConnectionTree"; - this.ConnectionTree.NodeDeletionConfirmer = alwaysConfirmYes2; - this.ConnectionTree.PostSetupActions = new IConnectionTreeDelegate[0]; - this.ConnectionTree.SelectedBackColor = System.Drawing.SystemColors.Highlight; - this.ConnectionTree.SelectedForeColor = System.Drawing.SystemColors.HighlightText; - this.ConnectionTree.ShowGroups = false; - treeNodeCompositeClickHandler4.ClickHandlers = new ITreeNodeClickHandler[0]; - this.ConnectionTree.SingleClickHandler = treeNodeCompositeClickHandler4; - this.ConnectionTree.Size = new System.Drawing.Size(204, 366); - this.ConnectionTree.TabIndex = 20; - this.ConnectionTree.UnfocusedSelectedBackColor = System.Drawing.SystemColors.Highlight; - this.ConnectionTree.UnfocusedSelectedForeColor = System.Drawing.SystemColors.HighlightText; - this.ConnectionTree.UseCompatibleStateImageBehavior = false; - this.ConnectionTree.UseOverlays = false; - this.ConnectionTree.View = System.Windows.Forms.View.Details; - this.ConnectionTree.VirtualMode = true; - // - // msMain - // - this.msMain.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.msMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.mMenAddConnection, - this.mMenAddFolder, - this.mMenViewExpandAllFolders, - this.mMenViewCollapseAllFolders, - this.mMenSort, - this.mMenFavorites}); - this.msMain.Location = new System.Drawing.Point(0, 0); - this.msMain.Name = "msMain"; - this.msMain.Padding = new System.Windows.Forms.Padding(0, 2, 0, 2); - this.msMain.ShowItemToolTips = true; - this.msMain.Size = new System.Drawing.Size(204, 24); - this.msMain.TabIndex = 10; - this.msMain.Text = "MenuStrip1"; - // - // mMenAddConnection - // - this.mMenAddConnection.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.mMenAddConnection.Image = global::mRemoteNG.Properties.Resources.AddItem_16x; - this.mMenAddConnection.Name = "mMenAddConnection"; - this.mMenAddConnection.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0); - this.mMenAddConnection.Size = new System.Drawing.Size(24, 20); - this.mMenAddConnection.Click += new System.EventHandler(this.CMenTreeAddConnection_Click); - // - // mMenAddFolder - // - this.mMenAddFolder.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.mMenAddFolder.Image = global::mRemoteNG.Properties.Resources.AddFolder_16x; - this.mMenAddFolder.Name = "mMenAddFolder"; - this.mMenAddFolder.Size = new System.Drawing.Size(28, 20); - this.mMenAddFolder.Click += new System.EventHandler(this.CMenTreeAddFolder_Click); - // - // mMenViewExpandAllFolders - // - this.mMenViewExpandAllFolders.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.mMenViewExpandAllFolders.Image = global::mRemoteNG.Properties.Resources.ExpandAll_16x; - this.mMenViewExpandAllFolders.Name = "mMenViewExpandAllFolders"; - this.mMenViewExpandAllFolders.Size = new System.Drawing.Size(28, 20); - this.mMenViewExpandAllFolders.Text = "Expand all folders"; - // - // mMenViewCollapseAllFolders - // - this.mMenViewCollapseAllFolders.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.mMenViewCollapseAllFolders.Image = global::mRemoteNG.Properties.Resources.CollapseAll_16x; - this.mMenViewCollapseAllFolders.Name = "mMenViewCollapseAllFolders"; - this.mMenViewCollapseAllFolders.Size = new System.Drawing.Size(28, 20); - this.mMenViewCollapseAllFolders.Text = "Collapse all folders"; - // - // mMenSortAscending - // - this.mMenSort.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.mMenSort.Image = global::mRemoteNG.Properties.Resources.SortAscending_16x; - this.mMenSort.Name = "mMenSort"; - this.mMenSort.Size = new System.Drawing.Size(28, 20); - // - // mMenFavorites - // - this.mMenFavorites.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.mMenFavorites.Image = global::mRemoteNG.Properties.Resources.Favorite_16x; - this.mMenFavorites.Name = "mMenFavorites"; - this.mMenFavorites.Size = new System.Drawing.Size(28, 20); - this.mMenFavorites.Text = "Favorites"; - // - // vsToolStripExtender - // - this.vsToolStripExtender.DefaultRenderer = null; - // - // pbSearch - // - this.pbSearch.Dock = System.Windows.Forms.DockStyle.Fill; - this.pbSearch.Image = global::mRemoteNG.Properties.Resources.Search_16x; - this.pbSearch.Location = new System.Drawing.Point(0, 0); - this.pbSearch.Margin = new System.Windows.Forms.Padding(0); - this.pbSearch.Name = "pbSearch"; - this.pbSearch.Size = new System.Drawing.Size(26, 21); - this.pbSearch.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.pbSearch.TabIndex = 1; - this.pbSearch.TabStop = false; - // - // txtSearch - // - this.txtSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSearch.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtSearch.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtSearch.ForeColor = System.Drawing.SystemColors.GrayText; - this.txtSearch.Location = new System.Drawing.Point(26, 3); - this.txtSearch.Margin = new System.Windows.Forms.Padding(0); - this.txtSearch.Name = "txtSearch"; - this.txtSearch.Size = new System.Drawing.Size(178, 15); - this.txtSearch.TabIndex = 30; - this.txtSearch.TabStop = false; - this.txtSearch.Text = "Search"; - this.txtSearch.TextChanged += new System.EventHandler(this.txtSearch_TextChanged); - this.txtSearch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtSearch_KeyDown); - // - // tableLayoutPanel1 - // - this.searchBoxLayoutPanel.BackColor = System.Drawing.SystemColors.Control; - this.searchBoxLayoutPanel.ColumnCount = 2; - this.searchBoxLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.searchBoxLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.searchBoxLayoutPanel.Controls.Add(this.pbSearch, 0, 0); - this.searchBoxLayoutPanel.Controls.Add(this.txtSearch); - this.searchBoxLayoutPanel.Dock = System.Windows.Forms.DockStyle.Bottom; - this.searchBoxLayoutPanel.Location = new System.Drawing.Point(0, 390); - this.searchBoxLayoutPanel.Name = "searchBoxLayoutPanel"; - this.searchBoxLayoutPanel.RowCount = 1; - this.searchBoxLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.searchBoxLayoutPanel.Size = new System.Drawing.Size(204, 21); - this.searchBoxLayoutPanel.TabIndex = 32; - // - // ConnectionTreeWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(204, 411); - this.Controls.Add(this.ConnectionTree); - this.Controls.Add(this.searchBoxLayoutPanel); - this.Controls.Add(this.msMain); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.HideOnClose = true; - this.Name = "ConnectionTreeWindow"; - this.TabText = "Connections"; - this.Text = "Connections"; - this.Load += new System.EventHandler(this.Tree_Load); - ((System.ComponentModel.ISupportInitialize)(this.ConnectionTree)).EndInit(); - this.msMain.ResumeLayout(false); - this.msMain.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbSearch)).EndInit(); - this.searchBoxLayoutPanel.ResumeLayout(false); - this.searchBoxLayoutPanel.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - #endregion - - private System.ComponentModel.IContainer components; - private WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender vsToolStripExtender; - internal MrngPictureBox pbSearch; - internal Controls.MrngSearchBox txtSearch; - public System.Windows.Forms.TableLayoutPanel searchBoxLayoutPanel; - internal System.Windows.Forms.ToolStripMenuItem mMenFavorites; - } -} diff --git a/mRemoteNG/UI/Window/ConnectionTreeWindow.cs b/mRemoteNG/UI/Window/ConnectionTreeWindow.cs deleted file mode 100644 index 3a5e44361..000000000 --- a/mRemoteNG/UI/Window/ConnectionTreeWindow.cs +++ /dev/null @@ -1,384 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Config.Connections; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Properties; -using mRemoteNG.Themes; -using mRemoteNG.Tree; -using mRemoteNG.Tree.ClickHandlers; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI.Controls.ConnectionTree; -using mRemoteNG.UI.TaskDialog; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - -// ReSharper disable ArrangeAccessorOwnerBody - -namespace mRemoteNG.UI.Window -{ - public partial class ConnectionTreeWindow - { - private ThemeManager _themeManager; - private bool _sortedAz = true; - - public ConnectionInfo SelectedNode => ConnectionTree.SelectedNode; - - public ConnectionTree ConnectionTree { get; set; } - - public ConnectionTreeWindow() : this(new DockContent()) - { - } - - public ConnectionTreeWindow(DockContent panel) - { - WindowType = WindowType.Tree; - DockPnl = panel; - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.ASPWebSite_16x); - InitializeComponent(); - SetMenuEventHandlers(); - SetConnectionTreeEventHandlers(); - Settings.Default.PropertyChanged += OnAppSettingsChanged; - ApplyLanguage(); - } - - private void OnAppSettingsChanged(object o, PropertyChangedEventArgs propertyChangedEventArgs) - { - if (propertyChangedEventArgs.PropertyName == nameof(Settings.UseFilterSearch)) - { - ConnectionTree.UseFiltering = Settings.Default.UseFilterSearch; - ApplyFiltering(); - } - - PlaceSearchBar(Settings.Default.PlaceSearchBarAboveConnectionTree); - SetConnectionTreeClickHandlers(); - } - - private void PlaceSearchBar(bool placeSearchBarAboveConnectionTree) - { - searchBoxLayoutPanel.Dock = placeSearchBarAboveConnectionTree ? DockStyle.Top : DockStyle.Bottom; - } - - - #region Form Stuff - - private void Tree_Load(object sender, EventArgs e) - { - //work on the theme change - _themeManager = ThemeManager.getInstance(); - _themeManager.ThemeChanged += ApplyTheme; - ApplyTheme(); - - txtSearch.Multiline = true; - txtSearch.MinimumSize = new Size(0, 14); - txtSearch.Size = new Size(txtSearch.Size.Width, 14); - txtSearch.Multiline = false; - } - - private void ApplyLanguage() - { - Text = Language.Connections; - TabText = Language.Connections; - - mMenAddConnection.ToolTipText = Language.NewConnection; - mMenAddFolder.ToolTipText = Language.NewFolder; - mMenViewExpandAllFolders.ToolTipText = Language.ExpandAllFolders; - mMenViewCollapseAllFolders.ToolTipText = Language.CollapseAllFolders; - mMenSort.ToolTipText = Language.Sort; - mMenFavorites.ToolTipText = Language.Favorites; - - txtSearch.Text = Language.SearchPrompt; - } - - private new void ApplyTheme() - { - if (!_themeManager.ThemingActive) - return; - - var activeTheme = _themeManager.ActiveTheme; - vsToolStripExtender.SetStyle(msMain, activeTheme.Version, activeTheme.Theme); - vsToolStripExtender.SetStyle(ConnectionTree.ContextMenuStrip, activeTheme.Version, - activeTheme.Theme); - - if (!_themeManager.ActiveAndExtended) - return; - - // connection search area - searchBoxLayoutPanel.BackColor = activeTheme.ExtendedPalette.getColor("Dialog_Background"); - searchBoxLayoutPanel.ForeColor = activeTheme.ExtendedPalette.getColor("Dialog_Foreground"); - txtSearch.BackColor = activeTheme.ExtendedPalette.getColor("TextBox_Background"); - txtSearch.ForeColor = activeTheme.ExtendedPalette.getColor("TextBox_Foreground"); - //Picturebox needs to be manually themed - pbSearch.BackColor = activeTheme.ExtendedPalette.getColor("TreeView_Background"); - } - - #endregion - - #region ConnectionTree - - private void SetConnectionTreeEventHandlers() - { - ConnectionTree.NodeDeletionConfirmer = - new SelectedConnectionDeletionConfirmer(prompt => CTaskDialog.MessageBox( - Application.ProductName, prompt, "", ETaskDialogButtons.YesNo, ESysIcons.Question)); - ConnectionTree.KeyDown += TvConnections_KeyDown; - ConnectionTree.KeyPress += TvConnections_KeyPress; - SetTreePostSetupActions(); - SetConnectionTreeClickHandlers(); - Runtime.ConnectionsService.ConnectionsLoaded += ConnectionsServiceOnConnectionsLoaded; - } - - private void SetTreePostSetupActions() - { - var actions = new List - { - new PreviouslyOpenedFolderExpander(), - new RootNodeExpander() - }; - - if (Settings.Default.OpenConsFromLastSession && !Settings.Default.NoReconnect) - actions.Add(new PreviousSessionOpener(Runtime.ConnectionInitiator)); - - ConnectionTree.PostSetupActions = actions; - } - - private void SetConnectionTreeClickHandlers() - { - var singleClickHandlers = new List>(); - var doubleClickHandlers = new List> - { - new ExpandNodeClickHandler(ConnectionTree) - }; - - if (Settings.Default.SingleClickOnConnectionOpensIt) - singleClickHandlers.Add(new OpenConnectionClickHandler(Runtime.ConnectionInitiator)); - else - doubleClickHandlers.Add(new OpenConnectionClickHandler(Runtime.ConnectionInitiator)); - - if (Settings.Default.SingleClickSwitchesToOpenConnection) - singleClickHandlers.Add(new SwitchToConnectionClickHandler(Runtime.ConnectionInitiator)); - - ConnectionTree.SingleClickHandler = new TreeNodeCompositeClickHandler { ClickHandlers = singleClickHandlers }; - ConnectionTree.DoubleClickHandler = new TreeNodeCompositeClickHandler { ClickHandlers = doubleClickHandlers }; - } - - private void ConnectionsServiceOnConnectionsLoaded(object o, ConnectionsLoadedEventArgs connectionsLoadedEventArgs) - { - if (ConnectionTree.InvokeRequired) - { - ConnectionTree.Invoke(() => ConnectionsServiceOnConnectionsLoaded(o, connectionsLoadedEventArgs)); - return; - } - - ConnectionTree.ConnectionTreeModel = connectionsLoadedEventArgs.NewConnectionTreeModel; - ConnectionTree.SelectedObject = - connectionsLoadedEventArgs.NewConnectionTreeModel.RootNodes.OfType().FirstOrDefault(); - } - - #endregion - - #region Top Menu - - private void SetMenuEventHandlers() - { - mMenViewExpandAllFolders.Click += (sender, args) => ConnectionTree.ExpandAll(); - mMenViewCollapseAllFolders.Click += (sender, args) => - { - ConnectionTree.CollapseAll(); - ConnectionTree.Expand(ConnectionTree.GetRootConnectionNode()); - }; - mMenSort.Click += (sender, args) => - { - if (_sortedAz) - { - ConnectionTree.SortRecursive(ConnectionTree.GetRootConnectionNode(), ListSortDirection.Ascending); - mMenSort.Image = Properties.Resources.SortDescending_16x; - _sortedAz = false; - } - else - { - ConnectionTree.SortRecursive(ConnectionTree.GetRootConnectionNode(), ListSortDirection.Descending); - mMenSort.Image = Properties.Resources.SortAscending_16x; - _sortedAz = true; - } - }; - mMenFavorites.Click += (sender, args) => - { - mMenFavorites.DropDownItems.Clear(); - var rootNodes = Runtime.ConnectionsService.ConnectionTreeModel.RootNodes; - var favoritesList = new List(); - - foreach (var node in rootNodes) - { - foreach (var containerInfo in Runtime.ConnectionsService.ConnectionTreeModel.GetRecursiveFavoriteChildList(node)) - { - var favoriteMenuItem = new ToolStripMenuItem - { - Text = containerInfo.Name, - Tag = containerInfo, - Image = containerInfo.OpenConnections.Count > 0 ? Properties.Resources.Run_16x : Properties.Resources.Stop_16x - }; - favoriteMenuItem.MouseUp += FavoriteMenuItem_MouseUp; - favoritesList.Add(favoriteMenuItem); - } - } - - mMenFavorites.DropDownItems.AddRange(favoritesList.ToArray()); - mMenFavorites.ShowDropDown(); - }; - } - - private void FavoriteMenuItem_MouseUp(object sender, MouseEventArgs e) - { - if (((ToolStripMenuItem)sender).Tag is ContainerInfo) return; - Runtime.ConnectionInitiator.OpenConnection((ConnectionInfo)((ToolStripMenuItem)sender).Tag); - } - - #endregion - - #region Tree Context Menu - - private void CMenTreeAddConnection_Click(object sender, EventArgs e) - { - ConnectionTree.AddConnection(); - } - - private void CMenTreeAddFolder_Click(object sender, EventArgs e) - { - ConnectionTree.AddFolder(); - } - - #endregion - - #region Search - - private void TxtSearch_KeyDown(object sender, KeyEventArgs e) - { - try - { - switch (e.KeyCode) - { - case Keys.Escape: - e.Handled = true; - ConnectionTree.Focus(); - break; - case Keys.Up: - { - var match = ConnectionTree.NodeSearcher.PreviousMatch(); - JumpToNode(match); - e.Handled = true; - break; - } - case Keys.Down: - { - var match = ConnectionTree.NodeSearcher.NextMatch(); - JumpToNode(match); - e.Handled = true; - break; - } - default: - TvConnections_KeyDown(sender, e); - break; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("txtSearch_KeyDown (UI.Window.ConnectionTreeWindow) failed", ex); - } - } - - private void txtSearch_TextChanged(object sender, EventArgs e) - { - ApplyFiltering(); - } - - private void ApplyFiltering() - { - if (Settings.Default.UseFilterSearch) - { - if (txtSearch.Text == "" || txtSearch.Text == Language.SearchPrompt) - { - ConnectionTree.RemoveFilter(); - return; - } - - ConnectionTree.ApplyFilter(txtSearch.Text); - } - else - { - if (txtSearch.Text == "") return; - ConnectionTree.NodeSearcher?.SearchByName(txtSearch.Text); - JumpToNode(ConnectionTree.NodeSearcher?.CurrentMatch); - } - } - - public void JumpToNode(ConnectionInfo connectionInfo) - { - if (connectionInfo == null) - { - ConnectionTree.SelectedObject = null; - return; - } - - ExpandParentsRecursive(connectionInfo); - ConnectionTree.SelectObject(connectionInfo); - ConnectionTree.EnsureModelVisible(connectionInfo); - } - - private void ExpandParentsRecursive(ConnectionInfo connectionInfo) - { - while (true) - { - if (connectionInfo?.Parent == null) return; - ConnectionTree.Expand(connectionInfo.Parent); - connectionInfo = connectionInfo.Parent; - } - } - - private void TvConnections_KeyPress(object sender, KeyPressEventArgs e) - { - try - { - if (!char.IsLetterOrDigit(e.KeyChar)) return; - txtSearch.Focus(); - txtSearch.Text = e.KeyChar.ToString(); - txtSearch.SelectionStart = txtSearch.TextLength; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("tvConnections_KeyPress (UI.Window.ConnectionTreeWindow) failed", ex); - } - } - - private void TvConnections_KeyDown(object sender, KeyEventArgs e) - { - try - { - if (e.KeyCode == Keys.Enter) - { - e.Handled = true; - if (SelectedNode == null) - return; - Runtime.ConnectionInitiator.OpenConnection(SelectedNode); - } - else if (e.Control && e.KeyCode == Keys.F) - { - txtSearch.Focus(); - txtSearch.SelectAll(); - e.Handled = true; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace("tvConnections_KeyDown (UI.Window.ConnectionTreeWindow) failed", ex); - } - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Window/ConnectionTreeWindow.resx b/mRemoteNG/UI/Window/ConnectionTreeWindow.resx deleted file mode 100644 index 8283f562a..000000000 --- a/mRemoteNG/UI/Window/ConnectionTreeWindow.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 177, 17 - - - 17, 17 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ConnectionWindow.Designer.cs b/mRemoteNG/UI/Window/ConnectionWindow.Designer.cs deleted file mode 100644 index 70bff5b06..000000000 --- a/mRemoteNG/UI/Window/ConnectionWindow.Designer.cs +++ /dev/null @@ -1,243 +0,0 @@ -using System; -using System.Drawing; -using System.Windows.Forms; - - -namespace mRemoteNG.UI.Window -{ - public partial class ConnectionWindow - { - internal ContextMenuStrip cmenTab; - private ToolStripMenuItem cmenTabFullscreen; - private ToolStripMenuItem cmenTabTransferFile; - private ToolStripMenuItem cmenTabSendSpecialKeys; - private ToolStripSeparator cmenTabSep1; - private ToolStripSeparator cmenTabSep2; - private ToolStripMenuItem cmenTabRenameTab; - private ToolStripMenuItem cmenTabDuplicateTab; - private ToolStripMenuItem cmenTabDisconnect; - private ToolStripMenuItem cmenTabDisconnectOthers; - private ToolStripMenuItem cmenTabDisconnectOthersRight; - private ToolStripMenuItem cmenTabSmartSize; - private ToolStripMenuItem cmenTabSendSpecialKeysCtrlAltDel; - private ToolStripMenuItem cmenTabSendSpecialKeysCtrlEsc; - private ToolStripMenuItem cmenTabViewOnly; - internal ToolStripMenuItem cmenTabReconnect; - internal ToolStripMenuItem cmenTabExternalApps; - private ToolStripMenuItem cmenTabStartChat; - private ToolStripMenuItem cmenTabRefreshScreen; - private ToolStripMenuItem cmenTabPuttySettings; - - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConnectionWindow)); - this.connDock = new WeifenLuo.WinFormsUI.Docking.DockPanel(); - this.cmenTab = new System.Windows.Forms.ContextMenuStrip(this.components); - this.cmenTabReconnect = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabDisconnect = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabDisconnectOthers = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabDisconnectOthersRight = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabRenameTab = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabDuplicateTab = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabSep1 = new System.Windows.Forms.ToolStripSeparator(); - this.cmenTabFullscreen = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabSmartSize = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabViewOnly = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabStartChat = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabRefreshScreen = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabTransferFile = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabSendSpecialKeys = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabSendSpecialKeysCtrlAltDel = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabSendSpecialKeysCtrlEsc = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabSep2 = new System.Windows.Forms.ToolStripSeparator(); - this.cmenTabPuttySettings = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTabExternalApps = new System.Windows.Forms.ToolStripMenuItem(); - this.cmenTab.SuspendLayout(); - this.SuspendLayout(); - // - // connDock - // - this.connDock.Dock = System.Windows.Forms.DockStyle.Fill; - this.connDock.DockBackColor = System.Drawing.SystemColors.Control; - this.connDock.DocumentStyle = WeifenLuo.WinFormsUI.Docking.DocumentStyle.DockingSdi; - this.connDock.Location = new System.Drawing.Point(0, 0); - this.connDock.Margin = new System.Windows.Forms.Padding(4); - this.connDock.Name = "connDock"; - this.connDock.Size = new System.Drawing.Size(632, 453); - this.connDock.TabIndex = 13; - // - // cmenTab - // - this.cmenTab.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.cmenTabReconnect, - this.cmenTabDisconnect, - this.cmenTabDisconnectOthers, - this.cmenTabDisconnectOthersRight, - this.cmenTabRenameTab, - this.cmenTabDuplicateTab, - this.cmenTabSep1, - this.cmenTabFullscreen, - this.cmenTabSmartSize, - this.cmenTabViewOnly, - this.cmenTabStartChat, - this.cmenTabRefreshScreen, - this.cmenTabTransferFile, - this.cmenTabSendSpecialKeys, - this.cmenTabSep2, - this.cmenTabPuttySettings, - this.cmenTabExternalApps}); - this.cmenTab.Name = "cmenTab"; - this.cmenTab.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; - this.cmenTab.Size = new System.Drawing.Size(231, 390); - // - // cmenTabReconnect - // - this.cmenTabReconnect.Image = ((System.Drawing.Image)(resources.GetObject("cmenTabReconnect.Image"))); - this.cmenTabReconnect.Name = "cmenTabReconnect"; - this.cmenTabReconnect.Size = new System.Drawing.Size(230, 22); - this.cmenTabReconnect.Text = "Reconnect"; - // - // cmenTabDisconnect - // - this.cmenTabDisconnect.Image = global::mRemoteNG.Properties.Resources.Remove_16x; - this.cmenTabDisconnect.Name = "cmenTabDisconnect"; - this.cmenTabDisconnect.Size = new System.Drawing.Size(230, 22); - this.cmenTabDisconnect.Text = "Disconnect"; - // - // cmenTabDisconnectOthers - // - this.cmenTabDisconnectOthers.Image = global::mRemoteNG.Properties.Resources.Remove_16x; - this.cmenTabDisconnectOthers.Name = "cmenTabDisconnectOthers"; - this.cmenTabDisconnectOthers.Size = new System.Drawing.Size(230, 22); - this.cmenTabDisconnectOthers.Text = "Disconnect Other Tabs"; - // - // cmenTabDisconnectOthersRight - // - this.cmenTabDisconnectOthersRight.Image = global::mRemoteNG.Properties.Resources.Remove_16x; - this.cmenTabDisconnectOthersRight.Name = "cmenTabDisconnectOthersRight"; - this.cmenTabDisconnectOthersRight.Size = new System.Drawing.Size(230, 22); - this.cmenTabDisconnectOthersRight.Text = "Disconnect Tabs To The Right"; - // - // cmenTabRenameTab - // - this.cmenTabRenameTab.Image = global::mRemoteNG.Properties.Resources.Rename_16x; - this.cmenTabRenameTab.Name = "cmenTabRenameTab"; - this.cmenTabRenameTab.Size = new System.Drawing.Size(230, 22); - this.cmenTabRenameTab.Text = "Rename Tab"; - // - // cmenTabDuplicateTab - // - this.cmenTabDuplicateTab.Image = global::mRemoteNG.Properties.Resources.Add_16x; - this.cmenTabDuplicateTab.Name = "cmenTabDuplicateTab"; - this.cmenTabDuplicateTab.Size = new System.Drawing.Size(230, 22); - this.cmenTabDuplicateTab.Text = "Duplicate Tab"; - // - // cmenTabSep1 - // - this.cmenTabSep1.Name = "cmenTabSep1"; - this.cmenTabSep1.Size = new System.Drawing.Size(227, 6); - // - // cmenTabFullscreen - // - this.cmenTabFullscreen.Image = global::mRemoteNG.Properties.Resources.FullScreen_16x; - this.cmenTabFullscreen.Name = "cmenTabFullscreen"; - this.cmenTabFullscreen.Size = new System.Drawing.Size(230, 22); - this.cmenTabFullscreen.Text = "Fullscreen (RDP)"; - // - // cmenTabSmartSize - // - this.cmenTabSmartSize.Image = global::mRemoteNG.Properties.Resources.Resize_16x; - this.cmenTabSmartSize.Name = "cmenTabSmartSize"; - this.cmenTabSmartSize.Size = new System.Drawing.Size(230, 22); - this.cmenTabSmartSize.Text = "SmartSize (RDP/VNC)"; - // - // cmenTabViewOnly - // - this.cmenTabViewOnly.Image = global::mRemoteNG.Properties.Resources.Monitor_16x; - this.cmenTabViewOnly.Name = "cmenTabViewOnly"; - this.cmenTabViewOnly.Size = new System.Drawing.Size(230, 22); - this.cmenTabViewOnly.Text = "View Only (VNC)"; - // - // cmenTabStartChat - // - this.cmenTabStartChat.Image = global::mRemoteNG.Properties.Resources.Message_16x; - this.cmenTabStartChat.Name = "cmenTabStartChat"; - this.cmenTabStartChat.Size = new System.Drawing.Size(230, 22); - this.cmenTabStartChat.Text = "Start Chat (VNC)"; - this.cmenTabStartChat.Visible = false; - // - // cmenTabRefreshScreen - // - this.cmenTabRefreshScreen.Image = global::mRemoteNG.Properties.Resources.Refresh_16x; - this.cmenTabRefreshScreen.Name = "cmenTabRefreshScreen"; - this.cmenTabRefreshScreen.Size = new System.Drawing.Size(230, 22); - this.cmenTabRefreshScreen.Text = "Refresh Screen (VNC)"; - // - // cmenTabTransferFile - // - this.cmenTabTransferFile.Image = global::mRemoteNG.Properties.Resources.SyncArrow_16x; - this.cmenTabTransferFile.Name = "cmenTabTransferFile"; - this.cmenTabTransferFile.Size = new System.Drawing.Size(230, 22); - this.cmenTabTransferFile.Text = "Transfer File (SSH)"; - // - // cmenTabSendSpecialKeys - // - this.cmenTabSendSpecialKeys.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.cmenTabSendSpecialKeysCtrlAltDel, - this.cmenTabSendSpecialKeysCtrlEsc}); - this.cmenTabSendSpecialKeys.Image = global::mRemoteNG.Properties.Resources.ToggleOfficeKeyboardScheme_16x; - this.cmenTabSendSpecialKeys.Name = "cmenTabSendSpecialKeys"; - this.cmenTabSendSpecialKeys.Size = new System.Drawing.Size(230, 22); - this.cmenTabSendSpecialKeys.Text = "Send special Keys (VNC)"; - // - // cmenTabSendSpecialKeysCtrlAltDel - // - this.cmenTabSendSpecialKeysCtrlAltDel.Name = "cmenTabSendSpecialKeysCtrlAltDel"; - this.cmenTabSendSpecialKeysCtrlAltDel.Size = new System.Drawing.Size(141, 22); - this.cmenTabSendSpecialKeysCtrlAltDel.Text = "Ctrl+Alt+Del"; - // - // cmenTabSendSpecialKeysCtrlEsc - // - this.cmenTabSendSpecialKeysCtrlEsc.Name = "cmenTabSendSpecialKeysCtrlEsc"; - this.cmenTabSendSpecialKeysCtrlEsc.Size = new System.Drawing.Size(141, 22); - this.cmenTabSendSpecialKeysCtrlEsc.Text = "Ctrl+Esc"; - // - // cmenTabSep2 - // - this.cmenTabSep2.Name = "cmenTabSep2"; - this.cmenTabSep2.Size = new System.Drawing.Size(227, 6); - // - // cmenTabPuttySettings - // - this.cmenTabPuttySettings.Image = global::mRemoteNG.Properties.Resources.PuttyConfig; - this.cmenTabPuttySettings.Name = "cmenTabPuttySettings"; - this.cmenTabPuttySettings.Size = new System.Drawing.Size(230, 22); - this.cmenTabPuttySettings.Text = "PuTTY Settings"; - // - // cmenTabExternalApps - // - this.cmenTabExternalApps.Image = ((System.Drawing.Image)(resources.GetObject("cmenTabExternalApps.Image"))); - this.cmenTabExternalApps.Name = "cmenTabExternalApps"; - this.cmenTabExternalApps.Size = new System.Drawing.Size(230, 22); - this.cmenTabExternalApps.Text = "External Applications"; - // - // ConnectionWindow - // - this.ClientSize = new System.Drawing.Size(632, 453); - this.Controls.Add(this.connDock); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Icon = global::mRemoteNG.Properties.Resources.mRemoteNG_Icon; - this.Name = "ConnectionWindow"; - this.TabText = "UI.Window.Connection"; - this.Text = "UI.Window.Connection"; - this.cmenTab.ResumeLayout(false); - this.ResumeLayout(false); - - } - - internal WeifenLuo.WinFormsUI.Docking.DockPanel connDock; - private System.ComponentModel.IContainer components; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ConnectionWindow.cs b/mRemoteNG/UI/Window/ConnectionWindow.cs deleted file mode 100644 index 792a8b6fe..000000000 --- a/mRemoteNG/UI/Window/ConnectionWindow.cs +++ /dev/null @@ -1,792 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Config; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Messages; -using mRemoteNG.Properties; -using mRemoteNG.Themes; -using mRemoteNG.Tools; -using mRemoteNG.UI.Forms; -using mRemoteNG.UI.Tabs; -using mRemoteNG.UI.TaskDialog; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Window -{ - public partial class ConnectionWindow : BaseWindow - { - private VisualStudioToolStripExtender vsToolStripExtender; - private readonly ToolStripRenderer _toolStripProfessionalRenderer = new ToolStripProfessionalRenderer(); - - #region Public Methods - - public ConnectionWindow(DockContent panel, string formText = "") - { - if (formText == "") - { - formText = Language.NewPanel; - } - - WindowType = WindowType.Connection; - DockPnl = panel; - InitializeComponent(); - SetEventHandlers(); - // ReSharper disable once VirtualMemberCallInConstructor - Text = formText; - TabText = formText; - connDock.DocumentStyle = DocumentStyle.DockingWindow; - connDock.ShowDocumentIcon = true; - - connDock.ActiveContentChanged += ConnDockOnActiveContentChanged; - } - - private InterfaceControl GetInterfaceControl() - { - return InterfaceControl.FindInterfaceControl(connDock); - } - - private void SetEventHandlers() - { - SetFormEventHandlers(); - SetContextMenuEventHandlers(); - } - - private void SetFormEventHandlers() - { - Load += Connection_Load; - DockStateChanged += Connection_DockStateChanged; - FormClosing += Connection_FormClosing; - } - - private void SetContextMenuEventHandlers() - { - // event handler to adjust the items within the context menu - cmenTab.Opening += ShowHideMenuButtons; - - // event handlers for all context menu items... - cmenTabFullscreen.Click += (sender, args) => ToggleFullscreen(); - cmenTabSmartSize.Click += (sender, args) => ToggleSmartSize(); - cmenTabViewOnly.Click += (sender, args) => ToggleViewOnly(); - cmenTabStartChat.Click += (sender, args) => StartChat(); - cmenTabTransferFile.Click += (sender, args) => TransferFile(); - cmenTabRefreshScreen.Click += (sender, args) => RefreshScreen(); - cmenTabSendSpecialKeysCtrlAltDel.Click += - (sender, args) => SendSpecialKeys(ProtocolVNC.SpecialKeys.CtrlAltDel); - cmenTabSendSpecialKeysCtrlEsc.Click += (sender, args) => SendSpecialKeys(ProtocolVNC.SpecialKeys.CtrlEsc); - cmenTabRenameTab.Click += (sender, args) => RenameTab(); - cmenTabDuplicateTab.Click += (sender, args) => DuplicateTab(); - cmenTabReconnect.Click += (sender, args) => Reconnect(); - cmenTabDisconnect.Click += (sender, args) => CloseTabMenu(); - cmenTabDisconnectOthers.Click += (sender, args) => CloseOtherTabs(); - cmenTabDisconnectOthersRight.Click += (sender, args) => CloseOtherTabsToTheRight(); - cmenTabPuttySettings.Click += (sender, args) => ShowPuttySettingsDialog(); - GotFocus += ConnectionWindow_GotFocus; - } - - private void ConnectionWindow_GotFocus(object sender, EventArgs e) - { - TabHelper.Instance.CurrentPanel = this; - } - - public ConnectionTab AddConnectionTab(ConnectionInfo connectionInfo) - { - try - { - //Set the connection text based on name and preferences - string titleText; - if (Settings.Default.ShowProtocolOnTabs) - titleText = connectionInfo.Protocol + @": "; - else - titleText = ""; - - titleText += connectionInfo.Name; - - if (Settings.Default.ShowLogonInfoOnTabs) - { - titleText += @" ("; - if (connectionInfo.Domain != "") - titleText += connectionInfo.Domain; - - if (connectionInfo.Username != "") - { - if (connectionInfo.Domain != "") - titleText += @"\"; - titleText += connectionInfo.Username; - } - - titleText += @")"; - } - - titleText = titleText.Replace("&", "&&"); - - var conTab = new ConnectionTab - { - Tag = connectionInfo, - DockAreas = DockAreas.Document | DockAreas.Float, - Icon = ConnectionIcon.FromString(connectionInfo.Icon), - TabText = titleText, - TabPageContextMenuStrip = cmenTab - }; - - //if (Settings.Default.AlwaysShowConnectionTabs == false) - // TODO: See if we can make this work with DPS... - //TabController.HideTabsMode = TabControl.HideTabsModes.HideAlways; - - - //Show the tab - conTab.Show(connDock, DockState.Document); - conTab.Focus(); - return conTab; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("AddConnectionTab (UI.Window.ConnectionWindow) failed", - ex); - } - - return null; - } - - #endregion - - public void reconnectAll(IConnectionInitiator initiator) - { - var controlList = new List(); - try - { - foreach (var dockContent in connDock.DocumentsToArray()) - { - var tab = (ConnectionTab)dockContent; - controlList.Add((InterfaceControl)tab.Tag); - } - - foreach (var iControl in controlList) - { - iControl.Protocol.Close(); - initiator.OpenConnection(iControl.Info, ConnectionInfo.Force.DoNotJump); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("reconnectAll (UI.Window.ConnectionWindow) failed", ex); - } - - // ReSharper disable once RedundantAssignment - controlList = null; - } - - #region Form - - private void Connection_Load(object sender, EventArgs e) - { - ApplyTheme(); - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - ApplyLanguage(); - } - - private new void ApplyTheme() - { - if (!ThemeManager.getInstance().ThemingActive) - { - connDock.Theme = ThemeManager.getInstance().DefaultTheme.Theme; - return; - } - - base.ApplyTheme(); - try - { - connDock.Theme = ThemeManager.getInstance().ActiveTheme.Theme; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.ConnectionWindow.ApplyTheme() failed", ex); - } - - vsToolStripExtender = new VisualStudioToolStripExtender(components) - { - DefaultRenderer = _toolStripProfessionalRenderer - }; - vsToolStripExtender.SetStyle(cmenTab, ThemeManager.getInstance().ActiveTheme.Version, - ThemeManager.getInstance().ActiveTheme.Theme); - - if (!ThemeManager.getInstance().ActiveAndExtended) return; - connDock.DockBackColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Tab_Item_Background"); - } - - private bool _documentHandlersAdded; - private bool _floatHandlersAdded; - - private void Connection_DockStateChanged(object sender, EventArgs e) - { - switch (DockState) - { - case DockState.Float: - { - if (_documentHandlersAdded) - { - FrmMain.Default.ResizeBegin -= Connection_ResizeBegin; - FrmMain.Default.ResizeEnd -= Connection_ResizeEnd; - _documentHandlersAdded = false; - } - - DockHandler.FloatPane.FloatWindow.ResizeBegin += Connection_ResizeBegin; - DockHandler.FloatPane.FloatWindow.ResizeEnd += Connection_ResizeEnd; - _floatHandlersAdded = true; - break; - } - case DockState.Document: - { - if (_floatHandlersAdded) - { - DockHandler.FloatPane.FloatWindow.ResizeBegin -= Connection_ResizeBegin; - DockHandler.FloatPane.FloatWindow.ResizeEnd -= Connection_ResizeEnd; - _floatHandlersAdded = false; - } - - FrmMain.Default.ResizeBegin += Connection_ResizeBegin; - FrmMain.Default.ResizeEnd += Connection_ResizeEnd; - _documentHandlersAdded = true; - break; - } - } - } - - private void ApplyLanguage() - { - cmenTabFullscreen.Text = Language.Fullscreen; - cmenTabSmartSize.Text = Language.SmartSize; - cmenTabViewOnly.Text = Language.ViewOnly; - cmenTabStartChat.Text = Language.StartChat; - cmenTabTransferFile.Text = Language.TransferFile; - cmenTabRefreshScreen.Text = Language.RefreshScreen; - cmenTabSendSpecialKeys.Text = Language.SendSpecialKeys; - cmenTabSendSpecialKeysCtrlAltDel.Text = Language.CtrlAltDel; - cmenTabSendSpecialKeysCtrlEsc.Text = Language.CtrlEsc; - cmenTabExternalApps.Text = Language._Tools; - cmenTabRenameTab.Text = Language.RenameTab; - cmenTabDuplicateTab.Text = Language.DuplicateTab; - cmenTabReconnect.Text = Language.Reconnect; - cmenTabDisconnect.Text = Language.Disconnect; - cmenTabDisconnectOthers.Text = Language.DisconnectOthers; - cmenTabDisconnectOthersRight.Text = Language.DisconnectOthersRight; - cmenTabPuttySettings.Text = Language.PuttySettings; - } - - private void Connection_FormClosing(object sender, FormClosingEventArgs e) - { - if (!FrmMain.Default.IsClosing && - (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.All & connDock.Documents.Any() || - Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.Multiple & - connDock.Documents.Count() > 1)) - { - var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, - string - .Format(Language.ConfirmCloseConnectionPanelMainInstruction, - Text), "", "", "", - Language.CheckboxDoNotShowThisMessageAgain, - ETaskDialogButtons.YesNo, ESysIcons.Question, - ESysIcons.Question); - if (CTaskDialog.VerificationChecked) - { - Settings.Default.ConfirmCloseConnection--; - } - - if (result == DialogResult.No) - { - e.Cancel = true; - return; - } - } - - try - { - foreach (var dockContent in connDock.Documents.ToArray()) - { - var tabP = (ConnectionTab)dockContent; - if (tabP.Tag == null) continue; - tabP.silentClose = true; - tabP.Close(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.Connection.Connection_FormClosing() failed", - ex); - } - } - - public new event EventHandler ResizeBegin; - - private void Connection_ResizeBegin(object sender, EventArgs e) - { - ResizeBegin?.Invoke(this, e); - } - - public new event EventHandler ResizeEnd; - - private void Connection_ResizeEnd(object sender, EventArgs e) - { - ResizeEnd?.Invoke(sender, e); - } - - #endregion - - #region Events - - private void ConnDockOnActiveContentChanged(object sender, EventArgs e) - { - var ic = GetInterfaceControl(); - if (ic?.Info == null) return; - FrmMain.Default.SelectedConnection = ic.Info; - } - - #endregion - - #region Tab Menu - - private void ShowHideMenuButtons(object sender, CancelEventArgs e) - { - try - { - var interfaceControl = GetInterfaceControl(); - if (interfaceControl == null) return; - - if (interfaceControl.Protocol is ISupportsViewOnly viewOnly) - { - cmenTabViewOnly.Visible = true; - cmenTabViewOnly.Checked = viewOnly.ViewOnly; - } - else - { - cmenTabViewOnly.Visible = false; - } - - if (interfaceControl.Info.Protocol == ProtocolType.RDP) - { - var rdp = (RdpProtocol6)interfaceControl.Protocol; - cmenTabFullscreen.Visible = true; - cmenTabFullscreen.Checked = rdp.Fullscreen; - cmenTabSmartSize.Visible = true; - cmenTabSmartSize.Checked = rdp.SmartSize; - } - else - { - cmenTabFullscreen.Visible = false; - cmenTabSmartSize.Visible = false; - } - - if (interfaceControl.Info.Protocol == ProtocolType.VNC) - { - var vnc = (ProtocolVNC)interfaceControl.Protocol; - cmenTabSendSpecialKeys.Visible = true; - cmenTabSmartSize.Visible = true; - cmenTabStartChat.Visible = true; - cmenTabRefreshScreen.Visible = true; - cmenTabTransferFile.Visible = false; - } - else - { - cmenTabSendSpecialKeys.Visible = false; - cmenTabStartChat.Visible = false; - cmenTabRefreshScreen.Visible = false; - cmenTabTransferFile.Visible = false; - } - - if (interfaceControl.Info.Protocol == ProtocolType.SSH1 | - interfaceControl.Info.Protocol == ProtocolType.SSH2) - { - cmenTabTransferFile.Visible = true; - } - - cmenTabPuttySettings.Visible = interfaceControl.Protocol is PuttyBase; - - AddExternalApps(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("ShowHideMenuButtons (UI.Window.ConnectionWindow) failed", - ex); - } - } - - #endregion - - #region Tab Actions - - private void ToggleSmartSize() - { - try - { - var interfaceControl = GetInterfaceControl(); - - switch (interfaceControl.Protocol) - { - case RdpProtocol6 rdp: - rdp.ToggleSmartSize(); - break; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("ToggleSmartSize (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void TransferFile() - { - try - { - var interfaceControl = GetInterfaceControl(); - if (interfaceControl == null) return; - - if (interfaceControl.Info.Protocol == ProtocolType.SSH1 | - interfaceControl.Info.Protocol == ProtocolType.SSH2) - SshTransferFile(); - else if (interfaceControl.Info.Protocol == ProtocolType.VNC) - VncTransferFile(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("TransferFile (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void SshTransferFile() - { - try - { - var interfaceControl = GetInterfaceControl(); - if (interfaceControl == null) return; - - Windows.Show(WindowType.SSHTransfer); - var connectionInfo = interfaceControl.Info; - - Windows.SshtransferForm.Hostname = connectionInfo.Hostname; - Windows.SshtransferForm.Username = connectionInfo.Username; - Windows.SshtransferForm.Password = connectionInfo.Password; - Windows.SshtransferForm.Port = Convert.ToString(connectionInfo.Port); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("SSHTransferFile (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void VncTransferFile() - { - try - { - var interfaceControl = GetInterfaceControl(); - var vnc = interfaceControl?.Protocol as ProtocolVNC; - vnc?.StartFileTransfer(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("VNCTransferFile (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void ToggleViewOnly() - { - try - { - var interfaceControl = GetInterfaceControl(); - if (!(interfaceControl?.Protocol is ISupportsViewOnly viewOnly)) - return; - - cmenTabViewOnly.Checked = !cmenTabViewOnly.Checked; - viewOnly.ToggleViewOnly(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("ToggleViewOnly (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void StartChat() - { - try - { - var interfaceControl = GetInterfaceControl(); - var vnc = interfaceControl?.Protocol as ProtocolVNC; - vnc?.StartChat(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("StartChat (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void RefreshScreen() - { - try - { - var interfaceControl = GetInterfaceControl(); - var vnc = interfaceControl?.Protocol as ProtocolVNC; - vnc?.RefreshScreen(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("RefreshScreen (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void SendSpecialKeys(ProtocolVNC.SpecialKeys keys) - { - try - { - var interfaceControl = GetInterfaceControl(); - var vnc = interfaceControl?.Protocol as ProtocolVNC; - vnc?.SendSpecialKeys(keys); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("SendSpecialKeys (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void ToggleFullscreen() - { - try - { - var interfaceControl = GetInterfaceControl(); - var rdp = interfaceControl?.Protocol as RdpProtocol6; - rdp?.ToggleFullscreen(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("ToggleFullscreen (UI.Window.ConnectionWindow) failed", - ex); - } - } - - private void ShowPuttySettingsDialog() - { - try - { - var interfaceControl = GetInterfaceControl(); - var puttyBase = interfaceControl?.Protocol as PuttyBase; - puttyBase?.ShowSettingsDialog(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage( - "ShowPuttySettingsDialog (UI.Window.ConnectionWindow) failed", - ex); - } - } - - private void AddExternalApps() - { - try - { - //clean up. since new items are added below, we have to dispose of any previous items first - if (cmenTabExternalApps.DropDownItems.Count > 0) - { - for (var i = cmenTabExternalApps.DropDownItems.Count - 1; i >= 0; i--) - cmenTabExternalApps.DropDownItems[i].Dispose(); - cmenTabExternalApps.DropDownItems.Clear(); - } - - //add ext apps - foreach (var externalTool in Runtime.ExternalToolsService.ExternalTools) - { - var nItem = new ToolStripMenuItem - { - Text = externalTool.DisplayName, - Tag = externalTool, - /* rare failure here. While ExternalTool.Image already tries to default this - * try again so it's not null/doesn't crash. - */ - Image = externalTool.Image ?? Properties.Resources.mRemoteNG_Icon.ToBitmap() - }; - - nItem.Click += (sender, args) => StartExternalApp(((ToolStripMenuItem)sender).Tag as ExternalTool); - cmenTabExternalApps.DropDownItems.Add(nItem); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace( - "cMenTreeTools_DropDownOpening failed (UI.Window.ConnectionWindow)", - ex); - } - } - - private void StartExternalApp(ExternalTool externalTool) - { - try - { - var interfaceControl = GetInterfaceControl(); - externalTool.Start(interfaceControl?.Info); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage( - "cmenTabExternalAppsEntry_Click failed (UI.Window.ConnectionWindow)", - ex); - } - } - - - private void CloseTabMenu() - { - var selectedTab = (ConnectionTab)GetInterfaceControl()?.Parent; - if (selectedTab == null) return; - - try - { - selectedTab.Close(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("CloseTabMenu (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void CloseOtherTabs() - { - var selectedTab = (ConnectionTab)GetInterfaceControl()?.Parent; - if (selectedTab == null) return; - if (Settings.Default.ConfirmCloseConnection == (int)ConfirmCloseEnum.Multiple) - { - var result = CTaskDialog.MessageBox(this, GeneralAppInfo.ProductName, - string.Format(Language.ConfirmCloseConnectionOthersInstruction, - selectedTab.TabText), "", "", "", - Language.CheckboxDoNotShowThisMessageAgain, - ETaskDialogButtons.YesNo, ESysIcons.Question, - ESysIcons.Question); - if (CTaskDialog.VerificationChecked) - { - Settings.Default.ConfirmCloseConnection--; - } - - if (result == DialogResult.No) - { - return; - } - } - - foreach (var dockContent in connDock.DocumentsToArray()) - { - var tab = (ConnectionTab)dockContent; - if (selectedTab != tab) - { - tab.Close(); - } - } - } - - private void CloseOtherTabsToTheRight() - { - try - { - var selectedTab = (ConnectionTab)GetInterfaceControl()?.Parent; - if (selectedTab == null) return; - var dockPane = selectedTab.Pane; - - var pastTabToKeepAlive = false; - var connectionsToClose = new List(); - foreach (var dockContent in dockPane.Contents) - { - var tab = (ConnectionTab)dockContent; - if (pastTabToKeepAlive) - connectionsToClose.Add(tab); - - if (selectedTab == tab) - pastTabToKeepAlive = true; - } - - foreach (var tab in connectionsToClose) - { - tab.Close(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("CloseTabMenu (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void DuplicateTab() - { - try - { - var interfaceControl = GetInterfaceControl(); - if (interfaceControl == null) return; - Runtime.ConnectionInitiator.OpenConnection(interfaceControl.Info, ConnectionInfo.Force.DoNotJump); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("DuplicateTab (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void Reconnect() - { - try - { - var interfaceControl = GetInterfaceControl(); - if (interfaceControl == null) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "Reconnect (UI.Window.ConnectionWindow) failed. Could not find InterfaceControl."); - return; - } - - Invoke(new Action(() => Prot_Event_Closed(interfaceControl.Protocol))); - Runtime.ConnectionInitiator.OpenConnection(interfaceControl.Info, ConnectionInfo.Force.DoNotJump); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("Reconnect (UI.Window.ConnectionWindow) failed", ex); - } - } - - private void RenameTab() - { - try - { - var interfaceControl = GetInterfaceControl(); - if (interfaceControl == null) return; - using (var frmInputBox = new FrmInputBox(Language.NewTitle, Language.NewTitle, - ((ConnectionTab)interfaceControl.Parent).TabText)) - { - var dr = frmInputBox.ShowDialog(); - if (dr != DialogResult.OK) return; - if (!string.IsNullOrEmpty(frmInputBox.returnValue)) - ((ConnectionTab)interfaceControl.Parent).TabText = frmInputBox.returnValue.Replace("&", "&&"); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("RenameTab (UI.Window.ConnectionWindow) failed", ex); - } - } - - #endregion - - #region Protocols - - public void Prot_Event_Closed(object sender) - { - var protocolBase = sender as ProtocolBase; - if (!(protocolBase?.InterfaceControl.Parent is ConnectionTab tabPage)) return; - if (tabPage.Disposing || tabPage.IsDisposed) return; - tabPage.protocolClose = true; - Invoke(new Action(() => tabPage.Close())); - } - - #endregion - } -} diff --git a/mRemoteNG/UI/Window/ConnectionWindow.resx b/mRemoteNG/UI/Window/ConnectionWindow.resx deleted file mode 100644 index 2285f203d..000000000 --- a/mRemoteNG/UI/Window/ConnectionWindow.resx +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 - JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAACUUlEQVQ4T4WT60uTcRTHB/szYnbRkkJ6 - YYWs+81kLW9kBq02f67pyEsDy5yLNX3c3KVd3E3NsWFJRiUMjEZUVtvYcF2WI+i170Twbfju23keWuzR - RS++D+P8zjnfL+fDJAD+q6tPmoZaZxTScm/bCuXUPN1QUEyciZR7+/uj/6NWduutxqB7pUpoFtrXrz1t - weWoEo3heuifdaDzsQpHzYd9pcO8hE/fUqdc/0Yd51JG+HMORL4HEV0JYTrvQ/DzQ3iXxzGetqAt1ISa - vuox0YLedx2y7tfX455lK+Z+zGDqmxeP8n6Evrjhy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VldXMT4+ - vusH0htQEp9f4jEFsL6+jkgksiPEaoqKtbW1ONwZpWQqnuDd5HI5UqkUYrEY8vPz/4LEJmVlZaioqIDD - 4cDB9h5KxqbnYDKZOFBQUMAhMSaDmATExmRmTHV1dTjQ0kXJ6EQcNpvtD0isLyB2AZ1Oxy9gMBj4FVwu - F/zNYUqGb0/zPsxFQL+fTJyNpWSyWCyorq6Gx+OBO9hGyeWRCd5HRBNOAmL3FhBbnqmmpgY+nw/OQIiS - 80PXt1gfp9OJ+vp6Hs3tdnMHpoaGBni9Xg74/X40NjZyBQIB2N3BAdLe1dfeHb2w1h0dkjr7BqWjPQNS - 64lzUujYaelQR68UbD0pBUKdkq/piJSOLKVdpf2+ZsnuCq5Z7C7Djl909wL5BXhAQe3YxLjpAAAAAElF - TkSuQmCC - - - - 59 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ErrorAndInfoWindow.Designer.cs b/mRemoteNG/UI/Window/ErrorAndInfoWindow.Designer.cs deleted file mode 100644 index 3c547af1f..000000000 --- a/mRemoteNG/UI/Window/ErrorAndInfoWindow.Designer.cs +++ /dev/null @@ -1,172 +0,0 @@ - -using mRemoteNG.UI.Controls; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Window -{ - public partial class ErrorAndInfoWindow - { - internal MrngPictureBox pbError; - internal System.Windows.Forms.ListView lvErrorCollector; - internal System.Windows.Forms.ColumnHeader clmMessage; - internal Controls.MrngTextBox txtMsgText; - internal System.Windows.Forms.ImageList imgListMC; - internal System.Windows.Forms.ContextMenuStrip cMenMC; - internal System.Windows.Forms.ToolStripMenuItem cMenMCCopy; - internal System.Windows.Forms.ToolStripMenuItem cMenMCDelete; - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.txtMsgText = new mRemoteNG.UI.Controls.MrngTextBox(); - this.pbError = new MrngPictureBox(this.components); - this.lvErrorCollector = new System.Windows.Forms.ListView(); - this.clmMessage = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.cMenMC = new System.Windows.Forms.ContextMenuStrip(this.components); - this.cMenMCCopy = new System.Windows.Forms.ToolStripMenuItem(); - this.cMenMCDelete = new System.Windows.Forms.ToolStripMenuItem(); - this.imgListMC = new System.Windows.Forms.ImageList(this.components); - this.lblMsgDate = new mRemoteNG.UI.Controls.MrngLabel(); - this.pnlErrorMsg = new System.Windows.Forms.Panel(); - ((System.ComponentModel.ISupportInitialize)(this.pbError)).BeginInit(); - this.cMenMC.SuspendLayout(); - this.pnlErrorMsg.SuspendLayout(); - this.SuspendLayout(); - // - // txtMsgText - // - this.txtMsgText.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtMsgText.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtMsgText.Location = new System.Drawing.Point(40, 19); - this.txtMsgText.Multiline = true; - this.txtMsgText.Name = "txtMsgText"; - this.txtMsgText.ReadOnly = true; - this.txtMsgText.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtMsgText.Size = new System.Drawing.Size(154, 208); - this.txtMsgText.TabIndex = 30; - this.txtMsgText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MC_KeyDown); - // - // pbError - // - this.pbError.InitialImage = null; - this.pbError.Location = new System.Drawing.Point(5, 5); - this.pbError.Name = "pbError"; - this.pbError.Size = new System.Drawing.Size(32, 32); - this.pbError.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.pbError.TabIndex = 0; - this.pbError.TabStop = false; - this.pbError.Visible = false; - // - // lvErrorCollector - // - this.lvErrorCollector.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lvErrorCollector.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.lvErrorCollector.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.clmMessage}); - this.lvErrorCollector.ContextMenuStrip = this.cMenMC; - this.lvErrorCollector.FullRowSelect = true; - this.lvErrorCollector.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.lvErrorCollector.HideSelection = false; - this.lvErrorCollector.Location = new System.Drawing.Point(200, 0); - this.lvErrorCollector.Margin = new System.Windows.Forms.Padding(0); - this.lvErrorCollector.Name = "lvErrorCollector"; - this.lvErrorCollector.ShowGroups = false; - this.lvErrorCollector.Size = new System.Drawing.Size(417, 233); - this.lvErrorCollector.SmallImageList = this.imgListMC; - this.lvErrorCollector.TabIndex = 10; - this.lvErrorCollector.UseCompatibleStateImageBehavior = false; - this.lvErrorCollector.View = System.Windows.Forms.View.Details; - this.lvErrorCollector.SelectedIndexChanged += new System.EventHandler(this.lvErrorCollector_SelectedIndexChanged); - this.lvErrorCollector.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MC_KeyDown); - // - // clmMessage - // - this.clmMessage.Text = Language.Message; - this.clmMessage.Width = 184; - // - // cMenMC - // - this.cMenMC.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cMenMC.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.cMenMCCopy, - this.cMenMCDelete}); - this.cMenMC.Name = "cMenMC"; - this.cMenMC.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; - this.cMenMC.Size = new System.Drawing.Size(141, 48); - this.cMenMC.Opening += new System.ComponentModel.CancelEventHandler(this.cMenMC_Opening); - // - // cMenMCCopy - // - this.cMenMCCopy.Image = global::mRemoteNG.Properties.Resources.Copy_16x; - this.cMenMCCopy.Name = "cMenMCCopy"; - this.cMenMCCopy.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); - this.cMenMCCopy.Size = new System.Drawing.Size(140, 22); - this.cMenMCCopy.Text = Language.Copy; - this.cMenMCCopy.Click += new System.EventHandler(this.cMenMCCopy_Click); - // - // cMenMCDelete - // - this.cMenMCDelete.Image = global::mRemoteNG.Properties.Resources.Close_16x; - this.cMenMCDelete.Name = "cMenMCDelete"; - this.cMenMCDelete.ShortcutKeys = System.Windows.Forms.Keys.Delete; - this.cMenMCDelete.Size = new System.Drawing.Size(140, 22); - this.cMenMCDelete.Text = Language.Delete; - this.cMenMCDelete.Click += new System.EventHandler(this.cMenMCDelete_Click); - // - // imgListMC - // - this.imgListMC.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit; - this.imgListMC.ImageSize = new System.Drawing.Size(16, 16); - this.imgListMC.TransparentColor = System.Drawing.Color.Transparent; - // - // lblMsgDate - // - this.lblMsgDate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblMsgDate.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMsgDate.Location = new System.Drawing.Point(37, 3); - this.lblMsgDate.Name = "lblMsgDate"; - this.lblMsgDate.Size = new System.Drawing.Size(157, 13); - this.lblMsgDate.TabIndex = 40; - // - // pnlErrorMsg - // - this.pnlErrorMsg.BackColor = System.Drawing.SystemColors.Control; - this.pnlErrorMsg.Controls.Add(this.txtMsgText); - this.pnlErrorMsg.Controls.Add(this.lblMsgDate); - this.pnlErrorMsg.Controls.Add(this.pbError); - this.pnlErrorMsg.Location = new System.Drawing.Point(0, 0); - this.pnlErrorMsg.Margin = new System.Windows.Forms.Padding(0); - this.pnlErrorMsg.Name = "pnlErrorMsg"; - this.pnlErrorMsg.Size = new System.Drawing.Size(200, 233); - this.pnlErrorMsg.TabIndex = 20; - // - // ErrorAndInfoWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(617, 233); - this.Controls.Add(this.lvErrorCollector); - this.Controls.Add(this.pnlErrorMsg); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.HideOnClose = true; - this.Name = "ErrorAndInfoWindow"; - this.TabText = Language.Notifications; - this.Text = "Notifications"; - this.Load += new System.EventHandler(this.ErrorsAndInfos_Load); - this.Resize += new System.EventHandler(this.ErrorsAndInfos_Resize); - ((System.ComponentModel.ISupportInitialize)(this.pbError)).EndInit(); - this.cMenMC.ResumeLayout(false); - this.pnlErrorMsg.ResumeLayout(false); - this.pnlErrorMsg.PerformLayout(); - this.ResumeLayout(false); - - } - - private System.ComponentModel.IContainer components; - internal Controls.MrngLabel lblMsgDate; - internal System.Windows.Forms.Panel pnlErrorMsg; - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ErrorAndInfoWindow.cs b/mRemoteNG/UI/Window/ErrorAndInfoWindow.cs deleted file mode 100644 index 51e5f6331..000000000 --- a/mRemoteNG/UI/Window/ErrorAndInfoWindow.cs +++ /dev/null @@ -1,420 +0,0 @@ -using System; -using System.Drawing; -using System.Collections; -using System.Globalization; -using System.Windows.Forms; -using System.Text; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.App; -using mRemoteNG.Messages; -using mRemoteNG.UI.Forms; -using mRemoteNG.Themes; -using mRemoteNG.Resources.Language; -using Message = mRemoteNG.Messages.Message; - -namespace mRemoteNG.UI.Window -{ - public partial class ErrorAndInfoWindow : BaseWindow - { - private ControlLayout _layout = ControlLayout.Vertical; - private readonly ThemeManager _themeManager; - private readonly DisplayProperties _display; - - public DockContent PreviousActiveForm { get; set; } - - public ErrorAndInfoWindow() : this(new DockContent()) - { - } - - public ErrorAndInfoWindow(DockContent panel) - { - WindowType = WindowType.ErrorsAndInfos; - DockPnl = panel; - _display = new DisplayProperties(); - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.StatusInformation_16x); - lblMsgDate.Width = _display.ScaleWidth(lblMsgDate.Width); - _themeManager = ThemeManager.getInstance(); - ApplyTheme(); - _themeManager.ThemeChanged += ApplyTheme; - LayoutVertical(); - FillImageList(); - ApplyLanguage(); - } - - #region Form Stuff - - private void ErrorsAndInfos_Load(object sender, EventArgs e) - { - } - - private void ApplyLanguage() - { - clmMessage.Text = Language.Message; - cMenMCCopy.Text = Language.CopyAll; - cMenMCDelete.Text = Language.DeleteAll; - TabText = Language.Notifications; - Text = Language.Notifications; - } - - #endregion - - #region Private Methods - - private new void ApplyTheme() - { - if (!_themeManager.ActiveAndExtended) return; - lvErrorCollector.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - lvErrorCollector.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - - pnlErrorMsg.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlErrorMsg.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - txtMsgText.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - txtMsgText.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground"); - lblMsgDate.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - lblMsgDate.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - private void FillImageList() - { - imgListMC.ImageSize = _display.ScaleSize(imgListMC.ImageSize); - imgListMC.Images.Add(_display.ScaleImage(Properties.Resources.Test_16x)); - imgListMC.Images.Add(_display.ScaleImage(Properties.Resources.StatusInformation_16x)); - imgListMC.Images.Add(_display.ScaleImage(Properties.Resources.LogWarning_16x)); - imgListMC.Images.Add(_display.ScaleImage(Properties.Resources.LogError_16x)); - } - - private void LayoutVertical() - { - try - { - pnlErrorMsg.Location = new Point(0, Height - _display.ScaleHeight(200)); - pnlErrorMsg.Size = new Size(Width, Height - pnlErrorMsg.Top); - pnlErrorMsg.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; - txtMsgText.Size = new Size( - pnlErrorMsg.Width - pbError.Width - _display.ScaleWidth(8), - pnlErrorMsg.Height - _display.ScaleHeight(20)); - lvErrorCollector.Location = new Point(0, 0); - lvErrorCollector.Size = new Size(Width, Height - pnlErrorMsg.Height - _display.ScaleHeight(5)); - lvErrorCollector.Anchor = - AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; - - _layout = ControlLayout.Vertical; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "LayoutVertical (UI.Window.ErrorsAndInfos) failed" + - Environment.NewLine + ex.Message, true); - } - } - - private void LayoutHorizontal() - { - try - { - pnlErrorMsg.Location = new Point(0, 0); - pnlErrorMsg.Size = new Size(_display.ScaleWidth(200), Height); - pnlErrorMsg.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top; - - txtMsgText.Size = new Size( - pnlErrorMsg.Width - pbError.Width - _display.ScaleWidth(8), - pnlErrorMsg.Height - _display.ScaleHeight(20)); - lvErrorCollector.Location = new Point(pnlErrorMsg.Width + _display.ScaleWidth(5), 0); - lvErrorCollector.Size = new Size(Width - pnlErrorMsg.Width - _display.ScaleWidth(5), Height); - lvErrorCollector.Anchor = - AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; - - _layout = ControlLayout.Horizontal; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "LayoutHorizontal (UI.Window.ErrorsAndInfos) failed" + - Environment.NewLine + ex.Message, true); - } - } - - private void ErrorsAndInfos_Resize(object sender, EventArgs e) - { - try - { - if (Width > Height) - { - if (_layout == ControlLayout.Vertical) - LayoutHorizontal(); - } - else - { - if (_layout == ControlLayout.Horizontal) - LayoutVertical(); - } - - lvErrorCollector.Columns[0].Width = lvErrorCollector.Width - 20; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "ErrorsAndInfos_Resize (UI.Window.ErrorsAndInfos) failed" + - Environment.NewLine + ex.Message, true); - } - } - - private void SetStyleWhenNoMessageSelected() - { - try - { - pnlErrorMsg.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pbError.Image = null; - txtMsgText.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background"); - txtMsgText.Text = ""; - lblMsgDate.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - lblMsgDate.Text = ""; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "pnlErrorMsg_ResetDefaultStyle (UI.Window.ErrorsAndInfos) failed" + - Environment.NewLine + - ex.Message, true); - } - } - - private void MC_KeyDown(object sender, KeyEventArgs e) - { - try - { - if (e.KeyCode != Keys.Escape) return; - try - { - if (PreviousActiveForm != null) - PreviousActiveForm.Show(FrmMain.Default.pnlDock); - else - Windows.TreeForm.Show(FrmMain.Default.pnlDock); - } - catch (Exception) - { - // ignored - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "MC_KeyDown (UI.Window.ErrorsAndInfos) failed" + - Environment.NewLine + ex.Message, true); - } - } - - private void lvErrorCollector_SelectedIndexChanged(object sender, EventArgs e) - { - try - { - if (lvErrorCollector.SelectedItems.Count == 0 | lvErrorCollector.SelectedItems.Count > 1) - { - SetStyleWhenNoMessageSelected(); - return; - } - - var sItem = lvErrorCollector.SelectedItems[0]; - var eMsg = (Message)sItem.Tag; - switch (eMsg.Class) - { - case MessageClass.DebugMsg: - pbError.Image = _display.ScaleImage(Properties.Resources.Test_16x); - if (_themeManager.ThemingActive) - { - pnlErrorMsg.BackColor = Color.LightSteelBlue; - txtMsgText.BackColor = Color.LightSteelBlue; - lblMsgDate.BackColor = Color.LightSteelBlue; - } - - break; - case MessageClass.InformationMsg: - pbError.Image = _display.ScaleImage(Properties.Resources.StatusInformation_16x); - if (_themeManager.ThemingActive) - { - pnlErrorMsg.BackColor = Color.LightSteelBlue; - txtMsgText.BackColor = Color.LightSteelBlue; - lblMsgDate.BackColor = Color.LightSteelBlue; - } - - break; - case MessageClass.WarningMsg: - pbError.Image = _display.ScaleImage(Properties.Resources.LogWarning_16x); - if (_themeManager.ActiveAndExtended) - { - //Inverse colors for dramatic effect - pnlErrorMsg.BackColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("WarningText_Foreground"); - pnlErrorMsg.ForeColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("WarningText_Background"); - txtMsgText.BackColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("WarningText_Foreground"); - txtMsgText.ForeColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("WarningText_Background"); - lblMsgDate.BackColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("WarningText_Foreground"); - lblMsgDate.ForeColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("WarningText_Background"); - } - - break; - case MessageClass.ErrorMsg: - pbError.Image = _display.ScaleImage(Properties.Resources.LogError_16x); - if (_themeManager.ActiveAndExtended) - { - pnlErrorMsg.BackColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("ErrorText_Foreground"); - pnlErrorMsg.ForeColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("ErrorText_Background"); - txtMsgText.BackColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("ErrorText_Foreground"); - txtMsgText.ForeColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("ErrorText_Background"); - lblMsgDate.BackColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("ErrorText_Foreground"); - lblMsgDate.ForeColor = - _themeManager.ActiveTheme.ExtendedPalette.getColor("ErrorText_Background"); - } - - break; - } - - lblMsgDate.Text = eMsg.Date.ToString(CultureInfo.InvariantCulture); - txtMsgText.Text = eMsg.Text; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "lvErrorCollector_SelectedIndexChanged (UI.Window.ErrorsAndInfos) failed" + - Environment.NewLine + - ex.Message, true); - } - } - - private void cMenMC_Opening(object sender, System.ComponentModel.CancelEventArgs e) - { - if (lvErrorCollector.Items.Count > 0) - { - cMenMCCopy.Enabled = true; - cMenMCDelete.Enabled = true; - pbError.Visible = true; - } - else - { - cMenMCCopy.Enabled = false; - cMenMCDelete.Enabled = false; - } - - if (lvErrorCollector.SelectedItems.Count > 0) - { - cMenMCCopy.Text = Language.Copy; - cMenMCDelete.Text = Language.Delete; - } - else - { - cMenMCCopy.Text = Language.CopyAll; - cMenMCDelete.Text = Language.DeleteAll; - } - } - - private void cMenMCCopy_Click(object sender, EventArgs e) - { - CopyMessagesToClipboard(); - } - - private void CopyMessagesToClipboard() - { - try - { - IEnumerable items; - if (lvErrorCollector.SelectedItems.Count > 0) - { - items = lvErrorCollector.SelectedItems; - } - else - { - items = lvErrorCollector.Items; - } - - var stringBuilder = new StringBuilder(); - stringBuilder.AppendLine("----------"); - - lvErrorCollector.BeginUpdate(); - - foreach (ListViewItem item in items) - { - if (!(item.Tag is Message message)) - { - continue; - } - - stringBuilder.AppendLine(message.Class.ToString()); - stringBuilder.AppendLine(message.Date.ToString(CultureInfo.InvariantCulture)); - stringBuilder.AppendLine(message.Text); - stringBuilder.AppendLine("----------"); - } - - Clipboard.SetText(stringBuilder.ToString()); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "UI.Window.ErrorsAndInfos.CopyMessagesToClipboard() failed." + - Environment.NewLine + ex.Message, - true); - } - finally - { - lvErrorCollector.EndUpdate(); - } - } - - private void cMenMCDelete_Click(object sender, EventArgs e) - { - DeleteMessages(); - } - - private void DeleteMessages() - { - try - { - lvErrorCollector.BeginUpdate(); - - if (lvErrorCollector.SelectedItems.Count > 0) - { - foreach (ListViewItem item in lvErrorCollector.SelectedItems) - item.Remove(); - } - else - { - lvErrorCollector.Items.Clear(); - } - - if (lvErrorCollector.Items.Count == 0) - { - pbError.Visible = false; - txtMsgText.Visible = false; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "UI.Window.ErrorsAndInfos.DeleteMessages() failed" + - Environment.NewLine + ex.Message, true); - } - finally - { - lvErrorCollector.EndUpdate(); - } - } - - #endregion - - private enum ControlLayout - { - Vertical = 0, - Horizontal = 1 - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ErrorAndInfoWindow.resx b/mRemoteNG/UI/Window/ErrorAndInfoWindow.resx deleted file mode 100644 index 5090460e1..000000000 --- a/mRemoteNG/UI/Window/ErrorAndInfoWindow.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 119, 17 - - - 17, 17 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Window/ExternalToolsWindow.Designer.cs b/mRemoteNG/UI/Window/ExternalToolsWindow.Designer.cs deleted file mode 100644 index 5d4fc833d..000000000 --- a/mRemoteNG/UI/Window/ExternalToolsWindow.Designer.cs +++ /dev/null @@ -1,596 +0,0 @@ - -using mRemoteNG.Themes; -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Window -{ - public partial class ExternalToolsWindow : BaseWindow - { - #region Windows Form Designer generated code - internal BrightIdeasSoftware.OLVColumn FilenameColumnHeader; - internal BrightIdeasSoftware.OLVColumn DisplayNameColumnHeader; - internal BrightIdeasSoftware.OLVColumn ArgumentsColumnHeader; - internal BrightIdeasSoftware.OLVColumn WaitForExitColumnHeader; - internal BrightIdeasSoftware.OLVColumn TryToIntegrateColumnHeader; - internal BrightIdeasSoftware.OLVColumn WorkingDirColumnHeader; - internal BrightIdeasSoftware.OLVColumn RunElevateHeader; - internal Controls.MrngTextBox DisplayNameTextBox; - internal BrightIdeasSoftware.OLVColumn ShowOnToolbarColumnHeader; - internal Controls.MrngLabel DisplayNameLabel; - internal Controls.MrngTextBox ArgumentsCheckBox; - internal Controls.MrngTextBox FilenameTextBox; - internal Controls.MrngLabel ArgumentsLabel; - internal Controls.MrngLabel FilenameLabel; - internal MrngButton BrowseButton; - internal System.Windows.Forms.ContextMenuStrip ToolsContextMenuStrip; - internal System.Windows.Forms.ToolStripMenuItem NewToolMenuItem; - internal System.Windows.Forms.ToolStripMenuItem DeleteToolMenuItem; - internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator1; - internal System.Windows.Forms.ToolStripMenuItem LaunchToolMenuItem; - internal MrngCheckBox WaitForExitCheckBox; - internal Controls.MrngLabel OptionsLabel; - internal MrngCheckBox TryToIntegrateCheckBox; - internal MrngCheckBox ShowOnToolbarCheckBox; - internal Controls.MrngListView ToolsListObjView; - internal Controls.MrngLabel WorkingDirLabel; - internal Controls.MrngTextBox WorkingDirTextBox; - internal MrngButton BrowseWorkingDir; - internal MrngCheckBox RunElevatedCheckBox; - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExternalToolsWindow)); - this.ToolsListObjView = new mRemoteNG.UI.Controls.MrngListView(); - this.DisplayNameColumnHeader = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.FilenameColumnHeader = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.ArgumentsColumnHeader = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.WorkingDirColumnHeader = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.WaitForExitColumnHeader = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.TryToIntegrateColumnHeader = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.RunElevateHeader = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.ShowOnToolbarColumnHeader = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.ToolsContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); - this.NewToolMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.DeleteToolMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ToolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.LaunchToolMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.PropertiesGroupBox = new MrngGroupBox(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.DisplayNameLabel = new mRemoteNG.UI.Controls.MrngLabel(); - this.ShowOnToolbarCheckBox = new MrngCheckBox(); - this.WorkingDirTextBox = new mRemoteNG.UI.Controls.MrngTextBox(); - this.DisplayNameTextBox = new mRemoteNG.UI.Controls.MrngTextBox(); - this.FilenameTextBox = new mRemoteNG.UI.Controls.MrngTextBox(); - this.ArgumentsCheckBox = new mRemoteNG.UI.Controls.MrngTextBox(); - this.FilenameLabel = new mRemoteNG.UI.Controls.MrngLabel(); - this.RunElevatedCheckBox = new MrngCheckBox(); - this.ArgumentsLabel = new mRemoteNG.UI.Controls.MrngLabel(); - this.TryToIntegrateCheckBox = new MrngCheckBox(); - this.WorkingDirLabel = new mRemoteNG.UI.Controls.MrngLabel(); - this.OptionsLabel = new mRemoteNG.UI.Controls.MrngLabel(); - this.WaitForExitCheckBox = new MrngCheckBox(); - this.BrowseButton = new MrngButton(); - this.BrowseWorkingDir = new MrngButton(); - this.ToolStripContainer = new System.Windows.Forms.ToolStripContainer(); - this.ToolStrip = new System.Windows.Forms.ToolStrip(); - this.NewToolToolstripButton = new System.Windows.Forms.ToolStripButton(); - this.DeleteToolToolstripButton = new System.Windows.Forms.ToolStripButton(); - this.ToolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.LaunchToolToolstripButton = new System.Windows.Forms.ToolStripButton(); - this.vsToolStripExtender = new WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender(this.components); - ((System.ComponentModel.ISupportInitialize)(this.ToolsListObjView)).BeginInit(); - this.ToolsContextMenuStrip.SuspendLayout(); - this.PropertiesGroupBox.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); - this.ToolStripContainer.ContentPanel.SuspendLayout(); - this.ToolStripContainer.TopToolStripPanel.SuspendLayout(); - this.ToolStripContainer.SuspendLayout(); - this.ToolStrip.SuspendLayout(); - this.SuspendLayout(); - // - // ToolsListObjView - // - this.ToolsListObjView.AllColumns.Add(this.DisplayNameColumnHeader); - this.ToolsListObjView.AllColumns.Add(this.FilenameColumnHeader); - this.ToolsListObjView.AllColumns.Add(this.ArgumentsColumnHeader); - this.ToolsListObjView.AllColumns.Add(this.WorkingDirColumnHeader); - this.ToolsListObjView.AllColumns.Add(this.WaitForExitColumnHeader); - this.ToolsListObjView.AllColumns.Add(this.TryToIntegrateColumnHeader); - this.ToolsListObjView.AllColumns.Add(this.RunElevateHeader); - this.ToolsListObjView.AllColumns.Add(this.ShowOnToolbarColumnHeader); - this.ToolsListObjView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.ToolsListObjView.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.ToolsListObjView.CellEditActivation = BrightIdeasSoftware.ObjectListView.CellEditActivateMode.F2Only; - this.ToolsListObjView.CellEditUseWholeCell = false; - this.ToolsListObjView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.DisplayNameColumnHeader, - this.FilenameColumnHeader, - this.ArgumentsColumnHeader, - this.WorkingDirColumnHeader, - this.WaitForExitColumnHeader, - this.TryToIntegrateColumnHeader, - this.RunElevateHeader, - this.ShowOnToolbarColumnHeader}); - this.ToolsListObjView.ContextMenuStrip = this.ToolsContextMenuStrip; - this.ToolsListObjView.Cursor = System.Windows.Forms.Cursors.Default; - this.ToolsListObjView.DecorateLines = true; - this.ToolsListObjView.FullRowSelect = true; - this.ToolsListObjView.GridLines = true; - this.ToolsListObjView.HideSelection = false; - this.ToolsListObjView.Location = new System.Drawing.Point(0, 0); - this.ToolsListObjView.Name = "ToolsListObjView"; - this.ToolsListObjView.RenderNonEditableCheckboxesAsDisabled = true; - this.ToolsListObjView.ShowCommandMenuOnRightClick = true; - this.ToolsListObjView.ShowGroups = false; - this.ToolsListObjView.Size = new System.Drawing.Size(827, 186); - this.ToolsListObjView.Sorting = System.Windows.Forms.SortOrder.Ascending; - this.ToolsListObjView.TabIndex = 0; - this.ToolsListObjView.UseCompatibleStateImageBehavior = false; - this.ToolsListObjView.UseNotifyPropertyChanged = true; - this.ToolsListObjView.View = System.Windows.Forms.View.Details; - this.ToolsListObjView.CellToolTipShowing += new System.EventHandler(this.ToolsListObjView_CellToolTipShowing); - this.ToolsListObjView.SelectedIndexChanged += new System.EventHandler(this.ToolsListObjView_SelectedIndexChanged); - this.ToolsListObjView.DoubleClick += new System.EventHandler(this.ToolsListObjView_DoubleClick); - // - // DisplayNameColumnHeader - // - this.DisplayNameColumnHeader.AspectName = "DisplayName"; - this.DisplayNameColumnHeader.AutoCompleteEditor = false; - this.DisplayNameColumnHeader.AutoCompleteEditorMode = System.Windows.Forms.AutoCompleteMode.None; - this.DisplayNameColumnHeader.Text = "Display Name"; - this.DisplayNameColumnHeader.UseInitialLetterForGroup = true; - this.DisplayNameColumnHeader.Width = 100; - // - // FilenameColumnHeader - // - this.FilenameColumnHeader.AspectName = "FileName"; - this.FilenameColumnHeader.AutoCompleteEditor = false; - this.FilenameColumnHeader.AutoCompleteEditorMode = System.Windows.Forms.AutoCompleteMode.None; - this.FilenameColumnHeader.Groupable = false; - this.FilenameColumnHeader.Text = "Filename"; - this.FilenameColumnHeader.Width = 100; - // - // ArgumentsColumnHeader - // - this.ArgumentsColumnHeader.AspectName = "Arguments"; - this.ArgumentsColumnHeader.AutoCompleteEditor = false; - this.ArgumentsColumnHeader.AutoCompleteEditorMode = System.Windows.Forms.AutoCompleteMode.None; - this.ArgumentsColumnHeader.Groupable = false; - this.ArgumentsColumnHeader.Text = "Arguments"; - this.ArgumentsColumnHeader.Width = 100; - // - // WorkingDirColumnHeader - // - this.WorkingDirColumnHeader.AspectName = "WorkingDir"; - this.WorkingDirColumnHeader.AutoCompleteEditor = false; - this.WorkingDirColumnHeader.AutoCompleteEditorMode = System.Windows.Forms.AutoCompleteMode.None; - this.WorkingDirColumnHeader.Groupable = false; - this.WorkingDirColumnHeader.Text = "Working Directory"; - this.WorkingDirColumnHeader.Width = 120; - // - // WaitForExitColumnHeader - // - this.WaitForExitColumnHeader.AspectName = "WaitForExit"; - this.WaitForExitColumnHeader.CheckBoxes = true; - this.WaitForExitColumnHeader.Groupable = false; - this.WaitForExitColumnHeader.Text = "Wait for exit"; - this.WaitForExitColumnHeader.Width = 75; - // - // TryToIntegrateColumnHeader - // - this.TryToIntegrateColumnHeader.AspectName = "TryIntegrate"; - this.TryToIntegrateColumnHeader.CheckBoxes = true; - this.TryToIntegrateColumnHeader.Groupable = false; - this.TryToIntegrateColumnHeader.Text = "Try To Integrate"; - this.TryToIntegrateColumnHeader.Width = 95; - // - // RunElevateHeader - // - this.RunElevateHeader.AspectName = "RunElevated"; - this.RunElevateHeader.CheckBoxes = true; - this.RunElevateHeader.Groupable = false; - this.RunElevateHeader.Text = "Run Elevated"; - this.RunElevateHeader.Width = 95; - // - // ShowOnToolbarColumnHeader - // - this.ShowOnToolbarColumnHeader.AspectName = "ShowOnToolbar"; - this.ShowOnToolbarColumnHeader.CheckBoxes = true; - this.ShowOnToolbarColumnHeader.Groupable = false; - this.ShowOnToolbarColumnHeader.Text = "Show On Toolbar"; - this.ShowOnToolbarColumnHeader.Width = 120; - // - // ToolsContextMenuStrip - // - this.ToolsContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.NewToolMenuItem, - this.DeleteToolMenuItem, - this.ToolStripSeparator1, - this.LaunchToolMenuItem}); - this.ToolsContextMenuStrip.Name = "cMenApps"; - this.ToolsContextMenuStrip.Size = new System.Drawing.Size(220, 76); - // - // NewToolMenuItem - // - this.NewToolMenuItem.Image = global::mRemoteNG.Properties.Resources.Add_16x; - this.NewToolMenuItem.Name = "NewToolMenuItem"; - this.NewToolMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F4))); - this.NewToolMenuItem.Size = new System.Drawing.Size(219, 22); - this.NewToolMenuItem.Text = "New External Tool"; - this.NewToolMenuItem.Click += new System.EventHandler(this.NewTool_Click); - // - // DeleteToolMenuItem - // - this.DeleteToolMenuItem.Enabled = false; - this.DeleteToolMenuItem.Image = global::mRemoteNG.Properties.Resources.Remove_16x; - this.DeleteToolMenuItem.Name = "DeleteToolMenuItem"; - this.DeleteToolMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Delete; - this.DeleteToolMenuItem.Size = new System.Drawing.Size(219, 22); - this.DeleteToolMenuItem.Text = "Delete External Tool..."; - this.DeleteToolMenuItem.Click += new System.EventHandler(this.DeleteTool_Click); - // - // ToolStripSeparator1 - // - this.ToolStripSeparator1.Name = "ToolStripSeparator1"; - this.ToolStripSeparator1.Size = new System.Drawing.Size(216, 6); - // - // LaunchToolMenuItem - // - this.LaunchToolMenuItem.Enabled = false; - this.LaunchToolMenuItem.Image = global::mRemoteNG.Properties.Resources.Run_16x; - this.LaunchToolMenuItem.Name = "LaunchToolMenuItem"; - this.LaunchToolMenuItem.Size = new System.Drawing.Size(219, 22); - this.LaunchToolMenuItem.Text = "Launch External Tool"; - this.LaunchToolMenuItem.Click += new System.EventHandler(this.LaunchTool_Click); - // - // PropertiesGroupBox - // - this.PropertiesGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.PropertiesGroupBox.Controls.Add(this.tableLayoutPanel1); - this.PropertiesGroupBox.Enabled = false; - this.PropertiesGroupBox.Location = new System.Drawing.Point(0, 192); - this.PropertiesGroupBox.Name = "PropertiesGroupBox"; - this.PropertiesGroupBox.Size = new System.Drawing.Size(827, 184); - this.PropertiesGroupBox.TabIndex = 1; - this.PropertiesGroupBox.TabStop = false; - this.PropertiesGroupBox.Text = "External Tool Properties"; - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 5; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.Controls.Add(this.DisplayNameLabel, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.ShowOnToolbarCheckBox, 2, 5); - this.tableLayoutPanel1.Controls.Add(this.WorkingDirTextBox, 1, 3); - this.tableLayoutPanel1.Controls.Add(this.DisplayNameTextBox, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.FilenameTextBox, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.ArgumentsCheckBox, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.FilenameLabel, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.RunElevatedCheckBox, 1, 5); - this.tableLayoutPanel1.Controls.Add(this.ArgumentsLabel, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.TryToIntegrateCheckBox, 2, 4); - this.tableLayoutPanel1.Controls.Add(this.WorkingDirLabel, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.OptionsLabel, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.WaitForExitCheckBox, 1, 4); - this.tableLayoutPanel1.Controls.Add(this.BrowseButton, 4, 1); - this.tableLayoutPanel1.Controls.Add(this.BrowseWorkingDir, 4, 3); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 18); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 7; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 26F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(821, 163); - this.tableLayoutPanel1.TabIndex = 12; - // - // DisplayNameLabel - // - this.DisplayNameLabel.AutoSize = true; - this.DisplayNameLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.DisplayNameLabel.Location = new System.Drawing.Point(3, 0); - this.DisplayNameLabel.Name = "DisplayNameLabel"; - this.DisplayNameLabel.Size = new System.Drawing.Size(104, 26); - this.DisplayNameLabel.TabIndex = 0; - this.DisplayNameLabel.Text = "Display Name:"; - this.DisplayNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // ShowOnToolbarCheckBox - // - this.ShowOnToolbarCheckBox._mice = MrngCheckBox.MouseState.HOVER; - this.ShowOnToolbarCheckBox.AutoSize = true; - this.ShowOnToolbarCheckBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ShowOnToolbarCheckBox.Location = new System.Drawing.Point(239, 133); - this.ShowOnToolbarCheckBox.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); - this.ShowOnToolbarCheckBox.Name = "ShowOnToolbarCheckBox"; - this.ShowOnToolbarCheckBox.Size = new System.Drawing.Size(113, 20); - this.ShowOnToolbarCheckBox.TabIndex = 10; - this.ShowOnToolbarCheckBox.Text = "Show on toolbar"; - this.ShowOnToolbarCheckBox.UseVisualStyleBackColor = true; - this.ShowOnToolbarCheckBox.Click += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // WorkingDirTextBox - // - this.WorkingDirTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tableLayoutPanel1.SetColumnSpan(this.WorkingDirTextBox, 3); - this.WorkingDirTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.WorkingDirTextBox.Location = new System.Drawing.Point(110, 80); - this.WorkingDirTextBox.Margin = new System.Windows.Forms.Padding(0, 2, 3, 2); - this.WorkingDirTextBox.Name = "WorkingDirTextBox"; - this.WorkingDirTextBox.Size = new System.Drawing.Size(607, 22); - this.WorkingDirTextBox.TabIndex = 5; - this.WorkingDirTextBox.Leave += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // DisplayNameTextBox - // - this.DisplayNameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tableLayoutPanel1.SetColumnSpan(this.DisplayNameTextBox, 3); - this.DisplayNameTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.DisplayNameTextBox.Location = new System.Drawing.Point(110, 2); - this.DisplayNameTextBox.Margin = new System.Windows.Forms.Padding(0, 2, 3, 2); - this.DisplayNameTextBox.Name = "DisplayNameTextBox"; - this.DisplayNameTextBox.Size = new System.Drawing.Size(607, 22); - this.DisplayNameTextBox.TabIndex = 1; - this.DisplayNameTextBox.LostFocus += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // FilenameTextBox - // - this.FilenameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tableLayoutPanel1.SetColumnSpan(this.FilenameTextBox, 3); - this.FilenameTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.FilenameTextBox.Location = new System.Drawing.Point(110, 28); - this.FilenameTextBox.Margin = new System.Windows.Forms.Padding(0, 2, 3, 2); - this.FilenameTextBox.Name = "FilenameTextBox"; - this.FilenameTextBox.Size = new System.Drawing.Size(607, 22); - this.FilenameTextBox.TabIndex = 2; - this.FilenameTextBox.LostFocus += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // ArgumentsCheckBox - // - this.ArgumentsCheckBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.tableLayoutPanel1.SetColumnSpan(this.ArgumentsCheckBox, 3); - this.ArgumentsCheckBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ArgumentsCheckBox.Location = new System.Drawing.Point(110, 54); - this.ArgumentsCheckBox.Margin = new System.Windows.Forms.Padding(0, 2, 3, 2); - this.ArgumentsCheckBox.Name = "ArgumentsCheckBox"; - this.ArgumentsCheckBox.Size = new System.Drawing.Size(607, 22); - this.ArgumentsCheckBox.TabIndex = 4; - this.ArgumentsCheckBox.LostFocus += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // FilenameLabel - // - this.FilenameLabel.AutoSize = true; - this.FilenameLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.FilenameLabel.Location = new System.Drawing.Point(3, 26); - this.FilenameLabel.Name = "FilenameLabel"; - this.FilenameLabel.Size = new System.Drawing.Size(104, 26); - this.FilenameLabel.TabIndex = 2; - this.FilenameLabel.Text = "Filename:"; - this.FilenameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // RunElevatedCheckBox - // - this.RunElevatedCheckBox._mice = MrngCheckBox.MouseState.HOVER; - this.RunElevatedCheckBox.AutoSize = true; - this.RunElevatedCheckBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.RunElevatedCheckBox.Location = new System.Drawing.Point(113, 133); - this.RunElevatedCheckBox.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); - this.RunElevatedCheckBox.Name = "RunElevatedCheckBox"; - this.RunElevatedCheckBox.Size = new System.Drawing.Size(93, 20); - this.RunElevatedCheckBox.TabIndex = 9; - this.RunElevatedCheckBox.Text = "Run Elevated"; - this.RunElevatedCheckBox.UseVisualStyleBackColor = true; - this.RunElevatedCheckBox.Click += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // ArgumentsLabel - // - this.ArgumentsLabel.AutoSize = true; - this.ArgumentsLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.ArgumentsLabel.Location = new System.Drawing.Point(3, 52); - this.ArgumentsLabel.Name = "ArgumentsLabel"; - this.ArgumentsLabel.Size = new System.Drawing.Size(104, 26); - this.ArgumentsLabel.TabIndex = 5; - this.ArgumentsLabel.Text = "Arguments:"; - this.ArgumentsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // TryToIntegrateCheckBox - // - this.TryToIntegrateCheckBox._mice = MrngCheckBox.MouseState.HOVER; - this.TryToIntegrateCheckBox.AutoSize = true; - this.TryToIntegrateCheckBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.TryToIntegrateCheckBox.Location = new System.Drawing.Point(239, 107); - this.TryToIntegrateCheckBox.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); - this.TryToIntegrateCheckBox.Name = "TryToIntegrateCheckBox"; - this.TryToIntegrateCheckBox.Size = new System.Drawing.Size(113, 20); - this.TryToIntegrateCheckBox.TabIndex = 8; - this.TryToIntegrateCheckBox.Text = "Try to integrate"; - this.TryToIntegrateCheckBox.UseVisualStyleBackColor = true; - this.TryToIntegrateCheckBox.Click += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // WorkingDirLabel - // - this.WorkingDirLabel.AutoSize = true; - this.WorkingDirLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.WorkingDirLabel.Location = new System.Drawing.Point(3, 78); - this.WorkingDirLabel.Name = "WorkingDirLabel"; - this.WorkingDirLabel.Size = new System.Drawing.Size(104, 26); - this.WorkingDirLabel.TabIndex = 11; - this.WorkingDirLabel.Text = "Working Directory:"; - this.WorkingDirLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // OptionsLabel - // - this.OptionsLabel.AutoSize = true; - this.OptionsLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.OptionsLabel.Location = new System.Drawing.Point(3, 104); - this.OptionsLabel.Name = "OptionsLabel"; - this.OptionsLabel.Size = new System.Drawing.Size(104, 26); - this.OptionsLabel.TabIndex = 7; - this.OptionsLabel.Text = "Options:"; - this.OptionsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // WaitForExitCheckBox - // - this.WaitForExitCheckBox._mice = MrngCheckBox.MouseState.HOVER; - this.WaitForExitCheckBox.AutoSize = true; - this.WaitForExitCheckBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.WaitForExitCheckBox.Location = new System.Drawing.Point(113, 107); - this.WaitForExitCheckBox.Margin = new System.Windows.Forms.Padding(3, 3, 30, 3); - this.WaitForExitCheckBox.Name = "WaitForExitCheckBox"; - this.WaitForExitCheckBox.Size = new System.Drawing.Size(93, 20); - this.WaitForExitCheckBox.TabIndex = 7; - this.WaitForExitCheckBox.Text = "Wait for exit"; - this.WaitForExitCheckBox.UseVisualStyleBackColor = true; - this.WaitForExitCheckBox.Click += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - this.WaitForExitCheckBox.LostFocus += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // BrowseButton - // - this.BrowseButton._mice = MrngButton.MouseState.HOVER; - this.BrowseButton.Dock = System.Windows.Forms.DockStyle.Fill; - this.BrowseButton.Location = new System.Drawing.Point(723, 29); - this.BrowseButton.Name = "BrowseButton"; - this.BrowseButton.Size = new System.Drawing.Size(95, 20); - this.BrowseButton.TabIndex = 3; - this.BrowseButton.Text = "Browse..."; - this.BrowseButton.UseVisualStyleBackColor = true; - this.BrowseButton.Click += new System.EventHandler(this.BrowseButton_Click); - this.BrowseButton.LostFocus += new System.EventHandler(this.PropertyControl_ChangedOrLostFocus); - // - // BrowseWorkingDir - // - this.BrowseWorkingDir._mice = MrngButton.MouseState.HOVER; - this.BrowseWorkingDir.Dock = System.Windows.Forms.DockStyle.Fill; - this.BrowseWorkingDir.Location = new System.Drawing.Point(723, 81); - this.BrowseWorkingDir.Name = "BrowseWorkingDir"; - this.BrowseWorkingDir.Size = new System.Drawing.Size(95, 20); - this.BrowseWorkingDir.TabIndex = 6; - this.BrowseWorkingDir.Text = "Browse..."; - this.BrowseWorkingDir.UseVisualStyleBackColor = true; - this.BrowseWorkingDir.Click += new System.EventHandler(this.BrowseWorkingDir_Click); - // - // ToolStripContainer - // - // - // ToolStripContainer.ContentPanel - // - this.ToolStripContainer.ContentPanel.Controls.Add(this.PropertiesGroupBox); - this.ToolStripContainer.ContentPanel.Controls.Add(this.ToolsListObjView); - this.ToolStripContainer.ContentPanel.Size = new System.Drawing.Size(827, 376); - this.ToolStripContainer.Dock = System.Windows.Forms.DockStyle.Fill; - this.ToolStripContainer.Location = new System.Drawing.Point(0, 0); - this.ToolStripContainer.Name = "ToolStripContainer"; - this.ToolStripContainer.Size = new System.Drawing.Size(827, 401); - this.ToolStripContainer.TabIndex = 0; - this.ToolStripContainer.Text = "ToolStripContainer"; - // - // ToolStripContainer.TopToolStripPanel - // - this.ToolStripContainer.TopToolStripPanel.BackColor = System.Drawing.SystemColors.Control; - this.ToolStripContainer.TopToolStripPanel.Controls.Add(this.ToolStrip); - // - // ToolStrip - // - this.ToolStrip.Dock = System.Windows.Forms.DockStyle.None; - this.ToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.ToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.NewToolToolstripButton, - this.DeleteToolToolstripButton, - this.ToolStripSeparator2, - this.LaunchToolToolstripButton}); - this.ToolStrip.Location = new System.Drawing.Point(3, 0); - this.ToolStrip.Name = "ToolStrip"; - this.ToolStrip.Size = new System.Drawing.Size(186, 25); - this.ToolStrip.TabIndex = 0; - // - // NewToolToolstripButton - // - this.NewToolToolstripButton.Image = global::mRemoteNG.Properties.Resources.Add_16x; - this.NewToolToolstripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.NewToolToolstripButton.Name = "NewToolToolstripButton"; - this.NewToolToolstripButton.Size = new System.Drawing.Size(51, 22); - this.NewToolToolstripButton.Text = "New"; - this.NewToolToolstripButton.Click += new System.EventHandler(this.NewTool_Click); - // - // DeleteToolToolstripButton - // - this.DeleteToolToolstripButton.Enabled = false; - this.DeleteToolToolstripButton.Image = global::mRemoteNG.Properties.Resources.Remove_16x; - this.DeleteToolToolstripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.DeleteToolToolstripButton.Name = "DeleteToolToolstripButton"; - this.DeleteToolToolstripButton.Size = new System.Drawing.Size(60, 22); - this.DeleteToolToolstripButton.Text = "Delete"; - this.DeleteToolToolstripButton.Click += new System.EventHandler(this.DeleteTool_Click); - // - // ToolStripSeparator2 - // - this.ToolStripSeparator2.Name = "ToolStripSeparator2"; - this.ToolStripSeparator2.Size = new System.Drawing.Size(6, 25); - // - // LaunchToolToolstripButton - // - this.LaunchToolToolstripButton.Enabled = false; - this.LaunchToolToolstripButton.Image = global::mRemoteNG.Properties.Resources.Run_16x; - this.LaunchToolToolstripButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.LaunchToolToolstripButton.Name = "LaunchToolToolstripButton"; - this.LaunchToolToolstripButton.Size = new System.Drawing.Size(66, 22); - this.LaunchToolToolstripButton.Text = "Launch"; - this.LaunchToolToolstripButton.Click += new System.EventHandler(this.LaunchTool_Click); - // - // vsToolStripExtender - // - this.vsToolStripExtender.DefaultRenderer = null; - // - // ExternalToolsWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(827, 401); - this.Controls.Add(this.ToolStripContainer); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "ExternalToolsWindow"; - this.TabText = "External Applications"; - this.Text = "External Tools"; - this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ExternalTools_FormClosed); - this.Load += new System.EventHandler(this.ExternalTools_Load); - ((System.ComponentModel.ISupportInitialize)(this.ToolsListObjView)).EndInit(); - this.ToolsContextMenuStrip.ResumeLayout(false); - this.PropertiesGroupBox.ResumeLayout(false); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.ToolStripContainer.ContentPanel.ResumeLayout(false); - this.ToolStripContainer.TopToolStripPanel.ResumeLayout(false); - this.ToolStripContainer.TopToolStripPanel.PerformLayout(); - this.ToolStripContainer.ResumeLayout(false); - this.ToolStripContainer.PerformLayout(); - this.ToolStrip.ResumeLayout(false); - this.ToolStrip.PerformLayout(); - this.ResumeLayout(false); - - } - internal System.Windows.Forms.ToolStripContainer ToolStripContainer; - internal System.Windows.Forms.ToolStrip ToolStrip; - internal System.Windows.Forms.ToolStripButton NewToolToolstripButton; - internal System.Windows.Forms.ToolStripButton DeleteToolToolstripButton; - internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator2; - internal System.Windows.Forms.ToolStripButton LaunchToolToolstripButton; - private WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender vsToolStripExtender; - #endregion - - private System.ComponentModel.IContainer components; - internal MrngGroupBox PropertiesGroupBox; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - } -} diff --git a/mRemoteNG/UI/Window/ExternalToolsWindow.cs b/mRemoteNG/UI/Window/ExternalToolsWindow.cs deleted file mode 100644 index d164d01ef..000000000 --- a/mRemoteNG/UI/Window/ExternalToolsWindow.cs +++ /dev/null @@ -1,347 +0,0 @@ -using System; -using System.Linq; -using System.Windows.Forms; -using BrightIdeasSoftware; -using mRemoteNG.App; -using mRemoteNG.Config.Settings; -using mRemoteNG.Tools; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.UI.Forms; -using mRemoteNG.Themes; -using mRemoteNG.Tools.CustomCollections; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Window -{ - public partial class ExternalToolsWindow - { - private readonly ExternalAppsSaver _externalAppsSaver; - private readonly ThemeManager _themeManager; - private readonly FullyObservableCollection _currentlySelectedExternalTools; - - public ExternalToolsWindow() - { - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.Console_16x); - WindowType = WindowType.ExternalApps; - DockPnl = new DockContent(); - _themeManager = ThemeManager.getInstance(); - _themeManager.ThemeChanged += ApplyTheme; - _externalAppsSaver = new ExternalAppsSaver(); - _currentlySelectedExternalTools = new FullyObservableCollection(); - _currentlySelectedExternalTools.CollectionUpdated += CurrentlySelectedExternalToolsOnCollectionUpdated; - BrowseButton.Height = FilenameTextBox.Height; - BrowseWorkingDir.Height = WorkingDirTextBox.Height; - } - - - #region Private Methods - - private void ExternalTools_Load(object sender, EventArgs e) - { - ApplyLanguage(); - ApplyTheme(); - UpdateToolsListObjView(); - } - - private void ApplyLanguage() - { - Text = Language.ExternalTool; - TabText = Language.ExternalTool; - - NewToolToolstripButton.Text = Language._New; - DeleteToolToolstripButton.Text = Language.Delete; - LaunchToolToolstripButton.Text = Language._Launch; - - DisplayNameColumnHeader.Text = Language.DisplayName; - FilenameColumnHeader.Text = Language.Filename; - ArgumentsColumnHeader.Text = Language.Arguments; - WorkingDirColumnHeader.Text = Language.WorkingDirColumnHeader; - WaitForExitColumnHeader.Text = Language.WaitForExit; - TryToIntegrateColumnHeader.Text = Language.TryToIntegrate; - RunElevateHeader.Text = Language.RunElevated; - ShowOnToolbarColumnHeader.Text = Language.ShowOnToolbarColumnHeader; - - TryToIntegrateCheckBox.Text = Language.TryToIntegrate; - ShowOnToolbarCheckBox.Text = Language.ShowOnToolbar; - RunElevatedCheckBox.Text = Language.RunElevated; - - PropertiesGroupBox.Text = Language.ExternalToolProperties; - - DisplayNameLabel.Text = Language.DisplayName; - FilenameLabel.Text = Language.Filename; - ArgumentsLabel.Text = Language.Arguments; - WorkingDirLabel.Text = Language.WorkingDirectory; - OptionsLabel.Text = Language.Options; - - WaitForExitCheckBox.Text = Language.WaitForExit; - BrowseButton.Text = Language._Browse; - BrowseWorkingDir.Text = Language._Browse; - NewToolMenuItem.Text = Language.NewExternalTool; - DeleteToolMenuItem.Text = Language.DeleteExternalTool; - LaunchToolMenuItem.Text = Language.LaunchExternalTool; - } - - private new void ApplyTheme() - { - if (!_themeManager.ThemingActive) return; - vsToolStripExtender.SetStyle(ToolStrip, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme); - vsToolStripExtender.SetStyle(ToolsContextMenuStrip, _themeManager.ActiveTheme.Version, - _themeManager.ActiveTheme.Theme); - //Apply the extended palette - - ToolStripContainer.TopToolStripPanel.BackColor = - _themeManager.ActiveTheme.Theme.ColorPalette.CommandBarMenuDefault.Background; - ToolStripContainer.TopToolStripPanel.ForeColor = - _themeManager.ActiveTheme.Theme.ColorPalette.CommandBarMenuDefault.Text; - PropertiesGroupBox.BackColor = - _themeManager.ActiveTheme.Theme.ColorPalette.CommandBarMenuDefault.Background; - PropertiesGroupBox.ForeColor = _themeManager.ActiveTheme.Theme.ColorPalette.CommandBarMenuDefault.Text; - } - - private void UpdateToolsListObjView() - { - try - { - ToolsListObjView.BeginUpdate(); - ToolsListObjView.SetObjects(Runtime.ExternalToolsService.ExternalTools, true); - ToolsListObjView.AutoResizeColumns(); - ToolsListObjView.EndUpdate(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.ExternalTools.PopulateToolsListObjView()", ex); - } - } - - private void LaunchTool() - { - try - { - foreach (var externalTool in _currentlySelectedExternalTools) - { - externalTool.Start(); - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.ExternalTools.LaunchTool() failed.", ex); - } - } - - private void UpdateEditorControls() - { - var selectedTool = _currentlySelectedExternalTools.FirstOrDefault(); - - DisplayNameTextBox.Text = selectedTool?.DisplayName; - FilenameTextBox.Text = selectedTool?.FileName; - ArgumentsCheckBox.Text = selectedTool?.Arguments; - WorkingDirTextBox.Text = selectedTool?.WorkingDir; - WaitForExitCheckBox.Checked = selectedTool?.WaitForExit ?? false; - TryToIntegrateCheckBox.Checked = selectedTool?.TryIntegrate ?? false; - ShowOnToolbarCheckBox.Checked = selectedTool?.ShowOnToolbar ?? false; - RunElevatedCheckBox.Checked = selectedTool?.RunElevated ?? false; - WaitForExitCheckBox.Enabled = !TryToIntegrateCheckBox.Checked; - } - - private void UpdateToolstipControls() - { - _currentlySelectedExternalTools.Clear(); - _currentlySelectedExternalTools.AddRange(ToolsListObjView.SelectedObjects.OfType()); - PropertiesGroupBox.Enabled = _currentlySelectedExternalTools.Count == 1; - - var atleastOneToolSelected = _currentlySelectedExternalTools.Count > 0; - DeleteToolMenuItem.Enabled = atleastOneToolSelected; - DeleteToolToolstripButton.Enabled = atleastOneToolSelected; - LaunchToolMenuItem.Enabled = atleastOneToolSelected; - LaunchToolToolstripButton.Enabled = atleastOneToolSelected; - } - - #endregion - - #region Event Handlers - - private void CurrentlySelectedExternalToolsOnCollectionUpdated(object sender, - CollectionUpdatedEventArgs - collectionUpdatedEventArgs) - { - UpdateEditorControls(); - } - - private void ExternalTools_FormClosed(object sender, FormClosedEventArgs e) - { - _externalAppsSaver.Save(Runtime.ExternalToolsService.ExternalTools); - _themeManager.ThemeChanged -= ApplyTheme; - _currentlySelectedExternalTools.CollectionUpdated -= CurrentlySelectedExternalToolsOnCollectionUpdated; - } - - private void NewTool_Click(object sender, EventArgs e) - { - try - { - var externalTool = new ExternalTool(Language.ExternalToolDefaultName); - Runtime.ExternalToolsService.ExternalTools.Add(externalTool); - UpdateToolsListObjView(); - ToolsListObjView.SelectedObject = externalTool; - DisplayNameTextBox.Focus(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.ExternalTools.NewTool_Click() failed.", ex); - } - } - - private void DeleteTool_Click(object sender, EventArgs e) - { - try - { - string message; - if (_currentlySelectedExternalTools.Count == 1) - message = string.Format(Language.ConfirmDeleteExternalTool, - _currentlySelectedExternalTools[0].DisplayName); - else if (_currentlySelectedExternalTools.Count > 1) - message = string.Format(Language.ConfirmDeleteExternalToolMultiple, - _currentlySelectedExternalTools.Count); - else - return; - - if (MessageBox.Show(FrmMain.Default, message, "Question?", MessageBoxButtons.YesNo, - MessageBoxIcon.Question) != DialogResult.Yes) - return; - - foreach (var externalTool in _currentlySelectedExternalTools) - { - Runtime.ExternalToolsService.ExternalTools.Remove(externalTool); - } - - var firstDeletedNode = _currentlySelectedExternalTools.FirstOrDefault(); - var oldSelectedIndex = ToolsListObjView.IndexOf(firstDeletedNode); - _currentlySelectedExternalTools.Clear(); - UpdateToolsListObjView(); - - var maxIndex = ToolsListObjView.GetItemCount() - 1; - ToolsListObjView.SelectedIndex = oldSelectedIndex <= maxIndex - ? oldSelectedIndex - : maxIndex; - - UpdateToolstipControls(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.ExternalTools.DeleteTool_Click() failed.", ex); - } - } - - private void LaunchTool_Click(object sender, EventArgs e) - { - LaunchTool(); - } - - private void ToolsListObjView_SelectedIndexChanged(object sender, EventArgs e) - { - try - { - UpdateToolstipControls(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage( - "UI.Window.ExternalTools.ToolsListObjView_SelectedIndexChanged() failed.", - ex); - } - } - - private void ToolsListObjView_DoubleClick(object sender, EventArgs e) - { - if (ToolsListObjView.SelectedItems.Count > 0) - { - LaunchTool(); - } - } - - private void PropertyControl_ChangedOrLostFocus(object sender, EventArgs e) - { - var selectedTool = _currentlySelectedExternalTools.FirstOrDefault(); - if (selectedTool == null) - return; - - try - { - selectedTool.DisplayName = DisplayNameTextBox.Text; - selectedTool.FileName = FilenameTextBox.Text; - selectedTool.Arguments = ArgumentsCheckBox.Text; - selectedTool.WorkingDir = WorkingDirTextBox.Text; - selectedTool.WaitForExit = WaitForExitCheckBox.Checked; - selectedTool.TryIntegrate = TryToIntegrateCheckBox.Checked; - selectedTool.ShowOnToolbar = ShowOnToolbarCheckBox.Checked; - selectedTool.RunElevated = RunElevatedCheckBox.Checked; - - UpdateToolsListObjView(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage( - "UI.Window.ExternalTools.PropertyControl_ChangedOrLostFocus() failed.", - ex); - } - } - - private void BrowseButton_Click(object sender, EventArgs e) - { - try - { - using (var browseDialog = new OpenFileDialog()) - { - browseDialog.Filter = string.Join("|", Language.FilterApplication, "*.exe", - Language.FilterAll, "*.*"); - if (browseDialog.ShowDialog() != DialogResult.OK) - return; - var selectedItem = _currentlySelectedExternalTools.FirstOrDefault(); - if (selectedItem == null) - return; - selectedItem.FileName = browseDialog.FileName; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.ExternalTools.BrowseButton_Click() failed.", - ex); - } - } - - private void BrowseWorkingDir_Click(object sender, EventArgs e) - { - try - { - using (var browseDialog = new FolderBrowserDialog()) - { - if (browseDialog.ShowDialog() != DialogResult.OK) - return; - var selectedItem = _currentlySelectedExternalTools.FirstOrDefault(); - if (selectedItem == null) - return; - selectedItem.WorkingDir = browseDialog.SelectedPath; - } - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("UI.Window.ExternalTools.BrowseButton_Click() failed.", - ex); - } - } - - private void ToolsListObjView_CellToolTipShowing(object sender, ToolTipShowingEventArgs e) - { - if (e.Column != WaitForExitColumnHeader) - return; - - if (!(e.Model is ExternalTool rowItemAsExternalTool) || !rowItemAsExternalTool.TryIntegrate) - return; - - e.Text = - $"'{Language.WaitForExit}' cannot be enabled if '{Language.TryToIntegrate}' is enabled"; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/PortScanWindow.Designer.cs b/mRemoteNG/UI/Window/PortScanWindow.Designer.cs deleted file mode 100644 index 6c44539da..000000000 --- a/mRemoteNG/UI/Window/PortScanWindow.Designer.cs +++ /dev/null @@ -1,535 +0,0 @@ - -using mRemoteNG.Themes; -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Window -{ - public partial class PortScanWindow : BaseWindow - { - #region Windows Form Designer generated code - - internal Controls.MrngLabel lblEndIP; - internal Controls.MrngLabel lblStartIP; - internal MrngIpTextBox ipEnd; - internal Controls.MrngListView olvHosts; - internal BrightIdeasSoftware.OLVColumn clmHost; - internal BrightIdeasSoftware.OLVColumn clmSSH; - internal BrightIdeasSoftware.OLVColumn clmTelnet; - internal BrightIdeasSoftware.OLVColumn clmHTTP; - internal BrightIdeasSoftware.OLVColumn clmHTTPS; - internal BrightIdeasSoftware.OLVColumn clmRlogin; - internal BrightIdeasSoftware.OLVColumn clmRDP; - internal BrightIdeasSoftware.OLVColumn clmVNC; - internal BrightIdeasSoftware.OLVColumn clmOpenPorts; - internal BrightIdeasSoftware.OLVColumn clmClosedPorts; - internal Controls.MrngProgressBar prgBar; - internal Controls.MrngLabel lblOnlyImport; - internal MrngComboBox cbProtocol; - internal Controls.MrngNumericUpDown portEnd; - internal Controls.MrngNumericUpDown portStart; - internal MrngButton btnImport; - internal MrngIpTextBox ipStart; - - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PortScanWindow)); - this.ipStart = new mRemoteNG.UI.Controls.MrngIpTextBox(); - this.ipEnd = new mRemoteNG.UI.Controls.MrngIpTextBox(); - this.lblStartIP = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblEndIP = new mRemoteNG.UI.Controls.MrngLabel(); - this.olvHosts = new mRemoteNG.UI.Controls.MrngListView(); - this.resultsMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); - this.importHTTPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importHTTPSToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importRDPToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importRloginToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importSSH2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importTelnetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.importVNCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.btnImport = new MrngButton(); - this.cbProtocol = new MrngComboBox(); - this.lblOnlyImport = new mRemoteNG.UI.Controls.MrngLabel(); - this.clmHost = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmSSH = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmTelnet = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmHTTP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmHTTPS = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmRlogin = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmRDP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmVNC = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmOpenPorts = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.clmClosedPorts = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); - this.prgBar = new mRemoteNG.UI.Controls.MrngProgressBar(); - this.numericSelectorTimeout = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.lblTimeout = new System.Windows.Forms.Label(); - this.portEnd = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.portStart = new mRemoteNG.UI.Controls.MrngNumericUpDown(); - this.pnlIp = new System.Windows.Forms.TableLayoutPanel(); - this.btnScan = new MrngButton(); - this.ngCheckFirstPort = new MrngCheckBox(); - this.ngCheckLastPort = new MrngCheckBox(); - this.pnlImport = new System.Windows.Forms.TableLayoutPanel(); - this.pnlMain = new System.Windows.Forms.TableLayoutPanel(); - this.portScanToolTip = new System.Windows.Forms.ToolTip(this.components); - ((System.ComponentModel.ISupportInitialize)(this.olvHosts)).BeginInit(); - this.resultsMenuStrip.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericSelectorTimeout)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.portEnd)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.portStart)).BeginInit(); - this.pnlIp.SuspendLayout(); - this.pnlImport.SuspendLayout(); - this.pnlMain.SuspendLayout(); - this.SuspendLayout(); - // - // ipStart - // - this.ipStart.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ipStart.Location = new System.Drawing.Point(133, 3); - this.ipStart.Name = "ipStart"; - this.ipStart.Size = new System.Drawing.Size(124, 18); - this.ipStart.TabIndex = 1; - this.ipStart.ToolTipText = ""; - // - // ipEnd - // - this.ipEnd.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ipEnd.Location = new System.Drawing.Point(133, 27); - this.ipEnd.Name = "ipEnd"; - this.ipEnd.Size = new System.Drawing.Size(124, 18); - this.ipEnd.TabIndex = 2; - this.ipEnd.ToolTipText = ""; - // - // lblStartIP - // - this.lblStartIP.AutoSize = true; - this.lblStartIP.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblStartIP.Location = new System.Drawing.Point(3, 0); - this.lblStartIP.Name = "lblStartIP"; - this.lblStartIP.Size = new System.Drawing.Size(124, 24); - this.lblStartIP.TabIndex = 0; - this.lblStartIP.Text = "First IP"; - this.lblStartIP.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // lblEndIP - // - this.lblEndIP.AutoSize = true; - this.lblEndIP.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblEndIP.Location = new System.Drawing.Point(3, 24); - this.lblEndIP.Name = "lblEndIP"; - this.lblEndIP.Size = new System.Drawing.Size(124, 24); - this.lblEndIP.TabIndex = 5; - this.lblEndIP.Text = "Last IP"; - this.lblEndIP.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // olvHosts - // - this.olvHosts.CellEditUseWholeCell = false; - this.olvHosts.ContextMenuStrip = this.resultsMenuStrip; - this.olvHosts.Cursor = System.Windows.Forms.Cursors.Default; - this.olvHosts.DecorateLines = true; - this.olvHosts.Dock = System.Windows.Forms.DockStyle.Fill; - this.olvHosts.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.olvHosts.FullRowSelect = true; - this.olvHosts.GridLines = true; - this.olvHosts.HideSelection = false; - this.olvHosts.Location = new System.Drawing.Point(3, 168); - this.olvHosts.Name = "olvHosts"; - this.olvHosts.ShowGroups = false; - this.olvHosts.Size = new System.Drawing.Size(878, 230); - this.olvHosts.TabIndex = 26; - this.olvHosts.UseCompatibleStateImageBehavior = false; - this.olvHosts.View = System.Windows.Forms.View.Details; - // - // resultsMenuStrip - // - this.resultsMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.importHTTPToolStripMenuItem, - this.importHTTPSToolStripMenuItem, - this.importRDPToolStripMenuItem, - this.importRloginToolStripMenuItem, - this.importSSH2ToolStripMenuItem, - this.importTelnetToolStripMenuItem, - this.importVNCToolStripMenuItem}); - this.resultsMenuStrip.Name = "resultsMenuStrip"; - this.resultsMenuStrip.Size = new System.Drawing.Size(148, 158); - // - // importHTTPToolStripMenuItem - // - this.importHTTPToolStripMenuItem.Name = "importHTTPToolStripMenuItem"; - this.importHTTPToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.importHTTPToolStripMenuItem.Text = "Import HTTP"; - this.importHTTPToolStripMenuItem.Click += new System.EventHandler(this.importHTTPToolStripMenuItem_Click); - // - // importHTTPSToolStripMenuItem - // - this.importHTTPSToolStripMenuItem.Name = "importHTTPSToolStripMenuItem"; - this.importHTTPSToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.importHTTPSToolStripMenuItem.Text = "Import HTTPS"; - this.importHTTPSToolStripMenuItem.Click += new System.EventHandler(this.importHTTPSToolStripMenuItem_Click); - // - // importRDPToolStripMenuItem - // - this.importRDPToolStripMenuItem.Name = "importRDPToolStripMenuItem"; - this.importRDPToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.importRDPToolStripMenuItem.Text = "Import RDP"; - this.importRDPToolStripMenuItem.Click += new System.EventHandler(this.importRDPToolStripMenuItem_Click); - // - // importRloginToolStripMenuItem - // - this.importRloginToolStripMenuItem.Name = "importRloginToolStripMenuItem"; - this.importRloginToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.importRloginToolStripMenuItem.Text = "Import Rlogin"; - this.importRloginToolStripMenuItem.Click += new System.EventHandler(this.importRloginToolStripMenuItem_Click); - // - // importSSH2ToolStripMenuItem - // - this.importSSH2ToolStripMenuItem.Name = "importSSH2ToolStripMenuItem"; - this.importSSH2ToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.importSSH2ToolStripMenuItem.Text = "Import SSH2"; - this.importSSH2ToolStripMenuItem.Click += new System.EventHandler(this.importSSH2ToolStripMenuItem_Click); - // - // importTelnetToolStripMenuItem - // - this.importTelnetToolStripMenuItem.Name = "importTelnetToolStripMenuItem"; - this.importTelnetToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.importTelnetToolStripMenuItem.Text = "Import Telnet"; - this.importTelnetToolStripMenuItem.Click += new System.EventHandler(this.importTelnetToolStripMenuItem_Click); - // - // importVNCToolStripMenuItem - // - this.importVNCToolStripMenuItem.Name = "importVNCToolStripMenuItem"; - this.importVNCToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.importVNCToolStripMenuItem.Text = "Import VNC"; - this.importVNCToolStripMenuItem.Click += new System.EventHandler(this.importVNCToolStripMenuItem_Click); - // - // btnImport - // - this.btnImport._mice = MrngButton.MouseState.OUT; - this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnImport.Location = new System.Drawing.Point(765, 27); - this.btnImport.Name = "btnImport"; - this.btnImport.Size = new System.Drawing.Size(110, 24); - this.btnImport.TabIndex = 8; - this.btnImport.Text = "&Import"; - this.btnImport.UseVisualStyleBackColor = true; - this.btnImport.Click += new System.EventHandler(this.btnImport_Click); - // - // cbProtocol - // - this.cbProtocol._mice = MrngComboBox.MouseState.HOVER; - this.cbProtocol.Dock = System.Windows.Forms.DockStyle.Fill; - this.cbProtocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbProtocol.FormattingEnabled = true; - this.cbProtocol.Items.AddRange(new object[] { - "SSH2", - "Telnet", - "HTTP", - "HTTPS", - "Rlogin", - "RDP", - "VNC"}); - this.cbProtocol.Location = new System.Drawing.Point(3, 27); - this.cbProtocol.Name = "cbProtocol"; - this.cbProtocol.Size = new System.Drawing.Size(144, 21); - this.cbProtocol.TabIndex = 7; - // - // lblOnlyImport - // - this.lblOnlyImport.AutoSize = true; - this.lblOnlyImport.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblOnlyImport.Location = new System.Drawing.Point(3, 0); - this.lblOnlyImport.Name = "lblOnlyImport"; - this.lblOnlyImport.Size = new System.Drawing.Size(144, 24); - this.lblOnlyImport.TabIndex = 1; - this.lblOnlyImport.Text = "Protocol to import"; - this.lblOnlyImport.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // clmHost - // - this.clmHost.AspectName = "HostIPorName"; - this.clmHost.FillsFreeSpace = true; - this.clmHost.Text = "Hostname/IP"; - this.clmHost.Width = 130; - // - // clmSSH - // - this.clmSSH.AspectName = "SshName"; - this.clmSSH.Text = "SSH"; - this.clmSSH.Width = 50; - // - // clmTelnet - // - this.clmTelnet.AspectName = "TelnetName"; - this.clmTelnet.Text = "Telnet"; - this.clmTelnet.Width = 50; - // - // clmHTTP - // - this.clmHTTP.AspectName = "HttpName"; - this.clmHTTP.Text = "HTTP"; - this.clmHTTP.Width = 50; - // - // clmHTTPS - // - this.clmHTTPS.AspectName = "HttpsName"; - this.clmHTTPS.Text = "HTTPS"; - this.clmHTTPS.Width = 50; - // - // clmRlogin - // - this.clmRlogin.AspectName = "RloginName"; - this.clmRlogin.Text = "Rlogin"; - this.clmRlogin.Width = 50; - // - // clmRDP - // - this.clmRDP.AspectName = "RdpName"; - this.clmRDP.Text = "RDP"; - this.clmRDP.Width = 50; - // - // clmVNC - // - this.clmVNC.AspectName = "VncName"; - this.clmVNC.Text = "VNC"; - this.clmVNC.Width = 50; - // - // clmOpenPorts - // - this.clmOpenPorts.AspectName = "OpenPortsName"; - this.clmOpenPorts.FillsFreeSpace = true; - this.clmOpenPorts.Text = "Open Ports"; - this.clmOpenPorts.Width = 150; - // - // clmClosedPorts - // - this.clmClosedPorts.AspectName = "ClosedPortsName"; - this.clmClosedPorts.FillsFreeSpace = true; - this.clmClosedPorts.Text = "Closed Ports"; - this.clmClosedPorts.Width = 150; - // - // prgBar - // - this.prgBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.prgBar.Location = new System.Drawing.Point(3, 138); - this.prgBar.Name = "prgBar"; - this.prgBar.Size = new System.Drawing.Size(878, 24); - this.prgBar.Step = 1; - this.prgBar.TabIndex = 28; - // - // numericSelectorTimeout - // - this.numericSelectorTimeout.Location = new System.Drawing.Point(133, 99); - this.numericSelectorTimeout.Maximum = new decimal(new int[] { - 2147482, - 0, - 0, - 0}); - this.numericSelectorTimeout.Name = "numericSelectorTimeout"; - this.numericSelectorTimeout.Size = new System.Drawing.Size(67, 22); - this.numericSelectorTimeout.TabIndex = 5; - this.numericSelectorTimeout.Value = new decimal(new int[] { - 5, - 0, - 0, - 0}); - // - // lblTimeout - // - this.lblTimeout.AutoSize = true; - this.lblTimeout.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblTimeout.Location = new System.Drawing.Point(3, 96); - this.lblTimeout.Name = "lblTimeout"; - this.lblTimeout.Size = new System.Drawing.Size(124, 33); - this.lblTimeout.TabIndex = 16; - this.lblTimeout.Text = "Timeout [seconds]"; - this.lblTimeout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // portEnd - // - this.portEnd.Enabled = false; - this.portEnd.Location = new System.Drawing.Point(133, 75); - this.portEnd.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.portEnd.Name = "portEnd"; - this.portEnd.Size = new System.Drawing.Size(67, 22); - this.portEnd.TabIndex = 4; - this.portEnd.Value = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.portEnd.Enter += new System.EventHandler(this.portEnd_Enter); - // - // portStart - // - this.portStart.Enabled = false; - this.portStart.Location = new System.Drawing.Point(133, 51); - this.portStart.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.portStart.Name = "portStart"; - this.portStart.Size = new System.Drawing.Size(67, 22); - this.portStart.TabIndex = 3; - this.portStart.Enter += new System.EventHandler(this.portStart_Enter); - // - // pnlIp - // - this.pnlIp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlIp.ColumnCount = 3; - this.pnlIp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 130F)); - this.pnlIp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 130F)); - this.pnlIp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.pnlIp.Controls.Add(this.lblStartIP, 0, 0); - this.pnlIp.Controls.Add(this.ipEnd, 1, 1); - this.pnlIp.Controls.Add(this.ipStart, 1, 0); - this.pnlIp.Controls.Add(this.lblEndIP, 0, 1); - this.pnlIp.Controls.Add(this.portStart, 1, 2); - this.pnlIp.Controls.Add(this.portEnd, 1, 3); - this.pnlIp.Controls.Add(this.lblTimeout, 0, 4); - this.pnlIp.Controls.Add(this.numericSelectorTimeout, 1, 4); - this.pnlIp.Controls.Add(this.btnScan, 2, 4); - this.pnlIp.Controls.Add(this.ngCheckFirstPort, 0, 2); - this.pnlIp.Controls.Add(this.ngCheckLastPort, 0, 3); - this.pnlIp.Location = new System.Drawing.Point(3, 3); - this.pnlIp.Name = "pnlIp"; - this.pnlIp.RowCount = 5; - this.pnlIp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.pnlIp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.pnlIp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.pnlIp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.pnlIp.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.pnlIp.Size = new System.Drawing.Size(878, 129); - this.pnlIp.TabIndex = 103; - // - // btnScan - // - this.btnScan._mice = MrngButton.MouseState.OUT; - this.btnScan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnScan.Image = global::mRemoteNG.Properties.Resources.Search_16x; - this.btnScan.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnScan.Location = new System.Drawing.Point(765, 99); - this.btnScan.Name = "btnScan"; - this.btnScan.Size = new System.Drawing.Size(110, 24); - this.btnScan.TabIndex = 6; - this.btnScan.Text = "&Scan"; - this.btnScan.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.btnScan.UseVisualStyleBackColor = true; - this.btnScan.Click += new System.EventHandler(this.btnScan_Click); - // - // ngCheckFirstPort - // - this.ngCheckFirstPort._mice = MrngCheckBox.MouseState.OUT; - this.ngCheckFirstPort.AutoSize = true; - this.ngCheckFirstPort.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ngCheckFirstPort.Location = new System.Drawing.Point(3, 51); - this.ngCheckFirstPort.Name = "ngCheckFirstPort"; - this.ngCheckFirstPort.Size = new System.Drawing.Size(72, 17); - this.ngCheckFirstPort.TabIndex = 17; - this.ngCheckFirstPort.Text = "First Port"; - this.ngCheckFirstPort.UseVisualStyleBackColor = true; - this.ngCheckFirstPort.CheckedChanged += new System.EventHandler(this.NgCheckFirstPort_CheckedChanged); - // - // ngCheckLastPort - // - this.ngCheckLastPort._mice = MrngCheckBox.MouseState.OUT; - this.ngCheckLastPort.AutoSize = true; - this.ngCheckLastPort.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.ngCheckLastPort.Location = new System.Drawing.Point(3, 75); - this.ngCheckLastPort.Name = "ngCheckLastPort"; - this.ngCheckLastPort.Size = new System.Drawing.Size(70, 17); - this.ngCheckLastPort.TabIndex = 18; - this.ngCheckLastPort.Text = "Last Port"; - this.ngCheckLastPort.UseVisualStyleBackColor = true; - this.ngCheckLastPort.CheckedChanged += new System.EventHandler(this.NgCheckLastPort_CheckedChanged); - // - // pnlImport - // - this.pnlImport.ColumnCount = 2; - this.pnlImport.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 150F)); - this.pnlImport.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.pnlImport.Controls.Add(this.lblOnlyImport, 0, 0); - this.pnlImport.Controls.Add(this.cbProtocol, 0, 1); - this.pnlImport.Controls.Add(this.btnImport, 1, 1); - this.pnlImport.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlImport.Location = new System.Drawing.Point(3, 404); - this.pnlImport.Name = "pnlImport"; - this.pnlImport.RowCount = 2; - this.pnlImport.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.pnlImport.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); - this.pnlImport.Size = new System.Drawing.Size(878, 54); - this.pnlImport.TabIndex = 104; - // - // pnlMain - // - this.pnlMain.ColumnCount = 1; - this.pnlMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.pnlMain.Controls.Add(this.pnlIp, 0, 0); - this.pnlMain.Controls.Add(this.prgBar, 0, 1); - this.pnlMain.Controls.Add(this.pnlImport, 0, 3); - this.pnlMain.Controls.Add(this.olvHosts, 0, 2); - this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlMain.Location = new System.Drawing.Point(0, 0); - this.pnlMain.Name = "pnlMain"; - this.pnlMain.RowCount = 4; - this.pnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 135F)); - this.pnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.pnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.pnlMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F)); - this.pnlMain.Size = new System.Drawing.Size(884, 461); - this.pnlMain.TabIndex = 105; - // - // PortScanWindow - // - this.AcceptButton = this.btnImport; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.AutoScroll = true; - this.ClientSize = new System.Drawing.Size(884, 461); - this.Controls.Add(this.pnlMain); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "PortScanWindow"; - this.TabText = "Port Scan"; - this.Text = "Port Scan"; - this.Load += new System.EventHandler(this.PortScan_Load); - ((System.ComponentModel.ISupportInitialize)(this.olvHosts)).EndInit(); - this.resultsMenuStrip.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.numericSelectorTimeout)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.portEnd)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.portStart)).EndInit(); - this.pnlIp.ResumeLayout(false); - this.pnlIp.PerformLayout(); - this.pnlImport.ResumeLayout(false); - this.pnlImport.PerformLayout(); - this.pnlMain.ResumeLayout(false); - this.ResumeLayout(false); - - } - #endregion - - private System.Windows.Forms.ContextMenuStrip resultsMenuStrip; - private System.ComponentModel.IContainer components; - private System.Windows.Forms.ToolStripMenuItem importHTTPToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem importHTTPSToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem importRDPToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem importRloginToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem importSSH2ToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem importTelnetToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem importVNCToolStripMenuItem; - private System.Windows.Forms.Label lblTimeout; - private Controls.MrngNumericUpDown numericSelectorTimeout; - private System.Windows.Forms.TableLayoutPanel pnlIp; - private System.Windows.Forms.TableLayoutPanel pnlImport; - internal MrngButton btnScan; - private System.Windows.Forms.TableLayoutPanel pnlMain; - private MrngCheckBox ngCheckFirstPort; - private MrngCheckBox ngCheckLastPort; - private System.Windows.Forms.ToolTip portScanToolTip; - } -} diff --git a/mRemoteNG/UI/Window/PortScanWindow.cs b/mRemoteNG/UI/Window/PortScanWindow.cs deleted file mode 100644 index 27824807c..000000000 --- a/mRemoteNG/UI/Window/PortScanWindow.cs +++ /dev/null @@ -1,365 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Messages; -using mRemoteNG.Tools; -using mRemoteNG.Tree.Root; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Window -{ - public partial class PortScanWindow - { - #region Constructors - - public PortScanWindow() - { - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.SearchAndApps_16x); - WindowType = WindowType.PortScan; - DockPnl = new DockContent(); - ApplyTheme(); - var display = new DisplayProperties(); - btnScan.Image = display.ScaleImage(btnScan.Image); - } - - #endregion - - private new void ApplyTheme() - { - base.ApplyTheme(); - } - - #region Private Properties - - private bool IpsValid - { - get - { - if (string.IsNullOrEmpty(ipStart.Octet1.Text)) - { - return false; - } - - if (string.IsNullOrEmpty(ipStart.Octet2.Text)) - { - return false; - } - - if (string.IsNullOrEmpty(ipStart.Octet3.Text)) - { - return false; - } - - if (string.IsNullOrEmpty(ipStart.Octet4.Text)) - { - return false; - } - - if (string.IsNullOrEmpty(ipEnd.Octet1.Text)) - { - return false; - } - - if (string.IsNullOrEmpty(ipEnd.Octet2.Text)) - { - return false; - } - - if (string.IsNullOrEmpty(ipEnd.Octet3.Text)) - { - return false; - } - - if (string.IsNullOrEmpty(ipEnd.Octet4.Text)) - { - return false; - } - - return true; - } - } - - #endregion - - #region Private Fields - - private PortScanner _portScanner; - private bool _scanning; - - #endregion - - #region Private Methods - - #region Event Handlers - - private void PortScan_Load(object sender, EventArgs e) - { - ApplyLanguage(); - - try - { - olvHosts.Columns.AddRange(new ColumnHeader[] - { - clmHost, clmSSH, clmTelnet, clmHTTP, clmHTTPS, clmRlogin, clmRDP, clmVNC, clmOpenPorts, - clmClosedPorts - }); - ShowImportControls(true); - cbProtocol.SelectedIndex = 0; - numericSelectorTimeout.Value = 5; - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage(Language.PortScanCouldNotLoadPanel, ex); - } - } - - private void portStart_Enter(object sender, EventArgs e) - { - portStart.Select(0, portStart.Text.Length); - } - - private void portEnd_Enter(object sender, EventArgs e) - { - portEnd.Select(0, portEnd.Text.Length); - } - - private void btnScan_Click(object sender, EventArgs e) - { - if (_scanning) - { - StopScan(); - } - else - { - if (IpsValid) - { - StartScan(); - } - else - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, Language.CannotStartPortScan); - } - } - } - - private void btnImport_Click(object sender, EventArgs e) - { - var protocol = - (ProtocolType)Enum.Parse(typeof(ProtocolType), Convert.ToString(cbProtocol.SelectedItem), true); - importSelectedHosts(protocol); - } - - #endregion - - private void ApplyLanguage() - { - lblStartIP.Text = Language.FirstIp; - lblEndIP.Text = Language.LastIp; - btnScan.Text = Language._Scan; - btnImport.Text = Language._Import; - lblOnlyImport.Text = Language.ProtocolToImport; - clmHost.Text = Language.HostnameIp; - clmOpenPorts.Text = Language.OpenPorts; - clmClosedPorts.Text = Language.ClosedPorts; - ngCheckFirstPort.Text = Language.FirstPort; - ngCheckLastPort.Text = Language.LastPort; - lblTimeout.Text = Language.TimeoutInSeconds; - TabText = Language.PortScan; - Text = Language.PortScan; - } - - private void ShowImportControls(bool controlsVisible) - { - pnlImport.Visible = controlsVisible; - if (controlsVisible) - olvHosts.Height = pnlImport.Top - olvHosts.Top; - else - olvHosts.Height = pnlImport.Bottom - olvHosts.Top; - } - - private void StartScan() - { - try - { - _scanning = true; - SwitchButtonText(); - olvHosts.Items.Clear(); - - var ipAddressStart = IPAddress.Parse(ipStart.Text); - var ipAddressEnd = IPAddress.Parse(ipEnd.Text); - - if (!ngCheckFirstPort.Checked && !ngCheckLastPort.Checked) - _portScanner = new PortScanner(ipAddressStart, ipAddressEnd, (int)portStart.Value, - (int)portEnd.Value, (int)numericSelectorTimeout.Value * 1000, true); - else - _portScanner = new PortScanner(ipAddressStart, ipAddressEnd, (int)portStart.Value, - (int)portEnd.Value, (int)numericSelectorTimeout.Value * 1000); - - _portScanner.BeginHostScan += PortScanner_BeginHostScan; - _portScanner.HostScanned += PortScanner_HostScanned; - _portScanner.ScanComplete += PortScanner_ScanComplete; - - _portScanner.StartScan(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("StartScan failed (UI.Window.PortScan)", ex); - } - } - - private void StopScan() - { - _portScanner.BeginHostScan -= PortScanner_BeginHostScan; - _portScanner.HostScanned -= PortScanner_HostScanned; - _portScanner.ScanComplete -= PortScanner_ScanComplete; - - _portScanner?.StopScan(); - _scanning = false; - SwitchButtonText(); - } - - private void SwitchButtonText() - { - btnScan.Text = _scanning ? Language._Stop : Language._Scan; - - prgBar.Maximum = 100; - prgBar.Value = 0; - } - - private static void PortScanner_BeginHostScan(string host) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Scanning " + host, true); - } - - private delegate void PortScannerHostScannedDelegate(ScanHost host, int scannedCount, int totalCount); - - private void PortScanner_HostScanned(ScanHost host, int scannedCount, int totalCount) - { - if (InvokeRequired) - { - Invoke(new PortScannerHostScannedDelegate(PortScanner_HostScanned), - new object[] {host, scannedCount, totalCount}); - return; - } - - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Host scanned " + host.HostIp, true); - - olvHosts.AddObject(host); - prgBar.Maximum = totalCount; - prgBar.Value = scannedCount; - } - - private delegate void PortScannerScanComplete(List hosts); - - private void PortScanner_ScanComplete(List hosts) - { - if (InvokeRequired) - { - Invoke(new PortScannerScanComplete(PortScanner_ScanComplete), new object[] {hosts}); - return; - } - - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.PortScanComplete); - - _scanning = false; - SwitchButtonText(); - } - - #endregion - - private void importSelectedHosts(ProtocolType protocol) - { - var hosts = new List(); - foreach (ScanHost host in olvHosts.SelectedObjects) - { - hosts.Add(host); - } - - if (hosts.Count < 1) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "Could not import host(s) from port scan context menu"); - return; - } - - var destinationContainer = GetDestinationContainerForImportedHosts(); - Import.ImportFromPortScan(hosts, protocol, destinationContainer); - } - - /// - /// Determines where the imported hosts will be placed - /// in the connection tree. - /// - private ContainerInfo GetDestinationContainerForImportedHosts() - { - var selectedNode = Windows.TreeForm.SelectedNode - ?? Windows.TreeForm.ConnectionTree.ConnectionTreeModel.RootNodes.OfType() - .First(); - - // if a putty node is selected, place imported connections in the root connection node - if (selectedNode is RootPuttySessionsNodeInfo || selectedNode is PuttySessionInfo) - selectedNode = Windows.TreeForm.ConnectionTree.ConnectionTreeModel.RootNodes.OfType() - .First(); - - // if the selected node is a connection, use its parent container - var selectedTreeNodeAsContainer = selectedNode as ContainerInfo ?? selectedNode.Parent; - - return selectedTreeNodeAsContainer; - } - - private void importVNCToolStripMenuItem_Click(object sender, EventArgs e) - { - importSelectedHosts(ProtocolType.VNC); - } - - private void importTelnetToolStripMenuItem_Click(object sender, EventArgs e) - { - importSelectedHosts(ProtocolType.Telnet); - } - - private void importSSH2ToolStripMenuItem_Click(object sender, EventArgs e) - { - importSelectedHosts(ProtocolType.SSH2); - } - - private void importRloginToolStripMenuItem_Click(object sender, EventArgs e) - { - importSelectedHosts(ProtocolType.Rlogin); - } - - private void importRDPToolStripMenuItem_Click(object sender, EventArgs e) - { - importSelectedHosts(ProtocolType.RDP); - } - - private void importHTTPSToolStripMenuItem_Click(object sender, EventArgs e) - { - importSelectedHosts(ProtocolType.HTTPS); - } - - private void importHTTPToolStripMenuItem_Click(object sender, EventArgs e) - { - importSelectedHosts(ProtocolType.HTTP); - } - - private void NgCheckFirstPort_CheckedChanged(object sender, EventArgs e) - { - portStart.Enabled = ngCheckFirstPort.Checked; - } - - private void NgCheckLastPort_CheckedChanged(object sender, EventArgs e) - { - portEnd.Enabled = ngCheckLastPort.Checked; - - portEnd.Value = portEnd.Enabled ? 65535 : 0; - } - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/SSHTransferWindow.cs b/mRemoteNG/UI/Window/SSHTransferWindow.cs deleted file mode 100644 index b102bf350..000000000 --- a/mRemoteNG/UI/Window/SSHTransferWindow.cs +++ /dev/null @@ -1,613 +0,0 @@ -using mRemoteNG.App; -using System; -using System.IO; -using System.Threading; -using mRemoteNG.Tools; -using WeifenLuo.WinFormsUI.Docking; -using System.Windows.Forms; -using mRemoteNG.Messages; -using mRemoteNG.UI.Controls; -using mRemoteNG.UI.Forms; -using mRemoteNG.Resources.Language; - -namespace mRemoteNG.UI.Window -{ - public class SSHTransferWindow : BaseWindow - { - #region Form Init - - private MrngProgressBar pbStatus; - private MrngButton btnTransfer; - private MrngTextBox txtUser; - private MrngTextBox txtPassword; - private MrngTextBox txtHost; - private MrngTextBox txtPort; - private MrngLabel lblHost; - private MrngLabel lblPort; - private MrngLabel lblUser; - private MrngLabel lblPassword; - private MrngLabel lblProtocol; - private MrngRadioButton radProtSCP; - private MrngRadioButton radProtSFTP; - private MrngGroupBox grpConnection; - private MrngButton btnBrowse; - private MrngLabel lblRemoteFile; - private MrngTextBox txtRemoteFile; - private MrngTextBox txtLocalFile; - private MrngLabel lblLocalFile; - private MrngGroupBox grpFiles; - - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = - new System.ComponentModel.ComponentResourceManager(typeof(SSHTransferWindow)); - grpFiles = new MrngGroupBox(); - lblLocalFile = new MrngLabel(); - txtLocalFile = new MrngTextBox(); - btnTransfer = new MrngButton(); - txtRemoteFile = new MrngTextBox(); - lblRemoteFile = new MrngLabel(); - btnBrowse = new MrngButton(); - grpConnection = new MrngGroupBox(); - radProtSFTP = new MrngRadioButton(); - radProtSCP = new MrngRadioButton(); - lblProtocol = new MrngLabel(); - lblPassword = new MrngLabel(); - lblUser = new MrngLabel(); - lblPort = new MrngLabel(); - lblHost = new MrngLabel(); - txtPort = new MrngTextBox(); - txtHost = new MrngTextBox(); - txtPassword = new MrngTextBox(); - txtUser = new MrngTextBox(); - pbStatus = new MrngProgressBar(); - grpFiles.SuspendLayout(); - grpConnection.SuspendLayout(); - SuspendLayout(); - // - // grpFiles - // - grpFiles.Controls.Add(lblLocalFile); - grpFiles.Controls.Add(txtLocalFile); - grpFiles.Controls.Add(btnTransfer); - grpFiles.Controls.Add(txtRemoteFile); - grpFiles.Controls.Add(lblRemoteFile); - grpFiles.Controls.Add(btnBrowse); - grpFiles.FlatStyle = FlatStyle.Flat; - grpFiles.Location = new System.Drawing.Point(12, 172); - grpFiles.Name = "grpFiles"; - grpFiles.Size = new System.Drawing.Size(668, 175); - grpFiles.TabIndex = 2000; - grpFiles.TabStop = false; - grpFiles.Text = "Files"; - // - // lblLocalFile - // - lblLocalFile.AutoSize = true; - lblLocalFile.Location = new System.Drawing.Point(6, 30); - lblLocalFile.Name = "lblLocalFile"; - lblLocalFile.Size = new System.Drawing.Size(55, 13); - lblLocalFile.TabIndex = 10; - lblLocalFile.Text = "Local file:"; - // - // txtLocalFile - // - txtLocalFile.BorderStyle = BorderStyle.FixedSingle; - txtLocalFile.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - txtLocalFile.Location = new System.Drawing.Point(105, 28); - txtLocalFile.Name = "txtLocalFile"; - txtLocalFile.Size = new System.Drawing.Size(455, 22); - txtLocalFile.TabIndex = 20; - // - // btnTransfer - // - btnTransfer._mice = MrngButton.MouseState.HOVER; - btnTransfer.FlatStyle = FlatStyle.Flat; - btnTransfer.Image = Properties.Resources.SyncArrow_16x; - btnTransfer.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - btnTransfer.Location = new System.Drawing.Point(562, 145); - btnTransfer.Name = "btnTransfer"; - btnTransfer.Size = new System.Drawing.Size(100, 24); - btnTransfer.TabIndex = 10000; - btnTransfer.Text = "Transfer"; - btnTransfer.UseVisualStyleBackColor = true; - btnTransfer.Click += new EventHandler(btnTransfer_Click); - // - // txtRemoteFile - // - txtRemoteFile.BorderStyle = BorderStyle.FixedSingle; - txtRemoteFile.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - txtRemoteFile.Location = new System.Drawing.Point(105, 60); - txtRemoteFile.Name = "txtRemoteFile"; - txtRemoteFile.Size = new System.Drawing.Size(542, 22); - txtRemoteFile.TabIndex = 50; - // - // lblRemoteFile - // - lblRemoteFile.AutoSize = true; - lblRemoteFile.Location = new System.Drawing.Point(6, 67); - lblRemoteFile.Name = "lblRemoteFile"; - lblRemoteFile.Size = new System.Drawing.Size(68, 13); - lblRemoteFile.TabIndex = 40; - lblRemoteFile.Text = "Remote file:"; - // - // btnBrowse - // - btnBrowse._mice = MrngButton.MouseState.HOVER; - btnBrowse.FlatStyle = FlatStyle.Flat; - btnBrowse.Location = new System.Drawing.Point(566, 28); - btnBrowse.Name = "btnBrowse"; - btnBrowse.Size = new System.Drawing.Size(81, 22); - btnBrowse.TabIndex = 30; - btnBrowse.Text = "Browse"; - btnBrowse.UseVisualStyleBackColor = true; - btnBrowse.Click += new EventHandler(btnBrowse_Click); - // - // grpConnection - // - grpConnection.Controls.Add(radProtSFTP); - grpConnection.Controls.Add(radProtSCP); - grpConnection.Controls.Add(lblProtocol); - grpConnection.Controls.Add(lblPassword); - grpConnection.Controls.Add(lblUser); - grpConnection.Controls.Add(lblPort); - grpConnection.Controls.Add(lblHost); - grpConnection.Controls.Add(txtPort); - grpConnection.Controls.Add(txtHost); - grpConnection.Controls.Add(txtPassword); - grpConnection.Controls.Add(txtUser); - grpConnection.FlatStyle = FlatStyle.Flat; - grpConnection.Location = new System.Drawing.Point(12, 12); - grpConnection.Name = "grpConnection"; - grpConnection.Size = new System.Drawing.Size(668, 154); - grpConnection.TabIndex = 1000; - grpConnection.TabStop = false; - grpConnection.Text = "Connection"; - // - // radProtSFTP - // - radProtSFTP.AutoSize = true; - radProtSFTP.FlatStyle = FlatStyle.Flat; - radProtSFTP.Location = new System.Drawing.Point(164, 113); - radProtSFTP.Name = "radProtSFTP"; - radProtSFTP.Size = new System.Drawing.Size(47, 17); - radProtSFTP.TabIndex = 90; - radProtSFTP.Text = "SFTP"; - radProtSFTP.UseVisualStyleBackColor = true; - // - // radProtSCP - // - radProtSCP.AutoSize = true; - radProtSCP.Checked = true; - radProtSCP.FlatStyle = FlatStyle.Flat; - radProtSCP.Location = new System.Drawing.Point(105, 113); - radProtSCP.Name = "radProtSCP"; - radProtSCP.Size = new System.Drawing.Size(43, 17); - radProtSCP.TabIndex = 80; - radProtSCP.TabStop = true; - radProtSCP.Text = "SCP"; - radProtSCP.UseVisualStyleBackColor = true; - // - // lblProtocol - // - lblProtocol.AutoSize = true; - lblProtocol.Location = new System.Drawing.Point(6, 117); - lblProtocol.Name = "lblProtocol"; - lblProtocol.Size = new System.Drawing.Size(53, 13); - lblProtocol.TabIndex = 90; - lblProtocol.Text = "Protocol:"; - // - // lblPassword - // - lblPassword.AutoSize = true; - lblPassword.Location = new System.Drawing.Point(6, 88); - lblPassword.Name = "lblPassword"; - lblPassword.Size = new System.Drawing.Size(59, 13); - lblPassword.TabIndex = 70; - lblPassword.Text = "Password:"; - // - // lblUser - // - lblUser.AutoSize = true; - lblUser.Location = new System.Drawing.Point(6, 58); - lblUser.Name = "lblUser"; - lblUser.Size = new System.Drawing.Size(33, 13); - lblUser.TabIndex = 50; - lblUser.Text = "User:"; - // - // lblPort - // - lblPort.AutoSize = true; - lblPort.Location = new System.Drawing.Point(228, 115); - lblPort.Name = "lblPort"; - lblPort.Size = new System.Drawing.Size(31, 13); - lblPort.TabIndex = 30; - lblPort.Text = "Port:"; - // - // lblHost - // - lblHost.AutoSize = true; - lblHost.Location = new System.Drawing.Point(6, 27); - lblHost.Name = "lblHost"; - lblHost.Size = new System.Drawing.Size(34, 13); - lblHost.TabIndex = 10; - lblHost.Text = "Host:"; - // - // txtPort - // - txtPort.BorderStyle = BorderStyle.FixedSingle; - txtPort.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - txtPort.Location = new System.Drawing.Point(271, 110); - txtPort.Name = "txtPort"; - txtPort.Size = new System.Drawing.Size(30, 22); - txtPort.TabIndex = 100; - txtPort.Text = "22"; - txtPort.TextAlign = HorizontalAlignment.Center; - // - // txtHost - // - txtHost.BorderStyle = BorderStyle.FixedSingle; - txtHost.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - txtHost.Location = new System.Drawing.Point(105, 19); - txtHost.Name = "txtHost"; - txtHost.Size = new System.Drawing.Size(471, 22); - txtHost.TabIndex = 20; - // - // txtPassword - // - txtPassword.BorderStyle = BorderStyle.FixedSingle; - txtPassword.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - txtPassword.Location = new System.Drawing.Point(105, 81); - txtPassword.Name = "txtPassword"; - txtPassword.Size = new System.Drawing.Size(471, 22); - txtPassword.TabIndex = 60; - txtPassword.UseSystemPasswordChar = true; - // - // txtUser - // - txtUser.BorderStyle = BorderStyle.FixedSingle; - txtUser.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - txtUser.Location = new System.Drawing.Point(105, 51); - txtUser.Name = "txtUser"; - txtUser.Size = new System.Drawing.Size(471, 22); - txtUser.TabIndex = 40; - // - // pbStatus - // - pbStatus.Location = new System.Drawing.Point(12, 353); - pbStatus.Name = "pbStatus"; - pbStatus.Size = new System.Drawing.Size(668, 23); - pbStatus.Style = ProgressBarStyle.Continuous; - pbStatus.TabIndex = 3000; - // - // SSHTransferWindow - // - AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - AutoScaleMode = AutoScaleMode.Dpi; - ClientSize = new System.Drawing.Size(692, 423); - Controls.Add(grpFiles); - Controls.Add(grpConnection); - Controls.Add(pbStatus); - Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - Name = "SSHTransferWindow"; - TabText = "SSH File Transfer"; - Text = "SSH File Transfer"; - Load += new EventHandler(SSHTransfer_Load); - grpFiles.ResumeLayout(false); - grpFiles.PerformLayout(); - grpConnection.ResumeLayout(false); - grpConnection.PerformLayout(); - ResumeLayout(false); - } - - #endregion - - #region Private Properties - - private readonly OpenFileDialog oDlg; - - #endregion - - #region Public Properties - - public string Hostname - { - get => txtHost.Text; - set => txtHost.Text = value; - } - - public string Port - { - get => txtPort.Text; - set => txtPort.Text = value; - } - - public string Username - { - get => txtUser.Text; - set => txtUser.Text = value; - } - - public string Password - { - get => txtPassword.Text; - set => txtPassword.Text = value; - } - - #endregion - - #region Form Stuff - - private void SSHTransfer_Load(object sender, EventArgs e) - { - ApplyTheme(); - ApplyLanguage(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.SyncArrow_16x); - var display = new DisplayProperties(); - btnTransfer.Image = display.ScaleImage(btnTransfer.Image); - } - - private void ApplyLanguage() - { - grpFiles.Text = Language.Files; - lblLocalFile.Text = Language.LocalFile + ":"; - lblRemoteFile.Text = Language.RemoteFile + ":"; - btnBrowse.Text = Language._Browse; - grpConnection.Text = Language.Connection; - lblProtocol.Text = Language.Protocol; - lblPassword.Text = Language.Password; - lblUser.Text = Language.User + ":"; - lblPort.Text = Language.Port; - lblHost.Text = Language.Host + ":"; - btnTransfer.Text = Language.Transfer; - TabText = Language.Transfer; - Text = Language.Transfer; - } - - #endregion - - #region Private Methods - - private SecureTransfer st; - - private void StartTransfer(SecureTransfer.SSHTransferProtocol Protocol) - { - if (AllFieldsSet() == false) - { - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.PleaseFillAllFields); - return; - } - - if (File.Exists(txtLocalFile.Text) == false) - { - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, Language.LocalFileDoesNotExist); - return; - } - - try - { - st = new SecureTransfer(txtHost.Text, txtUser.Text, txtPassword.Text, int.Parse(txtPort.Text), Protocol, - txtLocalFile.Text, txtRemoteFile.Text); - - // Connect creates the protocol objects and makes the initial connection. - st.Connect(); - - switch (Protocol) - { - case SecureTransfer.SSHTransferProtocol.SCP: - st.ScpClt.Uploading += ScpClt_Uploading; - break; - case SecureTransfer.SSHTransferProtocol.SFTP: - st.asyncCallback = AsyncCallback; - break; - } - - var t = new Thread(StartTransferBG); - t.SetApartmentState(ApartmentState.STA); - t.IsBackground = true; - t.Start(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.SshTransferFailed, ex); - st?.Disconnect(); - st?.Dispose(); - } - } - - private void AsyncCallback(IAsyncResult ar) - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"SFTP AsyncCallback completed.", true); - } - - private void ScpClt_Uploading(object sender, Renci.SshNet.Common.ScpUploadEventArgs e) - { - // If the file size is over 2 gigs, convert to kb. This means we'll support a 2TB file. - var max = e.Size > int.MaxValue ? Convert.ToInt32(e.Size / 1024) : Convert.ToInt32(e.Size); - - // yes, compare to size since that's the total/original file size - var cur = e.Size > int.MaxValue ? Convert.ToInt32(e.Uploaded / 1024) : Convert.ToInt32(e.Uploaded); - - SshTransfer_Progress(cur, max); - } - - private void StartTransferBG() - { - try - { - DisableButtons(); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Transfer of {Path.GetFileName(st.SrcFile)} started.", true); - st.Upload(); - - // SftpClient is Asynchronous, so we need to wait here after the upload and handle the status directly since no status events are raised. - if (st.Protocol == SecureTransfer.SSHTransferProtocol.SFTP) - { - var fi = new FileInfo(st.SrcFile); - while (!st.asyncResult.IsCompleted) - { - var max = fi.Length > int.MaxValue - ? Convert.ToInt32(fi.Length / 1024) - : Convert.ToInt32(fi.Length); - - var cur = fi.Length > int.MaxValue - ? Convert.ToInt32(st.asyncResult.UploadedBytes / 1024) - : Convert.ToInt32(st.asyncResult.UploadedBytes); - SshTransfer_Progress(cur, max); - Thread.Sleep(50); - } - } - - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - $"Transfer of {Path.GetFileName(st.SrcFile)} completed.", true); - st.Disconnect(); - st.Dispose(); - EnableButtons(); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionStackTrace(Language.SshBackgroundTransferFailed, ex, - MessageClass.ErrorMsg, false); - st?.Disconnect(); - st?.Dispose(); - } - } - - private bool AllFieldsSet() - { - if (txtHost.Text != "" && txtPort.Text != "" && txtUser.Text != "" && txtLocalFile.Text != "" && - txtRemoteFile.Text != "") - { - if (txtPassword.Text == "") - { - if (MessageBox.Show(FrmMain.Default, Language.EmptyPasswordContinue, @"Question?", - MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) - { - return false; - } - } - - if (txtRemoteFile.Text.EndsWith("/") || txtRemoteFile.Text.EndsWith("\\")) - { - txtRemoteFile.Text += - txtLocalFile.Text.Substring(txtLocalFile.Text.LastIndexOf("\\", StringComparison.Ordinal) + 1); - } - - return true; - } - else - { - return false; - } - } - - - private int maxVal; - private int curVal; - - private delegate void SetStatusCB(); - - private void SetStatus() - { - if (pbStatus.InvokeRequired) - { - SetStatusCB d = SetStatus; - pbStatus.Invoke(d); - } - else - { - pbStatus.Maximum = maxVal; - pbStatus.Value = curVal; - } - } - - private delegate void EnableButtonsCB(); - - private void EnableButtons() - { - if (btnTransfer.InvokeRequired) - { - EnableButtonsCB d = EnableButtons; - btnTransfer.Invoke(d); - } - else - { - btnTransfer.Enabled = true; - } - } - - private delegate void DisableButtonsCB(); - - private void DisableButtons() - { - if (btnTransfer.InvokeRequired) - { - DisableButtonsCB d = DisableButtons; - btnTransfer.Invoke(d); - } - else - { - btnTransfer.Enabled = false; - } - } - - private void SshTransfer_Progress(int transferredBytes, int totalBytes) - { - maxVal = totalBytes; - curVal = transferredBytes; - - SetStatus(); - } - - #endregion - - #region Public Methods - - public SSHTransferWindow() - { - WindowType = WindowType.SSHTransfer; - DockPnl = new DockContent(); - InitializeComponent(); - - oDlg = new OpenFileDialog - { - Filter = @"All Files (*.*)|*.*", - CheckFileExists = true - }; - } - - #endregion - - #region Form Stuff - - private void btnBrowse_Click(object sender, EventArgs e) - { - if (oDlg.ShowDialog() != DialogResult.OK) return; - if (oDlg.FileName != "") - { - txtLocalFile.Text = oDlg.FileName; - } - } - - private void btnTransfer_Click(object sender, EventArgs e) - { - if (radProtSCP.Checked) - { - StartTransfer(SecureTransfer.SSHTransferProtocol.SCP); - } - else if (radProtSFTP.Checked) - { - StartTransfer(SecureTransfer.SSHTransferProtocol.SFTP); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/SSHTransferWindow.resx b/mRemoteNG/UI/Window/SSHTransferWindow.resx deleted file mode 100644 index c94db5950..000000000 --- a/mRemoteNG/UI/Window/SSHTransferWindow.resx +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATQxa4Ej8TBgAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZTBw4FkgZ9xRE - FtkAAAAAAAAAAAAAAABElUz/QJBI/zyKQ/84hD//NH86/zB6NsYtczJAJ2IskCNdKNggVyT/NWw5/2Kb - Zv9GfEr/FEQXzwAAAAAAAAAASZxR/4jKj/+FyIz/gsWJ/3/Dhv9iqWj/NXg7/1yXYf+EvYr/k86Y/5HM - lv+Py5P/jcqR/0d9Sv8VRRfEAAAAAE2iVv+NzJT/isuR/4bJjv+Dx4r/cLN2/0yNU/+b0qH/l8+d/5fP - nP+Vzpr/ksyX/5DMlf9KgU7/GEobyQAAAABSqFv/TqNX/0qeU/9JmlL/Yqxq/1SbXP97tYL/n9Sl/3y2 - g/9NilL/KWYu/1ONWf9RiVX/HlUi0QAAAAAAAAAAAAAAAAAAAAAAAAAAS59UDEeZT4VCjUv/n9Om/6HU - p/81eTz8MXM4SwAAAAApZy/9JmEr3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEudVQxImFGFcrJ6/6na - sP94tYD/OoVC/DiEP0sAAAAAL3E1/S11MtwAAAAAAAAAAAAAAABWr2L/VKxf/1GoXP9Upl7/eruD/6bX - rv+s3LP/VJtc/2uwcv9SnVr/OYVA/1ScWv9QmFf/LXYz0QAAAAAAAAAAWLNk/7jjv/+24r7/teG9/7Pg - u/+y37n/mc+i/0+cWP+NzZX/i8uT/4jKj/+FyIz/gsWJ/1KZWP8udzTJAAAAAFm0Zf+548H/uOPA/7fi - v/+24b3/kMuY/2Subf9grGn/iMmQ/4/PmP+NzJT/isuR/4bJjv9Wnl3/M305xAAAAABZtGX/WbRl/1m0 - Zf9XsWP/Va5h/1OqXsZRp1xAU6lckE+kWNhLn1T/V6Vf/3K3ev9ep2b/O4lCzwAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEygVThIm1D3RJVM2QAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAATaFWuEmcUQYAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAA//+cQf/nnEH/x5xBAAOcQQABnEEAAZxBAAOcQeAnnEHgJ5xBAAOcQQABnEEAAZxBAAOcQf/H - nEH/55xB//+cQQ== - - - \ No newline at end of file diff --git a/mRemoteNG/UI/Window/UltraVNCWindow.cs b/mRemoteNG/UI/Window/UltraVNCWindow.cs deleted file mode 100644 index e6d829d5c..000000000 --- a/mRemoteNG/UI/Window/UltraVNCWindow.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using mRemoteNG.App; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; - - -namespace mRemoteNG.UI.Window -{ - public class UltraVNCWindow : BaseWindow - { - #region Form Init - - internal System.Windows.Forms.ToolStrip tsMain; - internal System.Windows.Forms.Panel pnlContainer; - internal System.Windows.Forms.ToolStripButton btnDisconnect; - - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = - new System.ComponentModel.ComponentResourceManager(typeof(UltraVNCWindow)); - this.tsMain = new System.Windows.Forms.ToolStrip(); - this.btnDisconnect = new System.Windows.Forms.ToolStripButton(); - this.pnlContainer = new System.Windows.Forms.Panel(); - this.tsMain.SuspendLayout(); - this.SuspendLayout(); - // - // tsMain - // - this.tsMain.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.tsMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] - { - this.btnDisconnect - }); - this.tsMain.Location = new System.Drawing.Point(0, 0); - this.tsMain.Name = "tsMain"; - this.tsMain.Size = new System.Drawing.Size(446, 25); - this.tsMain.TabIndex = 0; - this.tsMain.Text = "ToolStrip1"; - // - // btnDisconnect - // - this.btnDisconnect.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.btnDisconnect.Image = ((System.Drawing.Image)(resources.GetObject("btnDisconnect.Image"))); - this.btnDisconnect.ImageTransparentColor = System.Drawing.Color.Magenta; - this.btnDisconnect.Name = "btnDisconnect"; - this.btnDisconnect.Size = new System.Drawing.Size(70, 22); - this.btnDisconnect.Text = "Disconnect"; - this.btnDisconnect.Click += new System.EventHandler(this.btnDisconnect_Click); - // - // pnlContainer - // - this.pnlContainer.Anchor = - ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlContainer.Location = new System.Drawing.Point(0, 27); - this.pnlContainer.Name = "pnlContainer"; - this.pnlContainer.Size = new System.Drawing.Size(446, 335); - this.pnlContainer.TabIndex = 1; - // - // UltraVNCWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(446, 362); - this.Controls.Add(this.pnlContainer); - this.Controls.Add(this.tsMain); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "UltraVNCWindow"; - this.TabText = "UltraVNC SC"; - this.Text = "UltraVNC SC"; - this.Load += new System.EventHandler(this.UltraVNCSC_Load); - this.tsMain.ResumeLayout(false); - this.tsMain.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - } - - #endregion - - #region Declarations - - //Private WithEvents vnc As AxCSC_ViewerXControl - - #endregion - - #region Public Methods - - public UltraVNCWindow() - { - this.WindowType = WindowType.UltraVNCSC; - this.DockPnl = new DockContent(); - this.InitializeComponent(); - } - - #endregion - - #region Private Methods - - private void UltraVNCSC_Load(object sender, System.EventArgs e) - { - ApplyLanguage(); - - StartListening(); - } - - private void ApplyLanguage() - { - btnDisconnect.Text = Language.Disconnect; - } - - private void StartListening() - { - try - { - //If vnc IsNot Nothing Then - // vnc.Dispose() - // vnc = Nothing - //End If - - //vnc = New AxCSC_ViewerXControl() - //SetupLicense() - - //vnc.Parent = pnlContainer - //vnc.Dock = DockStyle.Fill - //vnc.Show() - - //vnc.StretchMode = ViewerX.ScreenStretchMode.SSM_ASPECT - //vnc.ListeningText = Language.InheritListeningForIncomingVNCConnections & " " & Settings.UVNCSCPort - - //vnc.ListenEx(Settings.UVNCSCPort) - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, - "StartListening (UI.Window.UltraVNCSC) failed" + - Environment.NewLine + ex.Message); - Close(); - } - } - -#if false - private void SetupLicense() - { - try - { - //Dim f As System.Reflection.FieldInfo - //f = GetType(AxHost).GetField("licenseKey", Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.Instance) - //f.SetValue(vnc, "{072169039103041044176252035252117103057101225235137221179204110241121074}") - } - catch (Exception ex) - { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "VNC SetupLicense failed (UI.Window.UltraVNCSC)" + Environment.NewLine + ex.Message, true); - } - } -#endif - - //Private Sub vnc_ConnectionAccepted(ByVal sender As Object, ByVal e As AxViewerX._ISmartCodeVNCViewerEvents_ConnectionAcceptedEvent) Handles vnc.ConnectionAccepted - // mC.AddMessage(Messages.MessageClass.InformationMsg, e.bstrServerAddress & " is now connected to your UltraVNC SingleClick panel!") - //End Sub - - //Private Sub vnc_Disconnected(ByVal sender As Object, ByVal e As System.EventArgs) Handles vnc.Disconnected - // StartListening() - //End Sub - - private void btnDisconnect_Click(object sender, EventArgs e) - { - //vnc.Dispose() - Dispose(); - Windows.Show(WindowType.UltraVNCSC); - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/UltraVNCWindow.resx b/mRemoteNG/UI/Window/UltraVNCWindow.resx deleted file mode 100644 index 6ee44eda4..000000000 --- a/mRemoteNG/UI/Window/UltraVNCWindow.resx +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 18, 14 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG - YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 - 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw - bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc - VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 - c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 - Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo - mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ - kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D - TgDQASA1MVpwzwAAAABJRU5ErkJggg== - - - - 53 - - \ No newline at end of file diff --git a/mRemoteNG/UI/Window/UpdateWindow.Designer.cs b/mRemoteNG/UI/Window/UpdateWindow.Designer.cs deleted file mode 100644 index e19c49175..000000000 --- a/mRemoteNG/UI/Window/UpdateWindow.Designer.cs +++ /dev/null @@ -1,222 +0,0 @@ - - -using mRemoteNG.UI.Controls; - -namespace mRemoteNG.UI.Window -{ - public partial class UpdateWindow - { - #region Windows Form Designer generated code - internal Controls.MrngLabel lblStatus; - internal Controls.MrngTextBox txtChangeLog; - internal Controls.MrngLabel lblChangeLogLabel; - internal Controls.MrngLabel lblLatestVersionLabel; - internal Controls.MrngLabel lblInstalledVersionLabel; - internal Controls.MrngLabel lblLatestVersion; - internal Controls.MrngLabel lblInstalledVersion; - internal System.Windows.Forms.PictureBox pbUpdateImage; - internal MrngButton btnCheckForUpdate; - - private void InitializeComponent() - { - this.btnCheckForUpdate = new MrngButton(); - this.lblChangeLogLabel = new mRemoteNG.UI.Controls.MrngLabel(); - this.txtChangeLog = new mRemoteNG.UI.Controls.MrngTextBox(); - this.lblStatus = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblLatestVersionLabel = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblInstalledVersionLabel = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblLatestVersion = new mRemoteNG.UI.Controls.MrngLabel(); - this.lblInstalledVersion = new mRemoteNG.UI.Controls.MrngLabel(); - this.pbUpdateImage = new System.Windows.Forms.PictureBox(); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.prgbDownload = new mRemoteNG.UI.Controls.MrngProgressBar(); - this.btnDownload = new MrngButton(); - ((System.ComponentModel.ISupportInitialize)(this.pbUpdateImage)).BeginInit(); - this.tableLayoutPanel1.SuspendLayout(); - this.SuspendLayout(); - // - // btnCheckForUpdate - // - this.btnCheckForUpdate._mice = MrngButton.MouseState.HOVER; - this.btnCheckForUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCheckForUpdate.Location = new System.Drawing.Point(3, 94); - this.btnCheckForUpdate.Name = "btnCheckForUpdate"; - this.btnCheckForUpdate.Size = new System.Drawing.Size(104, 32); - this.btnCheckForUpdate.TabIndex = 5; - this.btnCheckForUpdate.Text = "Check Again"; - this.btnCheckForUpdate.UseVisualStyleBackColor = true; - this.btnCheckForUpdate.Click += new System.EventHandler(this.btnCheckForUpdate_Click); - // - // lblChangeLogLabel - // - this.lblChangeLogLabel.AutoSize = true; - this.lblChangeLogLabel.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblChangeLogLabel.Location = new System.Drawing.Point(3, 129); - this.lblChangeLogLabel.Name = "lblChangeLogLabel"; - this.lblChangeLogLabel.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0); - this.lblChangeLogLabel.Size = new System.Drawing.Size(73, 23); - this.lblChangeLogLabel.TabIndex = 0; - this.lblChangeLogLabel.Text = "Change Log:"; - // - // txtChangeLog - // - this.tableLayoutPanel1.SetColumnSpan(this.txtChangeLog, 3); - this.txtChangeLog.Cursor = System.Windows.Forms.Cursors.Arrow; - this.txtChangeLog.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtChangeLog.Location = new System.Drawing.Point(3, 155); - this.txtChangeLog.Multiline = true; - this.txtChangeLog.Name = "txtChangeLog"; - this.txtChangeLog.ReadOnly = true; - this.txtChangeLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtChangeLog.Size = new System.Drawing.Size(728, 225); - this.txtChangeLog.TabIndex = 1; - this.txtChangeLog.TabStop = false; - // - // lblStatus - // - this.lblStatus.AutoSize = true; - this.tableLayoutPanel1.SetColumnSpan(this.lblStatus, 3); - this.lblStatus.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblStatus.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblStatus.Location = new System.Drawing.Point(3, 0); - this.lblStatus.Name = "lblStatus"; - this.lblStatus.Padding = new System.Windows.Forms.Padding(0, 10, 0, 0); - this.lblStatus.Size = new System.Drawing.Size(57, 31); - this.lblStatus.TabIndex = 0; - this.lblStatus.Text = "Status"; - this.lblStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // lblLatestVersionLabel - // - this.lblLatestVersionLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.lblLatestVersionLabel.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblLatestVersionLabel.Location = new System.Drawing.Point(3, 61); - this.lblLatestVersionLabel.Name = "lblLatestVersionLabel"; - this.lblLatestVersionLabel.Size = new System.Drawing.Size(120, 30); - this.lblLatestVersionLabel.TabIndex = 3; - this.lblLatestVersionLabel.Text = "Current version:"; - this.lblLatestVersionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // lblInstalledVersionLabel - // - this.lblInstalledVersionLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.lblInstalledVersionLabel.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblInstalledVersionLabel.Location = new System.Drawing.Point(3, 31); - this.lblInstalledVersionLabel.Name = "lblInstalledVersionLabel"; - this.lblInstalledVersionLabel.Size = new System.Drawing.Size(120, 30); - this.lblInstalledVersionLabel.TabIndex = 1; - this.lblInstalledVersionLabel.Text = "Installed version:"; - this.lblInstalledVersionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // lblLatestVersion - // - this.lblLatestVersion.Dock = System.Windows.Forms.DockStyle.Left; - this.lblLatestVersion.Location = new System.Drawing.Point(129, 61); - this.lblLatestVersion.Name = "lblLatestVersion"; - this.lblLatestVersion.Size = new System.Drawing.Size(104, 30); - this.lblLatestVersion.TabIndex = 4; - this.lblLatestVersion.Text = "Version"; - this.lblLatestVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // lblInstalledVersion - // - this.lblInstalledVersion.Dock = System.Windows.Forms.DockStyle.Left; - this.lblInstalledVersion.Location = new System.Drawing.Point(129, 31); - this.lblInstalledVersion.Name = "lblInstalledVersion"; - this.lblInstalledVersion.Size = new System.Drawing.Size(104, 30); - this.lblInstalledVersion.TabIndex = 2; - this.lblInstalledVersion.Text = "Version"; - this.lblInstalledVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; - // - // pbUpdateImage - // - this.pbUpdateImage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pbUpdateImage.Cursor = System.Windows.Forms.Cursors.Hand; - this.pbUpdateImage.Dock = System.Windows.Forms.DockStyle.Fill; - this.pbUpdateImage.Location = new System.Drawing.Point(239, 34); - this.pbUpdateImage.Name = "pbUpdateImage"; - this.tableLayoutPanel1.SetRowSpan(this.pbUpdateImage, 4); - this.pbUpdateImage.Size = new System.Drawing.Size(492, 115); - this.pbUpdateImage.TabIndex = 45; - this.pbUpdateImage.TabStop = false; - this.pbUpdateImage.Visible = false; - this.pbUpdateImage.Click += new System.EventHandler(this.pbUpdateImage_Click); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 3; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Controls.Add(this.lblChangeLogLabel, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.lblStatus, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.btnCheckForUpdate, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.lblInstalledVersionLabel, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.lblLatestVersionLabel, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.lblInstalledVersion, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.lblLatestVersion, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.txtChangeLog, 0, 5); - this.tableLayoutPanel1.Controls.Add(this.btnDownload, 0, 6); - this.tableLayoutPanel1.Controls.Add(this.pbUpdateImage, 3, 1); - this.tableLayoutPanel1.Controls.Add(this.prgbDownload, 2, 6); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 7; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(734, 418); - this.tableLayoutPanel1.TabIndex = 46; - // - // prgbDownload - // - this.prgbDownload.Dock = System.Windows.Forms.DockStyle.Fill; - this.prgbDownload.Location = new System.Drawing.Point(239, 386); - this.prgbDownload.Name = "prgbDownload"; - this.prgbDownload.Size = new System.Drawing.Size(492, 29); - this.prgbDownload.TabIndex = 3; - this.prgbDownload.Visible = false; - // - // btnDownload - // - this.btnDownload._mice = MrngButton.MouseState.HOVER; - this.tableLayoutPanel1.SetColumnSpan(this.btnDownload, 2); - this.btnDownload.Dock = System.Windows.Forms.DockStyle.Fill; - this.btnDownload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnDownload.Location = new System.Drawing.Point(3, 386); - this.btnDownload.Name = "btnDownload"; - this.btnDownload.Size = new System.Drawing.Size(230, 29); - this.btnDownload.TabIndex = 2; - this.btnDownload.Text = "Download and Install"; - this.btnDownload.UseVisualStyleBackColor = true; - this.btnDownload.Click += new System.EventHandler(this.btnDownload_Click); - // - // UpdateWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(734, 418); - this.Controls.Add(this.tableLayoutPanel1); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Name = "UpdateWindow"; - this.TabText = "Update"; - this.Text = "Update"; - this.Load += new System.EventHandler(this.Update_Load); - ((System.ComponentModel.ISupportInitialize)(this.pbUpdateImage)).EndInit(); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); - this.ResumeLayout(false); - - } - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - internal MrngButton btnDownload; - internal Controls.MrngProgressBar prgbDownload; - } -} diff --git a/mRemoteNG/UI/Window/UpdateWindow.cs b/mRemoteNG/UI/Window/UpdateWindow.cs deleted file mode 100644 index e7d405c9f..000000000 --- a/mRemoteNG/UI/Window/UpdateWindow.cs +++ /dev/null @@ -1,235 +0,0 @@ -using System; -using System.Diagnostics; -using System.Drawing; -using System.IO; -using System.Windows.Forms; -using mRemoteNG.App; -using mRemoteNG.App.Update; -using mRemoteNG.Messages; -using mRemoteNG.Themes; -using WeifenLuo.WinFormsUI.Docking; -using mRemoteNG.Resources.Language; -using System.Threading.Tasks; - -namespace mRemoteNG.UI.Window -{ - public partial class UpdateWindow : BaseWindow - { - private AppUpdater _appUpdate; - //private bool _isUpdateDownloadHandlerDeclared; - - #region Public Methods - - public UpdateWindow() : this(new DockContent()) - { - } - - public UpdateWindow(DockContent panel) - { - WindowType = WindowType.Update; - DockPnl = panel; - InitializeComponent(); - Icon = Resources.ImageConverter.GetImageAsIcon(Properties.Resources.RunUpdate_16x); - FontOverrider.FontOverride(this); - } - - #endregion - - #region Form Stuff - - private async void Update_Load(object sender, EventArgs e) - { - ApplyTheme(); - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - ApplyLanguage(); - await CheckForUpdateAsync(); - } - - private new void ApplyTheme() - { - if (!ThemeManager.getInstance().ActiveAndExtended) return; - - base.ApplyTheme(); - txtChangeLog.BackColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - txtChangeLog.ForeColor = - ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - private void ApplyLanguage() - { - Text = Language.CheckForUpdates; - TabText = Language.CheckForUpdates; - btnCheckForUpdate.Text = Language.CheckAgain; - btnDownload.Text = Runtime.IsPortableEdition - ? Language.Download - : Language.DownloadAndInstall; - lblChangeLogLabel.Text = Language.Changelog; - lblInstalledVersion.Text = Language.Version; - lblInstalledVersionLabel.Text = $"{Language.AvailableVersion}:"; - lblLatestVersion.Text = Language.Version; - lblLatestVersionLabel.Text = $"{Language.AvailableVersion}:"; - } - - private async void btnCheckForUpdate_Click(object sender, EventArgs e) - { - await CheckForUpdateAsync(); - } - - private async void btnDownload_Click(object sender, EventArgs e) - { - await DownloadUpdateAsync(); - } - - private void pbUpdateImage_Click(object sender, EventArgs e) - { - var linkUri = pbUpdateImage.Tag as Uri; - if (linkUri == null || linkUri.IsFile || linkUri.IsUnc || linkUri.IsLoopback) - { - return; - } - - Process.Start(linkUri.ToString()); - } - - #endregion - - #region Private Methods - - private async Task CheckForUpdateAsync() - { - if (_appUpdate == null) - { - _appUpdate = new AppUpdater(); - //_appUpdate.Load += _appUpdate.Update_Load; - } - else if (_appUpdate.IsGetUpdateInfoRunning) - { - return; - } - - lblStatus.Text = Language.CheckForUpdates; - lblStatus.ForeColor = SystemColors.WindowText; - lblLatestVersionLabel.Visible = false; - lblInstalledVersion.Visible = false; - lblInstalledVersionLabel.Visible = false; - lblLatestVersion.Visible = false; - btnCheckForUpdate.Visible = false; - - SetVisibilityOfUpdateControls(false); - - try - { - await _appUpdate.GetUpdateInfoAsync(); - - lblInstalledVersion.Text = Application.ProductVersion; - lblInstalledVersion.Visible = true; - lblInstalledVersionLabel.Visible = true; - btnCheckForUpdate.Visible = true; - - if (_appUpdate.IsUpdateAvailable()) - { - lblStatus.Text = Language.UpdateAvailable; - lblStatus.ForeColor = Color.OrangeRed; - SetVisibilityOfUpdateControls(true); - - var updateInfo = _appUpdate.CurrentUpdateInfo; - lblLatestVersion.Text = updateInfo.Version.ToString(); - lblLatestVersionLabel.Visible = true; - lblLatestVersion.Visible = true; - - if (updateInfo.ImageAddress == null || string.IsNullOrEmpty(updateInfo.ImageAddress.ToString())) - { - pbUpdateImage.Visible = false; - } - else - { - pbUpdateImage.ImageLocation = updateInfo.ImageAddress.ToString(); - pbUpdateImage.Tag = updateInfo.ImageLinkAddress; - pbUpdateImage.Visible = true; - } - - try - { - var changeLog = await _appUpdate.GetChangeLogAsync(); - txtChangeLog.Text = changeLog.Replace("\n", Environment.NewLine); - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionStackTrace(Language.UpdateGetChangeLogFailed, ex); - } - - btnDownload.Focus(); - } - else - { - lblStatus.Text = Language.NoUpdateAvailable; - lblStatus.ForeColor = Color.ForestGreen; - - if (_appUpdate.CurrentUpdateInfo == null) return; - var updateInfo = _appUpdate.CurrentUpdateInfo; - if (!updateInfo.IsValid || updateInfo.Version == null) return; - lblLatestVersion.Text = updateInfo.Version.ToString(); - lblLatestVersionLabel.Visible = true; - lblLatestVersion.Visible = true; - } - } - catch (Exception ex) - { - lblStatus.Text = Language.CheckFailed; - lblStatus.ForeColor = Color.OrangeRed; - - Runtime.MessageCollector?.AddExceptionStackTrace(Language.UpdateCheckCompleteFailed, ex); - } - } - - private void SetVisibilityOfUpdateControls(bool visible) - { - lblChangeLogLabel.Visible = visible; - txtChangeLog.Visible = visible; - btnDownload.Visible = visible; - prgbDownload.Visible = visible; - } - - private async Task DownloadUpdateAsync() - { - try - { - btnDownload.Enabled = false; - prgbDownload.Visible = true; - prgbDownload.Value = 0; - - await _appUpdate.DownloadUpdateAsync(new Progress(progress => prgbDownload.Value = progress)); - - btnDownload.Enabled = true; - prgbDownload.Visible = false; - - if (Runtime.IsPortableEdition) - MessageBox.Show(Language.UpdatePortableDownloadComplete, Language.CheckForUpdates, - MessageBoxButtons.OK, MessageBoxIcon.Information); - else - { - if (MessageBox.Show(Language.UpdateDownloadComplete, Language.CheckForUpdates, - MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) - { - Shutdown.Quit(_appUpdate.CurrentUpdateInfo.UpdateFilePath); - } - else - { - File.Delete(_appUpdate.CurrentUpdateInfo.UpdateFilePath); - } - } - } - catch (Exception ex) - { - Runtime.MessageCollector?.AddExceptionStackTrace(Language.UpdateDownloadFailed, ex); - - Runtime.MessageCollector?.AddExceptionStackTrace(Language.UpdateDownloadCompleteFailed, ex); - Runtime.MessageCollector?.AddMessage(MessageClass.ErrorMsg, ex.Message); - - } - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/Window/UpdateWindow.resx b/mRemoteNG/UI/Window/UpdateWindow.resx deleted file mode 100644 index d58980a38..000000000 --- a/mRemoteNG/UI/Window/UpdateWindow.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNG/UI/WindowList.cs b/mRemoteNG/UI/WindowList.cs deleted file mode 100644 index bf254c6ba..000000000 --- a/mRemoteNG/UI/WindowList.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.Collections; -using mRemoteNG.UI.Window; - -namespace mRemoteNG.UI -{ - public class WindowList : CollectionBase - { - #region Public Properties - - public BaseWindow this[object Index] - { - get - { - CleanUp(); - if (Index is BaseWindow) - return IndexByObject(Index); - if (Index is int) - return IndexByNumber(Convert.ToInt32(Index)); - - return null; - } - } - - public new int Count - { - get - { - CleanUp(); - return List.Count; - } - } - - #endregion - - #region Public Methods - - public void Add(BaseWindow uiWindow) - { - List.Add(uiWindow); - //AddHandler uiWindow.FormClosing, AddressOf uiFormClosing - } - - public void AddRange(BaseWindow[] uiWindow) - { - foreach (var uW in uiWindow) - { - List.Add(uW); - } - } - - public void Remove(BaseWindow uiWindow) - { - List.Remove(uiWindow); - } - - public BaseWindow FromString(string uiWindow) - { - CleanUp(); - for (var i = 0; i < List.Count; i++) - { - if (this[i].Text == uiWindow.Replace("&", "&&")) - { - return this[i]; - } - } - - return null; - } - - #endregion - - - private void CleanUp() - { - for (var i = 0; i <= List.Count - 1; i++) - { - if (i > List.Count - 1) - { - CleanUp(); - return; - } - - var baseWindow = List[i] as BaseWindow; - if (baseWindow != null && !baseWindow.IsDisposed) continue; - List.RemoveAt(i); - CleanUp(); - return; - } - } - - private BaseWindow IndexByObject(object Index) - { - try - { - var objectIndex = List.IndexOf(Index); - return IndexByNumber(objectIndex); - } - catch (ArgumentOutOfRangeException e) - { - throw new ArgumentOutOfRangeException(e.ParamName, "Object was not present in the collection."); - } - } - - private BaseWindow IndexByNumber(int Index) - { - try - { - return List[Index] as BaseWindow; - } - catch (ArgumentOutOfRangeException e) - { - throw new ArgumentOutOfRangeException(e.ParamName, e.ActualValue, "Index was out of bounds"); - } - } - - /* - private void uiFormClosing(object sender, FormClosingEventArgs e) - { - List.Remove(sender); - } - */ - } -} \ No newline at end of file diff --git a/mRemoteNG/UI/WindowType.cs b/mRemoteNG/UI/WindowType.cs deleted file mode 100644 index 45876a210..000000000 --- a/mRemoteNG/UI/WindowType.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace mRemoteNG.UI -{ - public enum WindowType - { - Tree = 0, - Connection = 1, - Config = 2, - ErrorsAndInfos = 4, - Options = 6, - Update = 9, - SSHTransfer = 10, - ActiveDirectoryImport = 11, - ExternalApps = 13, - PortScan = 14, - UltraVNCSC = 16, - } -} \ No newline at end of file diff --git a/mRemoteNG/VisualElements_150.png b/mRemoteNG/VisualElements_150.png deleted file mode 100644 index e48d125de..000000000 Binary files a/mRemoteNG/VisualElements_150.png and /dev/null differ diff --git a/mRemoteNG/VisualElements_70.png b/mRemoteNG/VisualElements_70.png deleted file mode 100644 index ea86d91c7..000000000 Binary files a/mRemoteNG/VisualElements_70.png and /dev/null differ diff --git a/mRemoteNG/log4net.config b/mRemoteNG/log4net.config deleted file mode 100644 index 1f272e70e..000000000 --- a/mRemoteNG/log4net.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNG/mRemoteNG.VisualElementsManifest.xml b/mRemoteNG/mRemoteNG.VisualElementsManifest.xml deleted file mode 100644 index 21d61de8c..000000000 --- a/mRemoteNG/mRemoteNG.VisualElementsManifest.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/mRemoteNG/mRemoteNG.csproj b/mRemoteNG/mRemoteNG.csproj deleted file mode 100644 index ea69fd48c..000000000 --- a/mRemoteNG/mRemoteNG.csproj +++ /dev/null @@ -1,296 +0,0 @@ - - - - WinExe - net6.0-windows - true - Icons\mRemoteNG.ico - 1.77.3 - Multi-protocol remote connections manager - 2022 mRemoteNG Dev Team, 2010-2013 Riley McArdle, 2007-2009 Felix Deimel - COPYING.TXT - https://mremoteng.org/ - x64 - Debug;Release;Debug Portable;Release Portable;Release Installer - false - latest - Header_dark.png - - - DEBUG - false - - bin\x64\Debug\ - - - - - false - bin\x64\Release\ - false - - - - - DEBUG;PORTABLE - false - bin\x64\Debug Portable\ - false - - - - - PORTABLE - false - bin\x64\Release Portable\ - false - - - - - - - - - - aximp - 0 - 1 - 8c11efa1-92c3-11d1-bc1e-00c04fa31489 - 0 - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Settings.settings - - - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - Always - - - Always - - - True - \ - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - True - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGDocumentation/_static/css/custom.css b/mRemoteNGDocumentation/_static/css/custom.css deleted file mode 100644 index 744bda4c0..000000000 --- a/mRemoteNGDocumentation/_static/css/custom.css +++ /dev/null @@ -1,46 +0,0 @@ - -body { - --themecolor: #4F8AFF; - color: var(--themecolor); -} - -.wy-nav-content { - max-width: none; - background-color: #E9ECEF; -} - -.wy-side-nav-search { - background-color: var(--themecolor); -} - -.wy-nav-top { - background-color: var(--themecolor); -} - -.caption-text { - color: var(--themecolor); -} - -.reference_internal { - color: var(--themecolor); -} - -a:link { - color: var(--themecolor); -} - -a:visited { - color: var(--themecolor); -} - -a:hover { - color: var(--themecolor); -} - -a:active { - color: var(--themecolor); -} - -a { - color: var(--themecolor); -} diff --git a/mRemoteNGDocumentation/command_line_switches.rst b/mRemoteNGDocumentation/command_line_switches.rst deleted file mode 100644 index a67b55235..000000000 --- a/mRemoteNGDocumentation/command_line_switches.rst +++ /dev/null @@ -1,40 +0,0 @@ -********************* -Command-Line Switches -********************* - -The following commandlline switches are supported by mRemoteNG: - -``/cons: PathToConnectionsFile`` -``/c: PathToConnectionsFile`` - - Loads the connections file from the given path. This path can be a: - - full file path - - path relative to the current directory - - path relative to the mRemoteNG application directory - - path relative to the mRemoteNG default connection file directory - -``/reset`` - - Resets window position, panels and toolbars - -``/resetpos`` -``/rp`` - - Reset the windows position - -``/resetpanels`` -``/rpnl`` - - Resets all panel positions. Use this if you have troubles with panel layouts - -``/resettoolbar`` -``/rtbr`` - - Resets the positions of all toolbars - -``/noreconnect`` -``/norc`` - - Temporary disables reconnect to previously opened sessions. - Use this if you have problems opening mRemoteNG after you - enabled the setting and restarted mRemoteNG diff --git a/mRemoteNGDocumentation/conf.py b/mRemoteNGDocumentation/conf.py deleted file mode 100644 index fe88411f2..000000000 --- a/mRemoteNGDocumentation/conf.py +++ /dev/null @@ -1,18 +0,0 @@ -project = 'mRemoteNG' -copyright = '2021, The mRemoteNG Team' -author = 'The mRemoteNG Team' -language = 'en' -master_doc = 'index' -source_suffix = '.rst' -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] -templates_path = ['_templates'] -htmlhelp_basename = 'mRemoteNGdoc' -html_theme = 'sphinx_rtd_theme' -html_static_path = ['_static'] -html_logo = 'logo.png'; -html_theme_options = {'logo_only': True, 'display_version': True} -html_css_files = ['css/custom.css'] -man_pages = [(master_doc, 'mremoteng', 'mRemoteNG Documentation', [author], 1)] -pygments_style = None -todo_include_todos = True -html_show_sourcelink = False \ No newline at end of file diff --git a/mRemoteNGDocumentation/contact_mail.rst b/mRemoteNGDocumentation/contact_mail.rst deleted file mode 100644 index 174896912..000000000 --- a/mRemoteNGDocumentation/contact_mail.rst +++ /dev/null @@ -1,12 +0,0 @@ -**** -Mail -**** - -If you want to contact the mRemoteNG project maintainers -use the following address: support@mremoteng.org - -If you have found a security vulnerability, that you feel shouldn't be made public, -please report this to the following address: security@mremoteng.org -We will work together to determine public disclosure. -If you do not recieve a response within 48 hours to the e-mail file an issue on -GitHub and tag @sparerd and @kmscode within the issue. diff --git a/mRemoteNGDocumentation/external_tools_cheat_sheet.rst b/mRemoteNGDocumentation/external_tools_cheat_sheet.rst deleted file mode 100644 index ff247c20e..000000000 --- a/mRemoteNGDocumentation/external_tools_cheat_sheet.rst +++ /dev/null @@ -1,135 +0,0 @@ -*********************************** -Common External Tool Configurations -*********************************** - -The list below of various examples is by no means a full list of ways to use -**External Tools** but gives you a idea of how it can be used in different ways. - -Ping -==== -Ping a server via cmdline. - -- Filename: %COMSPEC% -- Arguments: /c ping -t %HostName% -- Can integrate: Unknown - -Traceroute -========== -Run a traceroute via cmdline. - -- Filename: %COMSPEC% -- Arguments: /c set /P = | tracert %HostName% -- Can integrate: Unknown - -`WinSCP `_ -============================================ -WinSCP is a free GUI Secure Copy program. - -- Filename: C:\\Program Files\\WinSCP\\WinSCP.exe (example path) -- Arguments: scp://%Username%:%Password%@%Hostname%/ -- Optional Arguments - turn on compression and ignore any host key errors: -rawsetting Compression=1 -hostkey=* -- Can integrate: No - -`FileZilla S/FTP `_ -=================================================== -Free and open source FTP client for most platforms. - -- Filename: C:\\Program Files\\FileZilla FTP Client\\filezilla.exe (example path) -- Arguments (FTP): ftp://%Username%:%Password%@%Hostname% -- Arguments (SFTP): sftp://%Username%:%Password%@%Hostname% -- Can integrate: Unknown - -`Firefox `_ -======================================================= -Don't like the built-in browser support? Integrate with the Mozilla Firefox browser directly! - -- Filename: C:\\Program Files\\Mozilla Firefox\\firefox.exe (example path) -- Arguments: %Hostname% -- Can integrate: Unknown - -`Google Chrome `_ -=========================================================================== -Google Chrome is a freeware web browser developed by Google. - -- Filename: C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe (example path) -- Arguments: %Hostname% -- Can integrate: Unknown - -`Internet Explorer `_ -============================================== -Standard browser included with Windows installation. - -- Filename: C:\\Program Files\\Internet Explorer\\iexplore.exe -- Arguments: %Hostname% -- Can integrate: Unknown - -`MySql Workbench `_ -============================================================= -MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more. You will be prompted for a password when starting the connection. - -- Filename: C:\\Program Files\\MySQL\\MySQL Workbench 6.3 CE\\MySQLWorkbench.exe (example path) -- Arguments: -query %USERNAME%@%HOSTNAME% -- Can integrate: Unknown - -`VNC Viewer `_ -========================================================= - -- Filename: C:\\Program Files\\RealVNC\\VNC Viewer\\vncviewer.exe (example path) -- Arguments: %HostName% -- Can integrate: Unknown - -Windows Computer Manager -======================== - -- Filename: %WINDIR%\\system32\\compmgmt.msc -- Arguments: /Computer=%HostName% -- Can integrate: Unknown - -`Zenmap GUI `_ -======================================== -Zenmap is a GUI front-end for nmap. - -- Filename: C:\\Program Files\\Nmap\\zenmap.exe (example path) -- Arguments: -p "Quick scan plus" -t %Hostname% -- Can integrate: Unknown - -`UltraVNC `_ -====================================== -UltraVNC is a free and open source program for connection to remote machines using the VNC protocol. - -- Filename: C:\\Program Files\\UltraVNC\\vncviewer.exe (example path) -- Arguments: %HostName%:%port% -password %PASSWORD% -- Can integrate: Unknown - -COM Serial Port -=============== -This will allow you to connect to a specific COM serial port using PuTTY. - -- Filename: putty.exe (example path) -- Arguments: -serial com%Port% -- Can integrate: Yes - -Create a new connection entry with the following information: - -- Name: Serial COM**X** -- Protocol: Ext. App -- External Tool: COM Serial Port -- Port: your desired COM port # here - -`Windows PowerShell `_ -========================================================================================================================================================================= -Windows PowerShell is a task-based command-line shell and scripting language designed especially for system administration. - -Running with suggested argument will open a PS session connected to a host. No prompt for credintials will popup. - -- Filename: %WINDIR%\system32\WindowsPowerShell\v1.0\PowerShell.exe -- Arguments: -noexit $pw = \"%password%\" -replace '\^', ''; $password = ConvertTo-SecureString $pw -AsPlainText -Force; $Cred= New-Object System.Management.Automation.PSCredential (\"%username%\", $password); Enter-PSSession -ComputerName %hostname% -credential $Cred -- Can integrate: No - -`Windows PowerShell (ISE) `_ -========================================================================================================================================================================= -Windows PowerShell Integrated Scripting Environment (ISE) is a graphical host application that enables you to read, write, run, debug, and test scripts and modules in a graphic-assisted environment. - -- Filename: %WINDIR%\\system32\\WindowsPowerShell\\v1.0\\PowerShell_ISE.exe -- Arguments: args here -- Can integrate: Yes diff --git a/mRemoteNGDocumentation/faq.rst b/mRemoteNGDocumentation/faq.rst deleted file mode 100644 index 0a9d8c9dd..000000000 --- a/mRemoteNGDocumentation/faq.rst +++ /dev/null @@ -1,18 +0,0 @@ -************************** -Frequently Asked Questions -************************** - -PuTTY sometimes displays icons in the terminal -============================================== - -You sometimes see PuTTY icons on the side of the terminal (example below). - -.. figure:: /images/putty.png - -This is a new security feature in PuTTY 0.71. It is meant to signify that PuTTY itself is outputting those lines and not some remote server. -Full details are available `here `_. - -How can I edit or create connections in bulk? -============================================= - -Currently, mRemoteNG does not have a feature to support editing or creating connections in bulk. See :ref:`bulk_connections` for more info on this. diff --git a/mRemoteNGDocumentation/folders_and_inheritance.rst b/mRemoteNGDocumentation/folders_and_inheritance.rst deleted file mode 100644 index f9345fdbc..000000000 --- a/mRemoteNGDocumentation/folders_and_inheritance.rst +++ /dev/null @@ -1,59 +0,0 @@ -*********************** -Folders and Inheritance -*********************** - -Folders on mRemoteNG cannot only be used to categorize connections but also to inherit -properties to underlying connections. - -Example -======= -You have ten Remote Desktop enabled servers in one domain and 15 in another domain. -Normally you would spend a lot of time creating all those connections and setting -the individual properties like username, password, etc. - -In mRemoteNG there is an easier way. You just create two folders -(one for domain A and one for domain B) and set all properties there. -Then create the connections itself and let it inherit every property. -The only properties left to set on the connection itself are the connection name and hostname. -Everything else will be inherited from the parent folder. - -**Here is how you do this:** -Add the folder. This can be done like this: - -- Right click on connections and click on **New Folder** -- :menuselection:`File --> New Folder` -- Or with keybinding: :kbd:`Ctrl+Shift+N` - -.. figure:: /images/folders_and_inheritance_01.png - -Then give it a name and fill all the properties you need (like you did with the test connection). - -.. figure:: /images/folders_and_inheritance_02.png - -When you have filled in the settings and values you can either -just drag the test Connection inside the folder or create a new one. - -.. figure:: /images/folders_and_inheritance_03.png - -Right now nothing has changed and nothing will be inherited. -To enable inheritance switch to the inheritance view by clicking the dedicated button. -(Marked with a red arrow below) - -.. figure:: /images/folders_and_inheritance_04.png - -The properties that show up now are almost the same as before, -but you only select yes or no to enable or disable a inheritance. - -.. figure:: /images/folders_and_inheritance_05.png - -When no is selected the property will not be inherited, yes indicates an inherited property. -For this test set Inherit Everything to Yes. -Now if you switch back to the properties view (the button left of the inheritance button) -you should see that not much is left of all those properties. - -.. figure:: /images/folders_and_inheritance_06.png - -Only the Name and Hostname/IP properties are left over, -everything else will be inherited from the parent folder. -Of course you can also only let some of the properties be inherited. -Just play around with this a bit and you'll get the hang of it. diff --git a/mRemoteNGDocumentation/howtos/bulk_connections.rst b/mRemoteNGDocumentation/howtos/bulk_connections.rst deleted file mode 100644 index 74dfafb13..000000000 --- a/mRemoteNGDocumentation/howtos/bulk_connections.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. _bulk_connections: - -************************* -Creating Bulk Connections -************************* - -Currently, mRemoteNG does not have a feature to support editing or creating connections in bulk. -Since this is a common issue, it would be useful to have a work around while a more user-friendly feature is developed. -The best way to create bulk connections is to generate XML with a PowerShell script. - -Since you likely don't want to spend your own time reading through XML files, we have provided an official script for doing this. -You can find the most recent version `here `_. - -A few notes about using this script: - -- While much of the setup has been done for you, you will still need to know some PowerShell in order to use this effectively. Some examples have been provided, but you will need to modify the bottom portion of the script to suite your needs. -- The script works with mRemoteNG v1.75 and will produce XML formatted for use with confCons v2.6 files. This script may need to be updated for future versions of mRemoteNG. -- As always, feel free to reach out to us in a `GitHub Issue `_ or on `Gitter `_ if you have issues. diff --git a/mRemoteNGDocumentation/howtos/credvault.rst b/mRemoteNGDocumentation/howtos/credvault.rst deleted file mode 100644 index 8824c56ea..000000000 --- a/mRemoteNGDocumentation/howtos/credvault.rst +++ /dev/null @@ -1,21 +0,0 @@ -************* -Credential Vault Connector -************* - -.. warning:: - -This feature is currently only developed for Thycotic Secret Server (on-premise installations). It is implemented for RDP and SSH connections. - -mRemote supports fetching credentials from external credential vaults. This allows providing credentials to the connection without storing these to disk, which has numerous benefits (security, auditing, rotating passwords, etc). - -Instead of specifying username/password/domain directly in mRemote, leave these fields empty and just set the secret id: - -.. figure:: /images/credvault01.png - -The secret id is the unique identifier of your secret, you can find it in the URL in your thycotic interface. -e.g. https://cred.domain.local/SecretServer/app/#/secret/3318/general -> the secret id is 3318 - -Before initiating the connection mRemote will access your Secret Server API URL and fetch the data. For this to work the API endpoint URL and access credentials need to be specified. A popup will show up if this information has not yet been set. - -.. figure:: /images/credvault02.png - diff --git a/mRemoteNGDocumentation/howtos/dynamic_host.rst b/mRemoteNGDocumentation/howtos/dynamic_host.rst deleted file mode 100644 index 1813601e7..000000000 --- a/mRemoteNGDocumentation/howtos/dynamic_host.rst +++ /dev/null @@ -1,16 +0,0 @@ -************* -Dynamic Host Addresses -************* - -.. warning:: - -This feature is in beta and currently supports Amazon EC2 only - -Some hosts may have dynamic ip addresses or hostnames. For example, Amazon EC2 instances without elastic ips change their public address upon stop and restart events. -mRemote can automatically update the host property when ec2 region and instance-id properties are set: - -.. figure:: /images/ec2instance.png - -Before initiating the connection, mRemote will contact the EC2 API, fetch the current public ipv4 address and write it to the host field. Afterwards the connection is initiated as usual. - -For this to work, a valid EC2 access key needs to be specified. mRemote will ask for it via a popup window if not yet specified. This token is then stored to registry. We strongly recommend to generate **readonly** access keys in the EC2 AMI interface. diff --git a/mRemoteNGDocumentation/howtos/external_tools.rst b/mRemoteNGDocumentation/howtos/external_tools.rst deleted file mode 100644 index 0fa573ace..000000000 --- a/mRemoteNGDocumentation/howtos/external_tools.rst +++ /dev/null @@ -1,76 +0,0 @@ -************** -External Tools -************** - -Start External Application -========================== - -This example will create a entry that will launch and login to server using filezilla and sftp. -Start with opening up external tools from: :menuselection:`Tools --> External Tools` And create a *New* entry. -Change *Display Name* to **FileZilla** and *Filename* to **C:\\Program Files\\FileZilla FTP Client\\filezilla.exe**. See image below: - -.. figure:: /images/example_et_start_application_01.png - -We then need to arguments to use for filezilla, which we can find out either by searching for it on the great wide -internet or by called the `-h` parameter to filezilla.exe in powershell: - -:code:`& 'C:\Program Files\FileZilla FTP Client\filezilla.exe' -h` - -This will open a small dialog showing the various input parameters. -What we are going to use is the following for our entry: - -- Application: FileZilla -- Protocol - sftp:// -- Input Parameters (variables) - %HOSTNAME%, %USERNAME%,%PASSWORD% and %PORT% - -All of the variables are parsed from mRemoteNG connection item to the filezilla command line. -So lets build this entry up in **External Tools** where we add all these items. - -.. figure:: /images/example_et_start_application_02.png - -Try the launch the FileZilla based external tool now against the server you want to login too -and you will notice that the application is launched with the variables. - -Traceroute -========== - -This example will create a traceroute which you can call on for a connection to get the traceroute to the -connection. Start with opening up external tools from: :menuselection:`Tools --> External Tools` -And create a *New* entry. See :doc:`/user_interface/external_tools` -Change *Display Name* to **Traceroute** and *Filename* to **cmd**. - -See image below: - -.. figure:: /images/example_et_traceroute_01.png - - Figure 1.0: Showing traceroute init settings - -Now comes the interesting part where we fill in arguments that tells the console what to launch. -Here are the parts we need: - -- Keep the console open - /K -- Program to run - tracert -- Variable to use - %HOSTNAME% - -So lets fill these options in to the arguments like so: - -.. figure:: /images/example_et_traceroute_02.png - -This is all we really need in order to do a traceroute. Right click on a connection in the connection -list and go to :menuselection:`External Tools --> Traceroute` which will open a cmd prompt and run a -tracert against the host using hostname variable. - -.. figure:: /images/example_et_traceroute_03.png - -A console like below will appear that show the traceroute and will not exit until you close the window. - -.. figure:: /images/example_et_traceroute_04.png - -If you want to use **powershell** instead. Then follow information below: - -- Filename - powershell.exe -- Arguments - -NoExit tracert %HOSTNAME% - -Notice that we replaced the /K with -NoExit and changed **cmd** with **powershell.exe**. See image below: - -.. figure:: /images/example_et_traceroute_05.png diff --git a/mRemoteNGDocumentation/howtos/sshtunnel.rst b/mRemoteNGDocumentation/howtos/sshtunnel.rst deleted file mode 100644 index b02eb92ca..000000000 --- a/mRemoteNGDocumentation/howtos/sshtunnel.rst +++ /dev/null @@ -1,13 +0,0 @@ -************* -SSH Tunneling -************* - -You can use any configured SSH connection to be used as a tunnel server for another connection. - -.. figure:: /images/ssh_tunnel.png - -If an SSH Tunnel is configured the connection is searched and if found a free local TCP port determined. The SSH tunnel connection -is setup with additional parameters for the tunnel. The original connection info is copied and the copy is modified to connect -to local host and the local TCP port and the target connection is opened. -You can use the SSH connection attribute for additional SSH options. It can be used by all -normal SSH connections as well to specify any additional options, e.g. to not start a shell which some SSH servers. diff --git a/mRemoteNGDocumentation/howtos/vmrdp.rst b/mRemoteNGDocumentation/howtos/vmrdp.rst deleted file mode 100644 index 5b29b6379..000000000 --- a/mRemoteNGDocumentation/howtos/vmrdp.rst +++ /dev/null @@ -1,64 +0,0 @@ -************************************* -Connect to virtual machine on Hyper-V -************************************* - -Introduction -============ -When set up properly, you can use mRemoteNG to connect to virtual machines running on Hyper-V. -This how to provides you with all the information you need to get things running. - -To be able to connect to the virtual machine we need its' id. -You can find it by executing the following powershell command on the Hyper-V server: - -.. code-block:: - - Get-VM | select Name, ID - -Create a new connection, set the protocol to RDP and set the "Use VM ID" property to true. -Enter the id in the new property field that just appeared in the connection section and set the port to 2179. - -Enter the id of the virtual machine you found out earlier and you are able to connect to the virtual machine. - -Prerequisites -============= -For the scenario above to work there is some configuration that may be necessary for you to set up, depending on your environment. - -You must be a member of the *Administrators* **and** *Hyper-V Administrators* groups on the Hyper-V Server to be able to remotely connect to any virtual machine running on the host via VMRDP. -If this is not the case your user has to be granted access to remotely access the machine. -The following Powershell command achieves this: - -.. code-block:: - - Grant-VMConnectAccess -VMName -UserName \\ - -Port 2179 must be open on Hyper-V server and on the machine you are connecting from. Use the following command to open the ports on the firewall if needed: - -.. code-block:: - - netsh advfirewall firewall add rule name="VMRDP" dir=in action=allow protocol=TCP localport=2179 (incoming) - netsh advfirewall firewall add rule name="VMRDP" dir=out action=allow protocol=TCP localport=2179 (outgoing) - -In case you are facing "Unknown disconnection reason 3848" error when connecting, you need to configure a number of registry settings on your client and the Hyper-V Server to make the connection work. -This problem occurs because of the CredSSP (Credential Security Service Provider) policy on the client and/or Hyper-V Server not allowing to authentication of remote users by default. - -.. note:: - - See Microsoft support file `954357 `_ for more information on this topic. - -.. note:: - - For more information on RDP error codes see `this Microsoft article `_. - -Start the PowerShell console with administrative privileges and run the following commands: - -.. code-block:: - - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowDefaultCredentialsDomain -Name Hyper-V -PropertyType String -Value "*" -Force - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowSavedCredentialsDomain -Name Hyper-V -PropertyType String -Value "*" -Force - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowDefaultCredentials -Name Hyper-V -PropertyType String -Value "*" -Force - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsDomain -Name Hyper-V -PropertyType String -Value "*" -Force - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentials -Name Hyper-V -PropertyType String -Value "*" -Force - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsWhenNTLMOnly -Name Hyper-V -PropertyType String -Value "*" -Force - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsWhenNTLMOnlyDomain -Name Hyper-V -PropertyType String -Value "*" -Force - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowSavedCredentials -Name Hyper-V -PropertyType String -Value "*" -Force - New-ItemProperty -Path HKLM\:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowSavedCredentialsWhenNTLMOnly -Name Hyper-V -PropertyType String -Value "*" -Force diff --git a/mRemoteNGDocumentation/images/config_top_bar.png b/mRemoteNGDocumentation/images/config_top_bar.png deleted file mode 100644 index 1f540c09b..000000000 Binary files a/mRemoteNGDocumentation/images/config_top_bar.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/connections_config.png b/mRemoteNGDocumentation/images/connections_config.png deleted file mode 100644 index b348ac811..000000000 Binary files a/mRemoteNGDocumentation/images/connections_config.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/connections_main.png b/mRemoteNGDocumentation/images/connections_main.png deleted file mode 100644 index 22ae8f3a0..000000000 Binary files a/mRemoteNGDocumentation/images/connections_main.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/connections_open.png b/mRemoteNGDocumentation/images/connections_open.png deleted file mode 100644 index 62f7ac786..000000000 Binary files a/mRemoteNGDocumentation/images/connections_open.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/connections_rightclick_menu.png b/mRemoteNGDocumentation/images/connections_rightclick_menu.png deleted file mode 100644 index 574568eee..000000000 Binary files a/mRemoteNGDocumentation/images/connections_rightclick_menu.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/connections_status.png b/mRemoteNGDocumentation/images/connections_status.png deleted file mode 100644 index ceaf83c44..000000000 Binary files a/mRemoteNGDocumentation/images/connections_status.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/connections_test_item.png b/mRemoteNGDocumentation/images/connections_test_item.png deleted file mode 100644 index d03747ff3..000000000 Binary files a/mRemoteNGDocumentation/images/connections_test_item.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/connections_top_bar.png b/mRemoteNGDocumentation/images/connections_top_bar.png deleted file mode 100644 index 15582b5ec..000000000 Binary files a/mRemoteNGDocumentation/images/connections_top_bar.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/credssp-error.png b/mRemoteNGDocumentation/images/credssp-error.png deleted file mode 100644 index fc13abf4b..000000000 Binary files a/mRemoteNGDocumentation/images/credssp-error.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/credvault01.png b/mRemoteNGDocumentation/images/credvault01.png deleted file mode 100644 index 14d2cad88..000000000 Binary files a/mRemoteNGDocumentation/images/credvault01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/credvault02.png b/mRemoteNGDocumentation/images/credvault02.png deleted file mode 100644 index 71c33eb88..000000000 Binary files a/mRemoteNGDocumentation/images/credvault02.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/default_properties.png b/mRemoteNGDocumentation/images/default_properties.png deleted file mode 100644 index 3889c2b88..000000000 Binary files a/mRemoteNGDocumentation/images/default_properties.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/ec2instance.png b/mRemoteNGDocumentation/images/ec2instance.png deleted file mode 100644 index 44aa6a4f1..000000000 Binary files a/mRemoteNGDocumentation/images/ec2instance.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/example_et_start_application_01.png b/mRemoteNGDocumentation/images/example_et_start_application_01.png deleted file mode 100644 index 8ea1f1d68..000000000 Binary files a/mRemoteNGDocumentation/images/example_et_start_application_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/example_et_start_application_02.png b/mRemoteNGDocumentation/images/example_et_start_application_02.png deleted file mode 100644 index 26aecc7ac..000000000 Binary files a/mRemoteNGDocumentation/images/example_et_start_application_02.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/example_et_traceroute_01.png b/mRemoteNGDocumentation/images/example_et_traceroute_01.png deleted file mode 100644 index 593b4fa02..000000000 Binary files a/mRemoteNGDocumentation/images/example_et_traceroute_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/example_et_traceroute_02.png b/mRemoteNGDocumentation/images/example_et_traceroute_02.png deleted file mode 100644 index 134acba00..000000000 Binary files a/mRemoteNGDocumentation/images/example_et_traceroute_02.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/example_et_traceroute_03.png b/mRemoteNGDocumentation/images/example_et_traceroute_03.png deleted file mode 100644 index dc3c84225..000000000 Binary files a/mRemoteNGDocumentation/images/example_et_traceroute_03.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/example_et_traceroute_04.png b/mRemoteNGDocumentation/images/example_et_traceroute_04.png deleted file mode 100644 index 7b90f49da..000000000 Binary files a/mRemoteNGDocumentation/images/example_et_traceroute_04.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/example_et_traceroute_05.png b/mRemoteNGDocumentation/images/example_et_traceroute_05.png deleted file mode 100644 index 4c3dcb72d..000000000 Binary files a/mRemoteNGDocumentation/images/example_et_traceroute_05.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/external_tools_external_tool_properties_01.png b/mRemoteNGDocumentation/images/external_tools_external_tool_properties_01.png deleted file mode 100644 index 321de595d..000000000 Binary files a/mRemoteNGDocumentation/images/external_tools_external_tool_properties_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/external_tools_main_ui_01.png b/mRemoteNGDocumentation/images/external_tools_main_ui_01.png deleted file mode 100644 index 404a170b6..000000000 Binary files a/mRemoteNGDocumentation/images/external_tools_main_ui_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/external_tools_toolbar_01.png b/mRemoteNGDocumentation/images/external_tools_toolbar_01.png deleted file mode 100644 index d6d56a234..000000000 Binary files a/mRemoteNGDocumentation/images/external_tools_toolbar_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/external_tools_tools_list_01.png b/mRemoteNGDocumentation/images/external_tools_tools_list_01.png deleted file mode 100644 index 0a49430ab..000000000 Binary files a/mRemoteNGDocumentation/images/external_tools_tools_list_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/folders_and_inheritance_01.png b/mRemoteNGDocumentation/images/folders_and_inheritance_01.png deleted file mode 100644 index f41bd88b7..000000000 Binary files a/mRemoteNGDocumentation/images/folders_and_inheritance_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/folders_and_inheritance_02.png b/mRemoteNGDocumentation/images/folders_and_inheritance_02.png deleted file mode 100644 index 15c7ee3b8..000000000 Binary files a/mRemoteNGDocumentation/images/folders_and_inheritance_02.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/folders_and_inheritance_03.png b/mRemoteNGDocumentation/images/folders_and_inheritance_03.png deleted file mode 100644 index 6f7caed54..000000000 Binary files a/mRemoteNGDocumentation/images/folders_and_inheritance_03.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/folders_and_inheritance_04.png b/mRemoteNGDocumentation/images/folders_and_inheritance_04.png deleted file mode 100644 index 19de6c6be..000000000 Binary files a/mRemoteNGDocumentation/images/folders_and_inheritance_04.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/folders_and_inheritance_05.png b/mRemoteNGDocumentation/images/folders_and_inheritance_05.png deleted file mode 100644 index c2a684444..000000000 Binary files a/mRemoteNGDocumentation/images/folders_and_inheritance_05.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/folders_and_inheritance_06.png b/mRemoteNGDocumentation/images/folders_and_inheritance_06.png deleted file mode 100644 index 29581dc9d..000000000 Binary files a/mRemoteNGDocumentation/images/folders_and_inheritance_06.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/import_export_dialog.png b/mRemoteNGDocumentation/images/import_export_dialog.png deleted file mode 100644 index 455b30548..000000000 Binary files a/mRemoteNGDocumentation/images/import_export_dialog.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/import_from_active_directory.png b/mRemoteNGDocumentation/images/import_from_active_directory.png deleted file mode 100644 index e267b3bfa..000000000 Binary files a/mRemoteNGDocumentation/images/import_from_active_directory.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/import_from_port_scan.png b/mRemoteNGDocumentation/images/import_from_port_scan.png deleted file mode 100644 index bb49ab7f2..000000000 Binary files a/mRemoteNGDocumentation/images/import_from_port_scan.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/menus_hide_menu_strip.png b/mRemoteNGDocumentation/images/menus_hide_menu_strip.png deleted file mode 100644 index e659cc855..000000000 Binary files a/mRemoteNGDocumentation/images/menus_hide_menu_strip.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/menus_main_menu.png b/mRemoteNGDocumentation/images/menus_main_menu.png deleted file mode 100644 index 22bf234ca..000000000 Binary files a/mRemoteNGDocumentation/images/menus_main_menu.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/mremoteng_favicon_32.png b/mRemoteNGDocumentation/images/mremoteng_favicon_32.png deleted file mode 100644 index 3e8fd49d3..000000000 Binary files a/mRemoteNGDocumentation/images/mremoteng_favicon_32.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/mremoteng_logo.png b/mRemoteNGDocumentation/images/mremoteng_logo.png deleted file mode 100644 index 78f40a6b8..000000000 Binary files a/mRemoteNGDocumentation/images/mremoteng_logo.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/mremoteng_main_ui.png b/mRemoteNGDocumentation/images/mremoteng_main_ui.png deleted file mode 100644 index 9f70fdb41..000000000 Binary files a/mRemoteNGDocumentation/images/mremoteng_main_ui.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/mremoteng_main_ui_connect_win_server.png b/mRemoteNGDocumentation/images/mremoteng_main_ui_connect_win_server.png deleted file mode 100644 index 49b98e97b..000000000 Binary files a/mRemoteNGDocumentation/images/mremoteng_main_ui_connect_win_server.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/notifications_panel.png b/mRemoteNGDocumentation/images/notifications_panel.png deleted file mode 100644 index 075e0d62f..000000000 Binary files a/mRemoteNGDocumentation/images/notifications_panel.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/notifications_popup.png b/mRemoteNGDocumentation/images/notifications_popup.png deleted file mode 100644 index 288c5f461..000000000 Binary files a/mRemoteNGDocumentation/images/notifications_popup.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/oracle_remediation_setting.png b/mRemoteNGDocumentation/images/oracle_remediation_setting.png deleted file mode 100644 index 57c41d8fb..000000000 Binary files a/mRemoteNGDocumentation/images/oracle_remediation_setting.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/putty.png b/mRemoteNGDocumentation/images/putty.png deleted file mode 100644 index 7bbd33827..000000000 Binary files a/mRemoteNGDocumentation/images/putty.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/quick_connect_01.png b/mRemoteNGDocumentation/images/quick_connect_01.png deleted file mode 100644 index 3fa15b94d..000000000 Binary files a/mRemoteNGDocumentation/images/quick_connect_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/quick_connect_02.png b/mRemoteNGDocumentation/images/quick_connect_02.png deleted file mode 100644 index 897788fd6..000000000 Binary files a/mRemoteNGDocumentation/images/quick_connect_02.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/quick_connect_03.png b/mRemoteNGDocumentation/images/quick_connect_03.png deleted file mode 100644 index 2d662fd52..000000000 Binary files a/mRemoteNGDocumentation/images/quick_connect_03.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/screenshot_manager_overview.png b/mRemoteNGDocumentation/images/screenshot_manager_overview.png deleted file mode 100644 index c1413c678..000000000 Binary files a/mRemoteNGDocumentation/images/screenshot_manager_overview.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/screenshot_manager_rightclick_menu.png b/mRemoteNGDocumentation/images/screenshot_manager_rightclick_menu.png deleted file mode 100644 index f63cfc42d..000000000 Binary files a/mRemoteNGDocumentation/images/screenshot_manager_rightclick_menu.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/ssh_file_transfer_01.png b/mRemoteNGDocumentation/images/ssh_file_transfer_01.png deleted file mode 100644 index d9facb2fe..000000000 Binary files a/mRemoteNGDocumentation/images/ssh_file_transfer_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/ssh_tunnel.png b/mRemoteNGDocumentation/images/ssh_tunnel.png deleted file mode 100644 index a883363c2..000000000 Binary files a/mRemoteNGDocumentation/images/ssh_tunnel.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/user_interface_overview.png b/mRemoteNGDocumentation/images/user_interface_overview.png deleted file mode 100644 index a7bbc0d5c..000000000 Binary files a/mRemoteNGDocumentation/images/user_interface_overview.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/user_interface_panels_01.png b/mRemoteNGDocumentation/images/user_interface_panels_01.png deleted file mode 100644 index c61a3d387..000000000 Binary files a/mRemoteNGDocumentation/images/user_interface_panels_01.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/user_interface_panels_02.png b/mRemoteNGDocumentation/images/user_interface_panels_02.png deleted file mode 100644 index 16573163f..000000000 Binary files a/mRemoteNGDocumentation/images/user_interface_panels_02.png and /dev/null differ diff --git a/mRemoteNGDocumentation/images/user_interface_panels_03.png b/mRemoteNGDocumentation/images/user_interface_panels_03.png deleted file mode 100644 index 877b56236..000000000 Binary files a/mRemoteNGDocumentation/images/user_interface_panels_03.png and /dev/null differ diff --git a/mRemoteNGDocumentation/index.rst b/mRemoteNGDocumentation/index.rst deleted file mode 100644 index f83a797d8..000000000 --- a/mRemoteNGDocumentation/index.rst +++ /dev/null @@ -1,49 +0,0 @@ -************************************* -Welcome to mRemoteNG's documentation! -************************************* - -.. toctree:: - :maxdepth: 2 - :caption: Application Handling - - user_interface.rst - folders_and_inheritance.rst - protocols.rst - keyboard_shortcuts.rst - sql_configuration.rst - command_line_switches.rst - -.. toctree:: - :maxdepth: 2 - :caption: Support - - troubleshooting.rst - known_issues.rst - faq.rst - -.. toctree:: - :maxdepth: 2 - :caption: HowTos - - howtos/sshtunnel.rst - howtos/external_tools.rst - howtos/bulk_connections.rst - howtos/vmrdp.rst - howtos/credvault.rst - howtos/dynamic_host.rst - -.. toctree:: - :maxdepth: 2 - :caption: Miscellaneous - - external_tools_cheat_sheet.rst - migrate.rst - Contribute - -.. toctree:: - :maxdepth: 2 - :caption: Contact Us - - Chat - Reddit - contact_mail.rst diff --git a/mRemoteNGDocumentation/keyboard_shortcuts.rst b/mRemoteNGDocumentation/keyboard_shortcuts.rst deleted file mode 100644 index 6bbf01ef0..000000000 --- a/mRemoteNGDocumentation/keyboard_shortcuts.rst +++ /dev/null @@ -1,75 +0,0 @@ -****************** -Keyboard Shortcuts -****************** - -General -======= - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Keybinding - - Action - * - F1 - - Help - - -File -==== - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Keybinding - - Action - * - Ctrl+N - - New Connection - * - Ctrl+Shift+N - - New Folder - * - Ctrl+O - - Open Connection File... - * - Ctrl+S - - Save Connection FIle - * - Ctrl+Shift+S - - Save Connection File As... - - -View -==== - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Keybinding - - Action - * - Ctrl+Alt+C - - Jump to (Connections and Config) - * - Ctrl+Alt+E - - Jump to (Notifications) - * - F11 - - Fullscreen - -Connections -=========== - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Keybinding - - Action - * - Ctrl+Shift+C - - Connect - * - Ctrl+D - - Duplicate - * - F2 - - Rename - * - Del - - Delete - * - Ctrl+Up - - Move Up - * - Ctrl+Down - - Move Down diff --git a/mRemoteNGDocumentation/known_issues.rst b/mRemoteNGDocumentation/known_issues.rst deleted file mode 100644 index e751758c7..000000000 --- a/mRemoteNGDocumentation/known_issues.rst +++ /dev/null @@ -1,139 +0,0 @@ -############ -Known Issues -############ - -CredSSP - CVE-2018-0886 - Authentication error -============================================== - -mRemoteNG uses the Microsoft Terminal Services Client (MSTSC) libraries -in order to make Remote Desktop connections. - -.. note:: - - mRemoteNG has no control over the functionality changes implemented by Microsoft. - -Please refer to `Microsoft's Documentation `_ for full details regarding this problem. -Patched clients attempting to connect to Unpatched servers will fail with the following error: - -.. figure:: /images/credssp-error.png - -The same error will occur with MSTSC directly on a patched -client attempting to connect to an unpatched server. - -Per the MS documentation, the only way around this is to do the following: - -- Patch the servers -- set the "Encryption Oracle Remediation" policy to "Vulnerable" - refer to the MS documentation above for details: - - .. figure:: /images/oracle_remediation_setting.png - -- Uninstall `KB4103727 `_ - -I can't open more than X number of RDP sessions. New sessions fail with error code 3334 -======================================================================================= -The issue here is likely the amount of resources available to the RDP component to open the connection. This was alleviated in `MR-714 `_ and `MR-864 `_ - -Other things you can do to help reduce the issue: - -- On your RDP connections, set CacheBitmaps to False (this reduces the memory usage of each connection) -- Consider removing KB2830477 if you have it installed. This seems to increase the likelyhood of getting 3334 error codes. - -RDP connections fail with error code 264 -======================================== -This issue is often caused by trying to retrieve session information. - -Try doing the following: - -- Disable "Automatically get session information" (Tools -> Options -> Advanced) - -ATI Tray Tools -============== -mRemoteNG is not compatible with ATI Tray Tools. We are aware of the issue and -hope to have it fixed in a future version. We recommend that you disable or -uninstall ATI Tray Tools while using mRemoteNG. - -mRemoteNG crashes with the error "Class not registered" when trying to connect using RDP -======================================================================================== -You may also see a message like "System.Runtime.InteropServices.COMException (0x80040154)" - -If you are running mRemoteNG on Windows 7 or Server 2008: - -- You may be missing one or more required windows updates. -- A common issue is that `KB2574819 `_ is either missing or has been installed after `KB2592687 `_. They must be installed in the correct order. If you do not have KB2574819, follow these instructions: - - Uninstall `KB2592687 `_ - - Install `KB2574819 `_ - - (Re)Install `KB2592687 `_ - - Reboot your machine - -If you are running mRemoteNG on Windows 8/10 or Server 2012+: - -- Try to repair the mRemoteNG installation using the installer or uninstall/reinstall. Receiving this error on these OS's is just an install fluke (or you've fiddled with your registry). - -VNC connections fail with the error "The server is using an unsupported version of the RFB protocol. The server is using version 4.1 but only version 3.x is supported." -======================================================================================================================================================================== -RFB version 4.0 and higher is a proprietary version owned by `RealVNC Limited `_. Building support for newer versions will likely result in licensing fees. Therefore, it is unlikely that mRemoteNG will have support for version 4.0+ anytime soon. - -Unfortunately, the only way around this limitation is to use an open source -implementation of VNC server such as `TightVNC `_ -or `UltraVNC `_ - -Cannot click some UI elements in an RDP connection window. -========================================================== -It may seem like some elements are not clickable along the top -and left sides of your RDP connection window. More information can be found in issue #210 - -This is likely due to non-standard (>100%) DPI scaling on your local machine. - -To turn this off: - -On Windows 7 / 8 - -- Start menu -> Control Panel -> Display -- Ensure the option **Smaller - 100% (default)** is selected - -On Windows 10 - -- Start menu -> Settings -> Display -- Ensure the slider under **Change the size of text, apps, and other items** is all the way to the left (at 100%) - -SSH login fails when password contains extended ASCII characters -================================================================ -Initial login to SSH (or WinSCP) fails when the password contains -extended ASCII characters (such as: €šœ£ÁØë). -Typing the password into the SSH session directly works. - -Investigation suggests that there is an issue in character encoding -when mRemoteNG passes the value to the cmd line, which then invokes PuTTY. -This was investigated in issue `#186 `_ - -The only resolution for this issue is to not use extended ASCII characters -in passwords that will be sent to PuTTY or similar tools. - -RDP tries to reconnect whenever I resize the window -=================================================== -Your RDP connection reconnects after resizing mRemoteNG or the connection panel. - -This will occur anytime the connection window changes size and -the following connection options are set: - -- Resolution: **Fit to Panel** -- Automatic Resize: **Yes** - -To prevent reconnecting, you can do one of several things: - -- Change the resolution to Smart Size. This will scale the original connection area when the view window size changes. This does not preserve aspect ratio. -- Turn off Automatic Resize. When the view window size changes, you will see scroll bars or dead space. - -There is no way to update the view window size without a reconnect. -This is an RDP protocol limitation. - -AltGr key combinations stop working in other apps when connected to RDP -======================================================================= -When connected to an RDP session AltGr, keyboard combinations sometimes stop working. - -This is a known issue with The Microsoft RDP library that cannot be solved by mRemoteNG. -There are three known work arounds for this issue: - -- Disconnect the RDP session which caused the issue. Since it can be difficult to determine which connection is to blame, you may need to disconnect all RDP sessions. Once you have confirmed AltGr combinations are working again, you may reconnect your RDP session(s). -- When the issue occurs, hold/press the Ctrl key. This is known to release the AltGr key from the RDP session. -- Use :kbd:`Ctrl` + :kbd:`Alt` instead of :kbd:`AltGr`. diff --git a/mRemoteNGDocumentation/logo.png b/mRemoteNGDocumentation/logo.png deleted file mode 100644 index ed53ce97a..000000000 Binary files a/mRemoteNGDocumentation/logo.png and /dev/null differ diff --git a/mRemoteNGDocumentation/migrate.rst b/mRemoteNGDocumentation/migrate.rst deleted file mode 100644 index 6c0b4d771..000000000 --- a/mRemoteNGDocumentation/migrate.rst +++ /dev/null @@ -1,38 +0,0 @@ -***************************** -Migrate Settings from mRemote -***************************** - -mRemoteNG does not automatically migrate settings from old (non-NG) versions of mRemote. -You will manually need to copy your settings files from mRemote to mRemoteNG. - -On Windows XP / Windows Home Server / Windows Server 2003 -========================================================= -Copy all the files in this folder: - -:: - - C:\Documents and Settings\[username]\Local Settings\Application Data\Felix_Deimel\mRemote - -To this folder: - -:: - - C:\Documents and Settings\[username]\Local Settings\Application Data\mRemoteNG - -On Windows Vista / Windows 7 / Windows Server 2008 -================================================== - -Copy all the files in this folder: - -:: - - C:\Users\[username]\AppData\Local\Felix_Deimel\mRemote - -To this folder: - -:: - - C:\Users\[username]\AppData\Local\mRemoteNG - -If you keep both programs installed on your computer, -changes within one program will not affect the other. diff --git a/mRemoteNGDocumentation/mssql_db_setup.sql b/mRemoteNGDocumentation/mssql_db_setup.sql deleted file mode 100644 index 018ef67e0..000000000 --- a/mRemoteNGDocumentation/mssql_db_setup.sql +++ /dev/null @@ -1,177 +0,0 @@ -if exists (select * from dbo.sysobjects - where id = object_id(N'[dbo].[tblCons]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) -drop table [dbo].[tblCons] -GO - -if exists (select * from dbo.sysobjects - where id = object_id(N'[dbo].[tblRoot]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) -drop table [dbo].[tblRoot] -GO - -if exists (select * from dbo.sysobjects - where id = object_id(N'[dbo].[tblUpdate]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) -drop table [dbo].[tblUpdate] -GO - -CREATE TABLE [dbo].[tblCons] ( - [ID] int NOT NULL IDENTITY(1,1), - [ConstantID] varchar(128) NOT NULL PRIMARY KEY, - [PositionID] int NOT NULL, - [ParentID] varchar(128), - [LastChange] datetime NOT NULL, - [Name] varchar(128) NOT NULL, - [Type] varchar(32) NOT NULL, - [Expanded] bit NOT NULL, - [AutomaticResize] bit DEFAULT ((1)) NOT NULL, - [CacheBitmaps] bit NOT NULL, - [Colors] varchar(32) NOT NULL, - [ConnectToConsole] bit NOT NULL, - [Connected] bit NOT NULL, - [Description] varchar(1024), - [DisableCursorBlinking] bit NOT NULL, - [DisableCursorShadow] bit NOT NULL, - [DisableFullWindowDrag] bit NOT NULL, - [DisableMenuAnimations] bit NOT NULL, - [DisplayThemes] bit NOT NULL, - [DisplayWallpaper] bit NOT NULL, - [Domain] varchar(512), - [EnableDesktopComposition] bit NOT NULL, - [EnableFontSmoothing] bit NOT NULL, - [ExtApp] varchar(256), - [Favorite] tinyint NOT NULL, - [Hostname] varchar(512), - [ICAEncryptionStrength] varchar(32) NOT NULL, - [Icon] varchar(128) NOT NULL, - [LoadBalanceInfo] varchar(1024), - [MacAddress] varchar(32), - [Panel] varchar(128) NOT NULL, - [Password] varchar(1024), - [Port] int NOT NULL, - [PostExtApp] varchar(256), - [PreExtApp] varchar(256), - [Protocol] varchar(32) NOT NULL, - [PuttySession] varchar(128), - [RDGatewayDomain] varchar(512), - [RDGatewayHostname] varchar(512), - [RDGatewayPassword] varchar(1024), - [RDGatewayUsageMethod] varchar(32) NOT NULL, - [RDGatewayUseConnectionCredentials] varchar(32) NOT NULL, - [RDGatewayUsername] varchar(512), - [RDPAlertIdleTimeout] bit NOT NULL, - [RDPAuthenticationLevel] varchar(32) NOT NULL, - [RDPMinutesToIdleTimeout] int NOT NULL, - [RdpVersion] varchar(10), - [RedirectAudioCapture] bit DEFAULT ((0)) NOT NULL, - [RedirectClipboard] bit DEFAULT ((0)) NOT NULL, - [RedirectDiskDrives] bit NOT NULL, - [RedirectKeys] bit NOT NULL, - [RedirectPorts] bit NOT NULL, - [RedirectPrinters] bit NOT NULL, - [RedirectSmartCards] bit NOT NULL, - [RedirectSound] varchar(64) NOT NULL, - [RenderingEngine] varchar(16), - [Resolution] varchar(32) NOT NULL, - [SSHOptions] varchar(1024) NOT NULL, - [SSHTunnelConnectionName] varchar(128) NOT NULL, - [SoundQuality] varchar(20) NOT NULL, - [UseCredSsp] bit NOT NULL, - [UseEnhancedMode] bit DEFAULT ((0)), - [UseVmId] bit, - [UserField] varchar(256), - [Username] varchar(512), - [VNCAuthMode] varchar(10), - [VNCColors] varchar(10), - [VNCCompression] varchar(10), - [VNCEncoding] varchar(20), - [VNCProxyIP] varchar(128), - [VNCProxyPassword] varchar(1024), - [VNCProxyPort] int, - [VNCProxyType] varchar(20), - [VNCProxyUsername] varchar(512), - [VNCSmartSizeMode] varchar(20), - [VNCViewOnly] bit NOT NULL, - [VmId] varchar(100), - [InheritAutomaticResize] bit DEFAULT ((0)) NOT NULL, - [InheritCacheBitmaps] bit NOT NULL, - [InheritColors] bit NOT NULL, - [InheritDescription] bit NOT NULL, - [InheritDisableCursorBlinking] bit NOT NULL, - [InheritDisableCursorShadow] bit NOT NULL, - [InheritDisableFullWindowDrag] bit NOT NULL, - [InheritDisableMenuAnimations] bit NOT NULL, - [InheritDisplayThemes] bit NOT NULL, - [InheritDisplayWallpaper] bit NOT NULL, - [InheritDomain] bit NOT NULL, - [InheritEnableDesktopComposition] bit NOT NULL, - [InheritEnableFontSmoothing] bit NOT NULL, - [InheritExtApp] bit NOT NULL, - [InheritFavorite] bit NOT NULL, - [InheritICAEncryptionStrength] bit NOT NULL, - [InheritIcon] bit NOT NULL, - [InheritLoadBalanceInfo] bit DEFAULT ((0)) NOT NULL, - [InheritMacAddress] bit NOT NULL, - [InheritPanel] bit NOT NULL, - [InheritPassword] bit NOT NULL, - [InheritPort] bit NOT NULL, - [InheritPostExtApp] bit NOT NULL, - [InheritPreExtApp] bit NOT NULL, - [InheritProtocol] bit NOT NULL, - [InheritPuttySession] bit NOT NULL, - [InheritRDGatewayDomain] bit NOT NULL, - [InheritRDGatewayHostname] bit NOT NULL, - [InheritRDGatewayPassword] bit NOT NULL, - [InheritRDGatewayUsageMethod] bit NOT NULL, - [InheritRDGatewayUseConnectionCredentials] bit NOT NULL, - [InheritRDGatewayUsername] bit NOT NULL, - [InheritRDPAlertIdleTimeout] bit NOT NULL, - [InheritRDPAuthenticationLevel] bit NOT NULL, - [InheritRDPMinutesToIdleTimeout] bit NOT NULL, - [InheritRdpVersion] bit DEFAULT ((0)) NOT NULL, - [InheritRedirectAudioCapture] bit DEFAULT ((0)) NOT NULL, - [InheritRedirectClipboard] bit DEFAULT ((0)) NOT NULL, - [InheritRedirectDiskDrives] bit NOT NULL, - [InheritRedirectKeys] bit NOT NULL, - [InheritRedirectPorts] bit NOT NULL, - [InheritRedirectPrinters] bit NOT NULL, - [InheritRedirectSmartCards] bit NOT NULL, - [InheritRedirectSound] bit NOT NULL, - [InheritRenderingEngine] bit NOT NULL, - [InheritResolution] bit NOT NULL, - [InheritSSHOptions] bit NOT NULL, - [InheritSSHTunnelConnectionName] bit NOT NULL, - [InheritSoundQuality] bit NOT NULL, - [InheritUseConsoleSession] bit NOT NULL, - [InheritUseCredSsp] bit NOT NULL, - [InheritUseEnhancedMode] bit DEFAULT ((0)), - [InheritUseVmId] bit, - [InheritUserField] bit NOT NULL, - [InheritUsername] bit NOT NULL, - [InheritVNCAuthMode] bit NOT NULL, - [InheritVNCColors] bit NOT NULL, - [InheritVNCCompression] bit NOT NULL, - [InheritVNCEncoding] bit NOT NULL, - [InheritVNCProxyIP] bit NOT NULL, - [InheritVNCProxyPassword] bit NOT NULL, - [InheritVNCProxyPort] bit NOT NULL, - [InheritVNCProxyType] bit NOT NULL, - [InheritVNCProxyUsername] bit NOT NULL, - [InheritVNCSmartSizeMode] bit NOT NULL, - [InheritVNCViewOnly] bit NOT NULL, - [InheritVmId] bit, - [StartProgram] varchar(512), - [StartProgramWorkDir] varchar(512) -) ON [PRIMARY] -GO - -CREATE TABLE [dbo].[tblRoot] ( - [Name] [varchar] (2048) NOT NULL , - [Export] [bit] NOT NULL , - [Protected] [varchar] (4048) NOT NULL , - [ConfVersion] [varchar] (15) NOT NULL -) ON [PRIMARY] -GO - -CREATE TABLE [dbo].[tblUpdate] ( - [LastUpdate] [datetime] NULL -) ON [PRIMARY] -GO \ No newline at end of file diff --git a/mRemoteNGDocumentation/mysql_db_setup.sql b/mRemoteNGDocumentation/mysql_db_setup.sql deleted file mode 100644 index 3c2e8af89..000000000 --- a/mRemoteNGDocumentation/mysql_db_setup.sql +++ /dev/null @@ -1,207 +0,0 @@ -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `tblCons` --- - -DROP TABLE IF EXISTS `tblCons`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tblCons` ( - `ID` int(11) NOT NULL AUTO_INCREMENT, - `ConstantID` varchar(128) NOT NULL, - `PositionID` int(11) NOT NULL, - `ParentID` varchar(128) DEFAULT NULL, - `LastChange` datetime NOT NULL, - `Name` varchar(128) NOT NULL, - `Type` varchar(32) NOT NULL, - `Expanded` tinyint(1) NOT NULL, - `AutomaticResize` tinyint(1) NOT NULL DEFAULT 1, - `CacheBitmaps` tinyint(1) NOT NULL, - `Colors` varchar(32) NOT NULL, - `ConnectToConsole` tinyint(1) NOT NULL, - `Connected` tinyint(1) NOT NULL, - `Description` varchar(1024) DEFAULT NULL, - `DisableCursorBlinking` tinyint(1) NOT NULL, - `DisableCursorShadow` tinyint(1) NOT NULL, - `DisableFullWindowDrag` tinyint(1) NOT NULL, - `DisableMenuAnimations` tinyint(1) NOT NULL, - `DisplayThemes` tinyint(1) NOT NULL, - `DisplayWallpaper` tinyint(1) NOT NULL, - `Domain` varchar(512) DEFAULT NULL, - `EnableDesktopComposition` tinyint(1) NOT NULL, - `EnableFontSmoothing` tinyint(1) NOT NULL, - `ExtApp` varchar(256) DEFAULT NULL, - `Favorite` tinyint(1) NOT NULL, - `Hostname` varchar(512) DEFAULT NULL, - `LoadBalanceInfo` varchar(1024) DEFAULT NULL, - `MacAddress` varchar(32) DEFAULT NULL, - `Panel` varchar(128) NOT NULL, - `Password` varchar(1024) DEFAULT NULL, - `Port` int(11) NOT NULL, - `PostExtApp` varchar(256) DEFAULT NULL, - `PreExtApp` varchar(256) DEFAULT NULL, - `Protocol` varchar(32) NOT NULL, - `PuttySession` varchar(128) DEFAULT NULL, - `RDGatewayDomain` varchar(512) DEFAULT NULL, - `RDGatewayHostname` varchar(512) DEFAULT NULL, - `RDGatewayPassword` varchar(1024) DEFAULT NULL, - `RDGatewayUsageMethod` varchar(32) NOT NULL, - `RDGatewayUseConnectionCredentials` varchar(32) NOT NULL, - `RDGatewayUsername` varchar(512) DEFAULT NULL, - `RDPAlertIdleTimeout` tinyint(1) NOT NULL, - `RDPAuthenticationLevel` varchar(32) NOT NULL, - `RDPMinutesToIdleTimeout` int(11) NOT NULL, - `RdpVersion` varchar(10) DEFAULT NULL, - `RedirectAudioCapture` tinyint(1) NOT NULL DEFAULT 0, - `RedirectClipboard` tinyint(1) NOT NULL DEFAULT 0, - `RedirectDiskDrives` tinyint(1) NOT NULL, - `RedirectKeys` tinyint(1) NOT NULL, - `RedirectPorts` tinyint(1) NOT NULL, - `RedirectPrinters` tinyint(1) NOT NULL, - `RedirectSmartCards` tinyint(1) NOT NULL, - `RedirectSound` varchar(64) NOT NULL, - `RenderingEngine` varchar(16) DEFAULT NULL, - `Resolution` varchar(32) NOT NULL, - `SSHOptions` varchar(1024) NOT NULL, - `SSHTunnelConnectionName` varchar(128) NOT NULL, - `SoundQuality` varchar(20) NOT NULL, - `UseCredSsp` tinyint(1) NOT NULL, - `UseEnhancedMode` tinyint(1) DEFAULT NULL, - `UseVmId` tinyint(1) DEFAULT NULL, - `UserField` varchar(256) DEFAULT NULL, - `Username` varchar(512) DEFAULT NULL, - `VNCAuthMode` varchar(10) DEFAULT NULL, - `VNCColors` varchar(10) DEFAULT NULL, - `VNCCompression` varchar(10) DEFAULT NULL, - `VNCEncoding` varchar(20) DEFAULT NULL, - `VNCProxyIP` varchar(128) DEFAULT NULL, - `VNCProxyPassword` varchar(1024) DEFAULT NULL, - `VNCProxyPort` int(11) DEFAULT NULL, - `VNCProxyType` varchar(20) DEFAULT NULL, - `VNCProxyUsername` varchar(512) DEFAULT NULL, - `VNCSmartSizeMode` varchar(20) DEFAULT NULL, - `VNCViewOnly` tinyint(1) NOT NULL, - `VmId` varchar(512) DEFAULT NULL, - `ICAEncryptionStrength` varchar(32) NOT NULL, - `Icon` varchar(128) NOT NULL, - `InheritAutomaticResize` tinyint(1) NOT NULL DEFAULT 0, - `InheritCacheBitmaps` tinyint(1) NOT NULL, - `InheritColors` tinyint(1) NOT NULL, - `InheritDescription` tinyint(1) NOT NULL, - `InheritDisableCursorBlinking` tinyint(1) NOT NULL, - `InheritDisableCursorShadow` tinyint(1) NOT NULL, - `InheritDisableFullWindowDrag` tinyint(1) NOT NULL, - `InheritDisableMenuAnimations` tinyint(1) NOT NULL, - `InheritDisplayThemes` tinyint(1) NOT NULL, - `InheritDisplayWallpaper` tinyint(1) NOT NULL, - `InheritDomain` tinyint(1) NOT NULL, - `InheritEnableDesktopComposition` tinyint(1) NOT NULL, - `InheritEnableFontSmoothing` tinyint(1) NOT NULL, - `InheritExtApp` tinyint(1) NOT NULL, - `InheritFavorite` tinyint(1) NOT NULL, - `InheritICAEncryptionStrength` tinyint(1) NOT NULL, - `InheritIcon` tinyint(1) NOT NULL, - `InheritLoadBalanceInfo` tinyint(1) NOT NULL DEFAULT 0, - `InheritMacAddress` tinyint(1) NOT NULL, - `InheritPanel` tinyint(1) NOT NULL, - `InheritPassword` tinyint(1) NOT NULL, - `InheritPort` tinyint(1) NOT NULL, - `InheritPostExtApp` tinyint(1) NOT NULL, - `InheritPreExtApp` tinyint(1) NOT NULL, - `InheritProtocol` tinyint(1) NOT NULL, - `InheritPuttySession` tinyint(1) NOT NULL, - `InheritRDGatewayDomain` tinyint(1) NOT NULL, - `InheritRDGatewayHostname` tinyint(1) NOT NULL, - `InheritRDGatewayPassword` tinyint(1) NOT NULL, - `InheritRDGatewayUsageMethod` tinyint(1) NOT NULL, - `InheritRDGatewayUseConnectionCredentials` tinyint(1) NOT NULL, - `InheritRDGatewayUsername` tinyint(1) NOT NULL, - `InheritRDPAlertIdleTimeout` tinyint(1) NOT NULL, - `InheritRDPAuthenticationLevel` tinyint(1) NOT NULL, - `InheritRDPMinutesToIdleTimeout` tinyint(1) NOT NULL, - `InheritRdpVersion` tinyint(1) NOT NULL DEFAULT 0, - `InheritRedirectAudioCapture` tinyint(1) NOT NULL DEFAULT 0, - `InheritRedirectClipboard` tinyint(1) NOT NULL DEFAULT 0, - `InheritRedirectDiskDrives` tinyint(1) NOT NULL, - `InheritRedirectKeys` tinyint(1) NOT NULL, - `InheritRedirectPorts` tinyint(1) NOT NULL, - `InheritRedirectPrinters` tinyint(1) NOT NULL, - `InheritRedirectSmartCards` tinyint(1) NOT NULL, - `InheritRedirectSound` tinyint(1) NOT NULL, - `InheritRenderingEngine` tinyint(1) NOT NULL, - `InheritResolution` tinyint(1) NOT NULL, - `InheritSSHOptions` tinyint(1) NOT NULL, - `InheritSSHTunnelConnectionName` tinyint(1) NOT NULL, - `InheritSoundQuality` tinyint(1) NOT NULL, - `InheritUseConsoleSession` tinyint(1) NOT NULL, - `InheritUseCredSsp` tinyint(1) NOT NULL, - `InheritUseEnhancedMode` tinyint(1) DEFAULT NULL, - `InheritUseVmId` tinyint(1) DEFAULT NULL, - `InheritUserField` tinyint(1) NOT NULL, - `InheritUsername` tinyint(1) NOT NULL, - `InheritVNCAuthMode` tinyint(1) NOT NULL, - `InheritVNCColors` tinyint(1) NOT NULL, - `InheritVNCCompression` tinyint(1) NOT NULL, - `InheritVNCEncoding` tinyint(1) NOT NULL, - `InheritVNCProxyIP` tinyint(1) NOT NULL, - `InheritVNCProxyPassword` tinyint(1) NOT NULL, - `InheritVNCProxyPort` tinyint(1) NOT NULL, - `InheritVNCProxyType` tinyint(1) NOT NULL, - `InheritVNCProxyUsername` tinyint(1) NOT NULL, - `InheritVNCSmartSizeMode` tinyint(1) NOT NULL, - `InheritVNCViewOnly` tinyint(1) NOT NULL, - `InheritVmId` tinyint(1) DEFAULT NULL, - `StartProgram` varchar(512) DEFAULT NULL, - `StartProgramWorkDir` varchar(512) DEFAULT NULL, - PRIMARY KEY (`ConstantID`), - UNIQUE (`ID`) -) ENGINE=InnoDB AUTO_INCREMENT=3324 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `tblRoot` --- - -DROP TABLE IF EXISTS `tblRoot`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tblRoot` ( - `Name` varchar(2048) NOT NULL, - `Export` tinyint(1) NOT NULL, - `Protected` varchar(4048) NOT NULL, - `ConfVersion` varchar(15) NOT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Table structure for table `tblUpdate` --- - -DROP TABLE IF EXISTS `tblUpdate`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `tblUpdate` ( - `LastUpdate` datetime(3) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - - -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; diff --git a/mRemoteNGDocumentation/protocols.rst b/mRemoteNGDocumentation/protocols.rst deleted file mode 100644 index 36f9c8d5d..000000000 --- a/mRemoteNGDocumentation/protocols.rst +++ /dev/null @@ -1,11 +0,0 @@ -############## -Protocols -############## - -mRemoteNG supports several remote connection protocols. See each page for more detailed information. - -.. toctree:: - :maxdepth: 1 - - protocols/rdp.rst - \ No newline at end of file diff --git a/mRemoteNGDocumentation/protocols/rdp.rst b/mRemoteNGDocumentation/protocols/rdp.rst deleted file mode 100644 index c8ad9cc64..000000000 --- a/mRemoteNGDocumentation/protocols/rdp.rst +++ /dev/null @@ -1,127 +0,0 @@ -************ -RDP Protocol -************ - -Microsoft's Remote Desktop Protocol is a highly configurable remoting protocol. - - -RDP Protocol Versions -===================== - -There are several versions of the RDP protocol supported in mRemoteNG. Each newer protocol adds support for additional connection properties. By default, RDP connections will attempt to use the highest RDP protocol version supported by both mRemoteNG and your machine. You can manually select a protocol version using the ``RDP Protocol Version`` connection property. - -.. note:: - The ability to select the RDP protocol version was added in mRemoteNG v1.77.1. The RDP 8 protocol was used from mRemoteNG v1.74.0 to v1.77.0. RDP 5 was used in v1.73 and earlier. - -RDP 6 ------ - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Property - - Description - * - Use Console Session - - Connect to the console session of the remote host - * - Server Authentication - - When connecting, RDP clients attempt to authenticate the remote server to ensure that it is who you expect. This option allows you to select how to handle authentication failures. The possible values are ``Always connect, even if authentication fails``, ``Don't connect if authentication fails``, ``Warn me if authentication fails``. - * - Minute to Idle - - Allows you to specify the number of minutes an RDP connection can sit idle before automatically being disconnected. A value of ``0`` means the connection will never disconnect due to inactivity. - * - Load Balance Info - - Load balancing information can be provided to load balancing routers to route RDP connection requests. - * - Use CredSSP - - Allows you to user Credential Security Support Provider (CredSSP) for authentication if it is available. - * - Use Gateway - - Specify whether you would like to use an RD Gateway server. Possible values are ``Never``, ``Always``, ``Detect`` - * - Gateway Hostname - - The hostname of the RD Gateway server. - * - Gateway Credentials - - Allows you to select the authentication to use when connecting to the RD Gateway. - - - ``Use the same username and password`` uses the same authentication information that was specified in the ``Username``, ``Domain``, and ``Password`` fields of the same connection. - - ``Use a different username and password`` allows you to specify alternate credentials using the ``Gateway Username``, ``Gateway Password``, and ``Gateway Domain`` fields. - - ``Use a smart card`` uses your current smart card for authenticaton to the RD Gateway. - * - Gateway Username - - The username to use when authenticating to the RD Gateway. - * - Gateway Password - - The password to use when authenticating to the RD Gateway. - * - Gateway Domain - - The domain to use when authenticating to the RD Gateway. - * - Resolution - - Allows you to select the resolution to use when connecting. - - - ``Fit to panel`` will dynamically select a resolution based on the size of the connection window. When the connection window is resized, scroll bars or grey space will be shown. The ``Automatic Resize`` connection property can be used to automatically resize the connection when the window size changes. - - ``Fullscreen`` will place the RDP connection into fullscreen mode immediately after connecting. When the connection window is resized, scroll bars or grey space will be shown. The ``Automatic Resize`` connection property can be used to automatically resize the connection when the window size changes. - - ``Smart size`` will select an appropriate resolution when initially connecting. When the connection window is resized, the connection image will be stretched or squished to prevent scroll bars or grey space from being shown. - - Specific resolutions are also provided which will guarantee the resolution of the connection. Scroll bars or grey space will be shown if the connection size does not match the connection window size. - * - Colors - - Allows you the specify the color quality to use for the connection. Higher values look better but increases network utilization. - * - Cache Bitmaps - - Uses additional system memory to reduce network bandwidth usage. - * - Display Wallpaper - - Specifies whether the wallpaper of the remote machine should be shown. - * - Display Themes - - Specifies whether the theme of the remote machine should be shown. - * - Font Smoothing - - Enabling this option turns on ClearType, making text clearer and easier to read. Enabling this option increases bandwidth usage of the connection. - * - Desktop Composition - - Enables visual effects on the remote desktop and features like glass window frames, 3D window transition animations, and Windows Flip. Uses more network bandwidth. - * - Redirect Key Combinations - - Select whether key combinations (e.g. Alt-Tab) should be redirected to the remote host. - * - Redirect Disk Drives - - Select whether local disk drives should be shown on the remote host. - * - Redirect Printers - - Select whether local printers should be shown on the remote host. - * - Redirect Clipboard - - Select whether the clipboard should be shared. - * - Redirect Ports - - Select whether local ports (ie. com, parallel) should be shown on the remote host. - * - Redirect Smart Cards - - Select whether local smart cards should be available on the remote host. - * - Redirect Sounds - - Determine how remote sound should be redirected. Possible values are ``Bring to this computer``, ``Leave at remote computer``, ``Do not play`` - - -RDP 7 ------ - -In RDP 7, support was added for specifying the network connection type. This property is used to determine whether certain performance options will be honored by the remote server. Some performance settings (such as Display Wallpaper or Display Themes) will not work when using protocols older than RDP 7 to connect to remote hosts that are Windows 8 or higher. - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Property - - Description - * - Sound Quality - - Specify the quality of sound redirection. Only valid when ``Redirect Sounds`` is enabled. Possible options are ``Dynamic``, ``Medium``, ``High`` - * - Redirect Audio Capture - - Enabled you to redirect the default audio input device on the remote machine to your local computer. - - -RDP 8 ------ - -In RDP 8, support was improved for reconnecting RDP connections for resizing operations. - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Property - - Description - * - Automatic Resize - - When this property is enabled and the connection window is resized, the RDP connection will automatically reconnect with the new window resolution. This prevent scroll bars from being shown and preserves the aspect ratio of the connection (prevents image stretching). This property is only available when ``Resolution`` is set to either ``Fullscreen`` or ``Fit to Panel``. - - -RDP 9 ------ - -We support this protocol version, but are not yet using any of its features. - - -RDP 10 ------- - -We support this protocol version, but are not yet using any of its features. diff --git a/mRemoteNGDocumentation/requirements.txt b/mRemoteNGDocumentation/requirements.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/mRemoteNGDocumentation/sql_configuration.rst b/mRemoteNGDocumentation/sql_configuration.rst deleted file mode 100644 index 67d8fb87e..000000000 --- a/mRemoteNGDocumentation/sql_configuration.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. _sql_configuration: - -***************** -SQL Configuration -***************** - -.. warning:: - - The SQL feature is in an early beta stage and not intended for use in a production environment! I recommend you to do a full backup of your connections and settings before switching to SQL Server. - -Supported Databases -=================== - -The list below includes databases that are officially supported. Others may already work and this list may expand with future updates. - -- MSSQL -- MySQL - -Steps to configure your SQL Server -================================== -- Create a new Database called "mRemoteNG" on your SQL Server. -- Run the SQL Script for your DB type listed below in topic (SQL Table creation Scripts) on the newly created Database. -- Give the users that you want to grant access to the mRemoteNG Connections Database Read/Write permissions on the Database. - -Steps to configure mRemoteNG for SQL -==================================== -- Start mRemoteNG if it's not already running. -- Go to Tools - Options - SQL Server -- Check the box that says "Use SQL Server to load & save connections". -- Fill in your SQL Server hostname or ip address. -- If you do not use your Windows logon info to authenticate against the SQL Server fill in the correct Username and Password. -- Click OK to apply the changes. The main window title should now change to "mRemoteNG | SQL Server". -- Now click on File - Save to update the tables on your SQL Server with the data from the loaded connections xml file. (Do not click File - New, this doesn't work yet) -- You should now be able to do everything you were able to do with the XML storage plus see the changes live on another mRemoteNG instance that is connected to the same Database. - -SQL Table creation Scripts -========================== - -MSSQL ------ - -.. include:: mssql_db_setup.sql - :code: sql - - -MYSQL ------ - -.. include:: mysql_db_setup.sql - :code: sql diff --git a/mRemoteNGDocumentation/troubleshooting.rst b/mRemoteNGDocumentation/troubleshooting.rst deleted file mode 100644 index ddfeffd2d..000000000 --- a/mRemoteNGDocumentation/troubleshooting.rst +++ /dev/null @@ -1,83 +0,0 @@ -*************** -Troubleshooting -*************** - -Logfile -======= - -The mRemoteNG.log is located in the following location: - -MSI/Installed version ---------------------- - -:: - - %APPDATA%\mRemoteNG\mRemoteNG.log - (example: `C:\Users\[username]\AppData\Roaming\mRemoteNG\mRemoteNG.log`) - -Portable version ----------------- - -:: - - [location of mRemoteNG.exe]\mRemoteNG.log - -Crash at Startup -================ - -Try deleting the :code:`user.config` file. It contains all the user-specific program settings. This file is automatically upgraded between version when new user settings are added. - -Installed Version ------------------ - -:: - - %LOCALAPPDATA%\mRemoteNG\\\user.config - -Portable Version ----------------- - -:: - - %APPDATA%\mRemoteNG\\\user.config - -Crash Information -================= - -- Provide the Stack Trace from the crash prompt or from the Windows Application Event Log `example `_) -- Check `C:\Users\All Users\Microsoft\Windows\WER\Report*` folders for any reports related to mRemoteNG -- Check `%LOCALAPPDATA%\CrashDumps `_ for any mRemoteNG.exe.*.dmp files -- Attach the Error Reports, Dumps and mRemoteNG.log to a new `Issue `_ - -Backup and Recovery -=================== - -By default, your connections file is backed up every time it is saved. -These backup files are normal/valid connections file - they have only been renamed to avoid being overwritten. -mRemoteNG will save the 10 most recent backups. - -Files and Locations -------------------- - -Your backup files are located in the same place as your normal connections file. -This could be one of three places: - -- Normal version: `%AppData%\\mRemoteNG` -- Portable version: In the same location as mRemoteNG.exe -- If you have saved your confCons.xml to a custom location, go there. - -There are 2 different backup naming schemes: - -- `confCons.xml.backup` is the most recent backup that was taken. -- `confCons.xml.YYYYMMDD-HHmmssxxxx.backup` is a rolling backup that was moved to a rolling backup file on the date specified in the file name. - -Recovering corrupted connections file -------------------------------------- - -If you find that your confCons.xml file has corrupted or has lost its data, -you will need to revert to a previous version. - -- Locate your confCons.xml file -- Find the most recent backup file that appears to have data (>1KB in size). -- Rename or delete the corrupted `confCons.xml` file. -- Rename the chosen backup file to remove the date stamp and .backup suffix. Unless you set a custom path, your backup file should now be named `confCons.xml`. diff --git a/mRemoteNGDocumentation/user_interface.rst b/mRemoteNGDocumentation/user_interface.rst deleted file mode 100644 index 67d20949c..000000000 --- a/mRemoteNGDocumentation/user_interface.rst +++ /dev/null @@ -1,22 +0,0 @@ -############## -User Interface -############## - -.. figure:: /images/user_interface_overview.png - -.. toctree:: - :maxdepth: 1 - - user_interface/main_window.rst - user_interface/panels.rst - user_interface/menu_container.rst - user_interface/connections.rst - user_interface/default_connection_properties.rst - user_interface/quick_connect.rst - user_interface/port_scan.rst - user_interface/screenshot_manager.rst - user_interface/notifications.rst - user_interface/import_export.rst - user_interface/ssh_file_transfer.rst - user_interface/external_tools.rst - user_interface/options.rst diff --git a/mRemoteNGDocumentation/user_interface/connections.rst b/mRemoteNGDocumentation/user_interface/connections.rst deleted file mode 100644 index 84aa31e41..000000000 --- a/mRemoteNGDocumentation/user_interface/connections.rst +++ /dev/null @@ -1,151 +0,0 @@ -*********** -Connections -*********** - -The connections dialog is the main collection of all connections that inside mRemoteNG. -This document will explain the details of the connections dialog. - -Connection Tree -=============== - -Menu Items ----------- - -.. figure:: /images/connections_top_bar.png - -- **Red** - New Connection -- **Green** - New Folder -- **Blue** - View (Expand/Collapse all folders) -- **Yellow** - Ascending sort - -New Connection --------------- - -.. tip:: - - You can also duplicate an existing connection. Just right click on folder or connection to duplicate the item. The information is then carried over for editing. This can save a lot of time when the connection list is large. - -.. tip:: - - When inside an SSH session you can open the PuTTY menu by holding down the CTRL key while right-clicking into the session window. - -Creates a new connection item in the connections dialog after where cursor is present. - -New Folder ----------- - -.. tip:: - - Folders can help to make adding connections easier. By setting a folder with some values that can be inheritaded down to the connections. - -Creates a new folder in connections dialog after where cursor is present. - -View ----- -Collapses or expands all directories in the connection dialog. -Useful when working with a lot of connections sorted in different directories. - -Ascending ---------- -Works like a sort or a refresh to get connection in ascending order. -(Descending order is note supported yet) When you have been moving around in the tree of connections, -just click this item to refresh the list and get everything in ascending ordering. - -Configuration -============= - -.. figure:: /images/connections_main.png - -Config dialog to setup the connection specific properties. -This includes inheritance from other items before the item and more. -Details below is about how to work with this dialog to get the most out of connections and configuration. - -Menu Items ----------- - -.. figure:: /images/config_top_bar.png - -- **Red** - Sort values Categories or Alphabetical -- **Green** - Show Properties, Inheritance values -- **Blue** - Connection icon -- **Yellow** - Host status (based on ICMP ping) - -Sort Values ------------ -Sorts the values in properties either by Categories or Alphabetically. - -- Categories sort - Shows values in categories with expanding options. -- Alphabetical sort - Expands everything and shows values in alphabetical order instead - -Icon ----- - -.. note:: - - Don't forget that mRemoteNG will save the change on exit auto unless you have unchecked this setting in options. - -The icon indicates the visual identifier for the connection. -Clicking the icon will let you set a different icon for the connection. - -Status ------- - -.. note:: - - In order for this to work you have to open up ICMP. On windows servers this is also disabled in windows firewall. - -Is a indicator that will glow red or green depending on the status of the host. -The status is based on ICMP ping to the host. - - -Creating a connection -===================== - -.. tip:: - - You can see an indicator in the properties window that is glowing green: - - .. figure:: /images/connections_status.png - - This icon does a ICMP ping on to check response from the server. If it glows green it indicates a connection response can be made using ping to the host. However this is turned off on windows by default. You have to enable ICMP and allow the firewall access for it. - - -Right click on the root item (the little blue globe named **Connections**) -in the Connections panel and select **New Connection**. - -.. figure:: /images/connections_rightclick_menu.png - -A new item shows up under the root item. You can give it a name now (or rename it later). -We'll just call this connection "Test" for the moment. - -.. figure:: /images/connections_test_item.png - -Now lets look at the config panel in the bottom left, just under the connections panel. -As you may notice this is where you configure all the properties of connections and folders. - -.. figure:: /images/connections_config.png - -Fill in the necessary properties and you have just created your first connection! -You can now connect to the server with a simple double-click on the "Test"-connection! - -Opening and Closing Connections -=============================== - -.. note:: - - If the connecting fails, the notifications panel will pop up and show an error message describing the problem. - -There are multiple ways to open a connection in mRemoteNG, -but the easiest way is to double click the connection in the Connections panel. -If you double click the connection you will notice that the connection is going -to try and open in a new panel called "General" and under a tab called "Test". -If all goes well you should see the remote desktop without any problems. - -.. figure:: /images/connections_open.png - -To close the connection you can do any of the following: - -- Log off in the start menu (Closes the connection and logs you out completely from RDP) -- Close the panel with the (Which leaves your session active on server but closes connection in mRemoteNG) -- Close the connection tab with (Also keeps your login active on server but closes RDP connection in mRemoteNG) -- Double click the connection tab (Same as above where the connection is active on server but closes RDP connection in mRemoteNG) diff --git a/mRemoteNGDocumentation/user_interface/default_connection_properties.rst b/mRemoteNGDocumentation/user_interface/default_connection_properties.rst deleted file mode 100644 index 1dad4167e..000000000 --- a/mRemoteNGDocumentation/user_interface/default_connection_properties.rst +++ /dev/null @@ -1,34 +0,0 @@ -***************************** -Default Connection Properties -***************************** - -Default connection properties are a template that is applied when creating new connections. You can set both property values and inheritance settings that will be set in new connections. - -.. note:: - Currently, default connection properties are saved within the user settings of mRemoteNG and not with the connection file. Sharing a connection file between multiple machines will not share default connection properties. - - -How it is used -============== - -New Folders/Connections ------------------------ -When a new folder or connection is created, all default properties and default inheritance are applied to it. - -.. note:: - Changing default properties does not affect existing connections. The default values are only applied when the connection is first created. - - -Quick Connections ------------------ -Default connection properties are also used when establishing quick connections. See :doc:`quick_connect` for more details. - - -How to set them -=============== -You can set default properties and inheritance by going to the Connection Tree and clicking the appropriate button for the default settings you would like to change. - -.. figure:: /images/default_properties.png - -- **Red** - Default connection properties -- **Green** - Default connection inheritance diff --git a/mRemoteNGDocumentation/user_interface/external_tools.rst b/mRemoteNGDocumentation/user_interface/external_tools.rst deleted file mode 100644 index d06e85447..000000000 --- a/mRemoteNGDocumentation/user_interface/external_tools.rst +++ /dev/null @@ -1,164 +0,0 @@ -.. _external_tools: - -************** -External Tools -************** - -External Tools can help you get things done that can't be done in mRemoteNG. - -For example you can: - -- Start a command -- Launch your favorite FTP tool - -This might not make much sense by itself because you can already launch your applications by using the Windows Start Menu, -Quick Launch or whatever you prefer to start your apps. - -But from within mRemoteNG you can launch applications and tell them what to do with the use of arguments, parameters and variables -of the currently selected Connection. You can, for example, select your home router's SSH connection entry and do a traceroute (tracert) -on that host. This is much quicker and more powerful than opening the console and typing ``tracert yourhost``. - -Main UI -======= -The below image will show the main UI of *External Tools*. You may find the interface a bit confusing in the beginning but -we will explain the various items in more details below. - -:Menu: :menuselection:`Tools --> External Tools` - -.. figure:: /images/external_tools_main_ui_01.png - - External Tools open with one new entry - - Toolbar (red), Tools/Items List (blue), External Tool Properties (green) - -Toolbar -------- - -.. figure:: /images/external_tools_toolbar_01.png - - External Tools - Toolbar - -New ``Shift-F4`` - Create a new external tool. - -Delete ``Del`` - Delete selected tool item in list. - -Launch - Run the current selected tool on currently selected connection. - -.. hint:: - - All items can be accessed with right click menu and with a keyboard shortcut except for the Launch action. - -Tools/Items List ----------------- - -.. figure:: /images/external_tools_tools_list_01.png - - External Tools - Tools/Items list - -Basically shows the list of Tools/Items that you have created with the arguments and options. - -External Tool Properties ------------------------- - -.. figure:: /images/external_tools_external_tool_properties_01.png - - External Tools - External Tool Properties - -Is where you do most of the work to setup the Tool/Item for External Tools. We will explain each item further down this page. - -Display Name - Name of the tool, this can be any type of name. - - **For example:** - - :code:`Open in FileZilla`, :code:`FileZilla`, :code:`Traceroute` - -Filename - Application/Command to run. - - **For example:** - - :code:`cmd`, :code:`powershell`, :code:`C:\WINDOWS\system32\compmgmt.msc`, - :code:`C:\Program Files(x86)\FileZilla FTP Client\filezilla.exe` - -Arguments - Sometimes also called switches and parameters. This is where you tell the application in the previous (filename) input what to run. - And also which variables from mRemoteNG to use for the arguments. - - **For Example:** - - :code:`sftp://%USERNAME%:%PASSWORD%@%HOSTNAME%:%PORT%`, :code:`/K tracert %HOSTNAME%`, :code:`-NoExit tracert %HOSTNAME%` - -Working directory - From where should this Tool/Item be ran. - -Variables -========= - -Variables and arguments can be used to tell the external tool what to do. - -This is the list of variables supported by mRemoteNG: - -- %NAME% -- %HOSTNAME% -- %PORT% -- %USERNAME% -- %PASSWORD% -- %DOMAIN% -- %DESCRIPTION% -- %MACADDRESS% -- %USERFIELD% - -mRemoteNG will also expand environment variables such as %PATH% and %USERPROFILE%. If you need to use an environment -variable with the same name as an mRemoteNG variable, use \\% instead of %. The most common use of this is for the -USERNAME environment variable. %USERNAME% will be expanded to the username set in the currently selected connection. -\\%USERNAME\\% will be expanded to the value set in the USERNAME environment variable. - -If you need to send a variable name to a program without mRemoteNG expanding it, use ^% instead of %. -mRemoteNG will remove the caret (^) and leave the rest unchanged. -For example, ^%USERNAME^% will be sent to the program as %USERNAME% and will not be expanded. - -Rules for variables -------------------- -- Variables always refer to the currently selected connection. -- Variable names are case-insensitive. -- Variables can be used in both the Filename and Arguments fields. - - -Special Character Escaping -========================== -Expanded variables will be escaped using the rules below. There are two levels of escaping that are done. - -1. Is escaping for standard argument splitting (C/C++ argv, CommandLineToArgvW, etc) -2. Is escaping shell metacharacters for ShellExecute. - -Argument splitting escaping ---------------------------- - -- Each quotation mark will be escaped by a backslash -- One or more backslashes (\\) followed by a quotation mark ("): - - Each backslash will be escaped by another backslash - - The quotation mark will be escaped by a backslash - - If the connection's user field contains ``"This"`` is a ``\"test\"`` - - Then %USERFIELD% is replaced with ``\"This\"`` is a ``\\\"test\\\"`` -- A variable name followed by a quotation mark (for example, %USERFIELD%") with a value ending in one or more backslashes: - - Each backslash will be escaped by another backslash - - Example: - - If the connection's user field contains ``c:\Example\`` - - Then "%USERFIELD%" is replaced with ``"c:\Example\\"`` - -To disable argument splitting escaping for a variable, precede its name with a minus (-) sign. For example: %-USERFIELD% - -Shell metacharacter escaping ----------------------------- - -- The shell metacharacters are ( ) % ! ^ " < > & | -- Each shell metacharacter will be escaped by a caret (^) - -To disable both argument splitting and shell metacharacter escaping for a variable, precede its name with an exclamation point (!). -For example, %!USERFIELD%. This is not recommended and may cause unexpected results. - -Only variables that have been expanded will be escaped. It is up to you to escape the rest of the arguments. diff --git a/mRemoteNGDocumentation/user_interface/import_export.rst b/mRemoteNGDocumentation/user_interface/import_export.rst deleted file mode 100644 index 58b3463d3..000000000 --- a/mRemoteNGDocumentation/user_interface/import_export.rst +++ /dev/null @@ -1,76 +0,0 @@ -************* -Import/Export -************* - -You can import or export your connections to mRemoteNG. Imports can be done in various -different ways. See below for more information. - -Import -====== - -Import from File ----------------- -Opens a normal file load dialog to open a exported xml or csv file for mRemoteNG. -See Export to file further down this page for information on exporting your connections. - -Import from Active Directory ----------------------------- -.. TODO: Needs even more information and testing (new image with a actual import of server from AD) - -This option can be used to import computers from a specific OU from you Arctive Directory. - -.. figure:: /images/import_from_active_directory.png - - Import from Active Directory dialog - -#. Go to: :menuselection:`File --> Import --> Import from Active Directory` -#. Choose the domain to check for computers available - -.. note:: Check the **Import sub OUs** checkbox if you want to import OUs recursively. - -Import from Port Scan ---------------------- -This option opens a dialog to import connections from a port scan. -Both network and port range can be specified. - -.. important:: Port Scan uses nmap to scan the ports. Be carefull on how you scan your network, as this can be considered a brute force attack. - - -.. figure:: /images/import_from_port_scan.png - - Import from Port Scan dialog - -- **First IP** - Start of ip to scan from -- **Last IP** - Stop of ip to scan to -- **First Port** (Optional) - Start port to scan from -- **Last Port** (Optional) - Stop port to scan to -- **Timeout [seconds]** - Seconds to wait until continuing scan - -Once the scan is done you can select connections to import with some options on the lower part of the dialog: - -- **Protocol to import** - Which protocol to use for the import of the connection(s) - -Export to file -============== -Here you can export your settings to a file to share or backup. -The dialog shown below is the dialog of which you chose the options to export. - -.. figure:: /images/import_export_dialog.png - - Export to file dialog example - -Export options: ---------------- -Here is a detailed explanation of the export dialog. - -- **Filename** - The output filename for which to save the export -- **File Format** - Currently supports xml and comma seperated csv output file format -- **Export Items** - Options to what you want to save - - **Export everything** - Will export all the connections - - **Export the currently selected folder** *[nameoffolder]* - Is used to only export all connections - in the folder selected. Note! the *[nameoffolder]* is the name to which you have selected in the connection tree. - - **Export the currently selected connection** *[nameofconnection]* - Same as before with folder but uses the currently - selected connection for export. -- **Export Properties** - Properties of the specific connections to export - -.. note:: Options do change based on what is selected in the connection tree. You can try this out by right clicking on a folder and selecting **Export to file** on a connection to understand more diff --git a/mRemoteNGDocumentation/user_interface/main_window.rst b/mRemoteNGDocumentation/user_interface/main_window.rst deleted file mode 100644 index d556571ac..000000000 --- a/mRemoteNGDocumentation/user_interface/main_window.rst +++ /dev/null @@ -1,55 +0,0 @@ -*********** -Main Window -*********** -After launching mRemoteNG for the first time you will be see -the main interface window looking similar to what is being shown below. - -.. figure:: /images/mremoteng_main_ui.png - - mRemoteNG 1.77 first launch - -In the next part we will start to explore the interface of mRemoteNG. - - -Default Screen -============== -The default screen of mRemoteNG - -- Menubar - Main menu, Quick Connect -- Sidebar - Connections, Config -- Work area - Remote Connections -- Footer - Notifications - -.. figure:: /images/mremoteng_main_ui_connect_win_server.png - - mRemoteNG default Screen, RDP to a Windows 2012 R2 host - -The default interface is very basic in that it will show the most important -part to get started with mRemoteNG. We will explain more details of the interface -further on this document. - - -Customization -============= -.. seealso:: - - :doc:`/keyboard_shortcuts` - For keybindings in mRemoteNG - -mRemoteNG supports themes and keyboard shortcuts. - -.. note:: - - Keyboard shortcuts can be overwritten when a connection is active. Since the connection might use the same shortcut - -The mRemoteNG shortcuts will work when the interface is in focus but not so often when the remote connection is active. - -Themes ------- -These can be chosen from the :menuselection:`Tools --> Options`. -There are also possibilities to create your own themes inside the settings for themes. -By default mRemoteNG has turned off the themes but they are easily -enabled by choosing another theme rather then the default (vs2015light) one. - -.. warning:: - - In order for the theme to load, mRemoteNG needs to be restarted diff --git a/mRemoteNGDocumentation/user_interface/menu_container.rst b/mRemoteNGDocumentation/user_interface/menu_container.rst deleted file mode 100644 index c6c64a78a..000000000 --- a/mRemoteNGDocumentation/user_interface/menu_container.rst +++ /dev/null @@ -1,134 +0,0 @@ -************** -Menu Container -************** - -Hide Menu Container -=================== - -You can hide the Menu Container when right-clicking the mRemoteNG title bar. - -.. figure:: /images/menus_hide_menu_strip.png - -Main Menu -========= - -In this section we are going to explain the menus located in mRemoteNG. - -- **Red** - Anchor to move menu around the interface -- **Green** - The menu items - -.. figure:: /images/menus_main_menu.png - -File Menu ---------- -Contains standard commands for the application. - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Item - - Description - * - New Connection - - Will add a new connection to the Connections dialog after where the cursor is positioned. - * - New Folder - - Add a new folder in the Connections dialog tree where the cursor is positioned. - * - New Connection File - - Create a new connection file. Dialog will come up asking about: filename and where to place the new connection file. - * - Open Connection File - - Open a connection file. Dialog comes up asking about which file to open. For security reasons, this also shows a dialog to ask if you want to save the current file before continuing. - * - Save Connection File - - Saves the currently opened connection file. If you are using a SQL server connection instead it will send a save to the SQL server. - * - Save Connection File As... - - Saves the current connection file to a specific location on disk. - * - Delete... - - Delete currently selected item in connections dialog. - * - Rename - - Rename current selected item in connections dialog. - * - Duplicate - - Duplicate current selected item in connections dialog. - * - Reconnect All Open Connections - - Sends a reconnect to all the open connections in mRemoteNG. - * - Exit - - Exit mRemoteNG application - -View Menu ---------- -Menu for additional dialogs for mRemoteNG. - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Item - - Description - * - Add Connection Panel - - Create a new and empty panel. - * - Connection Panels - - Jump to panel. - * - Connections - - Show connections dialog - * - Config - - Show config dialog - * - Notifications - - Show notifications dialog - * - Screenshots - - Open Screenshots Manager (See: :ref:`screenshot_manager`) - * - Jump To - - Place focus on "Connections", "Config" or "Notifications" panel based on selection. - * - Reset layout - - Resets the layout of panels and dialogs. Warning will come up about the action before continuing. - * - Lock toolbar positions - - Locks the toolbars at the top of the application so you do not move around items by mistake. - * - Quick Connect Toolbar - - Show quick connect toolbar - * - External Tools Toolbar - - Show external tools toolbar - * - Multi SSH Toolbar - - Show multi ssh toolbar - * - Fullscreen - - Fullscreen mRemoteNG (will not fullscreen connection window but only the mRemoteNG application) - -Tools Menu ----------- -Additional tools that can be used and triggered in mRemoteNG. - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Item - - Description - * - SSH File Transfer - - Show SSH file transer panel (See: :ref:`ssh_file_transfer`) - * - External Tools - - Show external tools dialog (See: :ref:`external_tools`) - * - Port Scan - - Show port scan dialog (See: :ref:`port_scan`) - * - Options - - Opens mRemoteNG global settings and options dialog - -Help Menu ---------- -Get more information for the application. - -.. list-table:: - :widths: 30 70 - :header-rows: 1 - - * - Item - - Description - * - mRemoteNG Help - - Show help panel (this panel) - * - Website - - Go to mRemoteNG website - * - Donate - - Go to mRemoteNG donation page - * - Support Forum - - Go to mRemoteNG suport forum - * - Report a Bug - - Go to github page to report a bug - * - Check for Updates - - Opens dialog to check for any updates of mRemoteNG - * - About - - Open about dialog for mRemoteNG (Shows contributors, changelog and more) diff --git a/mRemoteNGDocumentation/user_interface/notifications.rst b/mRemoteNGDocumentation/user_interface/notifications.rst deleted file mode 100644 index d39463034..000000000 --- a/mRemoteNGDocumentation/user_interface/notifications.rst +++ /dev/null @@ -1,43 +0,0 @@ -************* -Notifications -************* - -The notifications panel contains any errors or informational messages that mRemoteNG triggers. -Some example errors can be if there is a problem to connect, information on lost connection and so much more. -Notification settings can be found in (Tools > Options > Notifications) -below we will explain what can be set and how they do affect for various troubleshooting. - -Notifications general settings -============================== - -.. tip:: - - If you dont want the panel to show at all. Then unmark all options inSwitch to Notification panel on. Then the panel will not come up automatically. - -.. figure:: /images/notifications_panel.png - -This will tell mRemoteNG what type of messages and the level of messages to send to the panel. It does not the level for the log that mRemoteNG has but only for panel output. - -There is also 2 different options mentioned below: - -- Show these message types - Level of messages to show in panel. (default: Warnings and Errors) -- Switch to Notifications panel on - If interface should switch to the panel when a level of message occurs (default: all enabled) - -Logging settings -================ -Here you define the logging of messages. -That is a continues log which can be used to backtrack any error that has occurred. -Good when for example reporting issues about mRemoteNG or to check more details about problems. - -Log path - Choose where the log should recide (default: Log to application directory) -Log these message types - Level of logging to logfile (default: Informations, Warnings, Errors) - -Popups settings -=============== - -.. figure:: /images/notifications_popup.png - -When items are selected here you will recieve a popup on the error that occurrs -based on level chosen in settings here. -This can be useful if you do not want to use the notification area -and only get a popup if error occurs. (**default**: all off) diff --git a/mRemoteNGDocumentation/user_interface/options.rst b/mRemoteNGDocumentation/user_interface/options.rst deleted file mode 100644 index d1861eb78..000000000 --- a/mRemoteNGDocumentation/user_interface/options.rst +++ /dev/null @@ -1,250 +0,0 @@ -******* -Options -******* - -Options window which can also be named settings is the window -where you can personalize your options for all of mRemoteNG. -This includes how to set logging, credentials and so on. -Continue reading for the details of the different options here. - -Startup/Exit -============ -Options below are for the various settings for Startup/Exit of mRemoteNG. - -.. list-table:: - :widths: 30 70 70 - :header-rows: 1 - - * - Option - - Default - - Description - * - Reconnect to previously opened sessions on startup - - Off - - This option will allow you to open the connection from which you where connected to after last exit of application - * - Allow only a single instance of the application (mRemoteNG restart required) - - Off - - Enforces and makes sure only a single instance of mRemoteNG is running on the computer - -Appearance -========== -Various options for mRemoteNG appearance. - -.. list-table:: - :widths: 30 70 70 - :header-rows: 1 - - * - Option - - Default - - Description - * - Language - - (Automatically Detect) - - Which language to use for the interface of mRemoteNG - * - Show description tooltips in connection tree - - Off - - Holding mouse over a item in connection tree will show a popout from mouse with information - * - Show full connections file path in window title - - Off - - Adds the complete path to the title of mRemoteNG to where the connection file is located - * - Always show notification area icon - - Off - - Adds mRemoteNG to the taskbar in the OS - * - Minimize to notification area - - Off - - Will place mRemoteNG in taskbar on minimize - -Tabs & Panels -============= -Various settings for how tabs & panels should work in mRemoteNG. - -.. list-table:: - :widths: 30 70 70 - :header-rows: 1 - - * - Option - - Default - - Description - * - Always show panel tabs - - Off - - Will always show the tabs & panels in mRemoteNG - * - Open new tab to the right of the currently selected tab - - On - - When active then open next tab on the right of the active selection in mRemoteNG. Turn this off and next tab will open the next connection at the end of all tabs - * - Show logon information on tab names - - Off - - Show your login in the connection tab - * - Show protocols on tab names - - Off - - When active then in the tab show what protocol is used for the connection - * - Identify quick connect tabs by adding the prefix "Quick:" - - Off - - When active shows Quick: before the connection name in the tab connection to easier identify what is a quick connection and what is a non quick connection - * - Double click on tab closes it - - On - - When double clicking a tab it will close the connection but does not log you out from the server. The connection in this case is active on the destination server - * - Always show panel selection dialog when opening connections - - Off - - Option to allow you to always select what panel to place the connection on. If this is off it will create a General panel where the connection is placed or use the connections set panel from the connection options - * - Create a empty panel when mRemoteNG starts - - Off - - On startup if this is active mRemoteNG will create a panel mentioned under Panel Name - -Connections -=========== -.. list-table:: - :widths: 30 70 70 - :header-rows: 1 - - * - Option - - Default - - Description - * - Single click on connections opens it - - Off - - In connection tree when this is active will try to connect on single click. By default this is turned off to use double click to open connection. - * - Single click on opened connection in Connection Tree switches to the opened Connection Tab - - Off - - Allows you to single click on a active connection in the connection tree to go to that open connection in the tabs faster. - * - Set hostname like display name when creating or renaming connections - - Off - - Will make mRemoteNG try to use the remote host hostname to set the title of the tab in mRemoteNG. - * - Filter search matches in connection tree - - Off - - Allows you to filter out the connections to which does not match your filter search in the connection tree. If not active the search will only select the filter to which you do search. - * - RDP Reconnect count - - 5 - - Value in seconds - * - RDP Connection Timeout - - 20 - - Value in seconds - * - Auto save time in minutes (0 means disabled) - - 0 - - Value in minutes - * - When closing connections Warn me... - - ... when any connection closes - - Various options of how mRemoteNG should act when you close connections. The different options are listed below: - :: - - - ... when any connection closes - - ... when closing multiple connections - - ... only when exiting mRemoteNG - - ... never - By default a warning will come up on closing a connection. Change this value based on your prefered settings. - * - Connection Backup Frequency - - On Edit - - Various options of when mRemoteNG should create a backup of the connections file. The different options are listed below: - :: - - - Never backup connections - - On Edit - - On Exit - - Daily - - Weekly - By default a backup will be saved every time the connections are edited. Change this value based on your prefered settings. - * - Maximum number of backups - - 10 - - Number of backup copies of the connection file to keep. - * - Location of backup files - - (blank) - - Full path of backup copies of the connection files. - -Credentials -=========== -Options for credentials in mRemoteNG. The main purpose here is that when you have empty username, password or domain field then use below information. - -.. list-table:: - :widths: 30 70 70 - :header-rows: 1 - - * - Option - - Default - - Description - * - None - - On - - Use no specific settings on login - * - My Current credentials (Windows logon information) - - Off - - This option will use the logon information for the OS. This is useful if you are in a domain that uses specific credentials and want to login to servers with those credentials - * - The following - - Off - - Use one or two of the options below for the empty login or all of them. For example if you have a different domain that you login to the servers with - -SQL Server -========== - -.. note:: - - To understand more about SQL Server connection please see here: :ref:`sql_configuration` - -.. list-table:: - :widths: 30 70 70 - :header-rows: 1 - - * - Option - - Default - - Description - * - Use SQL Server to load & save connections - - Off - - Enable to fetch connections from a database. - -Updates -======= -Options for how mRemoteNG should check for updates from the website. - -.. list-table:: - :widths: 30 70 70 - :header-rows: 1 - - * - Option - - Default - - Description - * - Check for updates at startup - - On (Every 14 days) - - Here you can choose how often mRemoteNG checks for updates. Standard is every 14 days - * - Release Channel - - Stable - - The main channel to use for mRemoteNG. Note that the channels are described under the selection. Stable is suggested for normal usage but its always good to get feedback on upcoming releases - * - Use a proxy server to connect - - Off - - Proxy to connect through to check for updates. This is not a proxy connection for when you connect to a server but more to check for updates - -Theme -===== -This is not enabled by default but can be used inside mRemoteNG. -To enable themes you have to first enable it in the checkbox at the bottom of the options. -Then restart mRemoteNG in order for it to work. - -.. note:: - - Default theme is: vs2015light - -.. note:: - - To know more about themes and how to create your own See Here - -Advanced -======== - -.. list-table:: - :widths: 30 70 70 - :header-rows: 1 - - * - Option - - Default - - Description - * - Automatically get session information - - Off - - - * - Automatically try to reconnect when disconnected from server (RDP & ICA only) - - Off - - - * - Use UTF8 encoding for RDP "Load Balance info" property - - Off - - - * - Use custom PuTTY path - - Off - - - * - To configure PuTTY sessions click this button - - Launch PuTTY - - Will launch the putty agent so you can edit the sessions - * - Maximum PuTTY and integrated external tools wait time - - 2 seconds - - diff --git a/mRemoteNGDocumentation/user_interface/panels.rst b/mRemoteNGDocumentation/user_interface/panels.rst deleted file mode 100644 index 96ddcdb36..000000000 --- a/mRemoteNGDocumentation/user_interface/panels.rst +++ /dev/null @@ -1,62 +0,0 @@ -****** -Panels -****** - -mRemoteNG is using tabs and panels to stay organized but also to create -a better view of all multitasking that is being done inside the application. - - -Explanation -============ - -Panels are used to organize tabbed conections. This might seem a bit confusing -at first glance but is a great way to stay organized. Below is a few examples -of how to use panels to give you a hands on better view of them: - -- *Test and Production* - You can add 2 panels where you have test servers in one panel and production connections in the other - -- *Datacenters* - Maybe you want to divide panels into different datacenters - -- *Temp project* - To see all servers you work on for a temporary project - -- *Home vs Work* - Or divide them up into where home connections are and work connections are located - -As you can see the panels organization do have benefits to it. -Below you will see a screenshot of a organized view where Domain A -is in panel 1 and Domain B is in panel 2. - -.. figure:: /images/user_interface_panels_01.png - - Example two panels created with Domain A and Domain B - -The function of a panel works as a sort of workspace. - - -Creating Panels -=============== - -Usually panels are created using connections and folders to stay organized -automatic when making connections. However you can also create panels manually. - -.. figure:: /images/user_interface_panels_02.png - - Menu items for panels under **View** - -Creating manual panels will make you able to organize tabs manually in mRemoteNG. -To then open a connection to the new panel, right click on the connection and use -:menuselection:`Connect (with options) --> Choose panel before connecting` - -The other option in the menu name **Connection Panels** will list all panels -that are available in mRemoteNG window. - - -More Options -============ -If you right click on the panel there are a few more options that can be set: - -.. figure:: /images/user_interface_panels_03.png - - Right click context menu for panel - -- **Rename** - Rename the panel -- **Send to...** - Send the whole panel to monitor/screen *[number]*. Note this is not a real window but a detachable panel. If you double click the title then the panel will go back to mRemoteNG window and not fullscreen the window. diff --git a/mRemoteNGDocumentation/user_interface/port_scan.rst b/mRemoteNGDocumentation/user_interface/port_scan.rst deleted file mode 100644 index b7476585d..000000000 --- a/mRemoteNGDocumentation/user_interface/port_scan.rst +++ /dev/null @@ -1,20 +0,0 @@ -.. _port_scan: - -********* -Port Scan -********* - -The Port Scan feature (under Tools > Port Scan) is similar to a nmap port scan. -It will scan a range of IP addresses and to determine if specific mRemoteNG supported protocols are active. Hosts can then be bulk imported into mRemoteNG. - -.. tip:: - - If you leave this at the default of 0 & 0, the test will be for the default protocol ports that mRemoteNG supports. - -- Start the Port Scan feature by clicking Tools > Port Scan in the menu bar. -- Input your Start IP and End IP of the range you'd like to scan. -- Enter the Start Port and End Port that mRemoteNG should test for. -- Click Scan -- Wait. Possibly a long time. -- The table will populate, and eventually you'll get a notification that the scan has completed. Alternatively, you can press Stop to end the scan at any time. -- Change the dropdown to the protocol you'd like to import and click Import. \ No newline at end of file diff --git a/mRemoteNGDocumentation/user_interface/quick_connect.rst b/mRemoteNGDocumentation/user_interface/quick_connect.rst deleted file mode 100644 index 37563d982..000000000 --- a/mRemoteNGDocumentation/user_interface/quick_connect.rst +++ /dev/null @@ -1,41 +0,0 @@ -************* -Quick Connect -************* - -The Quick Connect functionality of mRemoteNG allows you to quickly connect to a remote host using a variety of network protocols. - -Prerequisites -============= -- Knowledge of a DNS host name or IP address -- Knowledge of an appropriate protocol to communicate with remote host -- A predefined mRemoteNG connection - -Using QuickConnect -================== - -.. tip:: - - You can input username and hostname simultaneously when using user@domain as connection string. - -To use Quick Connect, ensure the Quick Connect toolbar is enabled by selecting View and then Quick Connect Toolbar. -Next, input a DNS host name or IP address into the box labeled "Connect". This box will also save previous entries during your session. - -.. figure:: /images/quick_connect_01.png - -.. figure:: /images/quick_connect_02.png - -Select the appropriate network protocol by clicking the arrow next to the Connect box. - -.. figure:: /images/quick_connect_03.png - -If you wish to use an existing connection, select the globe icon next to the protocol button and select the appropriate connection. - -Configuration -============= - -Quick connections take most of their configuration from the :doc:`default_connection_properties`. -All default properties are used `except` for: - -- Hostname -- Protocol -- Port (the default port for the selected protocol is used) diff --git a/mRemoteNGDocumentation/user_interface/screenshot_manager.rst b/mRemoteNGDocumentation/user_interface/screenshot_manager.rst deleted file mode 100644 index a4af8ed5f..000000000 --- a/mRemoteNGDocumentation/user_interface/screenshot_manager.rst +++ /dev/null @@ -1,35 +0,0 @@ -.. _screenshot_manager: - -****************** -Screenshot Manager -****************** - -The screenshot manager is a panel and tool that can be used to organize -and take screenshots inside mRemoteNG. - -Take a screenshot -================= -To take a screenshot of a instance its as easy as to right click on -the connection tab and press Screenshot and it will open the screenshot manager. - -.. figure:: /images/screenshot_manager_rightclick_menu.png -.. figure:: /images/screenshot_manager_overview.png - -On the first image you can see the right click menu of the connection tab. -Clicking the screenshot there will allow mRemoteNG to create a screenshot. - -The second image is where the screenshots are stored in mRemoteNG. -Here you can store and then decide what to do with the images after you are done taking screenshots. - -Editing -======= -The manager is a simple tool for saving and deleting screenshots. -If you need to do more with the screenshots then the suggestion is to open them in a third party app. -Here is what the manager allows you to do: - -- Save -- Save All -- Delete -- Delete All - -Once you press save, a window to save the files will come up where you want to save the screenshots. diff --git a/mRemoteNGDocumentation/user_interface/ssh_file_transfer.rst b/mRemoteNGDocumentation/user_interface/ssh_file_transfer.rst deleted file mode 100644 index 27346f965..000000000 --- a/mRemoteNGDocumentation/user_interface/ssh_file_transfer.rst +++ /dev/null @@ -1,67 +0,0 @@ -.. _ssh_file_transfer: - -***************** -SSH File Transfer -***************** - -SSH File Transfer functionality allows you to securely transfer files to a -remote host over an encrypted tunnel using either **SFTP** or **SCP**. - -Prerequisites -============= -- SSH File Transfer requires an SSH service to listen on an available network port (default 22) on a remote host. -- A username and password must be supplied to connect with the remote host. -- The remote host must have a writeable folder on its filesystem to place the transferred files. - -Configuration Options -===================== -- **Host** - The remote host you connect to. Can be DNS name or IP address. -- **Port** - Remote network port listening for SSH/SFTP/SCP traffic. -- **User** - Username for account to log on to remote host. -- **Password** - Password for account to log on to remote host. -- **Protocol** - Choice of SCP or SFTP protocol used for communication. -- **Local File** - Path of file to transfer from local host. -- **Remote File** - Path where file will be transferred on remote host. (e.g. "/home/John/Documents") - -Using SSH File Transfer -======================= -Begin by going to :menuselection:`Tools --> SSH File Transfer`. - -The tool will open a new panel inside mRemoteNG which allows you to configure -some options for the SSH File Transfer. Each option is needed in order to -complete a file transfer over SSH. - -.. figure:: /images/ssh_file_transfer_01.png - - Main SSH File Transfer panel - -- To populate the **Local File** option, select the **Browse** button and navigate to - the desired file on the local filesystem. - -- To populate the **Remote File** option, manually type desired filesystem path, - including the desired file name. - -Once all options are populated, select **Transfer** and the progress bar at -the bottom of the window will show the progress of the transfer. - -Troubleshooting SSH File Transfer -================================= -To troubleshoot issues with SSH File Transfer, consult the log under -:code:`%AppData%\mRemoteNG\mRemoteNG.log`. -This log provides verbose information about successful and failed connections. - -Common Issues -------------- -ERROR - Please fill all fields - This issue was likely encountered because you did not provide all - information needed to establish the connection. - -ERROR- SSH background transfer failed! - This issue was likely encountered due to a permissions issue. - Ensure you have appropriate access to write to the specified Remote File. - -System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it - This issue was likely encountered because the local host could not contact the remote - host specified on the remote port specified. - The issue may be caused by improperly configured firewall rules or a - SSH service not listening properly on the remote host. diff --git a/mRemoteNGInstaller/CustomActions/CustomAction.config b/mRemoteNGInstaller/CustomActions/CustomAction.config deleted file mode 100644 index de951b78d..000000000 --- a/mRemoteNGInstaller/CustomActions/CustomAction.config +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/mRemoteNGInstaller/CustomActions/CustomActions.cs b/mRemoteNGInstaller/CustomActions/CustomActions.cs deleted file mode 100644 index d13453244..000000000 --- a/mRemoteNGInstaller/CustomActions/CustomActions.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Microsoft.Deployment.WindowsInstaller; - -namespace CustomActions -{ - public class CustomActions - { - [CustomAction] - public static ActionResult IsMinimumRdpVersionInstalled(Session session) - { - var acceptedRdpKbVariables = new[] { session["RDP80_KB"], session["RDP81_KB"] }; - var returnVariable = "MINIMUM_RDP_VERSION_INSTALLED"; - var kbInstalledChecker = new KbInstalledChecker(session); - kbInstalledChecker.Execute(acceptedRdpKbVariables, returnVariable); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult IsRdpDtlsUpdateInstalled(Session session) - { - var kb = session["RDP_DTLS_KB"]; - var returnVar = "RDP_DTLS_UPDATE_INSTALLED"; - var kbInstalledChecker = new KbInstalledChecker(session); - kbInstalledChecker.Execute(kb, returnVar); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult IsLegacyVersionInstalled(Session session) - { - session.Log("Begin IsLegacyVersionInstalled"); - var uninstaller = new UninstallNsisVersions(); - if (uninstaller.IsLegacymRemoteNgInstalled()) - { - session["LEGACYVERSIONINSTALLED"] = "1"; - } - else - { - session["LEGACYVERSIONINSTALLED"] = "0"; - } - - session.Log("End IsLegacyVersionInstalled"); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult UninstallLegacyVersion(Session session) - { - session.Log("Begin UninstallLegacyVersion"); - var uninstaller = new UninstallNsisVersions(); - uninstaller.GetLegacyUninstallString(); - uninstaller.UninstallLegacyVersion(true); - session.Log("End UninstallLegacyVersion"); - return ActionResult.Success; - } - } -} \ No newline at end of file diff --git a/mRemoteNGInstaller/CustomActions/CustomActions.csproj b/mRemoteNGInstaller/CustomActions/CustomActions.csproj deleted file mode 100644 index 169f219b0..000000000 --- a/mRemoteNGInstaller/CustomActions/CustomActions.csproj +++ /dev/null @@ -1,84 +0,0 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {5423D985-CB48-4344-B47F-E8C6D60C8B04} - Library - Properties - CustomActions - CustomActions - v4.8 - 512 - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets - - - - - - - - true - bin\x64\Debug\ - DEBUG;TRACE - full - x64 - 7.3 - prompt - - - bin\x64\Release\ - TRACE - true - pdbonly - x64 - 7.3 - prompt - - - true - bin\x64\Debug Portable\ - DEBUG;TRACE - full - x64 - 7.3 - prompt - - - bin\x64\Release Portable\ - TRACE - true - pdbonly - x64 - 7.3 - prompt - - - bin\x64\Release Installer\ - TRACE - true - pdbonly - x64 - 7.3 - prompt - - - - - - True - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/CustomActions/InstalledWindowsUpdateChecker.cs b/mRemoteNGInstaller/CustomActions/InstalledWindowsUpdateChecker.cs deleted file mode 100644 index 5fa3d6d27..000000000 --- a/mRemoteNGInstaller/CustomActions/InstalledWindowsUpdateChecker.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.Management; -using System.Collections; -using System.Collections.Generic; - -namespace CustomActions -{ - public class InstalledWindowsUpdateChecker - { - private readonly ManagementScope _managementScope; - - public InstalledWindowsUpdateChecker() - { - _managementScope = Connect(); - } - - - public ManagementScope Connect() - { - try - { - return new ManagementScope(@"root\cimv2"); - } - catch (ManagementException e) - { - Console.WriteLine($"Failed to connect: {e.Message}"); - throw; - } - } - - public ArrayList GetInstalledUpdates() - { - const string query = "SELECT * FROM Win32_QuickFixEngineering"; - var installedUpdates = new ArrayList(); - var searcher = new ManagementObjectSearcher(_managementScope, new ObjectQuery(query)); - foreach(var o in searcher.Get()) - { - var queryObj = (ManagementObject) o; - installedUpdates.Add(queryObj["HotFixID"]); - } - return installedUpdates; - } - - public bool IsUpdateInstalled(string kb) => IsUpdateInstalled(new[] {kb}); - - public bool IsUpdateInstalled(IEnumerable kbList) - { - var updateIsInstalled = false; - var whereClause = BuildWhereClauseFromKbList(kbList); - if (whereClause == "") return false; - var query = $"SELECT HotFixID FROM Win32_QuickFixEngineering WHERE {whereClause}"; - var searcher = new ManagementObjectSearcher(_managementScope, new ObjectQuery(query)); - if (searcher.Get().Count > 0) - updateIsInstalled = true; - return updateIsInstalled; - } - - private string BuildWhereClauseFromKbList(IEnumerable kbList) - { - var whereClause = ""; - var counter = 0; - foreach (var kb in kbList) - { - if (counter > 0) - whereClause += " OR "; - whereClause += $"HotFixID='{kb}'"; - counter++; - } - return whereClause; - } - } -} \ No newline at end of file diff --git a/mRemoteNGInstaller/CustomActions/KbInstalledChecker.cs b/mRemoteNGInstaller/CustomActions/KbInstalledChecker.cs deleted file mode 100644 index bdfe432f3..000000000 --- a/mRemoteNGInstaller/CustomActions/KbInstalledChecker.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.Deployment.WindowsInstaller; - -namespace CustomActions -{ - public class KbInstalledChecker - { - private readonly Session _session; - private readonly InstalledWindowsUpdateChecker _installedUpdateChecker; - - public KbInstalledChecker(Session session) - { - _installedUpdateChecker = new InstalledWindowsUpdateChecker(); - _session = session; - } - - public bool Execute(string acceptedKb, string returnVar) => Execute(new[] {acceptedKb}, returnVar); - - public bool Execute(IEnumerable acceptedKbs, string returnVar) - { - try - { - _session.Log("Begin KbInstalledChecker"); - var isUpdateInstalled = _installedUpdateChecker.IsUpdateInstalled(acceptedKbs); - SetReturnValue(isUpdateInstalled, returnVar); - _session.Log("End KbInstalledChecker"); - return true; - } - catch (Exception e) - { - _session.Log($"There was an issue executing the KbInstalledChecker. Exception: {e}"); - return false; - } - } - - private void SetReturnValue(bool isUpdateInstalled, string returnVar) - { - var updateInstalledVal = isUpdateInstalled ? "1" : "0"; - _session[returnVar] = updateInstalledVal; - _session.Log($"Set property '{returnVar}' to '{updateInstalledVal}'"); - } - } -} \ No newline at end of file diff --git a/mRemoteNGInstaller/CustomActions/Properties/AssemblyInfo.cs b/mRemoteNGInstaller/CustomActions/Properties/AssemblyInfo.cs deleted file mode 100644 index 3114143cb..000000000 --- a/mRemoteNGInstaller/CustomActions/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HotfixInstalled")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HotfixInstalled")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5423d985-cb48-4344-b47f-e8c6d60c8b04")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/mRemoteNGInstaller/CustomActions/UninstallNSISVersions.cs b/mRemoteNGInstaller/CustomActions/UninstallNSISVersions.cs deleted file mode 100644 index bcf04678c..000000000 --- a/mRemoteNGInstaller/CustomActions/UninstallNSISVersions.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using Microsoft.Win32; -using System.Diagnostics; - - -namespace CustomActions -{ - public class UninstallNsisVersions - { - private const string RegistryPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\mRemoteNG"; - private const string RegistryPathWow6432 = "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\mRemoteNG"; - private RegistryKey _activeRegistryPath; - - - public UninstallNsisVersions() - { - GetLegacymRemoteNgRegistryKeyPath(); - } - - public void UninstallLegacyVersion(bool silent = false) - { - if (!IsLegacymRemoteNgInstalled()) - return; - var uninstallString = GetLegacyUninstallString(); - var forceNonTempUninstaller = $"_?={uninstallString.Replace("Uninstall.exe", "").Replace(@"""", "")}"; - var silentUninstall = ""; - if (silent) - { - silentUninstall = "/S"; - } - var processStartInfo = new ProcessStartInfo(uninstallString) - { - UseShellExecute = true, - Arguments = $"{forceNonTempUninstaller} {silentUninstall}" - }; - var uninstallProcess = Process.Start(processStartInfo); - while (uninstallProcess != null && uninstallProcess.HasExited == false) - { - Debug.WriteLine("Waiting for uninstaller to exit"); - } - } - - public bool IsLegacymRemoteNgInstalled() - { - return (_activeRegistryPath != null); - } - - public string GetLegacyUninstallString() - { - return IsLegacymRemoteNgInstalled() ? _activeRegistryPath.GetValue("UninstallString").ToString() : ""; - } - - private void GetLegacymRemoteNgRegistryKeyPath() - { - GetUninstallKeyPath(); - GetUninstallKeyPath6432(); - } - - private void GetUninstallKeyPath() - { - try - { - _activeRegistryPath = Registry.LocalMachine.OpenSubKey(RegistryPath); - } - catch (Exception) - { - // ignored - } - } - - private void GetUninstallKeyPath6432() - { - try - { - _activeRegistryPath = Registry.LocalMachine.OpenSubKey(RegistryPathWow6432); - } - catch (Exception) - { - // ignored - } - } - } -} \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/CustomActions/CheckForInstalledWindowsUpdates.wxs b/mRemoteNGInstaller/Installer/CustomActions/CheckForInstalledWindowsUpdates.wxs deleted file mode 100644 index 583fc20ca..000000000 --- a/mRemoteNGInstaller/Installer/CustomActions/CheckForInstalledWindowsUpdates.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/CustomActions/SaveInstallLocation.wxs b/mRemoteNGInstaller/Installer/CustomActions/SaveInstallLocation.wxs deleted file mode 100644 index 4dfda2ad0..000000000 --- a/mRemoteNGInstaller/Installer/CustomActions/SaveInstallLocation.wxs +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - CMDLINE_INSTALLDIR - - - - - - - CMDLINE_INSTALLDIR - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/CustomActions/UninstallLegacyVersions.wxs b/mRemoteNGInstaller/Installer/CustomActions/UninstallLegacyVersions.wxs deleted file mode 100644 index 65dc0d172..000000000 --- a/mRemoteNGInstaller/Installer/CustomActions/UninstallLegacyVersions.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/CustomDialogs/My_CustomizeDlg.wxs b/mRemoteNGInstaller/Installer/CustomDialogs/My_CustomizeDlg.wxs deleted file mode 100644 index a273a8b40..000000000 --- a/mRemoteNGInstaller/Installer/CustomDialogs/My_CustomizeDlg.wxs +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - 1 - Installed - Installed - - - 1 - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - Installed - - - - Installed - - - - - diff --git a/mRemoteNGInstaller/Installer/CustomDialogs/My_WixUI_FeatureTree.wxs b/mRemoteNGInstaller/Installer/CustomDialogs/My_WixUI_FeatureTree.wxs deleted file mode 100644 index e6bfc230b..000000000 --- a/mRemoteNGInstaller/Installer/CustomDialogs/My_WixUI_FeatureTree.wxs +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - NOT Installed - Installed AND PATCH - - 1 - LicenseAccepted = "1" - - Installed - NOT Installed - 1 - - NOT Installed OR WixUI_InstallMode = "Change" - Installed AND NOT PATCH - Installed AND PATCH - - 1 - - 1 - 1 - 1 - 1 - - - - - diff --git a/mRemoteNGInstaller/Installer/Filters/Harvest_Filter.xslt b/mRemoteNGInstaller/Installer/Filters/Harvest_Filter.xslt deleted file mode 100644 index 8f63dffb3..000000000 --- a/mRemoteNGInstaller/Installer/Filters/Harvest_Filter.xslt +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Fragments/DirectoriesFragment.wxs b/mRemoteNGInstaller/Installer/Fragments/DirectoriesFragment.wxs deleted file mode 100644 index 41a51e212..000000000 --- a/mRemoteNGInstaller/Installer/Fragments/DirectoriesFragment.wxs +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Fragments/FilesFragment.wxs b/mRemoteNGInstaller/Installer/Fragments/FilesFragment.wxs deleted file mode 100644 index 3b0a34b39..000000000 --- a/mRemoteNGInstaller/Installer/Fragments/FilesFragment.wxs +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Fragments/MainExeFragment.wxs b/mRemoteNGInstaller/Installer/Fragments/MainExeFragment.wxs deleted file mode 100644 index 8cb9f674a..000000000 --- a/mRemoteNGInstaller/Installer/Fragments/MainExeFragment.wxs +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Fragments/MiscTextFilesFragment.wxs b/mRemoteNGInstaller/Installer/Fragments/MiscTextFilesFragment.wxs deleted file mode 100644 index 7889e8a1d..000000000 --- a/mRemoteNGInstaller/Installer/Fragments/MiscTextFilesFragment.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Fragments/PuTTYNGFragment.wxs b/mRemoteNGInstaller/Installer/Fragments/PuTTYNGFragment.wxs deleted file mode 100644 index 62d105822..000000000 --- a/mRemoteNGInstaller/Installer/Fragments/PuTTYNGFragment.wxs +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Fragments/RegistryEntriesFragment.wxs b/mRemoteNGInstaller/Installer/Fragments/RegistryEntriesFragment.wxs deleted file mode 100644 index 2d81c3c5c..000000000 --- a/mRemoteNGInstaller/Installer/Fragments/RegistryEntriesFragment.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/mRemoteNGInstaller/Installer/Fragments/ShortcutFragment.wxs b/mRemoteNGInstaller/Installer/Fragments/ShortcutFragment.wxs deleted file mode 100644 index a29e11e9d..000000000 --- a/mRemoteNGInstaller/Installer/Fragments/ShortcutFragment.wxs +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Includes/Config.wxi b/mRemoteNGInstaller/Installer/Includes/Config.wxi deleted file mode 100644 index e33df21fd..000000000 --- a/mRemoteNGInstaller/Installer/Includes/Config.wxi +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Installer.wixproj b/mRemoteNGInstaller/Installer/Installer.wixproj deleted file mode 100644 index 3de5eff75..000000000 --- a/mRemoteNGInstaller/Installer/Installer.wixproj +++ /dev/null @@ -1,197 +0,0 @@ - - - - Debug - x64 - 3.10 - f0168b9f-6815-40df-ba53-46cee7683b68 - 2.0 - mRemoteNG-Installer - Package - $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets - bin\$(Configuration)\ - obj\$(Configuration)\ - - - HarvestPath=..\mRemoteNG\bin\Debug; - - - HarvestPath=..\mRemoteNG\bin\Release; - - - HarvestPath=..\mRemoteNG\bin\Debug Portable; - - - HarvestPath=..\mRemoteNG\bin\Release Portable; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(WixExtDir)\WixUtilExtension.dll - WixUtilExtension - - - $(WixExtDir)\WixUIExtension.dll - WixUIExtension - - - $(WixExtDir)\WixNetFxExtension.dll - WixNetFxExtension - - - - - - - - - - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release - en-US - True - - - en-US - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug Portable - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release Portable - bin\x64\$(Platform)\$(Configuration)\ - - - :: When passing paths to powershell scripts, check if the path ends with a backslash "\" -:: If it does, then the backslash may be interpreted as an escape character. Add another backslash to cancel the first one. - -powershell -noprofile -command "sleep 2" - -set /p buildenv=<buildenv.tmp - -:: Manual builds, set the cert password and uncomment below. -:: IF "%25APPVEYOR_BUILD_FOLDER"=="" ( set cert_pwd= ) - -:: Call the post build powershell script -powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild_installer.ps1" -SolutionDir "$(SolutionDir)\" -TargetDir "%25cd%25" -TargetFileName "mRemoteNG.exe" -ConfigurationName "%25buildenv%25" -CertificatePath "$(CertPath)" -CertificatePassword "$(CertPassword)" -ExcludeFromSigning "PuTTYNG.exe" - - - en-US - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release - en-US - True - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug Portable - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release Portable - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - True - False - - - en-US - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release - en-US - True - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug Portable - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release Portable - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Debug Portable - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - HarvestPath=$(SolutionDir)mRemoteNG\bin\x64\Release Portable - bin\$(Platform)\$(Configuration)\ - obj\$(Platform)\$(Configuration)\ - - - REM Clean the TargetDir -rmdir /S /Q "$(TargetDir)" - -echo $(ConfigurationName) > buildenv.tmp - -REM Harvest bin directory of the mRemoteNG project -"$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteNG\bin\x64\$(Configuration)" -ag -nologo -dr INSTALLDIR -var var.HarvestPath -srd -scom -sreg -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt" - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Localizations/en-US.wxl b/mRemoteNGInstaller/Installer/Localizations/en-US.wxl deleted file mode 100644 index 24ea485f9..000000000 --- a/mRemoteNGInstaller/Installer/Localizations/en-US.wxl +++ /dev/null @@ -1,27 +0,0 @@ - - - - - A newer version of [ProductName] is already installed. - You need to be an administrator to install this product. - mRemoteNG requires Microsoft .NET Framework [REQUIREDDOTNETFRAMEWORKVERSION] or higher. - mRemoteNG requires Windows 7 SP1 or higher to run. Please update your operating system and try again. - mRemoteNG requires RDP 8.0 or higher to run. Windows 7 users will need to install either KB2592687 (RDP 8.0) or KB2830477 (RDP 8.1) - mRemoteNG requires KB2574819 in order to create RDP connections. Windows 7 users will need to install this KB. - For mRemoteNG to run on Windows 7, it requires Service Pack 1 to be installed. Please install Service Pack 1 and try again. - - - Desktop - Credits - License - Version History - - - Complete - Desktop Shortcut - Start Menu Shortcut - - - Launch mRemoteNG now - - \ No newline at end of file diff --git a/mRemoteNGInstaller/Installer/Resources/AppIcon.ico b/mRemoteNGInstaller/Installer/Resources/AppIcon.ico deleted file mode 100644 index f3cc087a2..000000000 Binary files a/mRemoteNGInstaller/Installer/Resources/AppIcon.ico and /dev/null differ diff --git a/mRemoteNGInstaller/Installer/Resources/Installer_Header.png b/mRemoteNGInstaller/Installer/Resources/Installer_Header.png deleted file mode 100644 index 1b26685ea..000000000 Binary files a/mRemoteNGInstaller/Installer/Resources/Installer_Header.png and /dev/null differ diff --git a/mRemoteNGInstaller/Installer/Resources/Installer_Side.png b/mRemoteNGInstaller/Installer/Resources/Installer_Side.png deleted file mode 100644 index 91addde88..000000000 Binary files a/mRemoteNGInstaller/Installer/Resources/Installer_Side.png and /dev/null differ diff --git a/mRemoteNGInstaller/Installer/Resources/License.rtf b/mRemoteNGInstaller/Installer/Resources/License.rtf deleted file mode 100644 index e7f24cb5b..000000000 --- a/mRemoteNGInstaller/Installer/Resources/License.rtf +++ /dev/null @@ -1,51 +0,0 @@ -{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} -{\colortbl;\red255\green0\blue0;\red0\green0\blue255;} -\widowctrl\hyphauto - -{\pard \ql \f0 \sa180 \li0 \fi0 \f1 GNU GENERAL PUBLIC LICENSE\line - Version 2, June 1991\par} -{\pard \ql \f0 \sa180 \li0 \fi0 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 \f1 Preamble\par} -{\pard \ql \f0 \sa180 \li0 \fi0 The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 The precise terms and conditions for copying, distribution and modification follow.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 \f1 GNU GENERAL PUBLIC LICENSE\par} -{\pard \ql \f0 \sa180 \li0 \fi0 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\par} -{\pard \ql \f0 \sa0 \li360 \fi-360 0.\tx360\tab This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".\sa180\par} -{\pard \ql \f0 \sa180 \li0 \fi0 Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.\par} -{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.\sa180\par} -{\pard \ql \f0 \sa180 \li0 \fi0 You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:\par} -{\pard \ql \f0 \sa180 \li720 \fi-360 a)\tx360\tab You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.\par} -{\pard \ql \f0 \sa180 \li720 \fi-360 b)\tx360\tab You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.\par} -{\pard \ql \f0 \sa180 \li720 \fi-360 c)\tx360\tab If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)\sa180\sa180\par} -{\pard \ql \f0 \sa180 \li0 \fi0 These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:\par} -{\pard \ql \f0 \sa180 \li720 \fi-360 a)\tx360\tab Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,\par} -{\pard \ql \f0 \sa180 \li720 \fi-360 b)\tx360\tab Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,\par} -{\pard \ql \f0 \sa180 \li720 \fi-360 c)\tx360\tab Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)\sa180\sa180\par} -{\pard \ql \f0 \sa180 \li0 \fi0 The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 4.\tx360\tab You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 5.\tx360\tab You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 6.\tx360\tab Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 7.\tx360\tab If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.\sa180\par} -{\pard \ql \f0 \sa180 \li0 \fi0 If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.\par} -{\pard \ql \f0 \sa180 \li0 \fi0 This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 8.\tx360\tab If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 9.\tx360\tab The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.\sa180\par} -{\pard \ql \f0 \sa180 \li0 \fi0 Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 10.\tx360\tab If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.\par} -{\pard \ql \f0 \sa180 \li360 \fi0 \f1 NO WARRANTY\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 11.\tx360\tab BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\par} -{\pard \ql \f0 \sa180 \li360 \fi-360 12.\tx360\tab IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\par} -{\pard \ql \f0 \sa180 \li360 \fi0 \f1 END OF TERMS AND CONDITIONS\sa180\par} -} diff --git a/mRemoteNGInstaller/Installer/mRemoteNG.wxs b/mRemoteNGInstaller/Installer/mRemoteNG.wxs deleted file mode 100644 index 5fe4837ae..000000000 --- a/mRemoteNGInstaller/Installer/mRemoteNG.wxs +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (NOT Installed) AND (LEGACYVERSIONINSTALLED = 1) - - - - (NOT Installed) AND (VersionNT = 601 OR VersionNT64 = 601) - (NOT Installed) AND (VersionNT = 601 OR VersionNT64 = 601) - - - (NOT Installed) AND (LEGACYVERSIONINSTALLED = 1) - - - - - - Privileged - - - - = 601) OR (VersionNT64 >= 601)]]> - - - - = 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND ServicePackLevel >= 1)]]> - - - - - - - - = 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND (RDP_DTLS_UPDATE_INSTALLED = 1))]]> - - - - = 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND (MINIMUM_RDP_VERSION_INSTALLED = 1))]]> - - - - - - - - - - - - - - - - - - - - - - - - WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGSpecs/Features/CredentialRepository.feature b/mRemoteNGSpecs/Features/CredentialRepository.feature deleted file mode 100644 index e28735012..000000000 --- a/mRemoteNGSpecs/Features/CredentialRepository.feature +++ /dev/null @@ -1,25 +0,0 @@ -Feature: CredentialRepository - As a user with several environments - I would like to load multiple credential repositories - In order to keep credentials separate - -@credentials -Scenario: Load credential repository - Given I have a credential repository - And the credential repository is unloaded - When I click load - Then the credential repository is loaded - -Scenario: Add credential record - Given I have a credential repository - And The credential repository is loaded - And The repository has 0 credentials - When I click add credential - Then the repository has 1 credentials - -Scenario: Unload credential repository - Given I have a credential repository - And The credential repository is loaded - And The repository has 1 credentials - When I click unload - Then the credentials in the repository will no longer be available \ No newline at end of file diff --git a/mRemoteNGSpecs/Features/CredentialRepository.feature.cs b/mRemoteNGSpecs/Features/CredentialRepository.feature.cs deleted file mode 100644 index 0eee5da70..000000000 --- a/mRemoteNGSpecs/Features/CredentialRepository.feature.cs +++ /dev/null @@ -1,216 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace mRemoteNGSpecs.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("CredentialRepository")] - public partial class CredentialRepositoryFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private string[] _featureTags = ((string[])(null)); - -#line 1 "CredentialRepository.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "CredentialRepository", "\tAs a user with several environments\r\n\tI would like to load multiple credential r" + - "epositories\r\n\tIn order to keep credentials separate", ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Load credential repository")] - [NUnit.Framework.CategoryAttribute("credentials")] - public virtual void LoadCredentialRepository() - { - string[] tagsOfScenario = new string[] { - "credentials"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load credential repository", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 7 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 8 - testRunner.Given("I have a credential repository", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 9 - testRunner.And("the credential repository is unloaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 10 - testRunner.When("I click load", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 11 - testRunner.Then("the credential repository is loaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Add credential record")] - public virtual void AddCredentialRecord() - { - string[] tagsOfScenario = ((string[])(null)); - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add credential record", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 13 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 14 - testRunner.Given("I have a credential repository", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 15 - testRunner.And("The credential repository is loaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 16 - testRunner.And("The repository has 0 credentials", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 17 - testRunner.When("I click add credential", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 18 - testRunner.Then("the repository has 1 credentials", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Unload credential repository")] - public virtual void UnloadCredentialRepository() - { - string[] tagsOfScenario = ((string[])(null)); - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Unload credential repository", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 20 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 21 - testRunner.Given("I have a credential repository", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 22 - testRunner.And("The credential repository is loaded", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 23 - testRunner.And("The repository has 1 credentials", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 24 - testRunner.When("I click unload", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 25 - testRunner.Then("the credentials in the repository will no longer be available", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/mRemoteNGSpecs/Features/CredentialRepositoryList.feature b/mRemoteNGSpecs/Features/CredentialRepositoryList.feature deleted file mode 100644 index 7992254b4..000000000 --- a/mRemoteNGSpecs/Features/CredentialRepositoryList.feature +++ /dev/null @@ -1,17 +0,0 @@ -Feature: CredentialRepositoryList - As a user with several environments - I would like to load multiple credential repositories - In order to keep credentials separate - -@credentials -Scenario: Add a new credential repository - Given I have a credential repository list - And It has 0 repositories set up - When I press add and complete the creation wizard - Then I will have 1 credential repository - -Scenario: Remove a credential repository - Given I have a credential repository list - And It has 2 repositories set up - When I remove the first repository - Then I will have 1 credential repository \ No newline at end of file diff --git a/mRemoteNGSpecs/Features/CredentialRepositoryList.feature.cs b/mRemoteNGSpecs/Features/CredentialRepositoryList.feature.cs deleted file mode 100644 index 4e873244e..000000000 --- a/mRemoteNGSpecs/Features/CredentialRepositoryList.feature.cs +++ /dev/null @@ -1,167 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// This code was generated by SpecFlow (https://www.specflow.org/). -// SpecFlow Version:3.9.0.0 -// SpecFlow Generator Version:3.9.0.0 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ -#region Designer generated code -#pragma warning disable -namespace mRemoteNGSpecs.Features -{ - using TechTalk.SpecFlow; - using System; - using System.Linq; - - - [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] - [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [NUnit.Framework.TestFixtureAttribute()] - [NUnit.Framework.DescriptionAttribute("CredentialRepositoryList")] - public partial class CredentialRepositoryListFeature - { - - private TechTalk.SpecFlow.ITestRunner testRunner; - - private string[] _featureTags = ((string[])(null)); - -#line 1 "CredentialRepositoryList.feature" -#line hidden - - [NUnit.Framework.OneTimeSetUpAttribute()] - public virtual void FeatureSetup() - { - testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Features", "CredentialRepositoryList", "\tAs a user with several environments\r\n\tI would like to load multiple credential r" + - "epositories\r\n\tIn order to keep credentials separate", ProgrammingLanguage.CSharp, ((string[])(null))); - testRunner.OnFeatureStart(featureInfo); - } - - [NUnit.Framework.OneTimeTearDownAttribute()] - public virtual void FeatureTearDown() - { - testRunner.OnFeatureEnd(); - testRunner = null; - } - - [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() - { - } - - [NUnit.Framework.TearDownAttribute()] - public virtual void TestTearDown() - { - testRunner.OnScenarioEnd(); - } - - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) - { - testRunner.OnScenarioInitialize(scenarioInfo); - testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); - } - - public virtual void ScenarioStart() - { - testRunner.OnScenarioStart(); - } - - public virtual void ScenarioCleanup() - { - testRunner.CollectScenarioErrors(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Add a new credential repository")] - [NUnit.Framework.CategoryAttribute("credentials")] - public virtual void AddANewCredentialRepository() - { - string[] tagsOfScenario = new string[] { - "credentials"}; - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add a new credential repository", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 7 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 8 - testRunner.Given("I have a credential repository list", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 9 - testRunner.And("It has 0 repositories set up", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 10 - testRunner.When("I press add and complete the creation wizard", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 11 - testRunner.Then("I will have 1 credential repository", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - - [NUnit.Framework.TestAttribute()] - [NUnit.Framework.DescriptionAttribute("Remove a credential repository")] - public virtual void RemoveACredentialRepository() - { - string[] tagsOfScenario = ((string[])(null)); - System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Remove a credential repository", null, tagsOfScenario, argumentsOfScenario, this._featureTags); -#line 13 -this.ScenarioInitialize(scenarioInfo); -#line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) - { - testRunner.SkipScenario(); - } - else - { - this.ScenarioStart(); -#line 14 - testRunner.Given("I have a credential repository list", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); -#line hidden -#line 15 - testRunner.And("It has 2 repositories set up", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 16 - testRunner.When("I remove the first repository", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); -#line hidden -#line 17 - testRunner.Then("I will have 1 credential repository", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); -#line hidden - } - this.ScenarioCleanup(); - } - } -} -#pragma warning restore -#endregion diff --git a/mRemoteNGSpecs/StepDefinitions/CredentialRepositoryListSteps.cs b/mRemoteNGSpecs/StepDefinitions/CredentialRepositoryListSteps.cs deleted file mode 100644 index 8f9c1f8ea..000000000 --- a/mRemoteNGSpecs/StepDefinitions/CredentialRepositoryListSteps.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Linq; -using mRemoteNG.Credential.Repositories; -using mRemoteNGSpecs.Utilities; -using NUnit.Framework; -using TechTalk.SpecFlow; - -namespace mRemoteNGSpecs.StepDefinitions -{ - [Binding] - public class CredentialRepositoryListSteps - { - private CredentialRepositoryList _credentialRepositoryList; - private readonly XmlCredentialRepoBuilder _credentialRepoUtilities = new XmlCredentialRepoBuilder(); - - [Given(@"I have a credential repository list")] - public void GivenIHaveACredentialRepositoryList() - { - _credentialRepositoryList = new CredentialRepositoryList(); - } - - [Given(@"It has (.*) repositories set up")] - public void GivenItHasRepositoriesSetUp(int numberOfCredentialRepos) - { - for (var i = 0; i < numberOfCredentialRepos; i++) - _credentialRepositoryList.AddProvider(_credentialRepoUtilities.BuildXmlCredentialRepo()); - } - - [When(@"I press add and complete the creation wizard")] - public void WhenIPressAddAndCompleteTheCreationWizard() - { - var credentialRepo = _credentialRepoUtilities.BuildXmlCredentialRepo(); - _credentialRepositoryList.AddProvider(credentialRepo); - } - - [When(@"I remove the first repository")] - public void WhenIRemoveTheFirstRepository() - { - var firstRepo = _credentialRepositoryList.CredentialProviders.First(); - _credentialRepositoryList.RemoveProvider(firstRepo); - } - - [Then(@"I will have (.*) credential repository")] - public void ThenIWillHaveCredentialRepository(int expectedCredRepoCount) - { - Assert.That(_credentialRepositoryList.CredentialProviders.Count(), Is.EqualTo(expectedCredRepoCount)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGSpecs/StepDefinitions/CredentialRepositorySteps.cs b/mRemoteNGSpecs/StepDefinitions/CredentialRepositorySteps.cs deleted file mode 100644 index 57e849e88..000000000 --- a/mRemoteNGSpecs/StepDefinitions/CredentialRepositorySteps.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System.Security; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using mRemoteNGSpecs.Utilities; -using NUnit.Framework; -using TechTalk.SpecFlow; - -namespace mRemoteNGSpecs.StepDefinitions -{ - [Binding] - public class CredentialRepositorySteps - { - private ICredentialRepository _credentialRepository; - private readonly SecureString _key = "somePassword".ConvertToSecureString(); - - [Given(@"I have a credential repository")] - public void GivenIHaveACredentialRepository() - { - var utilityFactory = new XmlCredentialRepoBuilder { EncryptionKey = _key }; - _credentialRepository = utilityFactory.BuildXmlCredentialRepo(); - } - - [Given(@"The repository has (.*) credentials")] - public void GivenTheRepositoryHasCredentials(int numberOfCreds) - { - for (var i = 0; i < numberOfCreds; i++) - _credentialRepository.CredentialRecords.Add(new CredentialRecord()); - Assert.That(_credentialRepository.CredentialRecords.Count, Is.EqualTo(numberOfCreds)); - } - - [Given(@"The credential repository is loaded")] - public void GivenTheCredentialRepositoryIsLoaded() - { - _credentialRepository.LoadCredentials(_key); - Assert.That(_credentialRepository.IsLoaded); - } - - [Given(@"the credential repository is unloaded")] - public void GivenTheCredentialRepositoryIsUnloaded() - { - Assert.That(_credentialRepository.IsLoaded, Is.False); - } - - [When(@"I click load")] - public void WhenIClickLoad() - { - _credentialRepository.LoadCredentials(_key); - } - - [Then(@"the credential repository is loaded")] - public void ThenTheCredentialRepositoryIsLoaded() - { - Assert.That(_credentialRepository.IsLoaded); - } - - [When(@"I click add credential")] - public void WhenIClickAddCredential() - { - _credentialRepository.CredentialRecords.Add(new CredentialRecord()); - } - - [Then(@"the repository has (.*) credentials")] - public void ThenTheRepositoryHasCredentials(int numberOfCreds) - { - Assert.That(_credentialRepository.CredentialRecords.Count, Is.EqualTo(numberOfCreds)); - } - - [When(@"I click unload")] - public void WhenIClickUnload() - { - _credentialRepository.UnloadCredentials(); - } - - [Then(@"the credentials in the repository will no longer be available")] - public void ThenTheCredentialsInTheRepositoryWillNoLongerBeAvailable() - { - Assert.That(_credentialRepository.CredentialRecords, Is.Empty); - } - } -} \ No newline at end of file diff --git a/mRemoteNGSpecs/Utilities/CredRepoXmlFileBuilder.cs b/mRemoteNGSpecs/Utilities/CredRepoXmlFileBuilder.cs deleted file mode 100644 index c94f1fb43..000000000 --- a/mRemoteNGSpecs/Utilities/CredRepoXmlFileBuilder.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace mRemoteNGSpecs.Utilities -{ - public class CredRepoXmlFileBuilder - { - public string Build(string authHeader) - { - return "" + - $"" + - ""; - } - } -} \ No newline at end of file diff --git a/mRemoteNGSpecs/Utilities/XmlCredentialRepoBuilder.cs b/mRemoteNGSpecs/Utilities/XmlCredentialRepoBuilder.cs deleted file mode 100644 index 59d27311c..000000000 --- a/mRemoteNGSpecs/Utilities/XmlCredentialRepoBuilder.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Security; -using mRemoteNG.Config; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers.CredentialSerializer; -using mRemoteNG.Credential; -using mRemoteNG.Credential.Repositories; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; - -namespace mRemoteNGSpecs.Utilities -{ - public class XmlCredentialRepoBuilder - { - public SecureString EncryptionKey { get; set; } = "someKey1".ConvertToSecureString(); - public ICryptographyProvider CryptographyProvider { get; set; } = new AeadCryptographyProvider(); - - public ICredentialRepository BuildXmlCredentialRepo() - { - var xmlFileBuilder = new CredRepoXmlFileBuilder(); - var xmlFileContent = xmlFileBuilder.Build(CryptographyProvider.Encrypt("someheaderdata", EncryptionKey)); - var dataProvider = new InMemoryStringDataProvider(xmlFileContent); - var encryptor = new XmlCredentialPasswordEncryptorDecorator( - CryptographyProvider, - new XmlCredentialRecordSerializer() - ); - var decryptor = new XmlCredentialPasswordDecryptorDecorator( - new XmlCredentialRecordDeserializer() - ); - - return new XmlCredentialRepository( - new CredentialRepositoryConfig(), - new CredentialRecordSaver( - dataProvider, - encryptor - ), new CredentialRecordLoader( - dataProvider, - decryptor - ) - ); - } - } -} \ No newline at end of file diff --git a/mRemoteNGSpecs/app.config b/mRemoteNGSpecs/app.config deleted file mode 100644 index 061123b1b..000000000 --- a/mRemoteNGSpecs/app.config +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGSpecs/mRemoteNGSpecs.csproj b/mRemoteNGSpecs/mRemoteNGSpecs.csproj deleted file mode 100644 index 0fdbbc1d5..000000000 --- a/mRemoteNGSpecs/mRemoteNGSpecs.csproj +++ /dev/null @@ -1,44 +0,0 @@ - - - - WinExe - net6.0-windows - enable - true - x64 - Debug;Release;Debug Portable;Release Portable;Release Installer - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/App/ImportTests.cs b/mRemoteNGTests/App/ImportTests.cs deleted file mode 100644 index 22628db3f..000000000 --- a/mRemoteNGTests/App/ImportTests.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.IO; -using mRemoteNG.App; -using mRemoteNG.Config.Putty; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNGTests.Properties; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; - -namespace mRemoteNGTests.App -{ - public class ImportTests - { - [Test] - public void ErrorHandlerCalledWhenUnsupportedFileExtensionFound() - { - using (FileTestHelpers.DisposableTempFile(out var file, ".blah")) - { - var conService = new ConnectionsService(PuttySessionsManager.Instance); - var container = new ContainerInfo(); - var exceptionOccurred = false; - - Import.HeadlessFileImport(new []{file}, container, conService, s => exceptionOccurred = true); - - Assert.That(exceptionOccurred); - } - } - - [Test] - public void AnErrorInOneFileDoNotPreventOtherFilesFromProcessing() - { - using (FileTestHelpers.DisposableTempFile(out var badFile, ".blah")) - using (FileTestHelpers.DisposableTempFile(out var rdpFile, ".rdp")) - { - File.AppendAllText(rdpFile, Resources.test_remotedesktopconnection_rdp); - var conService = new ConnectionsService(PuttySessionsManager.Instance); - var container = new ContainerInfo(); - var exceptionCount = 0; - - Import.HeadlessFileImport(new[] { badFile, rdpFile }, container, conService, s => exceptionCount++); - - Assert.That(exceptionCount, Is.EqualTo(1)); - Assert.That(container.Children, Has.One.Items); - } - } - } -} diff --git a/mRemoteNGTests/App/UpdaterTests.cs b/mRemoteNGTests/App/UpdaterTests.cs deleted file mode 100644 index ab81bf6ff..000000000 --- a/mRemoteNGTests/App/UpdaterTests.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using mRemoteNG.App.Info; -using mRemoteNG.App.Update; -using mRemoteNGTests.Properties; -using NUnit.Framework; - -namespace mRemoteNGTests.App -{ - [TestFixture] - public class UpdaterTests - { - [Test] - public void UpdateStableChannel() - { - GeneralAppInfo.ApplicationVersion = "1.0.0.0"; - var CurrentUpdateInfo = UpdateInfo.FromString(Resources.update); - Assert.That(CurrentUpdateInfo.CheckIfValid(), Is.True); - Version v; - Version.TryParse(GeneralAppInfo.ApplicationVersion, out v); - var IsNewer = CurrentUpdateInfo.Version > v; - Assert.That(IsNewer, Is.True); - } - - [Test] - public void UpdateBetaChannel() - { - GeneralAppInfo.ApplicationVersion = "1.0.0.0"; - var CurrentUpdateInfo = UpdateInfo.FromString(Resources.beta_update); - Assert.That(CurrentUpdateInfo.CheckIfValid(), Is.True); - Version v; - Version.TryParse(GeneralAppInfo.ApplicationVersion, out v); - var IsNewer = CurrentUpdateInfo.Version > v; - Assert.That(IsNewer, Is.True); - } - - [Test] - public void UpdateDevChannel() - { - GeneralAppInfo.ApplicationVersion = "1.0.0.0"; - var CurrentUpdateInfo = UpdateInfo.FromString(Resources.dev_update); - Assert.That(CurrentUpdateInfo.CheckIfValid(), Is.True); - Version v; - Version.TryParse(GeneralAppInfo.ApplicationVersion, out v); - var IsNewer = CurrentUpdateInfo.Version > v; - Assert.That(IsNewer, Is.True); - } - - [Test] - public void UpdateStablePortableChannel() - { - GeneralAppInfo.ApplicationVersion = "1.0.0.0"; - var CurrentUpdateInfo = UpdateInfo.FromString(Resources.update_portable); - Assert.That(CurrentUpdateInfo.CheckIfValid(), Is.True); - Version v; - Version.TryParse(GeneralAppInfo.ApplicationVersion, out v); - var IsNewer = CurrentUpdateInfo.Version > v; - Assert.That(IsNewer, Is.True); - } - - [Test] - public void UpdateBetaPortableChannel() - { - GeneralAppInfo.ApplicationVersion = "1.0.0.0"; - var CurrentUpdateInfo = UpdateInfo.FromString(Resources.beta_update_portable); - Assert.That(CurrentUpdateInfo.CheckIfValid(), Is.True); - Version v; - Version.TryParse(GeneralAppInfo.ApplicationVersion, out v); - var IsNewer = CurrentUpdateInfo.Version > v; - Assert.That(IsNewer, Is.True); - } - - [Test] - public void UpdateDevPortableChannel() - { - GeneralAppInfo.ApplicationVersion = "1.0.0.0"; - var CurrentUpdateInfo = UpdateInfo.FromString(Resources.dev_update_portable); - Assert.That(CurrentUpdateInfo.CheckIfValid(), Is.True); - Version v; - Version.TryParse(GeneralAppInfo.ApplicationVersion, out v); - var IsNewer = CurrentUpdateInfo.Version > v; - Assert.That(IsNewer, Is.True); - } - } -} diff --git a/mRemoteNGTests/BinaryFileTests.cs b/mRemoteNGTests/BinaryFileTests.cs deleted file mode 100644 index 1ba2bbe16..000000000 --- a/mRemoteNGTests/BinaryFileTests.cs +++ /dev/null @@ -1,70 +0,0 @@ -using NUnit.Framework; -using System.IO; -using System.Runtime.CompilerServices; - -namespace mRemoteNGTests -{ - [TestFixture] - public class BinaryFileTests - { - [Test] - public void LargeAddressAwareFlagIsSet() - { - var exePath = GetTargetPath(); - Assert.That(IsLargeAware(exePath), Is.True); - } - - public string GetTargetPath([CallerFilePath] string sourceFilePath = "") - { - const string debugOrRelease = - #if DEBUG || DEBUG_PORTABLE - "Debug"; - #else - "Release"; - #endif - - const string normalOrPortable = - #if PORTABLE || DEBUG_PORTABLE - " Portable"; - #else - ""; - #endif - var path = Path.GetDirectoryName(sourceFilePath); - var filePath = $"{path}\\..\\mRemoteNG\\bin\\x64\\{debugOrRelease}{normalOrPortable}\\mRemoteNG.exe"; - return filePath; - } - - private bool IsLargeAware(string file) - { - using (var fs = File.OpenRead(file)) - { - return IsLargeAware(fs); - } - } - - /// - /// Checks if the stream is a MZ header and if it is large address aware - /// - /// Stream to check, make sure its at the start of the MZ header - /// - private bool IsLargeAware(Stream stream) - { - const int imageFileLargeAddressAware = 0x20; - - var br = new BinaryReader(stream); - - if (br.ReadInt16() != 0x5A4D) //No MZ Header - return false; - - br.BaseStream.Position = 0x3C; - var peHeaderLocation = br.ReadInt32(); //Get the PE header location. - - br.BaseStream.Position = peHeaderLocation; - if (br.ReadInt32() != 0x4550) //No PE header - return false; - - br.BaseStream.Position += 0x12; - return (br.ReadInt16() & imageFileLargeAddressAware) == imageFileLargeAddressAware; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Connections/Multiuser/ConnectionsUpdateAvailableEventArgsTests.cs b/mRemoteNGTests/Config/Connections/Multiuser/ConnectionsUpdateAvailableEventArgsTests.cs deleted file mode 100644 index b7ff5c2e1..000000000 --- a/mRemoteNGTests/Config/Connections/Multiuser/ConnectionsUpdateAvailableEventArgsTests.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using mRemoteNG.Config.Connections.Multiuser; -using mRemoteNG.Config.DatabaseConnectors; -using NSubstitute; -using NUnit.Framework; -// ReSharper disable ObjectCreationAsStatement - -namespace mRemoteNGTests.Config.Connections.Multiuser -{ - public class ConnectionsUpdateAvailableEventArgsTests - { - private IDatabaseConnector _databaseConnector; - private DateTime _dateTime; - - [SetUp] - public void Setup() - { - _databaseConnector = Substitute.For(); - _dateTime = DateTime.MinValue; - } - - [Test] - public void CantProvideNullDatabaseConnectorToCtor() - { - Assert.Throws(() => new ConnectionsUpdateAvailableEventArgs(null, _dateTime)); - } - - [Test] - public void DatabaseConnectorPropertySet() - { - var eventArgs = new ConnectionsUpdateAvailableEventArgs(_databaseConnector, _dateTime); - Assert.That(eventArgs.DatabaseConnector, Is.EqualTo(_databaseConnector)); - } - - [Test] - public void UpdateTimePropertySet() - { - var eventArgs = new ConnectionsUpdateAvailableEventArgs(_databaseConnector, _dateTime); - Assert.That(eventArgs.UpdateTime, Is.EqualTo(_dateTime)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Connections/XmlConnectionsLoaderTests.cs b/mRemoteNGTests/Config/Connections/XmlConnectionsLoaderTests.cs deleted file mode 100644 index fa83cc400..000000000 --- a/mRemoteNGTests/Config/Connections/XmlConnectionsLoaderTests.cs +++ /dev/null @@ -1,21 +0,0 @@ -using mRemoteNG.Config.Connections; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace mRemoteNGTests.Config.Connections -{ - class XmlConnectionsLoaderTests - { - [Test] - public void ThrowsFileNotFound() - { - Assert.Throws(() => (new XmlConnectionsLoader(FileTestHelpers.NewTempFilePath())).Load()); - } - } -} diff --git a/mRemoteNGTests/Config/CredentialHarvesterTests.cs b/mRemoteNGTests/Config/CredentialHarvesterTests.cs deleted file mode 100644 index 06eac3607..000000000 --- a/mRemoteNGTests/Config/CredentialHarvesterTests.cs +++ /dev/null @@ -1,131 +0,0 @@ -using mRemoteNG.Config; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Tree.Root; -using NUnit.Framework; -using System; -using System.Linq; -using System.Security; -using System.Xml.Linq; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; - - -namespace mRemoteNGTests.Config -{ -#pragma warning disable 618 - public class CredentialHarvesterTests - { - - private CredentialHarvester _credentialHarvester; - private ICryptographyProvider _cryptographyProvider; - private SecureString _key; - - [SetUp] - public void Setup() - { - _credentialHarvester = new CredentialHarvester(); - _cryptographyProvider = new CryptoProviderFactory(BlockCipherEngines.AES, BlockCipherModes.GCM).Build(); - _key = "testKey123".ConvertToSecureString(); - } - - [Test] - public void HarvestsUsername() - { - var connection = new ConnectionInfo { Username = "myuser", Domain = "somedomain", Password = "mypass" }; - var xdoc = CreateTestData(connection); - var credentials = _credentialHarvester.Harvest(xdoc, _key); - Assert.That(credentials.Single().Username, Is.EqualTo(connection.Username)); - } - - [Test] - public void HarvestsDomain() - { - var connection = new ConnectionInfo { Username = "myuser", Domain = "somedomain", Password = "mypass" }; - var xdoc = CreateTestData(connection); - var credentials = _credentialHarvester.Harvest(xdoc, _key); - Assert.That(credentials.Single().Domain, Is.EqualTo(connection.Domain)); - } - - [Test] - public void HarvestsPassword() - { - var connection = new ConnectionInfo { Username = "myuser", Domain = "somedomain", Password = "mypass" }; - var xdoc = CreateTestData(connection); - var credentials = _credentialHarvester.Harvest(xdoc, _key); - Assert.That(credentials.Single().Password.ConvertToUnsecureString(), Is.EqualTo(connection.Password)); - } - - [Test] - public void DoesNotHarvestEmptyCredentials() - { - var connection = new ConnectionInfo(); - var xdoc = CreateTestData(connection); - var credentials = _credentialHarvester.Harvest(xdoc, _key); - Assert.That(credentials.Count(), Is.EqualTo(0)); - } - - [Test] - public void HarvestsAllCredentials() - { - var container = new ContainerInfo(); - var con1 = new ConnectionInfo {Username = "blah"}; - var con2 = new ConnectionInfo {Username = "something"}; - container.AddChildRange(new [] {con1, con2}); - var xdoc = CreateTestData(container); - var credentials = _credentialHarvester.Harvest(xdoc, _key); - Assert.That(credentials.Count(), Is.EqualTo(2)); - } - - [Test] - public void OnlyReturnsUniqueCredentials() - { - var container = new ContainerInfo(); - var con1 = new ConnectionInfo { Username = "something" }; - var con2 = new ConnectionInfo { Username = "something" }; - container.AddChildRange(new[] { con1, con2 }); - var xdoc = CreateTestData(container); - var credentials = _credentialHarvester.Harvest(xdoc, _key); - Assert.That(credentials.Count(), Is.EqualTo(1)); - } - - [Test] - public void CredentialMapCorrectForSingleCredential() - { - var connection = new ConnectionInfo { Username = "myuser", Domain = "somedomain", Password = "mypass" }; - var connectionGuid = Guid.Parse(connection.ConstantID); - var xdoc = CreateTestData(connection); - _credentialHarvester.Harvest(xdoc, _key); - var map = _credentialHarvester.ConnectionToCredentialMap; - Assert.That(map[connectionGuid].Username, Is.EqualTo(connection.Username)); - } - - [Test] - public void CredentialMapDoesntContainDuplicateCredentialObjects() - { - var container = new ContainerInfo(); - var con1 = new ConnectionInfo { Username = "something" }; - var con2 = new ConnectionInfo { Username = "something" }; - container.AddChildRange(new[] { con1, con2 }); - var xdoc = CreateTestData(container); - var con1Id = Guid.Parse(con1.ConstantID); - var con2Id = Guid.Parse(con2.ConstantID); - _credentialHarvester.Harvest(xdoc, _key); - var map = _credentialHarvester.ConnectionToCredentialMap; - Assert.That(map[con1Id], Is.EqualTo(map[con2Id])); - } - - - private XDocument CreateTestData(ConnectionInfo connectionInfo) - { - var rootNode = new RootNodeInfo(RootNodeType.Connection) {PasswordString = _key.ConvertToUnsecureString()}; - rootNode.AddChild(connectionInfo); - var nodeSerializer = new XmlConnectionNodeSerializer27(_cryptographyProvider, _key, new SaveFilter()); - var serializer = new XmlConnectionsSerializer(_cryptographyProvider, nodeSerializer); - var serializedData = serializer.Serialize(rootNode); - return XDocument.Parse(serializedData); - } - } -#pragma warning restore 618 -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/CredentialRecordLoaderTests.cs b/mRemoteNGTests/Config/CredentialRecordLoaderTests.cs deleted file mode 100644 index e78f41337..000000000 --- a/mRemoteNGTests/Config/CredentialRecordLoaderTests.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Collections.Generic; -using System.Security; -using mRemoteNG.Config; -using mRemoteNG.Config.DataProviders; -using mRemoteNG.Config.Serializers; -using mRemoteNG.Credential; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Config -{ - public class CredentialRecordLoaderTests - { - private CredentialRecordLoader _credentialRecordLoader; - private IDataProvider _dataProvider; - private ISecureDeserializer> _deserializer; - - [SetUp] - public void Setup() - { - _dataProvider = Substitute.For>(); - _deserializer = Substitute.For>>(); - _credentialRecordLoader = new CredentialRecordLoader(_dataProvider, _deserializer); - } - - [Test] - public void LoadsFromDataProvider() - { - _credentialRecordLoader.Load(new SecureString()); - _dataProvider.Received(1).Load(); - } - - [Test] - public void DeserializesDataFromDataProvider() - { - var key = new SecureString(); - _dataProvider.Load().Returns("mydata"); - _credentialRecordLoader.Load(key); - _deserializer.Received(1).Deserialize("mydata", key); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/DataProviders/FileBackupCreatorTests.cs b/mRemoteNGTests/Config/DataProviders/FileBackupCreatorTests.cs deleted file mode 100644 index 47437ca6f..000000000 --- a/mRemoteNGTests/Config/DataProviders/FileBackupCreatorTests.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.IO; -using mRemoteNG.Config.DataProviders; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.DataProviders -{ - public class FileBackupCreatorTests - { - private FileBackupCreator _fileBackupCreator; - private string _testFilePath; - private string _testFilePathBackup; - private string _testFileDirectory; - private string _testFileRollingBackup; - - [SetUp] - public void Setup() - { - _testFilePath = FileTestHelpers.NewTempFilePath(); - _testFileDirectory = Path.GetDirectoryName(_testFilePath); - _testFileRollingBackup = Path.GetFileName(_testFilePath) + ".*-*.backup"; - _testFilePathBackup = _testFilePath + ".backup"; - _fileBackupCreator = new FileBackupCreator(); - } - - [TearDown] - public void Teardown() - { - if (Directory.Exists(_testFileDirectory)) - Directory.Delete(_testFileDirectory, true); - } - - [Test] - public void BackupCreatedWhenFileAlreadyExists() - { - File.WriteAllText(_testFilePath, ""); - _fileBackupCreator.CreateBackupFile(_testFilePath); - var rollingBackupFiles = Directory.GetFiles(_testFileDirectory, _testFileRollingBackup); - Assert.That(rollingBackupFiles.Length, Is.EqualTo(1)); - } - - [Test] - public void BackupNotCreatedIfFileDidntAlreadyExist() - { - _fileBackupCreator.CreateBackupFile(_testFilePath); - var backupFileExists = File.Exists(_testFilePathBackup); - Assert.That(backupFileExists, Is.False); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/DataProviders/FileDataProviderTests.cs b/mRemoteNGTests/Config/DataProviders/FileDataProviderTests.cs deleted file mode 100644 index 2ecc104a3..000000000 --- a/mRemoteNGTests/Config/DataProviders/FileDataProviderTests.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.IO; -using mRemoteNG.Config.DataProviders; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.DataProviders -{ - public class FileDataProviderTests - { - private FileDataProvider _dataProvider; - private string _testFilePath; - private string _testFileDirectory; - - [SetUp] - public void Setup() - { - _testFilePath = FileTestHelpers.NewTempFilePath(); - _testFileDirectory = Path.GetDirectoryName(_testFilePath); - _dataProvider = new FileDataProvider(_testFilePath); - } - - [TearDown] - public void Teardown() - { - if (Directory.Exists(_testFileDirectory)) - Directory.Delete(_testFileDirectory, true); - } - - [Test] - public void SetsFileContent() - { - Assert.That(File.Exists(_testFilePath), Is.False); - var expectedFileContent = Guid.NewGuid().ToString(); - _dataProvider.Save(expectedFileContent); - var fileContent = File.ReadAllText(_testFilePath); - Assert.That(fileContent, Is.EqualTo(expectedFileContent)); - } - - [Test] - public void LoadingFileThatDoesntExistProvidesEmptyString() - { - var fileThatShouldntExist = Guid.NewGuid().ToString(); - var dataProvider = new FileDataProvider(fileThatShouldntExist); - var loadedData = dataProvider.Load(); - Assert.That(loadedData, Is.Empty); - } - - [Test] - public void SaveCreatesDirectoriesThatDontExist() - { - var folder1 = Guid.NewGuid().ToString(); - var folder2 = Guid.NewGuid().ToString(); - var fileThatShouldExist = Path.Combine(_testFileDirectory, folder1, folder2, Path.GetRandomFileName()); - _dataProvider.FilePath = fileThatShouldExist; - _dataProvider.Save(""); - Assert.That(File.Exists(fileThatShouldExist), Is.True); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/DataProviders/FileDataProviderWithRollingBackupTests.cs b/mRemoteNGTests/Config/DataProviders/FileDataProviderWithRollingBackupTests.cs deleted file mode 100644 index 5321cc5ae..000000000 --- a/mRemoteNGTests/Config/DataProviders/FileDataProviderWithRollingBackupTests.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.IO; -using System.Threading; -using mRemoteNG.Config.DataProviders; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.DataProviders -{ - public class FileDataProviderWithRollingBackupTests - { - private FileDataProviderWithRollingBackup _dataProvider; - private string _testFilePath; - private string _testFileDirectory; - private string _testFileRollingBackup; - - [SetUp] - public void Setup() - { - _testFilePath = FileTestHelpers.NewTempFilePath(); - _testFileDirectory = Path.GetDirectoryName(_testFilePath); - _testFileRollingBackup = Path.GetFileName(_testFilePath) + ".*-*.backup"; - _dataProvider = new FileDataProviderWithRollingBackup(_testFilePath); - } - - [TearDown] - public void Teardown() - { - if (Directory.Exists(_testFileDirectory)) - Directory.Delete(_testFileDirectory, true); - } - - [Test] - public void RollingBackupCreatedIfRegularBackupExists() - { - for (var i = 0; i < 3; i++) - { - _dataProvider.Save(""); - Thread.Sleep(100); - } - - var rollingBackupFiles = Directory.GetFiles(_testFileDirectory, _testFileRollingBackup); - Assert.That(rollingBackupFiles.Length, Is.EqualTo(2)); - } - - [Test] - public void NoRollingBackupCreatedIfRegularFileDoesntExists() - { - _dataProvider.Save(""); - var rollingBackupFiles = Directory.GetFiles(_testFileDirectory, _testFileRollingBackup); - Assert.That(rollingBackupFiles.Length, Is.EqualTo(0)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/ConfConsEnsureConnectionsHaveIdsTests.cs b/mRemoteNGTests/Config/Serializers/ConfConsEnsureConnectionsHaveIdsTests.cs deleted file mode 100644 index cc6c0f903..000000000 --- a/mRemoteNGTests/Config/Serializers/ConfConsEnsureConnectionsHaveIdsTests.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Xml.Linq; -using mRemoteNG.Config.Serializers; -using NUnit.Framework; - - -namespace mRemoteNGTests.Config.Serializers -{ - public class ConfConsEnsureConnectionsHaveIdsTests - { - private ConfConsEnsureConnectionsHaveIds _consEnsureConnectionsHaveIds; - - [SetUp] - public void Setup() - { - _consEnsureConnectionsHaveIds = new ConfConsEnsureConnectionsHaveIds(); - } - - [Test] - public void IdAttributeIsAddedIfItDidntExist() - { - var xdoc = CreateTestDocument(); - _consEnsureConnectionsHaveIds.EnsureElementsHaveIds(xdoc); - var attribute = xdoc.Root?.Element("Node")?.Attribute("Id"); - Assert.That(attribute, Is.Not.Null); - } - - [Test] - public void NewIdAttributeShouldNotBeAnEmptyGuid() - { - var xdoc = CreateTestDocument(); - _consEnsureConnectionsHaveIds.EnsureElementsHaveIds(xdoc); - var attribute = xdoc.Root?.Element("Node")?.Attribute("Id"); - Assert.That(attribute?.Value, Is.Not.EqualTo(Guid.Empty.ToString())); - } - - private XDocument CreateTestDocument() - { - var xdoc = new XDocument(); - xdoc.Add(new XElement("Root", - new XElement("Node", - new XAttribute("Thingy","")))); - return xdoc; - } - } -} diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs deleted file mode 100644 index e3f9aedae..000000000 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs +++ /dev/null @@ -1,194 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using mRemoteNGTests.TestHelpers; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv -{ - public class CsvConnectionsDeserializerMremotengFormatTests - { - private CsvConnectionsDeserializerMremotengFormat _deserializer; - private CsvConnectionsSerializerMremotengFormat _serializer; - - [SetUp] - public void Setup() - { - _deserializer = new CsvConnectionsDeserializerMremotengFormat(); - var credentialRepositoryList = Substitute.For(); - _serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), credentialRepositoryList); - } - - [TestCaseSource(typeof(DeserializationTestSource), nameof(DeserializationTestSource.ConnectionPropertyTestCases))] - public object ConnectionPropertiesDeserializedCorrectly(string propertyToCheck) - { - var csv = _serializer.Serialize(GetTestConnection()); - var deserializedConnections = _deserializer.Deserialize(csv); - var connection = deserializedConnections.GetRecursiveChildList().FirstOrDefault(); - var propertyValue = typeof(ConnectionInfo).GetProperty(propertyToCheck)?.GetValue(connection); - return propertyValue; - } - - [TestCaseSource(typeof(DeserializationTestSource), nameof(DeserializationTestSource.InheritanceTestCases))] - public object InheritancePropertiesDeserializedCorrectly(string propertyToCheck) - { - var csv = _serializer.Serialize(GetTestConnectionWithAllInherited()); - var deserializedConnections = _deserializer.Deserialize(csv); - var connection = deserializedConnections.GetRecursiveChildList().FirstOrDefault(); - connection?.RemoveParent(); - var propertyValue = typeof(ConnectionInfoInheritance).GetProperty(propertyToCheck)?.GetValue(connection?.Inheritance); - return propertyValue; - } - - [Test] - public void TreeStructureDeserializedCorrectly() - { - //Root - // |- folder1 - // | |- Con1 - // |- Con2 - var treeModel = new ConnectionTreeModelBuilder().Build(); - var csv = _serializer.Serialize(treeModel); - var deserializedConnections = _deserializer.Deserialize(csv); - var con1 = deserializedConnections.GetRecursiveChildList().First(info => info.Name == "Con1"); - var folder1 = deserializedConnections.GetRecursiveChildList().First(info => info.Name == "folder1"); - Assert.That(con1.Parent, Is.EqualTo(folder1)); - } - - internal static ConnectionInfo GetTestConnection() - { - return new ConnectionInfo - { - Name = "SomeName", - Description = "SomeDescription", - Icon = "SomeIcon", - Panel = "SomePanel", - Username = "SomeUsername", - Password = "SomePassword", - Domain = "SomeDomain", - Hostname = "SomeHostname", - PuttySession = "SomePuttySession", - LoadBalanceInfo = "SomeLoadBalanceInfo", - OpeningCommand = "SomeOpeningCommand", - PreExtApp = "SomePreExtApp", - PostExtApp = "SomePostExtApp", - MacAddress = "SomeMacAddress", - UserField = "SomeUserField", - VmId = "SomeVmId", - ExtApp = "SomeExtApp", - VNCProxyUsername = "SomeVNCProxyUsername", - VNCProxyPassword = "SomeVNCProxyPassword", - RDGatewayUsername = "SomeRDGatewayUsername", - RDGatewayPassword = "SomeRDGatewayPassword", - RDGatewayDomain = "SomeRDGatewayDomain", - VNCProxyIP = "SomeVNCProxyIP", - RDGatewayHostname = "SomeRDGatewayHostname", - Protocol = ProtocolType.RDP, - Port = 999, - Favorite = true, - UseConsoleSession = true, - UseCredSsp = true, - UseVmId = false, - UseEnhancedMode = false, - RenderingEngine = HTTPBase.RenderingEngine.EdgeChromium, - RDPAuthenticationLevel = AuthenticationLevel.WarnOnFailedAuth, - Colors = RDPColors.Colors16Bit, - Resolution = RDPResolutions.Res1366x768, - AutomaticResize = true, - DisplayWallpaper = true, - DisplayThemes = true, - EnableFontSmoothing = true, - EnableDesktopComposition = true, - DisableFullWindowDrag = false, - DisableMenuAnimations = false, - DisableCursorShadow = false, - DisableCursorBlinking = false, - CacheBitmaps = true, - RedirectDiskDrives = true, - RedirectPorts = true, - RedirectPrinters = true, - RedirectSmartCards = true, - RedirectSound = RDPSounds.LeaveAtRemoteComputer, - RedirectAudioCapture = true, - RedirectKeys = true, - VNCCompression = ProtocolVNC.Compression.Comp4, - VNCEncoding = ProtocolVNC.Encoding.EncRRE, - VNCAuthMode = ProtocolVNC.AuthMode.AuthVNC, - VNCProxyType = ProtocolVNC.ProxyType.ProxySocks5, - VNCProxyPort = 123, - VNCColors = ProtocolVNC.Colors.Col8Bit, - VNCSmartSizeMode = ProtocolVNC.SmartSizeMode.SmartSAspect, - VNCViewOnly = true, - RDGatewayUsageMethod = RDGatewayUsageMethod.Detect, - RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard, - UserViaAPI = "", - EC2InstanceId = "", - EC2Region = "eu-central-1" - }; - } - - internal static ConnectionInfo GetTestConnectionWithAllInherited() - { - var connectionInfo = new ConnectionInfo(); - connectionInfo.Inheritance.TurnOnInheritanceCompletely(); - return connectionInfo; - } - - private class DeserializationTestSource - { - public static IEnumerable ConnectionPropertyTestCases() - { - var ignoreProperties = new[] - { - nameof(ConnectionInfo.Inheritance), - nameof(ConnectionInfo.ConstantID), - nameof(ConnectionInfo.Parent) - }; - var properties = typeof(ConnectionInfo) - .GetProperties() - .Where(property => !ignoreProperties.Contains(property.Name)); - var testCases = new List(); - var testConnectionInfo = GetTestConnection(); - - foreach (var property in properties) - { - testCases.Add( - new TestCaseData(property.Name) - .Returns(property.GetValue(testConnectionInfo))); - } - - return testCases; - } - - public static IEnumerable InheritanceTestCases() - { - var ignoreProperties = new[] - { - nameof(ConnectionInfoInheritance.EverythingInherited), - nameof(ConnectionInfoInheritance.Parent), - nameof(ConnectionInfoInheritance.EverythingInherited) - }; - var properties = typeof(ConnectionInfoInheritance) - .GetProperties() - .Where(property => !ignoreProperties.Contains(property.Name)); - var testCases = new List(); - var testInheritance = GetTestConnectionWithAllInherited().Inheritance; - - return properties - .Select(property => - new TestCaseData(property.Name) - .Returns(property.GetValue(testInheritance))) - .ToList(); - } - } - } -} diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormatTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormatTests.cs deleted file mode 100644 index 2226ecaee..000000000 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormatTests.cs +++ /dev/null @@ -1,155 +0,0 @@ -using System; -using System.Linq; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using mRemoteNG.Tree; -using mRemoteNGTests.TestHelpers; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv -{ - public class CsvConnectionsSerializerMremotengFormatTests - { - private ICredentialRepositoryList _credentialRepositoryList; - private const string ConnectionName = "myconnection"; - private const string Username = "myuser"; - private const string Domain = "mydomain"; - private const string Password = "mypass123"; - - [OneTimeSetUp] - public void OneTimeSetup() - { - var credRecord = Substitute.For(); - credRecord.Username.Returns(Username); - credRecord.Domain.Returns(Domain); - credRecord.Password.Returns(Password.ConvertToSecureString()); - _credentialRepositoryList = Substitute.For(); - _credentialRepositoryList.GetCredentialRecord(new Guid()).ReturnsForAnyArgs(credRecord); - } - - [Test] - public void SerializesNodeId() - { - var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList); - var connectionInfo = BuildConnectionInfo(); - var csv = serializer.Serialize(connectionInfo); - Assert.That(csv, Does.Match(connectionInfo.ConstantID)); - } - - [Test] - public void DoesntSerializeTheRootNode() - { - var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList); - var treeModel = new ConnectionTreeModelBuilder().Build(); - var csv = serializer.Serialize(treeModel); - Assert.That(csv, Does.Not.Match($"{treeModel.RootNodes[0].ConstantID};.*;{TreeNodeType.Root}")); - } - - [TestCase(Username)] - [TestCase(Domain)] - [TestCase(Password)] - [TestCase("InheritColors")] - public void CreatesCsv(string valueThatShouldExist) - { - var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList); - var connectionInfo = BuildConnectionInfo(); - var csv = serializer.Serialize(connectionInfo); - Assert.That(csv, Does.Match(valueThatShouldExist)); - } - - [TestCase(Username)] - [TestCase(Domain)] - [TestCase(Password)] - [TestCase("InheritColors")] - public void SerializerRespectsSaveFilterSettings(string valueThatShouldntExist) - { - var saveFilter = new SaveFilter(true); - var serializer = new CsvConnectionsSerializerMremotengFormat(saveFilter, _credentialRepositoryList); - var connectionInfo = BuildConnectionInfo(); - var csv = serializer.Serialize(connectionInfo); - Assert.That(csv, Does.Not.Match(valueThatShouldntExist)); - } - - [Test] - public void CanSerializeEmptyConnectionInfo() - { - var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList); - var connectionInfo = new ConnectionInfo(); - var csv = serializer.Serialize(connectionInfo); - Assert.That(csv, Is.Not.Empty); - } - - [Test] - public void CantPassNullToConstructor() - { - Assert.Throws(() => new CsvConnectionsSerializerMremotengFormat(null, _credentialRepositoryList)); - } - - [Test] - public void CantPassNullToSerializeConnectionInfo() - { - var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList); - Assert.Throws(() => serializer.Serialize((ConnectionInfo)null)); - } - - [Test] - public void CantPassNullToSerializeConnectionTreeModel() - { - var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList); - Assert.Throws(() => serializer.Serialize((ConnectionTreeModel)null)); - } - - [Test] - public void FoldersAreSerialized() - { - var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList); - var container = BuildContainer(); - var csv = serializer.Serialize(container); - Assert.That(csv, Does.Match(container.Name)); - Assert.That(csv, Does.Match(container.Username)); - Assert.That(csv, Does.Match(container.Domain)); - Assert.That(csv, Does.Match(container.Password)); - Assert.That(csv, Does.Contain(TreeNodeType.Container.ToString())); - } - - [Test] - public void SerializationIncludesRawInheritedValuesIfObjectInheritsFromParentOutsideOfSerializationScope() - { - var serializer = new CsvConnectionsSerializerMremotengFormat(new SaveFilter(), _credentialRepositoryList); - var treeModel = new ConnectionTreeModelBuilder().Build(); - var serializationTarget = treeModel.GetRecursiveChildList().First(info => info.Name == "folder3"); - var csv = serializer.Serialize(serializationTarget); - var lineWithFolder3 = csv.Split(new[] {Environment.NewLine}, StringSplitOptions.None).First(s => s.Contains(serializationTarget.Name)); - Assert.That(lineWithFolder3, Does.Contain(serializationTarget.Username)); - Assert.That(lineWithFolder3, Does.Contain(serializationTarget.Domain)); - Assert.That(lineWithFolder3, Does.Contain(serializationTarget.Password)); - } - - private ConnectionInfo BuildConnectionInfo() - { - return new ConnectionInfo - { - Name = ConnectionName, - Username = Username, - Domain = Domain, - Password = Password, - Inheritance = {Colors = true} - }; - } - - private ContainerInfo BuildContainer() - { - return new ContainerInfo - { - Name = "MyFolder", - Username = "BlahBlah1", - Domain = "aklkskkksh8", - Password = "qweraslkdjf87" - }; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/ValidateXmlSchemas.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/ValidateXmlSchemas.cs deleted file mode 100644 index 7e074d98f..000000000 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/ValidateXmlSchemas.cs +++ /dev/null @@ -1,87 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using NUnit.Framework; -using System.IO; -using System.Linq; -using System.Runtime.CompilerServices; -using System.Text; -using System.Xml; -using System.Xml.Schema; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; - -namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml -{ - public class ValidateXmlSchemas - { - private XmlConnectionsSerializer _serializer; - private ConnectionTreeModel _connectionTreeModel; - private ICryptographyProvider _cryptographyProvider; - private XmlReaderSettings _xmlReaderSettings; - - [SetUp] - public void Setup() - { - _connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - root.AddChild(new ConnectionInfo()); - _connectionTreeModel.AddRootNode(root); - - _cryptographyProvider = new AeadCryptographyProvider(); - var connectionNodeSerializer = new XmlConnectionNodeSerializer27( - _cryptographyProvider, - _connectionTreeModel.RootNodes.OfType().First().PasswordString.ConvertToSecureString(), - new SaveFilter()); - _serializer = new XmlConnectionsSerializer(_cryptographyProvider, connectionNodeSerializer); - _xmlReaderSettings = new XmlReaderSettings - { - ValidationType = ValidationType.Schema, - ValidationFlags = XmlSchemaValidationFlags.ProcessInlineSchema | - XmlSchemaValidationFlags.ProcessSchemaLocation | - XmlSchemaValidationFlags.ReportValidationWarnings - }; - } - - [Test] - public void ValidateSchema() - { - var sb = new StringBuilder(); - var xml = _serializer.Serialize(_connectionTreeModel); - var schemaFileName = $"mremoteng_confcons_v{_serializer.Version.Major}_{_serializer.Version.Minor}.xsd"; - var schemaFile = GetTargetPath(schemaFileName); - _xmlReaderSettings.Schemas.Add("http://mremoteng.org", schemaFile); - _xmlReaderSettings.ValidationEventHandler += (sender, args) => - { - sb.AppendLine($"{args.Severity}: {args.Message}"); - }; - - using (var stream = GenerateStreamFromString(xml)) - { - var reader = XmlReader.Create(stream, _xmlReaderSettings); - while (reader.Read()) ; - } - - Assert.That(sb.ToString(), Is.Empty); - } - - public string GetTargetPath(string fileName, [CallerFilePath] string sourceFilePath = "") - { - var path = Path.GetDirectoryName(sourceFilePath); - var filePath = $@"{path}\..\..\..\..\..\mRemoteNG\Schemas\{fileName}"; - - return filePath; - } - - private Stream GenerateStreamFromString(string s) - { - var stream = new MemoryStream(); - var writer = new StreamWriter(stream); - writer.Write(s); - writer.Flush(); - stream.Position = 0; - return stream; - } - } -} diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializerTests.cs deleted file mode 100644 index f4023b127..000000000 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializerTests.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Tree; -using mRemoteNGTests.Properties; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionsDeserializerTests - { - private XmlConnectionsDeserializer _xmlConnectionsDeserializer; - private ConnectionTreeModel _connectionTreeModel; - - public void Setup(string confCons, string password) - { - _xmlConnectionsDeserializer = new XmlConnectionsDeserializer(() => password.ConvertToSecureString()); - _connectionTreeModel = _xmlConnectionsDeserializer.Deserialize(confCons); - } - - [TearDown] - public void Teardown() - { - _xmlConnectionsDeserializer = null; - _connectionTreeModel = null; - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void DeserializingCreatesRootNode(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - Assert.That(_connectionTreeModel.RootNodes, Is.Not.Empty); - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void RootNodeHasThreeChildren(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - var connectionRoot = _connectionTreeModel.RootNodes[0]; - Assert.That(connectionRoot.Children.Count, Is.EqualTo(3)); - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void RootContainsFolder1(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - var connectionRoot = _connectionTreeModel.RootNodes[0]; - Assert.That(ContainsNodeNamed("Folder1", connectionRoot.Children), Is.True); - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void Folder1ContainsThreeConnections(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - var connectionRoot = _connectionTreeModel.RootNodes[0]; - var folder1 = GetFolderNamed("Folder1", connectionRoot.Children); - var folder1ConnectionCount = folder1?.Children.Count(node => !(node is ContainerInfo)); - Assert.That(folder1ConnectionCount, Is.EqualTo(3)); - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void Folder2ContainsThreeNodes(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - var connectionRoot = _connectionTreeModel.RootNodes[0]; - var folder2 = GetFolderNamed("Folder2", connectionRoot.Children); - var folder1Count = folder2?.Children.Count(); - Assert.That(folder1Count, Is.EqualTo(3)); - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void Folder21HasTwoNodes(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - var connectionRoot = _connectionTreeModel.RootNodes[0]; - var folder2 = GetFolderNamed("Folder2", connectionRoot.Children); - var folder21 = GetFolderNamed("Folder2.1", folder2.Children); - Assert.That(folder21.Children.Count, Is.EqualTo(2)); - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void Folder211HasOneConnection(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - var connectionRoot = _connectionTreeModel.RootNodes[0]; - var folder2 = GetFolderNamed("Folder2", connectionRoot.Children); - var folder21 = GetFolderNamed("Folder2.1", folder2.Children); - var folder211 = GetFolderNamed("Folder2.1.1", folder21.Children); - var connectionCount = folder211.Children.Count(node => !(node is ContainerInfo)); - Assert.That(connectionCount, Is.EqualTo(1)); - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void Folder22InheritsUsername(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - var connectionRoot = _connectionTreeModel.RootNodes[0]; - var folder2 = GetFolderNamed("Folder2", connectionRoot.Children); - var folder22 = GetFolderNamed("Folder2.2", folder2.Children); - Assert.That(folder22.Inheritance.Username, Is.True); - } - - [TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))] - public void ExpandedPropertyGetsDeserialized(Datagram testData) - { - Setup(testData.ConfCons, testData.Password); - var folder1 = GetFolderNamed("Folder1", _connectionTreeModel.GetRecursiveChildList()); - Assert.That(folder1.IsExpanded, Is.True); - } - - private bool ContainsNodeNamed(string name, IEnumerable list) - { - return list.Any(node => node.Name == name); - } - - private ContainerInfo GetFolderNamed(string name, IEnumerable list) - { - var folder = list.First(node => (node is ContainerInfo && node.Name == name)) as ContainerInfo; - return folder; - } - } - - public class XmlConnectionsDeserializerFixtureData - { - public static IEnumerable FixtureParams - { - get - { - yield return new TestCaseData(new Datagram("confCons v2.5", Resources.confCons_v2_5, "mR3m")); - yield return new TestCaseData(new Datagram("confCons v2.5 fullencryption", Resources.confCons_v2_5_fullencryption, "mR3m")); - yield return new TestCaseData(new Datagram("confCons v2.5 custompassword,fullencryption", Resources.confCons_v2_5_passwordis_Password_fullencryption, "Password")); - yield return new TestCaseData(new Datagram("confCons v2.6", Resources.confCons_v2_6, "mR3m")); - yield return new TestCaseData(new Datagram("confCons v2.6 5k Iterations", Resources.confCons_v2_6_5k_iterations, "mR3m")); - yield return new TestCaseData(new Datagram("confCons v2.6 fullencryption", Resources.confCons_v2_6_fullencryption, "mR3m")); - yield return new TestCaseData(new Datagram("confCons v2.6 custompassword", Resources.confCons_v2_6_passwordis_Password, "Password")); - yield return new TestCaseData(new Datagram("confCons v2.6 custompassword,fullencryption", Resources.confCons_v2_6_passwordis_Password_fullencryption, "Password")); - } - } - } - - public class Datagram - { - private readonly string _testName; - - public string ConfCons { get; set; } - public string Password { get; set; } - - public Datagram(string testName, string confCons, string password) - { - _testName = testName; - ConfCons = confCons; - Password = password; - } - - public override string ToString() - { - return _testName; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentCompilerTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentCompilerTests.cs deleted file mode 100644 index 69fd48e27..000000000 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentCompilerTests.cs +++ /dev/null @@ -1,112 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using NUnit.Framework; -using System.Linq; -using System.Xml.XPath; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; - -namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionsDocumentCompilerTests - { - private XmlConnectionsDocumentCompiler _documentCompiler; - private ConnectionTreeModel _connectionTreeModel; - private ICryptographyProvider _cryptographyProvider; - private ContainerInfo _folder1; - private ContainerInfo _folder2; - private ContainerInfo _folder3; - private ConnectionInfo _con0; - private ConnectionInfo _con1; - private ConnectionInfo _con2; - private ConnectionInfo _con3; - private ConnectionInfo _con4; - - [SetUp] - public void Setup() - { - _connectionTreeModel = SetupConnectionTreeModel(); - _cryptographyProvider = new CryptoProviderFactory(BlockCipherEngines.AES, BlockCipherModes.GCM).Build(); - var connectionNodeSerializer = new XmlConnectionNodeSerializer27( - _cryptographyProvider, - _connectionTreeModel.RootNodes.OfType().First().PasswordString.ConvertToSecureString(), - new SaveFilter()); - _documentCompiler = new XmlConnectionsDocumentCompiler(_cryptographyProvider, connectionNodeSerializer); - } - - [Test] - public void XDocumentHasXmlDeclaration() - { - var xdoc = _documentCompiler.CompileDocument(_connectionTreeModel, false); - Assert.That(xdoc.Declaration, Is.Not.Null); - } - - [Test] - public void DocumentHasRootConnectionElement() - { - var xdoc =_documentCompiler.CompileDocument(_connectionTreeModel, false); - var rootElementName = xdoc.Root?.Name.LocalName; - Assert.That(rootElementName, Is.EqualTo("Connections")); - } - - [Test] - public void ConnectionNodesSerializedRecursively() - { - var xdoc = _documentCompiler.CompileDocument(_connectionTreeModel, false); - var con4 = xdoc.Root?.XPathSelectElement("Node[@Name='folder2']/Node[@Name='folder3']/Node[@Name='con4']"); - Assert.That(con4, Is.Not.Null); - } - - [Test] - public void XmlContentEncryptedWhenFullFileEncryptionTurnedOn() - { - var xdoc = _documentCompiler.CompileDocument(_connectionTreeModel, true); - var rootElementValue = xdoc.Root?.Value; - Assert.That(rootElementValue, Is.Not.EqualTo(string.Empty)); - } - - - private ConnectionTreeModel SetupConnectionTreeModel() - { - /* - * Root - * |--- con0 - * |--- folder1 - * | L--- con1 - * L--- folder2 - * |--- con2 - * L--- folder3 - * |--- con3 - * L--- con4 - */ - BuildTreeNodes(); - var connectionTreeModel = new ConnectionTreeModel(); - var rootNode = new RootNodeInfo(RootNodeType.Connection); - rootNode.AddChild(_folder1); - rootNode.AddChild(_folder2); - rootNode.AddChild(_con0); - _folder1.AddChild(_con1); - _folder2.AddChild(_con2); - _folder2.AddChild(_folder3); - _folder3.AddChild(_con3); - _folder3.AddChild(_con4); - connectionTreeModel.AddRootNode(rootNode); - return connectionTreeModel; - } - - private void BuildTreeNodes() - { - _folder1 = new ContainerInfo { Name = "folder1" }; - _folder2 = new ContainerInfo { Name = "folder2" }; - _folder3 = new ContainerInfo { Name = "folder3" }; - _con0 = new ConnectionInfo { Name = "con0" }; - _con1 = new ConnectionInfo { Name = "con1" }; - _con2 = new ConnectionInfo { Name = "con2" }; - _con3 = new ConnectionInfo { Name = "con3" }; - _con4 = new ConnectionInfo { Name = "con4" }; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentEncryptorTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentEncryptorTests.cs deleted file mode 100644 index 167402945..000000000 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDocumentEncryptorTests.cs +++ /dev/null @@ -1,75 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using NUnit.Framework; -using System.Linq; -using System.Xml.Linq; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; - -namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionsDocumentEncryptorTests - { - private XmlConnectionsDocumentEncryptor _documentEncryptor; - private XDocument _originalDocument; - - [SetUp] - public void Setup() - { - var connectionTreeModel = SetupConnectionTreeModel(); - var cryptoProvider = new CryptoProviderFactory(BlockCipherEngines.AES, BlockCipherModes.GCM).Build(); - var connectionNodeSerializer = new XmlConnectionNodeSerializer27( - cryptoProvider, - connectionTreeModel.RootNodes.OfType().First().PasswordString.ConvertToSecureString(), - new SaveFilter()); - _originalDocument = new XmlConnectionsDocumentCompiler(cryptoProvider, connectionNodeSerializer).CompileDocument(connectionTreeModel, false); - _documentEncryptor = new XmlConnectionsDocumentEncryptor(cryptoProvider); - } - - [Test] - public void RootNodeValueIsEncrypted() - { - var encryptedDocument = _documentEncryptor.EncryptDocument(_originalDocument, "mR3m".ConvertToSecureString()); - var encryptedContent = encryptedDocument.Root?.Value; - Assert.That(encryptedContent, Is.Not.EqualTo(string.Empty)); - } - - private ConnectionTreeModel SetupConnectionTreeModel() - { - /* - * Root - * |--- con0 - * |--- folder1 - * | L--- con1 - * L--- folder2 - * |--- con2 - * L--- folder3 - * |--- con3 - * L--- con4 - */ - var connectionTreeModel = new ConnectionTreeModel(); - var rootNode = new RootNodeInfo(RootNodeType.Connection); - var folder1 = new ContainerInfo { Name = "folder1" }; - var folder2 = new ContainerInfo { Name = "folder2" }; - var folder3 = new ContainerInfo { Name = "folder3" }; - var con0 = new ConnectionInfo { Name = "con0" }; - var con1 = new ConnectionInfo { Name = "con1" }; - var con2 = new ConnectionInfo { Name = "con2" }; - var con3 = new ConnectionInfo { Name = "con3" }; - var con4 = new ConnectionInfo { Name = "con4" }; - rootNode.AddChild(folder1); - rootNode.AddChild(folder2); - rootNode.AddChild(con0); - folder1.AddChild(con1); - folder2.AddChild(con2); - folder2.AddChild(folder3); - folder3.AddChild(con3); - folder3.AddChild(con4); - connectionTreeModel.AddRootNode(rootNode); - return connectionTreeModel; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsSerializerTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsSerializerTests.cs deleted file mode 100644 index 7f4934526..000000000 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsSerializerTests.cs +++ /dev/null @@ -1,112 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using NUnit.Framework; -using System.Linq; -using System.Xml; -using System.Xml.Linq; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; - -namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlConnectionsSerializerTests - { - private XmlConnectionsSerializer _serializer; - private ConnectionTreeModel _connectionTreeModel; - private ICryptographyProvider _cryptographyProvider; - - - [SetUp] - public void Setup() - { - _connectionTreeModel = SetupConnectionTreeModel(); - _cryptographyProvider = new AeadCryptographyProvider(); - var connectionNodeSerializer = new XmlConnectionNodeSerializer27( - _cryptographyProvider, - _connectionTreeModel.RootNodes.OfType().First().PasswordString.ConvertToSecureString(), - new SaveFilter()); - _serializer = new XmlConnectionsSerializer(_cryptographyProvider, connectionNodeSerializer); - } - - [Test] - public void ChildNestingSerializedCorrectly() - { - var serializedConnections = _serializer.Serialize(_connectionTreeModel); - var xmlDoc = new XmlDocument(); - xmlDoc.LoadXml(serializedConnections); - var nodeCon4 = xmlDoc.DocumentElement?.SelectSingleNode("Node[@Name='folder2']/Node[@Name='folder3']/Node[@Name='con4']"); - Assert.That(nodeCon4, Is.Not.Null); - } - - [Test] - public void SingleConnectionSerializedCorrectly() - { - var connectionInfo = new ConnectionInfo {Name = "myConnection"}; - var serializedConnections = _serializer.Serialize(connectionInfo); - var xmlDoc = new XmlDocument(); - xmlDoc.LoadXml(serializedConnections); - var connectionNode = xmlDoc.DocumentElement?.SelectSingleNode($"Node[@Name='{connectionInfo.Name}']"); - Assert.That(connectionNode, Is.Not.Null); - } - - [TestCase("Username", "")] - [TestCase("Domain", "")] - [TestCase("Password", "")] - [TestCase("InheritAutomaticResize", null)] - public void SerializerRespectsSaveFilterSettings(string attributeName, string expectedValue) - { - var connectionNodeSerializer = new XmlConnectionNodeSerializer27( - _cryptographyProvider, - _connectionTreeModel.RootNodes.OfType().First().PasswordString.ConvertToSecureString(), - new SaveFilter(true)); - var serializer = new XmlConnectionsSerializer(_cryptographyProvider, connectionNodeSerializer); - var connectionInfo = new ConnectionInfo - { - Name = "myConnection", - Inheritance = {AutomaticResize = true} - }; - var serializedConnections = serializer.Serialize(connectionInfo); - var xdoc = XDocument.Parse(serializedConnections); - var attributeValue = xdoc.Root?.Element("Node")?.Attribute(attributeName)?.Value; - Assert.That(attributeValue, Is.EqualTo(expectedValue)); - } - - private ConnectionTreeModel SetupConnectionTreeModel() - { - /* - * Root - * |--- con0 - * |--- folder1 - * | L--- con1 - * L--- folder2 - * |--- con2 - * L--- folder3 - * |--- con3 - * L--- con4 - */ - var connectionTreeModel = new ConnectionTreeModel(); - var rootNode = new RootNodeInfo(RootNodeType.Connection); - var folder1 = new ContainerInfo { Name = "folder1" }; - var folder2 = new ContainerInfo { Name = "folder2" }; - var folder3 = new ContainerInfo { Name = "folder3" }; - var con0 = new ConnectionInfo { Name = "con0" }; - var con1 = new ConnectionInfo { Name = "con1" }; - var con2 = new ConnectionInfo { Name = "con2" }; - var con3 = new ConnectionInfo { Name = "con3" }; - var con4 = new ConnectionInfo { Name = "con4" }; - rootNode.AddChild(folder1); - rootNode.AddChild(folder2); - rootNode.AddChild(con0); - folder1.AddChild(con1); - folder2.AddChild(con2); - folder2.AddChild(folder3); - folder3.AddChild(con3); - folder3.AddChild(con4); - connectionTreeModel.AddRootNode(rootNode); - return connectionTreeModel; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlRootNodeSerializerTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlRootNodeSerializerTests.cs deleted file mode 100644 index 4eeb474e1..000000000 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Xml/XmlRootNodeSerializerTests.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using System.Collections; -using System.Xml.Linq; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tree.Root; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Xml -{ - public class XmlRootNodeSerializerTests - { - private XmlRootNodeSerializer _rootNodeSerializer; - private ICryptographyProvider _cryptographyProvider; - private RootNodeInfo _rootNodeInfo; - private Version _version; - - [SetUp] - public void Setup() - { - _rootNodeSerializer = new XmlRootNodeSerializer(); - _cryptographyProvider = new AeadCryptographyProvider(); - _rootNodeInfo = new RootNodeInfo(RootNodeType.Connection); - _version = new Version(99, 1); - } - - [Test] - public void RootElementNamedConnections() - { - var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, _version); - Assert.That(element.Name.LocalName, Is.EqualTo("Connections")); - } - - [Test] - [SetUICulture("en-US")] - public void RootNodeInfoNameSerialized() - { - var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, _version); - var attributeValue = element.Attribute(XName.Get("Name"))?.Value; - Assert.That(attributeValue, Is.EqualTo("Connections")); - } - - [TestCaseSource(typeof(TestCaseSources), nameof(TestCaseSources.AllEngineAndModeCombos))] - public void EncryptionEngineSerialized(BlockCipherEngines engine, BlockCipherModes mode) - { - var cryptoProvider = new CryptoProviderFactory(engine, mode).Build(); - var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, cryptoProvider, _version); - var attributeValue = element.Attribute(XName.Get("EncryptionEngine"))?.Value; - Assert.That(attributeValue, Is.EqualTo(engine.ToString())); - } - - [TestCaseSource(typeof(TestCaseSources), nameof(TestCaseSources.AllEngineAndModeCombos))] - public void EncryptionModeSerialized(BlockCipherEngines engine, BlockCipherModes mode) - { - var cryptoProvider = new CryptoProviderFactory(engine, mode).Build(); - var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, cryptoProvider, _version); - var attributeValue = element.Attribute(XName.Get("BlockCipherMode"))?.Value; - Assert.That(attributeValue, Is.EqualTo(mode.ToString())); - } - - [TestCase(1000)] - [TestCase(1234)] - [TestCase(9999)] - [TestCase(10000)] - public void KdfIterationsSerialized(int iterations) - { - _cryptographyProvider.KeyDerivationIterations = iterations; - var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, _version); - var attributeValue = element.Attribute(XName.Get("KdfIterations"))?.Value; - Assert.That(attributeValue, Is.EqualTo(iterations.ToString())); - } - - [TestCase(true)] - [TestCase(false)] - public void FullFileEncryptionFlagSerialized(bool fullFileEncryption) - { - var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, _version, fullFileEncryption); - var attributeValue = element.Attribute(XName.Get("FullFileEncryption"))?.Value; - Assert.That(bool.Parse(attributeValue), Is.EqualTo(fullFileEncryption)); - } - - [TestCase("", "ThisIsNotProtected")] - [TestCase(null, "ThisIsNotProtected")] - [TestCase("mR3m", "ThisIsNotProtected")] - [TestCase("customPassword1", "ThisIsProtected")] - public void ProtectedStringSerialized(string customPassword, string expectedPlainText) - { - _rootNodeInfo.PasswordString = customPassword; - var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, _version); - var attributeValue = element.Attribute(XName.Get("Protected"))?.Value; - var attributeValuePlainText = _cryptographyProvider.Decrypt(attributeValue, _rootNodeInfo.PasswordString.ConvertToSecureString()); - Assert.That(attributeValuePlainText, Is.EqualTo(expectedPlainText)); - } - - [Test] - public void ConfVersionSerialized() - { - var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, _version); - var attributeValue = element.Attribute(XName.Get("ConfVersion"))?.Value ?? ""; - var confVersion = Version.Parse(attributeValue); - Assert.That(confVersion, Is.EqualTo(_version)); - } - - private class TestCaseSources - { - public static IEnumerable AllEngineAndModeCombos - { - get - { - foreach (var engine in Enum.GetValues(typeof(BlockCipherEngines))) - { - foreach (var mode in Enum.GetValues(typeof(BlockCipherModes))) - { - yield return new TestCaseData(engine, mode); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/CredentialProviderSerializerTests.cs b/mRemoteNGTests/Config/Serializers/CredentialProviderSerializerTests.cs deleted file mode 100644 index 6fadfb0d0..000000000 --- a/mRemoteNGTests/Config/Serializers/CredentialProviderSerializerTests.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using mRemoteNG.Config.Serializers.CredentialProviderSerializer; -using mRemoteNG.Credential; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Config.Serializers -{ - public class CredentialProviderSerializerTests - { - private CredentialRepositoryListSerializer _credentialProviderSerializer; - - [SetUp] - public void Setup() - { - _credentialProviderSerializer = new CredentialRepositoryListSerializer(); - } - - private ICredentialRepository InitializeMockProvider() - { - var provider = Substitute.For(); - provider.Config.TypeName.Returns("ProviderName"); - provider.Config.Id.Returns(Guid.NewGuid()); - return provider; - } - - [Test] - public void SerializeExists() - { - var mockProvider = InitializeMockProvider(); - var providers = new[] { mockProvider }; - var serializedContent = _credentialProviderSerializer.Serialize(providers); - Assert.That(serializedContent, Is.Not.Null); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialPasswordDecryptorDecoratorTests.cs b/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialPasswordDecryptorDecoratorTests.cs deleted file mode 100644 index 6dfd13096..000000000 --- a/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialPasswordDecryptorDecoratorTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Linq; -using System.Security; -using mRemoteNG.Config.Serializers.CredentialSerializer; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.CredentialSerializers -{ - public class XmlCredentialPasswordDecryptorDecoratorTests - { - private XmlCredentialPasswordDecryptorDecorator _sut; - private readonly SecureString _decryptionKey = "myKey1".ConvertToSecureString(); - private string _unencryptedPassword = "myPassword1"; - - [SetUp] - public void Setup() - { - var baseDeserializer = new XmlCredentialRecordDeserializer(); - _sut = new XmlCredentialPasswordDecryptorDecorator(baseDeserializer); - } - - [Test] - public void OutputedCredentialHasDecryptedPassword() - { - var xml = GenerateCredentialXml(); - var output = _sut.Deserialize(xml, _decryptionKey); - Assert.That(output.First().Password.ConvertToUnsecureString(), Is.EqualTo(_unencryptedPassword)); - } - - [Test] - public void DecryptionThrowsExceptionWhenAuthHeaderNotFound() - { - var xml = GenerateCredentialXml(false); - Assert.Throws(() => _sut.Deserialize(xml, _decryptionKey)); - } - - - private string GenerateCredentialXml(bool includeAuthHeader = true) - { - var cryptoProvider = new AeadCryptographyProvider(); - var authHeader = includeAuthHeader ? $"Auth=\"{cryptoProvider.Encrypt("someheader", _decryptionKey)}\"" : ""; - var encryptedPassword = cryptoProvider.Encrypt(_unencryptedPassword, _decryptionKey); - return - "" + - $"" + - $"" + - ""; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialPasswordEncryptorDecoratorTests.cs b/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialPasswordEncryptorDecoratorTests.cs deleted file mode 100644 index 379e77597..000000000 --- a/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialPasswordEncryptorDecoratorTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security; -using System.Xml.Linq; -using mRemoteNG.Config.Serializers; -using mRemoteNG.Config.Serializers.CredentialSerializer; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.CredentialSerializers -{ - public class XmlCredentialPasswordEncryptorDecoratorTests - { - private XmlCredentialPasswordEncryptorDecorator _sut; - private const BlockCipherEngines CipherEngine = BlockCipherEngines.Twofish; - private const BlockCipherModes CipherMode = BlockCipherModes.EAX; - private const int KdfIterations = 2000; - private SecureString _key = "myKey1".ConvertToSecureString(); - - [SetUp] - public void Setup() - { - var cryptoProvider = SetupCryptoProvider(); - var baseSerializer = SetupBaseSerializer(); - _sut = new XmlCredentialPasswordEncryptorDecorator(cryptoProvider, baseSerializer); - } - - - [Test] - public void CantPassNullCredentialList() - { - Assert.Throws(() => _sut.Serialize(null, new SecureString())); - } - - [Test] - public void EncryptsPasswordAttributesInXml() - { - var credList = Substitute.For>(); - var output = _sut.Serialize(credList, _key); - var outputAsXdoc = XDocument.Parse(output); - var firstElementPassword = outputAsXdoc.Root?.Descendants().First().FirstAttribute.Value; - Assert.That(firstElementPassword, Is.EqualTo("encrypted")); - } - - [TestCase("EncryptionEngine", CipherEngine)] - [TestCase("BlockCipherMode", CipherMode)] - [TestCase("KdfIterations", KdfIterations)] - [TestCase("Auth", "encrypted")] - public void SetsRootNodeEncryptionAttributes(string attributeName, object expectedValue) - { - var credList = Substitute.For>(); - var output = _sut.Serialize(credList, _key); - var outputAsXdoc = XDocument.Parse(output); - var authField = outputAsXdoc.Root?.Attribute(attributeName)?.Value; - Assert.That(authField, Is.EqualTo(expectedValue.ToString())); - } - - private ISerializer, string> SetupBaseSerializer() - { - var baseSerializer = Substitute.For, string>>(); - var randomString = Guid.NewGuid().ToString(); - baseSerializer.Serialize(null).ReturnsForAnyArgs( - "" + - "" + - $"" + - $"" + - $"" + - "" + - ""); - return baseSerializer; - } - - private ICryptographyProvider SetupCryptoProvider() - { - var cryptoProvider = Substitute.For(); - cryptoProvider.CipherEngine.Returns(CipherEngine); - cryptoProvider.CipherMode.Returns(CipherMode); - cryptoProvider.KeyDerivationIterations.Returns(KdfIterations); - cryptoProvider.Encrypt(null, null).ReturnsForAnyArgs("encrypted"); - return cryptoProvider; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialRecordDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialRecordDeserializerTests.cs deleted file mode 100644 index 2e13f362f..000000000 --- a/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialRecordDeserializerTests.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Linq; -using mRemoteNG.Config.Serializers.CredentialSerializer; -using mRemoteNG.Security; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.CredentialSerializers -{ - public class XmlCredentialRecordDeserializerTests - { - private XmlCredentialRecordDeserializer _deserializer; - private readonly Guid _id = Guid.NewGuid(); - private const string Title = "sometitle"; - private const string Username = "myusername"; - private const string Domain = "mydomain"; - private const string PlaintextPassword = "mypassword"; - - - [SetUp] - public void Setup() - { - _deserializer = new XmlCredentialRecordDeserializer(); - } - - [Test] - public void HasCorrectId() - { - var xml = GenerateXml(); - var creds = _deserializer.Deserialize(xml); - Assert.That(creds.First().Id, Is.EqualTo(_id)); - } - - [Test] - public void HasCorrectTitle() - { - var xml = GenerateXml(); - var creds = _deserializer.Deserialize(xml); - Assert.That(creds.First().Title, Is.EqualTo(Title)); - } - - [Test] - public void HasCorrectUsername() - { - var xml = GenerateXml(); - var creds = _deserializer.Deserialize(xml); - Assert.That(creds.First().Username, Is.EqualTo(Username)); - } - - [Test] - public void HasCorrectDomain() - { - var xml = GenerateXml(); - var creds = _deserializer.Deserialize(xml); - Assert.That(creds.First().Domain, Is.EqualTo(Domain)); - } - - [Test] - public void HasCorrectPassword() - { - var xml = GenerateXml(); - var creds = _deserializer.Deserialize(xml); - Assert.That(creds.First().Password.ConvertToUnsecureString(), Is.EqualTo(PlaintextPassword)); - } - - [Test] - public void DeserializesAllCredentials() - { - var xml = GenerateXml(); - var creds = _deserializer.Deserialize(xml); - Assert.That(creds.Count(), Is.EqualTo(2)); - } - - [Test] - public void CanDecryptNonStandardEncryptions() - { - var xml = GenerateXml(BlockCipherEngines.Serpent, BlockCipherModes.EAX, 3000); - var creds = _deserializer.Deserialize(xml); - Assert.That(creds.First().Password.ConvertToUnsecureString(), Is.EqualTo(PlaintextPassword)); - } - - - private string GenerateXml(BlockCipherEngines engine = BlockCipherEngines.AES, BlockCipherModes mode = BlockCipherModes.GCM, int interations = 1000) - { - return $"" + - $"" + - $"" + - ""; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialSerializerTests.cs b/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialSerializerTests.cs deleted file mode 100644 index a22646a45..000000000 --- a/mRemoteNGTests/Config/Serializers/CredentialSerializers/XmlCredentialSerializerTests.cs +++ /dev/null @@ -1,49 +0,0 @@ -using mRemoteNG.Config.Serializers.CredentialSerializer; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using NUnit.Framework; -using System; -using System.Linq; -using System.Xml.Linq; - -namespace mRemoteNGTests.Config.Serializers.CredentialSerializers -{ - public class XmlCredentialSerializerTests - { - private XmlCredentialRecordSerializer _serializer; - private ICredentialRecord _cred1; - - [SetUp] - public void Setup() - { - _serializer = new XmlCredentialRecordSerializer(); - _cred1 = new CredentialRecord { Title = "testcred", Username = "davids", Domain = "mydomain", Password = "mypass".ConvertToSecureString() }; - } - - [Test] - public void ProducesValidXml() - { - var serialized = _serializer.Serialize(new[] { _cred1 }); - // ReSharper disable once ReturnValueOfPureMethodIsNotUsed - Assert.DoesNotThrow(() => XDocument.Parse(serialized)); - } - - [Test] - public void AllCredentialsSerialized() - { - var cred2 = new CredentialRecord { Title = "testcred2", Username = "admin", Domain = "otherdomain", Password = "somepass".ConvertToSecureString() }; - var serialized = _serializer.Serialize(new[] { _cred1, cred2 }); - var serializedCount = XDocument.Parse(serialized).Descendants("Credential").Count(); - Assert.That(serializedCount, Is.EqualTo(2)); - } - - [Test] - public void IncludesSchemaVersionParameter() - { - var serialized = _serializer.Serialize(new[] { _cred1 }); - var xdoc = XDocument.Parse(serialized); - var version = Version.Parse(xdoc.Root?.Attribute("SchemaVersion")?.Value ?? ""); - Assert.That(version, Is.EqualTo(_serializer.Version)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/DataTableDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/DataTableDeserializerTests.cs deleted file mode 100644 index 0d1d1a899..000000000 --- a/mRemoteNGTests/Config/Serializers/DataTableDeserializerTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Data; -using System.Security; -using mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql; -using mRemoteNG.Connection; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tree; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers -{ - public class DataTableDeserializerTests - { - private DataTableDeserializer _deserializer; - private ICryptographyProvider _cryptographyProvider; - - [SetUp] - public void Setup() - { - _cryptographyProvider = new LegacyRijndaelCryptographyProvider(); - } - - [Test] - public void WeCanDeserializeATree() - { - var model = CreateConnectionTreeModel(); - var dataTable = CreateDataTable(model.RootNodes[0]); - _deserializer = new DataTableDeserializer(_cryptographyProvider, new SecureString()); - var output = _deserializer.Deserialize(dataTable); - Assert.That(output.GetRecursiveChildList().Count, Is.EqualTo(model.GetRecursiveChildList().Count)); - } - - [Test] - public void WeCanDeserializeASingleEntry() - { - var dataTable = CreateDataTable(new ConnectionInfo()); - _deserializer = new DataTableDeserializer(_cryptographyProvider, new SecureString()); - var output = _deserializer.Deserialize(dataTable); - Assert.That(output.GetRecursiveChildList().Count, Is.EqualTo(1)); - } - - - private DataTable CreateDataTable(ConnectionInfo tableContent) - { - var serializer = new DataTableSerializer(new SaveFilter(), _cryptographyProvider, new SecureString()); - return serializer.Serialize(tableContent); - } - - private ConnectionTreeModel CreateConnectionTreeModel() - { - var builder = new ConnectionTreeModelBuilder(); - return builder.Build(); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/DataTableSerializerTests.cs b/mRemoteNGTests/Config/Serializers/DataTableSerializerTests.cs deleted file mode 100644 index 7bdb0e9c5..000000000 --- a/mRemoteNGTests/Config/Serializers/DataTableSerializerTests.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System.Linq; -using System.Security; -using mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql; -using mRemoteNG.Connection; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tree; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers -{ - public class DataTableSerializerTests - { - private DataTableSerializer _dataTableSerializer; - private SaveFilter _saveFilter; - - [SetUp] - public void Setup() - { - _saveFilter = new SaveFilter(); - _dataTableSerializer = new DataTableSerializer( - _saveFilter, - new LegacyRijndaelCryptographyProvider(), - new SecureString()); - } - - [Test] - public void AllItemsSerialized() - { - var model = CreateConnectionTreeModel(); - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows.Count, Is.EqualTo(model.GetRecursiveChildList().Count())); - } - - [Test] - public void ReturnsEmptyDataTableWhenGivenEmptyConnectionTreeModel() - { - var model = new ConnectionTreeModel(); - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows.Count, Is.EqualTo(0)); - } - - [Test] - public void UsernameSerializedWhenSaveSecurityAllowsIt() - { - var model = CreateConnectionTreeModel(); - _saveFilter.SaveUsername = true; - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows[0]["Username"], Is.Not.EqualTo("")); - } - - [Test] - public void DomainSerializedWhenSaveSecurityAllowsIt() - { - var model = CreateConnectionTreeModel(); - _saveFilter.SaveDomain = true; - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows[0]["Domain"], Is.Not.EqualTo("")); - } - - [Test] - public void PasswordSerializedWhenSaveSecurityAllowsIt() - { - var model = CreateConnectionTreeModel(); - _saveFilter.SavePassword = true; - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows[0]["Password"], Is.Not.EqualTo("")); - } - - [Test] - public void InheritanceSerializedWhenSaveSecurityAllowsIt() - { - var model = CreateConnectionTreeModel(); - _saveFilter.SaveInheritance = true; - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows[0]["InheritUsername"], Is.Not.EqualTo("")); - } - - - - [Test] - public void UsernameNotSerializedWhenSaveSecurityDisabled() - { - var model = CreateConnectionTreeModel(); - _saveFilter.SaveUsername = false; - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows[0]["Username"], Is.EqualTo("")); - } - - [Test] - public void DomainNotSerializedWhenSaveSecurityDisabled() - { - var model = CreateConnectionTreeModel(); - _saveFilter.SaveDomain = false; - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows[0]["Domain"], Is.EqualTo("")); - } - - [Test] - public void PasswordNotSerializedWhenSaveSecurityDisabled() - { - var model = CreateConnectionTreeModel(); - _saveFilter.SavePassword = false; - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows[0]["Password"], Is.EqualTo("")); - } - - [Test] - public void InheritanceNotSerializedWhenSaveSecurityDisabled() - { - var model = CreateConnectionTreeModel(); - _saveFilter.SaveInheritance = false; - var dataTable = _dataTableSerializer.Serialize(model); - Assert.That(dataTable.Rows[0]["InheritUsername"], Is.False); - } - - [Test] - public void CanSerializeEmptyConnectionInfo() - { - var dataTable = _dataTableSerializer.Serialize(new ConnectionInfo()); - Assert.That(dataTable.Rows.Count, Is.EqualTo(1)); - } - - - private ConnectionTreeModel CreateConnectionTreeModel() - { - var builder = new ConnectionTreeModelBuilder(); - return builder.Build(); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/PortScanDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/PortScanDeserializerTests.cs deleted file mode 100644 index dd6ce29e2..000000000 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/PortScanDeserializerTests.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Linq; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Tools; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.MiscSerializers -{ - public class PortScanDeserializerTests - { - private PortScanDeserializer _deserializer; - private ConnectionInfo _importedConnectionInfo; - private const string ExpectedHostName = "server1.domain.com"; - private const string ExpectedDisplayName = "server1"; - private const ProtocolType ExpectedProtocolType = ProtocolType.SSH2; - - - - [OneTimeSetUp] - public void OnetimeSetup() - { - var host = new ScanHost("10.20.30.40") - { - HostName = "server1.domain.com", - Ssh = true - }; - _deserializer = new PortScanDeserializer(ProtocolType.SSH2); - var connectionTreeModel = _deserializer.Deserialize(new[] { host }); - var root = connectionTreeModel.RootNodes.First(); - _importedConnectionInfo = root.Children.First(); - } - - [OneTimeTearDown] - public void OnetimeTeardown() - { - _deserializer = null; - _importedConnectionInfo = null; - } - - [Test] - public void DisplayNameImported() - { - Assert.That(_importedConnectionInfo.Name, Is.EqualTo(ExpectedDisplayName)); - } - - [Test] - public void HostNameImported() - { - Assert.That(_importedConnectionInfo.Hostname, Is.EqualTo(ExpectedHostName)); - } - - [Test] - public void ProtocolImported() - { - Assert.That(_importedConnectionInfo.Protocol, Is.EqualTo(ExpectedProtocolType)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/PuttyConnectionManagerDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/PuttyConnectionManagerDeserializerTests.cs deleted file mode 100644 index 08b8af72c..000000000 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/PuttyConnectionManagerDeserializerTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System.Linq; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNGTests.Properties; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.MiscSerializers -{ - public class PuttyConnectionManagerDeserializerTests - { - private PuttyConnectionManagerDeserializer _deserializer; - private ContainerInfo _rootImportedFolder; - private const string ExpectedRootFolderName = "test_puttyConnectionManager_database"; - private const string ExpectedConnectionDisplayName = "my ssh connection"; - private const string ExpectedConnectionHostname = "server1.mydomain.com"; - private const string ExpectedConnectionDescription = "My Description Here"; - private const int ExpectedConnectionPort = 22; - private const ProtocolType ExpectedProtocolType = ProtocolType.SSH2; - private const string ExpectedPuttySession = "MyCustomPuttySession"; - private const string ExpectedConnectionUsername = "mysshusername"; - private const string ExpectedConnectionPassword = "password123"; - - - [OneTimeSetUp] - public void OnetimeSetup() - { - var fileContents = Resources.test_puttyConnectionManager_database; - _deserializer = new PuttyConnectionManagerDeserializer(); - var connectionTreeModel = _deserializer.Deserialize(fileContents); - var rootNode = connectionTreeModel.RootNodes.First(); - _rootImportedFolder = rootNode.Children.Cast().First(); - } - - [OneTimeTearDown] - public void OnetimeTeardown() - { - _deserializer = null; - _rootImportedFolder = null; - } - - [Test] - public void RootFolderImportedWithCorrectName() - { - Assert.That(_rootImportedFolder.Name, Is.EqualTo(ExpectedRootFolderName)); - } - - [Test] - public void ConnectionDisplayNameImported() - { - var connection = GetSshConnection(); - Assert.That(connection.Name, Is.EqualTo(ExpectedConnectionDisplayName)); - } - - [Test] - public void ConnectionHostNameImported() - { - var connection = GetSshConnection(); - Assert.That(connection.Hostname, Is.EqualTo(ExpectedConnectionHostname)); - } - - [Test] - public void ConnectionDescriptionImported() - { - var connection = GetSshConnection(); - Assert.That(connection.Description, Is.EqualTo(ExpectedConnectionDescription)); - } - - [Test] - public void ConnectionPortImported() - { - var connection = GetSshConnection(); - Assert.That(connection.Port, Is.EqualTo(ExpectedConnectionPort)); - } - - [Test] - public void ConnectionProtocolTypeImported() - { - var connection = GetSshConnection(); - Assert.That(connection.Protocol, Is.EqualTo(ExpectedProtocolType)); - } - - [Test] - public void ConnectionPuttySessionImported() - { - var connection = GetSshConnection(); - Assert.That(connection.PuttySession, Is.EqualTo(ExpectedPuttySession)); - } - - [Test] - public void ConnectionUsernameImported() - { - var connection = GetSshConnection(); - Assert.That(connection.Username, Is.EqualTo(ExpectedConnectionUsername)); - } - - [Test] - public void ConnectionPasswordImported() - { - var connection = GetSshConnection(); - Assert.That(connection.Password, Is.EqualTo(ExpectedConnectionPassword)); - } - - private ConnectionInfo GetSshConnection() - { - var sshFolder = _rootImportedFolder.Children.OfType().First(node => node.Name == "SSHFolder"); - return sshFolder.Children.First(); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs deleted file mode 100644 index c343f3bbe..000000000 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs +++ /dev/null @@ -1,191 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Tree; -using mRemoteNGTests.Properties; -using NUnit.Framework; -using System.Linq; -using mRemoteNG.Config.Serializers.MiscSerializers; - -namespace mRemoteNGTests.Config.Serializers.MiscSerializers -{ - public class RemoteDesktopConnectionDeserializerTests - { - // .rdp file schema: https://technet.microsoft.com/en-us/library/ff393699(v=ws.10).aspx - private RemoteDesktopConnectionDeserializer _deserializer; - private ConnectionTreeModel _connectionTreeModel; - private const string ExpectedHostname = "testhostname.domain.com"; - private const string ExpectedUserName = "myusernamehere"; - private const string ExpectedDomain = "myspecialdomain"; - private const string ExpectedGatewayHostname = "gatewayhostname.domain.com"; - private const string ExpectedLoadBalanceInfo = "tsv://MS Terminal Services Plugin.1.RDS-NAME"; - private const int ExpectedPort = 9933; - private const RDPColors ExpectedColors = RDPColors.Colors24Bit; - private const bool ExpectedBitmapCaching = false; - private const RDPResolutions ExpectedResolutionMode = RDPResolutions.FitToWindow; - private const bool ExpectedWallpaperDisplay = true; - private const bool ExpectedThemesDisplay = true; - private const bool ExpectedFontSmoothing = true; - private const bool ExpectedDesktopComposition = true; - private const bool ExpectedSmartcardRedirection = true; - private const bool ExpectedDriveRedirection = true; - private const bool ExpectedPortRedirection = true; - private const bool ExpectedPrinterRedirection = true; - private const RDPSounds ExpectedSoundRedirection = RDPSounds.BringToThisComputer; - private const string ExpectedStartProgram = "alternate shell"; - - [OneTimeSetUp] - public void OnetimeSetup() - { - var connectionFileContents = Resources.test_remotedesktopconnection_rdp; - _deserializer = new RemoteDesktopConnectionDeserializer(); - _connectionTreeModel = _deserializer.Deserialize(connectionFileContents); - } - - [Test] - public void ConnectionTreeModelHasARootNode() - { - var numberOfRootNodes = _connectionTreeModel.RootNodes.Count; - Assert.That(numberOfRootNodes, Is.GreaterThan(0)); - } - - [Test] - public void RootNodeHasConnectionInfo() - { - var rootNodeContents = _connectionTreeModel.RootNodes.First().Children.OfType(); - Assert.That(rootNodeContents, Is.Not.Empty); - } - - [Test] - public void HostnameImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.Hostname, Is.EqualTo(ExpectedHostname)); - } - - [Test] - public void PortImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.Port, Is.EqualTo(ExpectedPort)); - } - - [Test] - public void UsernameImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.Username, Is.EqualTo(ExpectedUserName)); - } - - [Test] - public void DomainImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.Domain, Is.EqualTo(ExpectedDomain)); - } - - [Test] - public void RdpColorsImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.Colors, Is.EqualTo(ExpectedColors)); - } - - [Test] - public void BitmapCachingImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.CacheBitmaps, Is.EqualTo(ExpectedBitmapCaching)); - } - - [Test] - public void ResolutionImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.Resolution, Is.EqualTo(ExpectedResolutionMode)); - } - - [Test] - public void DisplayWallpaperImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.DisplayWallpaper, Is.EqualTo(ExpectedWallpaperDisplay)); - } - - [Test] - public void DisplayThemesImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.DisplayThemes, Is.EqualTo(ExpectedThemesDisplay)); - } - - [Test] - public void FontSmoothingImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.EnableFontSmoothing, Is.EqualTo(ExpectedFontSmoothing)); - } - - [Test] - public void DesktopCompositionImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.EnableDesktopComposition, Is.EqualTo(ExpectedDesktopComposition)); - } - - [Test] - public void SmartcardRedirectionImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.RedirectSmartCards, Is.EqualTo(ExpectedSmartcardRedirection)); - } - - [Test] - public void DriveRedirectionImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.RedirectDiskDrives, Is.EqualTo(ExpectedDriveRedirection)); - } - - [Test] - public void PortRedirectionImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.RedirectPorts, Is.EqualTo(ExpectedPortRedirection)); - } - - [Test] - public void PrinterRedirectionImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.RedirectPrinters, Is.EqualTo(ExpectedPrinterRedirection)); - } - - [Test] - public void SoundRedirectionImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.RedirectSound, Is.EqualTo(ExpectedSoundRedirection)); - } - - [Test] - public void LoadBalanceInfoImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.LoadBalanceInfo, Is.EqualTo(ExpectedLoadBalanceInfo)); - } - - [Test] - public void StartProgramImportedCorrectly() - { - var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - Assert.That(connectionInfo.RDPStartProgram, Is.EqualTo(ExpectedStartProgram)); - } - - //[Test] - //public void GatewayHostnameImportedCorrectly() - //{ - // var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First(); - // Assert.That(connectionInfo.RDGatewayHostname, Is.EqualTo(_expectedGatewayHostname)); - //} - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs deleted file mode 100644 index ab9d23484..000000000 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs +++ /dev/null @@ -1,199 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Container; -using mRemoteNGTests.Properties; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.MiscSerializers -{ - public class RemoteDesktopConnectionManager27DeserializerTests - { - private string _connectionFileContents; - private RemoteDesktopConnectionManagerDeserializer _deserializer; - private const string ExpectedName = "server1_displayname"; - private const string ExpectedHostname = "server1"; - private const string ExpectedDescription = "Comment text here"; - private const string ExpectedUsername = "myusername1"; - private const string ExpectedDomain = "mydomain"; - private const string ExpectedPassword = "passwordHere!"; - private const bool ExpectedUseConsoleSession = true; - private const int ExpectedPort = 9933; - private const RDGatewayUsageMethod ExpectedGatewayUsageMethod = RDGatewayUsageMethod.Always; - private const string ExpectedGatewayHostname = "gatewayserverhost.innerdomain.net"; - private const string ExpectedGatewayUsername = "gatewayusername"; - private const string ExpectedGatewayDomain = "innerdomain"; - private const string ExpectedGatewayPassword = "gatewayPassword123"; - private const RDPResolutions ExpectedRdpResolution = RDPResolutions.FitToWindow; - private const RDPColors ExpectedRdpColorDepth = RDPColors.Colors24Bit; - private const RDPSounds ExpectedAudioRedirection = RDPSounds.DoNotPlay; - private const bool ExpectedKeyRedirection = true; - private const bool ExpectedSmartcardRedirection = true; - private const bool ExpectedDriveRedirection = true; - private const bool ExpectedPortRedirection = true; - private const bool ExpectedPrinterRedirection = true; - private const AuthenticationLevel ExpectedAuthLevel = AuthenticationLevel.WarnOnFailedAuth; - private const string ExpectedStartProgram = "alternate shell"; - - [OneTimeSetUp] - public void OnetimeSetup() - { - _connectionFileContents = Resources.test_rdcman_v2_7_schema3; - _deserializer = new RemoteDesktopConnectionManagerDeserializer(); - } - - [Test] - public void ConnectionTreeModelHasARootNode() - { - var connectionTreeModel = _deserializer.Deserialize(_connectionFileContents); - var numberOfRootNodes = connectionTreeModel.RootNodes.Count; - Assert.That(numberOfRootNodes, Is.GreaterThan(0)); - } - - [Test] - public void RootNodeHasContents() - { - var connectionTreeModel = _deserializer.Deserialize(_connectionFileContents); - var rootNodeContents = connectionTreeModel.RootNodes.First().Children; - Assert.That(rootNodeContents, Is.Not.Empty); - } - - [Test] - public void AllSubRootFoldersImported() - { - var connectionTreeModel = _deserializer.Deserialize(_connectionFileContents); - var rootNode = connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var rootNodeContents = importedRdcmanRootNode.Children.Count(node => node.Name == "Group1" || node.Name == "Group2"); - Assert.That(rootNodeContents, Is.EqualTo(2)); - } - - [TestCaseSource(nameof(ExpectedPropertyValues))] - public void PropertiesWithValuesAreCorrectlyImported(Func propSelector, object expectedValue) - { - var connectionTreeModel = _deserializer.Deserialize(_connectionFileContents); - - var connection = connectionTreeModel - .GetRecursiveChildList() - .OfType() - .First(node => node.Name == "Group1") - .Children - .First(); - - Assert.That(propSelector(connection), Is.EqualTo(expectedValue)); - } - - [TestCaseSource(nameof(NullPropertyValues))] - public void PropertiesWithoutValuesAreIgnored(Func propSelector) - { - var connectionTreeModel = _deserializer.Deserialize(Resources.test_rdcman_v2_7_schema3_empty_values); - - var importedConnection = connectionTreeModel - .GetRecursiveChildList() - .OfType() - .First(node => node.Name == "Group1") - .Children - .First(); - - Assert.That(propSelector(importedConnection), Is.EqualTo(propSelector(new ConnectionInfo()))); - } - - [TestCaseSource(nameof(NullPropertyValues))] - public void NonExistantPropertiesAreIgnored(Func propSelector) - { - var connectionTreeModel = _deserializer.Deserialize(Resources.test_rdcman_v2_7_schema3_null_values); - - var importedConnection = connectionTreeModel - .GetRecursiveChildList() - .OfType() - .First(node => node.Name == "Group1") - .Children - .First(); - - Assert.That(propSelector(importedConnection), Is.EqualTo(propSelector(new ConnectionInfo()))); - } - - [Test] - public void ExceptionThrownOnBadSchemaVersion() - { - var badFileContents = Resources.test_rdcman_v2_2_badschemaversion; - Assert.That(() => _deserializer.Deserialize(badFileContents), Throws.TypeOf()); - } - - [Test] - public void ExceptionThrownOnUnsupportedVersion() - { - var badFileContents = Resources.test_rdcman_badVersionNumber; - Assert.That(() => _deserializer.Deserialize(badFileContents), Throws.TypeOf()); - } - - [Test] - public void ExceptionThrownOnNoVersion() - { - var badFileContents = Resources.test_rdcman_noversion; - Assert.That(() => _deserializer.Deserialize(badFileContents), Throws.TypeOf()); - } - - private static IEnumerable ExpectedPropertyValues() - { - return new[] - { - new TestCaseData((Func)(con => con.Name), ExpectedName).SetName(nameof(ConnectionInfo.Name)), - new TestCaseData((Func)(con => con.Hostname), ExpectedHostname).SetName(nameof(ConnectionInfo.Hostname)), - new TestCaseData((Func)(con => con.Description), ExpectedDescription).SetName(nameof(ConnectionInfo.Description)), - new TestCaseData((Func)(con => con.Username), ExpectedUsername).SetName(nameof(ConnectionInfo.Username)), - new TestCaseData((Func)(con => con.Domain), ExpectedDomain).SetName(nameof(ConnectionInfo.Domain)), - new TestCaseData((Func)(con => con.Protocol), ProtocolType.RDP).SetName(nameof(ConnectionInfo.Protocol)), - new TestCaseData((Func)(con => con.UseConsoleSession), ExpectedUseConsoleSession).SetName(nameof(ConnectionInfo.UseConsoleSession)), - new TestCaseData((Func)(con => con.Port), ExpectedPort).SetName(nameof(ConnectionInfo.Port)), - new TestCaseData((Func)(con => con.RDGatewayUsageMethod), ExpectedGatewayUsageMethod).SetName(nameof(ConnectionInfo.RDGatewayUsageMethod)), - new TestCaseData((Func)(con => con.RDGatewayHostname), ExpectedGatewayHostname).SetName(nameof(ConnectionInfo.RDGatewayHostname)), - new TestCaseData((Func)(con => con.RDGatewayUsername), ExpectedGatewayUsername).SetName(nameof(ConnectionInfo.RDGatewayUsername)), - new TestCaseData((Func)(con => con.RDGatewayDomain), ExpectedGatewayDomain).SetName(nameof(ConnectionInfo.RDGatewayDomain)), - new TestCaseData((Func)(con => con.Resolution), ExpectedRdpResolution).SetName(nameof(ConnectionInfo.Resolution)), - new TestCaseData((Func)(con => con.Colors), ExpectedRdpColorDepth).SetName(nameof(ConnectionInfo.Colors)), - new TestCaseData((Func)(con => con.RedirectSound), ExpectedAudioRedirection).SetName(nameof(ConnectionInfo.RedirectSound)), - new TestCaseData((Func)(con => con.RedirectKeys), ExpectedKeyRedirection).SetName(nameof(ConnectionInfo.RedirectKeys)), - new TestCaseData((Func)(con => con.RDPAuthenticationLevel), ExpectedAuthLevel).SetName(nameof(ConnectionInfo.RDPAuthenticationLevel)), - new TestCaseData((Func)(con => con.RedirectSmartCards), ExpectedSmartcardRedirection).SetName(nameof(ConnectionInfo.RedirectSmartCards)), - new TestCaseData((Func)(con => con.RedirectPrinters), ExpectedPrinterRedirection).SetName(nameof(ConnectionInfo.RedirectPrinters)), - new TestCaseData((Func)(con => con.RedirectPorts), ExpectedPortRedirection).SetName(nameof(ConnectionInfo.RedirectPorts)), - new TestCaseData((Func)(con => con.RedirectDiskDrives), ExpectedDriveRedirection).SetName(nameof(ConnectionInfo.RedirectDiskDrives)), - new TestCaseData((Func)(con => con.RDPStartProgram), ExpectedStartProgram).SetName(nameof(ConnectionInfo.RDPStartProgram)), - }; - } - - private static IEnumerable NullPropertyValues() - { - return new[] - { - new TestCaseData((Func)(con => con.Name)).SetName(nameof(ConnectionInfo.Name)), - new TestCaseData((Func)(con => con.Hostname)).SetName(nameof(ConnectionInfo.Hostname)), - new TestCaseData((Func)(con => con.Description)).SetName(nameof(ConnectionInfo.Description)), - new TestCaseData((Func)(con => con.Username)).SetName(nameof(ConnectionInfo.Username)), - new TestCaseData((Func)(con => con.Domain)).SetName(nameof(ConnectionInfo.Domain)), - new TestCaseData((Func)(con => con.Protocol)).SetName(nameof(ConnectionInfo.Protocol)), - new TestCaseData((Func)(con => con.UseConsoleSession)).SetName(nameof(ConnectionInfo.UseConsoleSession)), - new TestCaseData((Func)(con => con.Port)).SetName(nameof(ConnectionInfo.Port)), - new TestCaseData((Func)(con => con.RDGatewayUsageMethod)).SetName(nameof(ConnectionInfo.RDGatewayUsageMethod)), - new TestCaseData((Func)(con => con.RDGatewayHostname)).SetName(nameof(ConnectionInfo.RDGatewayHostname)), - new TestCaseData((Func)(con => con.RDGatewayUsername)).SetName(nameof(ConnectionInfo.RDGatewayUsername)), - new TestCaseData((Func)(con => con.RDGatewayDomain)).SetName(nameof(ConnectionInfo.RDGatewayDomain)), - new TestCaseData((Func)(con => con.Resolution)).SetName(nameof(ConnectionInfo.Resolution)), - new TestCaseData((Func)(con => con.Colors)).SetName(nameof(ConnectionInfo.Colors)), - new TestCaseData((Func)(con => con.RedirectSound)).SetName(nameof(ConnectionInfo.RedirectSound)), - new TestCaseData((Func)(con => con.RedirectKeys)).SetName(nameof(ConnectionInfo.RedirectKeys)), - new TestCaseData((Func)(con => con.RDPAuthenticationLevel)).SetName(nameof(ConnectionInfo.RDPAuthenticationLevel)), - new TestCaseData((Func)(con => con.RedirectSmartCards)).SetName(nameof(ConnectionInfo.RedirectSmartCards)), - new TestCaseData((Func)(con => con.RedirectPrinters)).SetName(nameof(ConnectionInfo.RedirectPrinters)), - new TestCaseData((Func)(con => con.RedirectPorts)).SetName(nameof(ConnectionInfo.RedirectPorts)), - new TestCaseData((Func)(con => con.RedirectDiskDrives)).SetName(nameof(ConnectionInfo.RedirectDiskDrives)), - }; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializerTests.cs deleted file mode 100644 index dd2362f65..000000000 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializerTests.cs +++ /dev/null @@ -1,336 +0,0 @@ -using System.IO; -using System.Linq; -using mRemoteNG.Config.Serializers.MiscSerializers; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNGTests.Properties; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.MiscSerializers -{ - public class RemoteDesktopConnectionManagerDeserializerTests - { - private string _connectionFileContents; - private RemoteDesktopConnectionManagerDeserializer _deserializer; - private ConnectionTreeModel _connectionTreeModel; - private const string ExpectedName = "server1_displayname"; - private const string ExpectedHostname = "server1"; - private const string ExpectedDescription = "Comment text here"; - private const string ExpectedUsername = "myusername1"; - private const string ExpectedDomain = "mydomain"; - private const string ExpectedPassword = "passwordHere!"; - private const bool ExpectedUseConsoleSession = true; - private const int ExpectedPort = 9933; - private const RDGatewayUsageMethod ExpectedGatewayUsageMethod = RDGatewayUsageMethod.Always; - private const string ExpectedGatewayHostname = "gatewayserverhost.innerdomain.net"; - private const string ExpectedGatewayUsername = "gatewayusername"; - private const string ExpectedGatewayDomain = "innerdomain"; - private const string ExpectedGatewayPassword = "gatewayPassword123"; - private const RDPResolutions ExpectedRdpResolution = RDPResolutions.FitToWindow; - private const RDPColors ExpectedRdpColorDepth = RDPColors.Colors24Bit; - private const RDPSounds ExpectedAudioRedirection = RDPSounds.DoNotPlay; - private const bool ExpectedKeyRedirection = true; - private const bool ExpectedSmartcardRedirection = true; - private const bool ExpectedDriveRedirection = true; - private const bool ExpectedPortRedirection = true; - private const bool ExpectedPrinterRedirection = true; - private const AuthenticationLevel ExpectedAuthLevel = AuthenticationLevel.AuthRequired; - private const string ExpectedStartProgram = "alternate shell"; - - [OneTimeSetUp] - public void OnetimeSetup() - { - _connectionFileContents = Resources.test_rdcman_v2_2_schema1; - _deserializer = new RemoteDesktopConnectionManagerDeserializer(); - _connectionTreeModel = _deserializer.Deserialize(_connectionFileContents); - } - - [Test] - public void ConnectionTreeModelHasARootNode() - { - var numberOfRootNodes = _connectionTreeModel.RootNodes.Count; - Assert.That(numberOfRootNodes, Is.GreaterThan(0)); - } - - [Test] - public void RootNodeHasContents() - { - var rootNodeContents = _connectionTreeModel.RootNodes.First().Children; - Assert.That(rootNodeContents, Is.Not.Empty); - } - - [Test] - public void AllSubRootFoldersImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var rootNodeContents = importedRdcmanRootNode.Children.Count(node => node.Name == "Group1" || node.Name == "Group2"); - Assert.That(rootNodeContents, Is.EqualTo(2)); - } - - [Test] - public void ConnectionDisplayNameImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Name, Is.EqualTo(ExpectedName)); - } - - [Test] - public void ConnectionHostnameImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Hostname, Is.EqualTo(ExpectedHostname)); - } - - [Test] - public void ConnectionDescriptionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Description, Is.EqualTo(ExpectedDescription)); - } - - [Test] - public void ConnectionUsernameImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Username, Is.EqualTo(ExpectedUsername)); - } - - [Test] - public void ConnectionDomainImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Domain, Is.EqualTo(ExpectedDomain)); - } - - // Since password is encrypted with a machine key, cant test decryption on another machine - //[Test] - //public void ConnectionPasswordImported() - //{ - // var rootNode = _connectionTreeModel.RootNodes.First(); - // var importedRdcmanRootNode = rootNode.Children.OfType().First(); - // var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - // var connection = group1.Children.First(); - // Assert.That(connection.Password, Is.EqualTo(ExpectedPassword)); - //} - - [Test] - public void ConnectionProtocolSetToRdp() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Protocol, Is.EqualTo(ProtocolType.RDP)); - } - - [Test] - public void ConnectionUseConsoleSessionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.UseConsoleSession, Is.EqualTo(ExpectedUseConsoleSession)); - } - - [Test] - public void ConnectionPortImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Port, Is.EqualTo(ExpectedPort)); - } - - [Test] - public void ConnectionGatewayUsageMethodImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RDGatewayUsageMethod, Is.EqualTo(ExpectedGatewayUsageMethod)); - } - - [Test] - public void ConnectionGatewayHostnameImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RDGatewayHostname, Is.EqualTo(ExpectedGatewayHostname)); - } - - [Test] - public void ConnectionGatewayUsernameImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RDGatewayUsername, Is.EqualTo(ExpectedGatewayUsername)); - } - - // Since password is encrypted with a machine key, cant test decryption on another machine - //[Test] - //public void ConnectionGatewayPasswordImported() - //{ - // var rootNode = _connectionTreeModel.RootNodes.First(); - // var importedRdcmanRootNode = rootNode.Children.OfType().First(); - // var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - // var connection = group1.Children.First(); - // Assert.That(connection.RDGatewayPassword, Is.EqualTo(ExpectedGatewayPassword)); - //} - - [Test] - public void ConnectionGatewayDomainImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RDGatewayDomain, Is.EqualTo(ExpectedGatewayDomain)); - } - - [Test] - public void ConnectionResolutionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Resolution, Is.EqualTo(ExpectedRdpResolution)); - } - - [Test] - public void ConnectionColorDepthImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.Colors, Is.EqualTo(ExpectedRdpColorDepth)); - } - - [Test] - public void ConnectionAudioRedirectionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RedirectSound, Is.EqualTo(ExpectedAudioRedirection)); - } - - [Test] - public void ConnectionKeyRedirectionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RedirectKeys, Is.EqualTo(ExpectedKeyRedirection)); - } - - [Test] - public void ConnectionDriveRedirectionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RedirectDiskDrives, Is.EqualTo(ExpectedDriveRedirection)); - } - - [Test] - public void ConnectionPortRedirectionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RedirectPorts, Is.EqualTo(ExpectedPortRedirection)); - } - - [Test] - public void ConnectionPrinterRedirectionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RedirectPrinters, Is.EqualTo(ExpectedPrinterRedirection)); - } - - [Test] - public void ConnectionSmartcardRedirectionImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RedirectSmartCards, Is.EqualTo(ExpectedSmartcardRedirection)); - } - - [Test] - public void ConnectionauthenticationLevelImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RDPAuthenticationLevel, Is.EqualTo(ExpectedAuthLevel)); - } - - [Test] - public void ExceptionThrownOnBadSchemaVersion() - { - var badFileContents = Resources.test_rdcman_v2_2_badschemaversion; - Assert.That(() => _deserializer.Deserialize(badFileContents), Throws.TypeOf()); - } - - [Test] - public void ExceptionThrownOnUnsupportedVersion() - { - var badFileContents = Resources.test_rdcman_badVersionNumber; - Assert.That(() => _deserializer.Deserialize(badFileContents), Throws.TypeOf()); - } - - [Test] - public void ExceptionThrownOnNoVersion() - { - var badFileContents = Resources.test_rdcman_noversion; - Assert.That(() => _deserializer.Deserialize(badFileContents), Throws.TypeOf()); - } - - [Test] - public void StartProgramImported() - { - var rootNode = _connectionTreeModel.RootNodes.First(); - var importedRdcmanRootNode = rootNode.Children.OfType().First(); - var group1 = importedRdcmanRootNode.Children.OfType().First(node => node.Name == "Group1"); - var connection = group1.Children.First(); - Assert.That(connection.RDPStartProgram, Is.EqualTo(ExpectedStartProgram)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion22To23UpgraderTests.cs b/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion22To23UpgraderTests.cs deleted file mode 100644 index 2fdfd3338..000000000 --- a/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion22To23UpgraderTests.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Config.Serializers.Versioning; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.Versioning -{ - public class SqlVersion22To23UpgraderTests - { - private SqlVersion22To23Upgrader _versionUpgrader; - - [SetUp] - public void Setup() - { - var sqlConnector = Substitute.For("", "", "", ""); - _versionUpgrader = new SqlVersion22To23Upgrader(sqlConnector); - } - - [Test] - public void CanUpgradeIfVersionIs22() - { - var currentVersion = new Version(2, 2); - var canUpgrade = _versionUpgrader.CanUpgrade(currentVersion); - Assert.That(canUpgrade, Is.True); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion23To24UpgraderTests.cs b/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion23To24UpgraderTests.cs deleted file mode 100644 index 8d4e6cbd3..000000000 --- a/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion23To24UpgraderTests.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Config.Serializers.Versioning; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.Versioning -{ - public class SqlVersion23To24UpgraderTests - { - private SqlVersion23To24Upgrader _versionUpgrader; - - [SetUp] - public void Setup() - { - var sqlConnector = Substitute.For("", "", "", ""); - _versionUpgrader = new SqlVersion23To24Upgrader(sqlConnector); - } - - [Test] - public void CanUpgradeIfVersionIs23() - { - var currentVersion = new Version(2, 3); - var canUpgrade = _versionUpgrader.CanUpgrade(currentVersion); - Assert.That(canUpgrade, Is.True); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion24To25UpgraderTests.cs b/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion24To25UpgraderTests.cs deleted file mode 100644 index e32cdaac7..000000000 --- a/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion24To25UpgraderTests.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Config.Serializers.Versioning; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.Versioning -{ - public class SqlVersion24To25UpgraderTests - { - private SqlVersion24To25Upgrader _versionUpgrader; - - [SetUp] - public void Setup() - { - var sqlConnector = Substitute.For("", "", "", ""); - _versionUpgrader = new SqlVersion24To25Upgrader(sqlConnector); - } - - [Test] - public void CanUpgradeIfVersionIs24() - { - var currentVersion = new Version(2, 4); - var canUpgrade = _versionUpgrader.CanUpgrade(currentVersion); - Assert.That(canUpgrade, Is.True); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion25To26UpgraderTests.cs b/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion25To26UpgraderTests.cs deleted file mode 100644 index 6396b0bfd..000000000 --- a/mRemoteNGTests/Config/Serializers/Versioning/SqlVersion25To26UpgraderTests.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using mRemoteNG.Config.DatabaseConnectors; -using mRemoteNG.Config.Serializers.Versioning; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Config.Serializers.Versioning -{ - public class SqlVersion25To26UpgraderTests - { - private SqlVersion25To26Upgrader _versionUpgrader; - - [SetUp] - public void Setup() - { - var sqlConnector = Substitute.For("", "", "", ""); - _versionUpgrader = new SqlVersion25To26Upgrader(sqlConnector); - } - - [Test] - public void CanUpgradeIfVersionIs25() - { - var currentVersion = new Version(2, 5); - var canUpgrade = _versionUpgrader.CanUpgrade(currentVersion); - Assert.That(canUpgrade, Is.True); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Config/Settings/DockPanelSerializerTests.cs b/mRemoteNGTests/Config/Settings/DockPanelSerializerTests.cs deleted file mode 100644 index 188440aaa..000000000 --- a/mRemoteNGTests/Config/Settings/DockPanelSerializerTests.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Xml.Linq; -using mRemoteNG.Config.Settings; -using NUnit.Framework; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNGTests.Config.Settings -{ - public class DockPanelSerializerTests - { - private DockPanelLayoutSerializer _dockPanelLayoutSerializer; - private DockPanel _dockPanel; - - [SetUp] - public void Setup() - { - _dockPanelLayoutSerializer = new DockPanelLayoutSerializer(); - _dockPanel = new DockPanel(); - } - - [Test] - public void SerializerProducesValidDockPanelXml() - { - var serializedData = _dockPanelLayoutSerializer.Serialize(_dockPanel); - var serializedDataAsXDoc = XDocument.Parse(serializedData); - Assert.That(serializedDataAsXDoc.Root?.Name.ToString(), Is.EqualTo("DockPanel")); - } - - [Test] - public void CantProvideNullDockPanel() - { - Assert.Throws(() => _dockPanelLayoutSerializer.Serialize(null)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Connection/AbstractConnectionInfoDataTests.cs b/mRemoteNGTests/Connection/AbstractConnectionInfoDataTests.cs deleted file mode 100644 index 577d4d1a6..000000000 --- a/mRemoteNGTests/Connection/AbstractConnectionInfoDataTests.cs +++ /dev/null @@ -1,522 +0,0 @@ -using System; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.VNC; -using NUnit.Framework; - - -namespace mRemoteNGTests.Connection -{ - public class AbstractConnectionInfoDataTests - { -#pragma warning disable 618 - private class TestAbstractConnectionInfoData : AbstractConnectionRecord { - public TestAbstractConnectionInfoData() : base(Guid.NewGuid().ToString()) - { - } - } -#pragma warning restore 618 - private TestAbstractConnectionInfoData _testAbstractConnectionInfoData; - - [SetUp] - public void Setup() - { - _testAbstractConnectionInfoData = new TestAbstractConnectionInfoData(); - } - - [TearDown] - public void Teardown() - { - _testAbstractConnectionInfoData = null; - } - - - [Test] - public void NameNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Name = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void DescriptionNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Description = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void IconNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Icon = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void PanelNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Panel = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void HostnameNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Hostname = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void UsernameNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Username = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void PasswordNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Password = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void DomainNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Domain = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void ProtocolNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Protocol = ProtocolType.HTTP; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void ExtAppNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.ExtApp = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void PortNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Port = 9999; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void PuttySessionNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.PuttySession = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void UseConsoleSessionNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.UseConsoleSession = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RdpAuthenticationLevelNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDPAuthenticationLevel = AuthenticationLevel.AuthRequired; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void LoadBalanceInfoNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.LoadBalanceInfo = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RenderingEngineNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RenderingEngine = HTTPBase.RenderingEngine.EdgeChromium; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void UseCredSspNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.UseCredSsp = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RdGatewayUsageMethodNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDGatewayUsageMethod = RDGatewayUsageMethod.Always; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RdGatewayHostnameNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDGatewayHostname = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RdGatewayUseConnectionCredentialsNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RdGatewayUsernameNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDGatewayUsername = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RdGatewayPasswordNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDGatewayPassword = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RdGatewayDomainNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDGatewayDomain = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void ResolutionNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Resolution = RDPResolutions.Res1366x768; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void AutomaticResizeNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.AutomaticResize = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void ColorsNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Colors = RDPColors.Colors16Bit; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void CacheBitmapsNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.CacheBitmaps = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void DisplayWallpaperNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.DisplayWallpaper = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void DisplayThemesNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.DisplayThemes = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void EnableFontSmoothingNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.EnableFontSmoothing = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void EnableDesktopCompositionNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.EnableDesktopComposition = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RedirectKeysNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RedirectKeys = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RedirectDiskDrivesNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RedirectDiskDrives = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RedirectPrintersNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RedirectPrinters = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RedirectPortsNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RedirectPorts = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RedirectSmartCardsNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RedirectSmartCards = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RedirectSoundNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RedirectSound = RDPSounds.DoNotPlay; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void OpeningCommandNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.OpeningCommand = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void PreExtAppNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.PreExtApp = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void PostExtAppNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.PostExtApp = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void MacAddressNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.MacAddress = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void UserFieldNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.UserField = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void FavoriteNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Favorite = true; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncCompressionNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCCompression = ProtocolVNC.Compression.Comp5; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncEncodingNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCEncoding = ProtocolVNC.Encoding.EncTight; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncAuthModeNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCAuthMode = ProtocolVNC.AuthMode.AuthWin; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncProxyTypeNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCProxyType = ProtocolVNC.ProxyType.ProxyUltra; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncProxyIpNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCProxyIP = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncProxyPortNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCProxyPort = 9999; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncProxyUsernameNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCProxyUsername = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncProxyPasswordNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCProxyPassword = "a"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncColorsNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCColors = ProtocolVNC.Colors.Col8Bit; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncSmartSizeModeNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCSmartSizeMode = ProtocolVNC.SmartSizeMode.SmartSFree; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void VncViewOnlyNotifiesOnValueChange() - { - var wasCalled = false; - _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.VNCViewOnly = true; - Assert.That(wasCalled, Is.True); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Connection/ConnectionInfoComparerTests.cs b/mRemoteNGTests/Connection/ConnectionInfoComparerTests.cs deleted file mode 100644 index 73df486d9..000000000 --- a/mRemoteNGTests/Connection/ConnectionInfoComparerTests.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.ComponentModel; -using mRemoteNG.Connection; -using NUnit.Framework; - - -namespace mRemoteNGTests.Connection -{ - public class ConnectionInfoComparerTests - { - private ConnectionInfo _con1; - private ConnectionInfo _con2; - - [OneTimeSetUp] - public void OnetimeSetup() - { - _con1 = new ConnectionInfo { Name = "a" }; - _con2 = new ConnectionInfo { Name = "b" }; - } - - [Test] - public void SortAscendingOnName() - { - var comparer = new ConnectionInfoComparer(node => node.Name) - { - SortDirection = ListSortDirection.Ascending - }; - var compareReturn = comparer.Compare(_con1, _con2); - Assert.That(compareReturn, Is.Negative); - } - - [Test] - public void SortDescendingOnName() - { - var comparer = new ConnectionInfoComparer(node => node.Name) - { - SortDirection = ListSortDirection.Descending - }; - var compareReturn = comparer.Compare(_con1, _con2); - Assert.That(compareReturn, Is.Positive); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Connection/ConnectionInfoInheritanceTests.cs b/mRemoteNGTests/Connection/ConnectionInfoInheritanceTests.cs deleted file mode 100644 index e1e582ce0..000000000 --- a/mRemoteNGTests/Connection/ConnectionInfoInheritanceTests.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System.Collections; -using System.Linq; -using System.Reflection; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree.Root; -using NUnit.Framework; - -namespace mRemoteNGTests.Connection -{ - [TestFixture] - public class ConnectionInfoInheritanceTests - { - private readonly PropertyInfo[] _inheritanceProperties = typeof(ConnectionInfoInheritance).GetProperties(); - - - [Test] - public void TurnOffInheritanceCompletely() - { - var inheritance = new ConnectionInfoInheritance(new ConnectionInfo()) {Username = true}; - inheritance.TurnOffInheritanceCompletely(); - Assert.That(AllInheritancePropertiesAreFalse(inheritance), Is.True); - } - - [Test] - public void TurnOnInheritanceCompletely() - { - var inheritance = new ConnectionInfoInheritance(new ConnectionInfo()); - inheritance.TurnOnInheritanceCompletely(); - Assert.That(AllInheritancePropertiesAreTrue(inheritance), Is.True); - } - - [Test] - public void InheritanceIsDisabledWhenAttachedToARootNode() - { - var inheritance = new ConnectionInfoInheritance(new RootNodeInfo(RootNodeType.Connection)); - Assert.That(inheritance.InheritanceActive, Is.False); - } - - [Test] - public void InheritanceIsDisabledWhenAttachedToAPuttyRootNode() - { - var inheritance = new ConnectionInfoInheritance(new RootNodeInfo(RootNodeType.PuttySessions)); - Assert.That(inheritance.InheritanceActive, Is.False); - } - - [Test] - public void InheritanceIsDisabledWhenAttachedToAPuttyNode() - { - var inheritance = new ConnectionInfoInheritance(new RootPuttySessionsNodeInfo()); - Assert.That(inheritance.InheritanceActive, Is.False); - } - - [Test] - public void InheritanceIsDisabledWhenAttachedToANodeDirectlyUnderTheRootNode() - { - var con = new ConnectionInfo(); - new RootNodeInfo(RootNodeType.Connection).AddChild(con); - Assert.That(con.Inheritance.InheritanceActive, Is.False); - } - - [Test] - public void InheritanceIsEnabledWhenAttachedToNormalConnectionInfo() - { - var inheritance = new ConnectionInfoInheritance(new ConnectionInfo()); - Assert.That(inheritance.InheritanceActive, Is.True); - } - - [Test] - public void InheritanceIsEnabledWhenAttachedToNormalContainerInfo() - { - var inheritance = new ConnectionInfoInheritance(new ContainerInfo()); - Assert.That(inheritance.InheritanceActive, Is.True); - } - - [Test] - public void GetPropertiesReturnsListOfSettableProperties() - { - var inheritance = new ConnectionInfoInheritance(new ConnectionInfo()); - var hasIconProperty = inheritance.GetProperties().Contains(typeof(ConnectionInfoInheritance).GetProperty("Icon")); - Assert.That(hasIconProperty, Is.True); - } - - [Test] - public void GetPropertiesExludesPropertiesThatShouldNotBeSet() - { - var inheritance = new ConnectionInfoInheritance(new ConnectionInfo()); - var hasEverythingInheritedProperty = inheritance.GetProperties().Contains(typeof(ConnectionInfoInheritance).GetProperty("EverythingInherited")); - Assert.That(hasEverythingInheritedProperty, Is.False); - } - - [Test] - public void AlwaysReturnInheritedValueIfRequested() - { - var expectedSetting = false; - - var container = new ContainerInfo { AutomaticResize = expectedSetting }; - var con1 = new ConnectionInfo - { - AutomaticResize = true, - Inheritance = {AutomaticResize = true} - }; - container.AddChild(con1); - - Assert.That(con1.AutomaticResize, Is.EqualTo(expectedSetting)); - } - - private bool AllInheritancePropertiesAreTrue(ConnectionInfoInheritance inheritance) - { - var allPropertiesTrue = true; - foreach (var property in _inheritanceProperties) - { - if (PropertyIsBoolean(property) && PropertyIsChangedWhenSettingInheritAll(property) && - BooleanPropertyIsSetToFalse(property, inheritance)) - allPropertiesTrue = false; - } - return allPropertiesTrue; - } - - private bool AllInheritancePropertiesAreFalse(ConnectionInfoInheritance inheritance) - { - var allPropertiesFalse = true; - foreach (var property in _inheritanceProperties) - { - if (PropertyIsBoolean(property) && PropertyIsChangedWhenSettingInheritAll(property) && - BooleanPropertyIsSetToTrue(property, inheritance)) - allPropertiesFalse = false; - } - return allPropertiesFalse; - } - - private bool PropertyIsChangedWhenSettingInheritAll(PropertyInfo property) - { - var propertiesIgnoredByInheritAll = new ArrayList {"IsDefault"}; - return propertiesIgnoredByInheritAll.Contains(property); - } - - private bool PropertyIsBoolean(PropertyInfo property) - { - return (property.PropertyType.Name == typeof(bool).Name); - } - - private bool BooleanPropertyIsSetToFalse(PropertyInfo property, ConnectionInfoInheritance inheritance) - { - return (bool)property.GetValue(inheritance) == false; - } - - private bool BooleanPropertyIsSetToTrue(PropertyInfo property, ConnectionInfoInheritance inheritance) - { - return (bool)property.GetValue(inheritance); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Connection/ConnectionInfoTests.cs b/mRemoteNGTests/Connection/ConnectionInfoTests.cs deleted file mode 100644 index 681f772d6..000000000 --- a/mRemoteNGTests/Connection/ConnectionInfoTests.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System.Collections.Generic; -using System.Reflection; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.SSH; -using mRemoteNG.Container; -using mRemoteNG.Tree.Root; -using NUnit.Framework; - - -namespace mRemoteNGTests.Connection -{ - public class ConnectionInfoTests - { - private ConnectionInfo _connectionInfo; - private const string TestDomain = "somedomain"; - - [SetUp] - public void Setup() - { - _connectionInfo = new ConnectionInfo(); - } - - [TearDown] - public void Teardown() - { - _connectionInfo = null; - } - - [Test] - public void CopyCreatesMemberwiseCopy() - { - _connectionInfo.Domain = TestDomain; - var secondConnection = _connectionInfo.Clone(); - Assert.That(secondConnection.Domain, Is.EqualTo(_connectionInfo.Domain)); - } - - [Test] - public void CloneDoesNotSetParentOfNewConnectionInfo() - { - _connectionInfo.SetParent(new ContainerInfo()); - var clonedConnection = _connectionInfo.Clone(); - Assert.That(clonedConnection.Parent, Is.Null); - } - - [Test] - public void CloneAlsoCopiesInheritanceObject() - { - var clonedConnection = _connectionInfo.Clone(); - Assert.That(clonedConnection.Inheritance, Is.Not.EqualTo(_connectionInfo.Inheritance)); - } - - [Test] - public void CloneCorrectlySetsParentOfInheritanceObject() - { - var originalConnection = new ConnectionInfo(); - var clonedConnection = originalConnection.Clone(); - Assert.That(clonedConnection.Inheritance.Parent, Is.EqualTo(clonedConnection)); - } - - [Test] - public void CopyFromCopiesProperties() - { - var secondConnection = new ConnectionInfo {Domain = TestDomain}; - _connectionInfo.CopyFrom(secondConnection); - Assert.That(_connectionInfo.Domain, Is.EqualTo(secondConnection.Domain)); - } - - [Test] - public void CopyingAConnectionInfoAlsoCopiesItsInheritance() - { - _connectionInfo.Inheritance.Username = true; - var secondConnection = new ConnectionInfo {Inheritance = {Username = false}}; - secondConnection.CopyFrom(_connectionInfo); - Assert.That(secondConnection.Inheritance.Username, Is.True); - } - - [Test] - public void PropertyChangedEventRaisedWhenOpenConnectionsChanges() - { - var eventWasCalled = false; - _connectionInfo.PropertyChanged += (sender, args) => eventWasCalled = true; - _connectionInfo.OpenConnections.Add(new ProtocolSSH2()); - Assert.That(eventWasCalled); - } - - [Test] - public void PropertyChangedEventArgsAreCorrectWhenOpenConnectionsChanges() - { - var nameOfModifiedProperty = ""; - _connectionInfo.PropertyChanged += (sender, args) => nameOfModifiedProperty = args.PropertyName; - _connectionInfo.OpenConnections.Add(new ProtocolSSH2()); - Assert.That(nameOfModifiedProperty, Is.EqualTo("OpenConnections")); - } - - [TestCaseSource(typeof(InheritancePropertyProvider), nameof(InheritancePropertyProvider.GetProperties))] - public void MovingAConnectionFromUnderRootNodeToUnderADifferentNodeEnablesInheritance(PropertyInfo property) - { - var rootNode = new RootNodeInfo(RootNodeType.Connection); - var otherContainer = new ContainerInfo(); - _connectionInfo.Inheritance.EverythingInherited = true; - _connectionInfo.SetParent(rootNode); - _connectionInfo.SetParent(otherContainer); - var propertyValue = property.GetValue(_connectionInfo.Inheritance); - Assert.That(propertyValue, Is.True); - } - - [TestCase(ProtocolType.HTTP, ExpectedResult = 80)] - [TestCase(ProtocolType.HTTPS, ExpectedResult = 443)] - [TestCase(ProtocolType.IntApp, ExpectedResult = 0)] - [TestCase(ProtocolType.RAW, ExpectedResult = 23)] - [TestCase(ProtocolType.RDP, ExpectedResult = 3389)] - [TestCase(ProtocolType.Rlogin, ExpectedResult = 513)] - [TestCase(ProtocolType.SSH1, ExpectedResult = 22)] - [TestCase(ProtocolType.SSH2, ExpectedResult = 22)] - [TestCase(ProtocolType.Telnet, ExpectedResult = 23)] - [TestCase(ProtocolType.VNC, ExpectedResult = 5900)] - public int GetDefaultPortReturnsCorrectPortForProtocol(ProtocolType protocolType) - { - _connectionInfo.Protocol = protocolType; - return _connectionInfo.GetDefaultPort(); - } - - private class InheritancePropertyProvider - { - public static IEnumerable GetProperties() - { - return new ConnectionInfoInheritance(new ConnectionInfo()).GetProperties(); - } - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Connection/DefaultConnectionInfoTests.cs b/mRemoteNGTests/Connection/DefaultConnectionInfoTests.cs deleted file mode 100644 index bafb4e145..000000000 --- a/mRemoteNGTests/Connection/DefaultConnectionInfoTests.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Collections.Generic; -using System.Reflection; -using mRemoteNG.Connection; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; - - -namespace mRemoteNGTests.Connection -{ - public class DefaultConnectionInfoTests - { - private ConnectionInfo _randomizedConnectionInfo; - - [SetUp] - public void Setup() - { - _randomizedConnectionInfo = ConnectionInfoHelpers.GetRandomizedConnectionInfo(); - } - - [TestCaseSource(nameof(GetConnectionInfoProperties))] - public void LoadingDefaultInfoUpdatesAllProperties(PropertyInfo property) - { - DefaultConnectionInfo.Instance.LoadFrom(_randomizedConnectionInfo); - var valueInDestination = property.GetValue(DefaultConnectionInfo.Instance); - var valueInSource = property.GetValue(_randomizedConnectionInfo); - Assert.That(valueInDestination, Is.EqualTo(valueInSource)); - } - - [TestCaseSource(nameof(GetConnectionInfoProperties))] - public void SavingDefaultConnectionInfoExportsAllProperties(PropertyInfo property) - { - var saveTarget = new ConnectionInfo(); - var randomizedValue = property.GetValue(_randomizedConnectionInfo); - property.SetValue(DefaultConnectionInfo.Instance, randomizedValue); - DefaultConnectionInfo.Instance.SaveTo(saveTarget); - var valueInDestination = property.GetValue(saveTarget); - var valueInSource = property.GetValue(DefaultConnectionInfo.Instance); - Assert.That(valueInDestination, Is.EqualTo(valueInSource)); - } - - [TestCaseSource(nameof(GetConnectionInfoProperties))] - public void CanSaveDefaultConnectionToModelWithAllStringProperties(PropertyInfo property) - { - var saveTarget = new SerializableConnectionInfoAllPropertiesOfType(); - - // randomize default connnection values to ensure we dont get false passing tests - var randomizedValue = property.GetValue(_randomizedConnectionInfo); - property.SetValue(DefaultConnectionInfo.Instance, randomizedValue); - - DefaultConnectionInfo.Instance.SaveTo(saveTarget); - - var valueInSource = property.GetValue(DefaultConnectionInfo.Instance).ToString(); - var valueInDestination = saveTarget.GetType().GetProperty(property.Name)?.GetValue(saveTarget)?.ToString(); - Assert.That(valueInDestination, Is.EqualTo(valueInSource)); - } - - private static IEnumerable GetConnectionInfoProperties() - { - return new ConnectionInfo().GetSerializableProperties(); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Connection/DefaultConnectionInheritanceTests.cs b/mRemoteNGTests/Connection/DefaultConnectionInheritanceTests.cs deleted file mode 100644 index 93669fd54..000000000 --- a/mRemoteNGTests/Connection/DefaultConnectionInheritanceTests.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.Collections.Generic; -using System.Reflection; -using mRemoteNG.Connection; -using NUnit.Framework; - - -namespace mRemoteNGTests.Connection -{ - public class DefaultConnectionInheritanceTests - { - [TestCaseSource(nameof(GetInheritanceProperties))] - public void LoadingDefaultInheritanceUpdatesAllProperties(PropertyInfo property) - { - var inheritanceSource = new ConnectionInfoInheritance(new ConnectionInfo(), true); - inheritanceSource.TurnOnInheritanceCompletely(); - DefaultConnectionInheritance.Instance.TurnOffInheritanceCompletely(); - - DefaultConnectionInheritance.Instance.LoadFrom(inheritanceSource); - - var valueInDestination = property.GetValue(DefaultConnectionInheritance.Instance); - var valueInSource = property.GetValue(inheritanceSource); - Assert.That(valueInDestination, Is.EqualTo(valueInSource)); - } - - [TestCaseSource(nameof(GetInheritanceProperties))] - public void SavingDefaultInheritanceExportsAllProperties(PropertyInfo property) - { - var saveTarget = new ConnectionInfoInheritance(new ConnectionInfo(), true); - saveTarget.TurnOffInheritanceCompletely(); - DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely(); - - DefaultConnectionInheritance.Instance.SaveTo(saveTarget); - - var valueInDestination = property.GetValue(saveTarget); - var valueInSource = property.GetValue(DefaultConnectionInheritance.Instance); - Assert.That(valueInDestination, Is.EqualTo(valueInSource)); - } - - [Test] - public void NewInheritanceInstancesCreatedWithDefaultInheritanceValues() - { - DefaultConnectionInheritance.Instance.Domain = true; - var inheritanceInstance = new ConnectionInfoInheritance(new ConnectionInfo()); - Assert.That(inheritanceInstance.Domain, Is.True); - } - - [TestCaseSource(nameof(GetInheritanceProperties))] - public void NewInheritanceInstancesCreatedWithAllDefaultInheritanceValues(PropertyInfo property) - { - DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely(); - var inheritanceInstance = new ConnectionInfoInheritance(new ConnectionInfo()); - - var valueInDestination = property.GetValue(inheritanceInstance); - var valueInSource = property.GetValue(DefaultConnectionInheritance.Instance); - Assert.That(valueInDestination, Is.EqualTo(valueInSource)); - } - - private static IEnumerable GetInheritanceProperties() - { - return new ConnectionInfoInheritance(new ConnectionInfo(), true).GetProperties(); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Connection/Protocol/IntegratedProgramTests.cs b/mRemoteNGTests/Connection/Protocol/IntegratedProgramTests.cs deleted file mode 100644 index a0ae68a4a..000000000 --- a/mRemoteNGTests/Connection/Protocol/IntegratedProgramTests.cs +++ /dev/null @@ -1,57 +0,0 @@ -using mRemoteNG.App; -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Tools; -using mRemoteNG.Tools.CustomCollections; -using mRemoteNG.UI.Window; -using NUnit.Framework; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNGTests.Connection.Protocol -{ - public class IntegratedProgramTests - { - private readonly ExternalTool _extTool = new ExternalTool - { - DisplayName = "notepad", - FileName = @"%windir%\system32\notepad.exe", - Arguments = "", - TryIntegrate = true - }; - - - [Test] - public void CanStartExternalApp() - { - SetExternalToolList(_extTool); - var sut = new IntegratedProgram(); - sut.InterfaceControl = BuildInterfaceControl("notepad", sut); - sut.Initialize(); - var appStarted = sut.Connect(); - sut.Disconnect(); - Assert.That(appStarted); - } - - [Test] - public void ConnectingToExternalAppThatDoesntExistDoesNothing() - { - SetExternalToolList(_extTool); - var sut = new IntegratedProgram(); - sut.InterfaceControl = BuildInterfaceControl("doesntExist", sut); - var appInitialized = sut.Initialize(); - Assert.That(appInitialized, Is.False); - } - - private void SetExternalToolList(ExternalTool externalTool) - { - Runtime.ExternalToolsService.ExternalTools = new FullyObservableCollection {externalTool}; - } - - private InterfaceControl BuildInterfaceControl(string extAppName, ProtocolBase sut) - { - var connectionWindow = new ConnectionWindow(new DockContent()); - var connectionInfo = new ConnectionInfo {ExtApp = extAppName, Protocol = ProtocolType.IntApp}; - return new InterfaceControl(connectionWindow, sut, connectionInfo); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Connection/Protocol/ProtocolListTests.cs b/mRemoteNGTests/Connection/Protocol/ProtocolListTests.cs deleted file mode 100644 index 7ca68e713..000000000 --- a/mRemoteNGTests/Connection/Protocol/ProtocolListTests.cs +++ /dev/null @@ -1,218 +0,0 @@ -using System.Collections; -using System.Collections.Specialized; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Connection.Protocol.SSH; -using mRemoteNG.Connection.Protocol.Telnet; -using mRemoteNG.Connection.Protocol.VNC; -using NUnit.Framework; - - -namespace mRemoteNGTests.Connection.Protocol -{ - public class ProtocolListTests - { - private ProtocolList _protocolList; - private ProtocolBase _protocol1; - private ProtocolBase _protocol2; - private ProtocolBase _protocol3; - - - [SetUp] - public void Setup() - { - _protocolList = new ProtocolList(); - _protocol1 = new ProtocolTelnet(); - _protocol2 = new ProtocolSSH2(); - _protocol3 = new ProtocolVNC(); - } - - [TearDown] - public void Teardown() - { - _protocolList = null; - _protocol1 = null; - _protocol2 = null; - _protocol3 = null; - } - - [Test] - public void EmptyWhenInitialized() - { - Assert.That(_protocolList.Count == 0); - } - - [Test] - public void AddAddsObjectToList() - { - _protocolList.Add(_protocol1); - Assert.That(_protocolList[0] == _protocol1); - } - - [Test] - public void AddRangeAddsAllObjects() - { - var protArray = new[] {_protocol1, _protocol2, _protocol3}; - _protocolList.AddRange(protArray); - Assert.That(_protocolList, Is.EquivalentTo(protArray)); - } - - [Test] - public void CountUpdatesToReflectCurrentList() - { - var protArray = new[] { _protocol1, _protocol2, _protocol3 }; - _protocolList.AddRange(protArray); - Assert.That(_protocolList.Count == protArray.Length); - } - - [Test] - public void RemoveRemovesObjectFromList() - { - _protocolList.Add(_protocol1); - _protocolList.Remove(_protocol1); - Assert.That(_protocolList.Count == 0); - } - - [Test] - public void ClearResetsList() - { - var protArray = new[] { _protocol1, _protocol2, _protocol3 }; - _protocolList.AddRange(protArray); - _protocolList.Clear(); - Assert.That(_protocolList.Count == 0); - } - - [Test] - public void IntIndexerReturnsCorrectObject() - { - var protArray = new[] { _protocol1, _protocol2, _protocol3 }; - _protocolList.AddRange(protArray); - Assert.That(_protocolList[1], Is.EqualTo(protArray[1])); - } - - [Test] - public void ObjectIndexerReturnsCorrectObject() - { - var protArray = new[] { _protocol1, _protocol2, _protocol3 }; - _protocolList.AddRange(protArray); - Assert.That(_protocolList[_protocol3], Is.EqualTo(_protocol3)); - } - - [Test] - public void IndexerSafelyHandlesUnknownObjects() - { - var protArray = new[] { _protocol1, _protocol2, _protocol3 }; - _protocolList.AddRange(protArray); - Assert.That(_protocolList["unacceptablevalue"], Is.EqualTo(null)); - } - - [Test] - public void RemovingNonexistantObjectFromListDoesNothing() - { - Assert.DoesNotThrow(()=> _protocolList.Remove(_protocol1)); - } - - [Test] - public void AddRaisesCollectionChangedEvent() - { - var eventWasCalled = false; - _protocolList.CollectionChanged += (sender, args) => eventWasCalled = true; - _protocolList.Add(_protocol1); - Assert.That(eventWasCalled); - } - - [Test] - public void AddCollectionChangedEventContainsAddedObject() - { - IList nodeListFromEvent = new ArrayList(); - _protocolList.CollectionChanged += (sender, args) => nodeListFromEvent = args.NewItems; - _protocolList.Add(_protocol1); - Assert.That(nodeListFromEvent, Is.EquivalentTo(new[] {_protocol1})); - } - - [Test] - public void AddRangeCollectionChangedEventContainsAddedObjects() - { - var protArray = new[] { _protocol1, _protocol2, _protocol3 }; - IList nodeListFromEvent = new ArrayList(); - _protocolList.CollectionChanged += (sender, args) => nodeListFromEvent = args.NewItems; - _protocolList.AddRange(protArray); - Assert.That(nodeListFromEvent, Is.EquivalentTo(protArray)); - } - - [Test] - public void RemoveCollectionChangedEventContainsRemovedObject() - { - IList nodeListFromEvent = new ArrayList(); - _protocolList.Add(_protocol1); - _protocolList.CollectionChanged += (sender, args) => nodeListFromEvent = args.OldItems; - _protocolList.Remove(_protocol1); - Assert.That(nodeListFromEvent, Is.EquivalentTo(new[] { _protocol1 })); - } - - [Test] - public void AttemptingToRemoveNonexistantObjectDoesNotRaiseCollectionChangedEvent() - { - var eventWasCalled = false; - _protocolList.CollectionChanged += (sender, args) => eventWasCalled = true; - _protocolList.Remove(_protocol1); - Assert.That(eventWasCalled == false); - } - - [Test] - public void ClearRaisesCollectionChangedEvent() - { - var eventWasCalled = false; - _protocolList.Add(_protocol1); - _protocolList.CollectionChanged += (sender, args) => eventWasCalled = true; - _protocolList.Clear(); - Assert.That(eventWasCalled); - } - - [Test] - public void ClearDoesntRaiseCollectionChangedEventWhenNoObjectsRemoved() - { - var eventWasCalled = false; - _protocolList.CollectionChanged += (sender, args) => eventWasCalled = true; - _protocolList.Clear(); - Assert.That(eventWasCalled == false); - } - - [Test] - public void AddCollectionChangedEventHasCorrectAction() - { - NotifyCollectionChangedAction collectionChangedAction = NotifyCollectionChangedAction.Move; - _protocolList.CollectionChanged += (sender, args) => collectionChangedAction = args.Action; - _protocolList.Add(_protocol1); - Assert.That(collectionChangedAction, Is.EqualTo(NotifyCollectionChangedAction.Add)); - } - - [Test] - public void AddRangeCollectionChangedEventHasCorrectAction() - { - NotifyCollectionChangedAction collectionChangedAction = NotifyCollectionChangedAction.Move; - _protocolList.CollectionChanged += (sender, args) => collectionChangedAction = args.Action; - _protocolList.AddRange(new []{_protocol1}); - Assert.That(collectionChangedAction, Is.EqualTo(NotifyCollectionChangedAction.Add)); - } - - [Test] - public void RemoveCollectionChangedEventHasCorrectAction() - { - NotifyCollectionChangedAction collectionChangedAction = NotifyCollectionChangedAction.Move; - _protocolList.Add(_protocol1); - _protocolList.CollectionChanged += (sender, args) => collectionChangedAction = args.Action; - _protocolList.Remove(_protocol1); - Assert.That(collectionChangedAction, Is.EqualTo(NotifyCollectionChangedAction.Remove)); - } - - [Test] - public void ClearCollectionChangedEventHasCorrectAction() - { - NotifyCollectionChangedAction collectionChangedAction = NotifyCollectionChangedAction.Move; - _protocolList.Add(_protocol1); - _protocolList.CollectionChanged += (sender, args) => collectionChangedAction = args.Action; - _protocolList.Clear(); - Assert.That(collectionChangedAction, Is.EqualTo(NotifyCollectionChangedAction.Reset)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Container/ContainerInfoTests.cs b/mRemoteNGTests/Container/ContainerInfoTests.cs deleted file mode 100644 index 0c8cb3b3f..000000000 --- a/mRemoteNGTests/Container/ContainerInfoTests.cs +++ /dev/null @@ -1,503 +0,0 @@ -using System.ComponentModel; -using System.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; - - -namespace mRemoteNGTests.Container -{ - public class ContainerInfoTests - { - private ContainerInfo _containerInfo; - private ConnectionInfo _con1; - private ConnectionInfo _con2; - private ConnectionInfo _con3; - - [SetUp] - public void Setup() - { - _containerInfo = new ContainerInfo(); - _con1 = new ConnectionInfo {Name = "a"}; - _con2 = new ConnectionInfo {Name = "b"}; - _con3 = new ConnectionInfo {Name = "c"}; - } - - [TearDown] - public void Teardown() - { - _containerInfo = null; - _con1 = null; - _con2 = null; - _con3 = null; - } - - [Test] - public void AddSetsParentPropertyOnTheChild() - { - _containerInfo.AddChild(_con1); - Assert.That(_con1.Parent, Is.EqualTo(_containerInfo)); - } - - [Test] - public void AddAddsChildToChildrenList() - { - _containerInfo.AddChild(_con1); - Assert.That(_containerInfo.Children, Does.Contain(_con1)); - } - - [Test] - public void AddRangeAddsAllItems() - { - var collection = new[] { _con1, _con2, _con3 }; - _containerInfo.AddChildRange(collection); - Assert.That(_containerInfo.Children, Is.EquivalentTo(collection)); - } - - [Test] - public void RemoveUnsetsParentPropertyOnChild() - { - _containerInfo.AddChild(_con1); - _containerInfo.RemoveChild(_con1); - Assert.That(_con1.Parent, Is.Not.EqualTo(_containerInfo)); - } - - [Test] - public void RemoveRemovesChildFromChildrenList() - { - _containerInfo.AddChild(_con1); - _containerInfo.RemoveChild(_con1); - Assert.That(_containerInfo.Children, Does.Not.Contains(_con1)); - } - - [Test] - public void RemoveRangeRemovesAllIndicatedItems() - { - var collection = new[] { _con1, _con2, new ContainerInfo() }; - _containerInfo.AddChildRange(collection); - _containerInfo.RemoveChildRange(collection); - Assert.That(_containerInfo.Children, Does.Not.Contains(collection[0]).And.Not.Contains(collection[1]).And.Not.Contains(collection[2])); - } - - [Test] - public void RemoveRangeDoesNotRemoveUntargetedMembers() - { - var collection = new[] { _con1, _con2, new ContainerInfo() }; - _containerInfo.AddChildRange(collection); - _containerInfo.AddChild(_con3); - _containerInfo.RemoveChildRange(collection); - Assert.That(_containerInfo.Children, Does.Contain(_con3)); - } - - [Test] - public void AddingChildTriggersCollectionChangedEvent() - { - var wasCalled = false; - _containerInfo.CollectionChanged += (sender, args) => wasCalled = true; - _containerInfo.AddChild(_con1); - Assert.That(wasCalled, Is.True); - } - - [Test] - public void RemovingChildTriggersCollectionChangedEvent() - { - var wasCalled = false; - _containerInfo.AddChild(_con1); - _containerInfo.CollectionChanged += (sender, args) => wasCalled = true; - _containerInfo.RemoveChild(_con1); - Assert.That(wasCalled, Is.True); - } - - [Test] - public void ChangingChildPropertyTriggersPropertyChangedEvent() - { - var wasCalled = false; - _containerInfo.AddChild(_con1); - _containerInfo.PropertyChanged += (sender, args) => wasCalled = true; - _con1.Name = "somethinghere"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void ChangingSubChildPropertyTriggersPropertyChangedEvent() - { - var wasCalled = false; - var container2 = new ContainerInfo(); - _containerInfo.AddChild(container2); - container2.AddChild(_con1); - _containerInfo.PropertyChanged += (sender, args) => wasCalled = true; - _con1.Name = "somethinghere"; - Assert.That(wasCalled, Is.True); - } - - [Test] - public void SetChildPositionPutsChildInCorrectPosition() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - _containerInfo.SetChildPosition(_con2, 2); - Assert.That(_containerInfo.Children.IndexOf(_con2), Is.EqualTo(2)); - } - - [Test] - public void SettingChildPositionAboveArrayBoundsPutsItAtEndOfList() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var finalIndex = _containerInfo.Children.Count - 1; - _containerInfo.SetChildPosition(_con2, 5); - Assert.That(_containerInfo.Children.IndexOf(_con2), Is.EqualTo(finalIndex)); - } - - [Test] - public void SettingChildPositionBelowArrayBoundsDoesNotMoveTheChild() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var originalIndex = _containerInfo.Children.IndexOf(_con2); - _containerInfo.SetChildPosition(_con2, -1); - Assert.That(_containerInfo.Children.IndexOf(_con2), Is.EqualTo(originalIndex)); - } - - [Test] - public void SetChildAbovePutsChildInCorrectPosition() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var referenceChildIndexBeforeMove = _containerInfo.Children.IndexOf(_con2); - _containerInfo.SetChildAbove(_con3, _con2); - var targetsNewIndex = _containerInfo.Children.IndexOf(_con3); - Assert.That(targetsNewIndex, Is.EqualTo(referenceChildIndexBeforeMove)); - } - - [Test] - public void SetChildBelowPutsChildInCorrectPosition() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var referenceChildIndexBeforeMove = _containerInfo.Children.IndexOf(_con1); - _containerInfo.SetChildBelow(_con3, _con1); - var targetsNewIndex = _containerInfo.Children.IndexOf(_con3); - Assert.That(targetsNewIndex, Is.EqualTo(referenceChildIndexBeforeMove+1)); - } - - [Test] - public void PromoteChildMovesTargetUpOne() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var targetsIndexBeforeMove = _containerInfo.Children.IndexOf(_con3); - _containerInfo.PromoteChild(_con3); - var targetsNewIndex = _containerInfo.Children.IndexOf(_con3); - Assert.That(targetsNewIndex, Is.EqualTo(targetsIndexBeforeMove - 1)); - } - - [Test] - public void PromoteChildDoesNothingWhenAlreadyAtTopOfList() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var targetsIndexBeforeMove = _containerInfo.Children.IndexOf(_con1); - _containerInfo.PromoteChild(_con1); - var targetsNewIndex = _containerInfo.Children.IndexOf(_con1); - Assert.That(targetsNewIndex, Is.EqualTo(targetsIndexBeforeMove)); - } - - [Test] - public void DemoteChildMovesTargetDownOne() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var targetsIndexBeforeMove = _containerInfo.Children.IndexOf(_con1); - _containerInfo.DemoteChild(_con1); - var targetsNewIndex = _containerInfo.Children.IndexOf(_con1); - Assert.That(targetsNewIndex, Is.EqualTo(targetsIndexBeforeMove + 1)); - } - - [Test] - public void DemoteChildDoesNothingWhenAlreadyAtTopOfList() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var targetsIndexBeforeMove = _containerInfo.Children.IndexOf(_con3); - _containerInfo.DemoteChild(_con3); - var targetsNewIndex = _containerInfo.Children.IndexOf(_con3); - Assert.That(targetsNewIndex, Is.EqualTo(targetsIndexBeforeMove)); - } - - [Test] - public void WhenChildAlreadyPresentAddChildAtDoesNothing() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var indexBeforeAttemptedMove = _containerInfo.Children.IndexOf(_con1); - _containerInfo.AddChildAt(_con1, 2); - var indexAfterAttemptedMove = _containerInfo.Children.IndexOf(_con1); - Assert.That(indexAfterAttemptedMove, Is.EqualTo(indexBeforeAttemptedMove)); - } - - [Test] - public void RemoveChildDoesNothingIfChildNotInList() - { - _containerInfo.AddChild(_con1); - var childListBeforeRemoval = _containerInfo.Children; - _containerInfo.RemoveChild(_con2); - var childListAfterRemoval = _containerInfo.Children; - Assert.That(childListAfterRemoval, Is.EquivalentTo(childListBeforeRemoval)); - } - - [Test] - public void ClonedContainerHasNewConstantId() - { - var clone = _containerInfo.Clone(); - Assert.That(clone.ConstantID, Is.Not.EqualTo(_containerInfo.ConstantID)); - } - - [Test] - public void ClonedContainerDoesNotHaveParentSet() - { - _containerInfo.SetParent(new ContainerInfo()); - var clone = _containerInfo.Clone(); - Assert.That(clone.Parent, Is.Null); - } - - [Test] - public void ClonedContainerContainsClonedChildren() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con3); - var clone = _containerInfo.Clone() as ContainerInfo; - var clonedChildNames = clone?.Children.Select((node) => node.Name); - var originalChildNames = _containerInfo?.Children.Select((node) => node.Name); - Assert.That(clonedChildNames, Is.EquivalentTo(originalChildNames)); - } - - [Test] - public void HasChildrenReturnsFalseForNoChildren() - { - var hasChildren = _containerInfo.HasChildren(); - Assert.That(hasChildren, Is.False); - } - - [Test] - public void HasChildrenReturnsTrueWhenChildrenPresent() - { - _containerInfo.AddChild(_con1); - var hasChildren = _containerInfo.HasChildren(); - Assert.That(hasChildren, Is.True); - } - - [Test] - public void AddChildAbovePutsNewChildInCorrectLocation() - { - _containerInfo.AddChild(_con1); - var referenceChildIndexBeforeInsertion = _containerInfo.Children.IndexOf(_con1); - _containerInfo.AddChildAbove(_con2, _con1); - var newChildIndex = _containerInfo.Children.IndexOf(_con2); - Assert.That(newChildIndex, Is.EqualTo(referenceChildIndexBeforeInsertion)); - } - - [Test] - public void AddChildAbovePutsNewChildAtEndOfListIfReferenceChildNotInList() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChildAbove(_con2, _con3); - var newChildIndex = _containerInfo.Children.IndexOf(_con2); - var lastIndex = _containerInfo.Children.Count - 1; - Assert.That(newChildIndex, Is.EqualTo(lastIndex)); - } - - [Test] - public void AddChildBelowPutsNewChildInCorrectLocation() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con2); - var referenceChildIndexBeforeInsertion = _containerInfo.Children.IndexOf(_con1); - _containerInfo.AddChildBelow(_con3, _con1); - var newChildIndex = _containerInfo.Children.IndexOf(_con3); - Assert.That(newChildIndex, Is.EqualTo(referenceChildIndexBeforeInsertion + 1)); - } - - [Test] - public void AddChildBelowPutsNewChildAtEndOfListIfReferenceChildNotInList() - { - _containerInfo.AddChild(_con1); - _containerInfo.AddChildBelow(_con2, _con3); - var newChildIndex = _containerInfo.Children.IndexOf(_con2); - var lastIndex = _containerInfo.Children.Count - 1; - Assert.That(newChildIndex, Is.EqualTo(lastIndex)); - } - - [Test] - public void SortAscendingSortsCorrectlyByName() - { - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con3); - _containerInfo.Sort(); - var orderAfterSort = _containerInfo.Children.ToArray(); - Assert.That(orderAfterSort, Is.Ordered.Ascending.By(nameof(ConnectionInfo.Name))); - } - - [Test] - public void SortDescendingSortsCorrectlyByName() - { - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con3); - _containerInfo.Sort(ListSortDirection.Descending); - var orderAfterSort = _containerInfo.Children.ToArray(); - Assert.That(orderAfterSort, Is.Ordered.Descending.By(nameof(ConnectionInfo.Name))); - } - - [Test] - public void SortOnConstantIdAscendingSortsCorrectly() - { - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con3); - _containerInfo.SortOn(node=> node.ConstantID); - var orderAfterSort = _containerInfo.Children.ToArray(); - Assert.That(orderAfterSort, Is.Ordered.Ascending.By(nameof(ConnectionInfo.ConstantID))); - } - - [Test] - public void SortOnConstantIdDescendingSortsCorrectly() - { - _containerInfo.AddChild(_con2); - _containerInfo.AddChild(_con1); - _containerInfo.AddChild(_con3); - _containerInfo.SortOn(node => node.ConstantID, ListSortDirection.Descending); - var orderAfterSort = _containerInfo.Children.ToArray(); - Assert.That(orderAfterSort, Is.Ordered.Descending.By(nameof(ConnectionInfo.ConstantID))); - } - - [Test] - public void SortAscendingRecursiveSortsGrandchildrenCorrectlyByName() - { - var childContainer = new ContainerInfo(); - childContainer.AddChild(_con2); - childContainer.AddChild(_con1); - childContainer.AddChild(_con3); - _containerInfo.AddChild(childContainer); - _containerInfo.SortRecursive(); - var grandchildOrderAfterSort = childContainer.Children.ToArray(); - Assert.That(grandchildOrderAfterSort, Is.Ordered.Ascending.By(nameof(ConnectionInfo.Name))); - } - - [Test] - public void SortDescendingRecursiveSortsGrandchildrenCorrectlyByName() - { - var childContainer = new ContainerInfo(); - childContainer.AddChild(_con2); - childContainer.AddChild(_con1); - childContainer.AddChild(_con3); - _containerInfo.AddChild(childContainer); - _containerInfo.SortRecursive(ListSortDirection.Descending); - var grandchildOrderAfterSort = _containerInfo.Children.ToArray(); - Assert.That(grandchildOrderAfterSort, Is.Ordered.Descending.By(nameof(ConnectionInfo.Name))); - } - - [Test] - public void SortOnRecursiveConstantIdAscendingSortsGrandchildrenCorrectly() - { - var childContainer = new ContainerInfo(); - childContainer.AddChild(_con2); - childContainer.AddChild(_con1); - childContainer.AddChild(_con3); - _containerInfo.AddChild(childContainer); - _containerInfo.SortOnRecursive(node => node.ConstantID); - var grandchildOrderAfterSort = _containerInfo.Children.ToArray(); - Assert.That(grandchildOrderAfterSort, Is.Ordered.Ascending.By(nameof(ConnectionInfo.ConstantID))); - } - - [Test] - public void SortOnRecursiveConstantIdDescendingSortsGrandchildrenCorrectly() - { - var childContainer = new ContainerInfo(); - childContainer.AddChild(_con2); - childContainer.AddChild(_con1); - childContainer.AddChild(_con3); - _containerInfo.AddChild(childContainer); - _containerInfo.SortOnRecursive(node => node.ConstantID, ListSortDirection.Descending); - var grandchildOrderAfterSort = _containerInfo.Children.ToArray(); - Assert.That(grandchildOrderAfterSort, Is.Ordered.Descending.By(nameof(ConnectionInfo.ConstantID))); - } - - [Test] - public void CanApplyConnectionSettingsToChildren() - { - var comparer = new ConnectionInfoAllConnectionPropertiesEqualityComparer(); - var container = new ContainerInfo(); - var con1 = ConnectionInfoHelpers.GetRandomizedConnectionInfo(); - var con2 = ConnectionInfoHelpers.GetRandomizedConnectionInfo(); - container.AddChild(con1); - container.AddChild(con2); - - container.ApplyConnectionPropertiesToChildren(); - - Assert.That(con1, Is.EqualTo(container).Using(comparer)); - Assert.That(con2, Is.EqualTo(container).Using(comparer)); - } - - [Test] - public void ApplyConnectionPropertiesToChildrenWorksRecursively() - { - var comparer = new ConnectionInfoAllConnectionPropertiesEqualityComparer(); - var container = new ContainerInfo(); - var subContainer = ConnectionInfoHelpers.GetRandomizedContainerInfo(); - var con1 = ConnectionInfoHelpers.GetRandomizedConnectionInfo(); - container.AddChild(subContainer); - subContainer.AddChild(con1); - - container.ApplyConnectionPropertiesToChildren(); - - Assert.That(subContainer, Is.EqualTo(container).Using(comparer)); - Assert.That(con1, Is.EqualTo(container).Using(comparer)); - } - - [Test] - public void CanApplyInheritanceSettingsToChildren() - { - var comparer = new ConnectionInheritanceAllPropertiesEqualityComparer(); - var container = new ContainerInfo(); - var con1 = ConnectionInfoHelpers.GetRandomizedConnectionInfo(randomizeInheritance:true); - var con2 = ConnectionInfoHelpers.GetRandomizedConnectionInfo(randomizeInheritance: true); - container.AddChild(con1); - container.AddChild(con2); - - container.ApplyInheritancePropertiesToChildren(); - - Assert.That(con1.Inheritance, Is.EqualTo(container.Inheritance).Using(comparer)); - Assert.That(con2.Inheritance, Is.EqualTo(container.Inheritance).Using(comparer)); - } - - [Test] - public void ApplyInheritancePropertiesToChildrenWorksRecursively() - { - var comparer = new ConnectionInheritanceAllPropertiesEqualityComparer(); - var container = new ContainerInfo(); - var subContainer = ConnectionInfoHelpers.GetRandomizedContainerInfo(randomizeInheritance: true); - var con1 = ConnectionInfoHelpers.GetRandomizedConnectionInfo(randomizeInheritance: true); - container.AddChild(subContainer); - subContainer.AddChild(con1); - - container.ApplyInheritancePropertiesToChildren(); - - Assert.That(subContainer.Inheritance, Is.EqualTo(container.Inheritance).Using(comparer)); - Assert.That(con1.Inheritance, Is.EqualTo(container.Inheritance).Using(comparer)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Container/RootNodeInfoTests.cs b/mRemoteNGTests/Container/RootNodeInfoTests.cs deleted file mode 100644 index 97927e684..000000000 --- a/mRemoteNGTests/Container/RootNodeInfoTests.cs +++ /dev/null @@ -1,26 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Tree.Root; -using NUnit.Framework; - -namespace mRemoteNGTests.Container -{ - public class RootNodeInfoTests - { - [Test] - public void InheritanceIsDisabledForNodesDirectlyUnderRootNode() - { - var expected = "UnInheritedValue"; - var rootNode = new RootNodeInfo(RootNodeType.Connection) - { - Description = "thisCameFromTheRootNode" - }; - var con1 = new ConnectionInfo - { - Description = expected, - Inheritance = { Description = true } - }; - rootNode.AddChild(con1); - Assert.That(con1.Description, Is.EqualTo(expected)); - } - } -} diff --git a/mRemoteNGTests/Credential/CompositeRepositoryUnlockerTests.cs b/mRemoteNGTests/Credential/CompositeRepositoryUnlockerTests.cs deleted file mode 100644 index 773d2f4a2..000000000 --- a/mRemoteNGTests/Credential/CompositeRepositoryUnlockerTests.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System.Collections.Generic; -using System.Security; -using mRemoteNG.Credential; -using mRemoteNG.Credential.Repositories; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Credential -{ - public class CompositeRepositoryUnlockerTests - { - private CompositeRepositoryUnlocker _repositoryUnlocker; - private IList _repos; - - [SetUp] - public void Setup() - { - _repos = BuildRepos(3); - _repositoryUnlocker = new CompositeRepositoryUnlocker(_repos); - } - - [Test] - public void WeCanCreateAnUnlockerThatWillHandleSomeRepos() - { - Assert.That(_repositoryUnlocker.Repositories, Is.EquivalentTo(_repos)); - } - - [Test] - public void TheFirstRepoIsInitiallySelected() - { - Assert.That(_repositoryUnlocker.SelectedRepository, Is.EqualTo(_repos[0])); - } - - [Test] - public void WeCanUnlockARepository() - { - var key = new SecureString(); - _repositoryUnlocker.Unlock(key); - _repositoryUnlocker.SelectedRepository.Received(1).LoadCredentials(key); - } - - [Test] - public void WeCanSelectTheNextLockedRepository() - { - _repos[1].IsLoaded.Returns(true); - _repositoryUnlocker.SelectNextLockedRepository(); - Assert.That(_repositoryUnlocker.SelectedRepository, Is.EqualTo(_repos[2])); - } - - [Test] - public void SelectingTheNextRepoWhenOnlyOneRepoExistsDoesNothing() - { - var repos = BuildRepos(1); - var repositoryUnlocker = new CompositeRepositoryUnlocker(repos); - repositoryUnlocker.SelectNextLockedRepository(); - Assert.That(repositoryUnlocker.SelectedRepository, Is.EqualTo(repos[0])); - } - - [Test] - public void SelectionIsClearedIfThereAreNoMoreLockedRepositories() - { - foreach(var repo in _repos) - repo.IsLoaded.Returns(true); - _repositoryUnlocker.SelectNextLockedRepository(); - Assert.That(_repositoryUnlocker.SelectedRepository, Is.Null); - } - - [Test] - public void SelectionRemainsTheSameIfTheCurrentRepoIsTheOnlyOneLocked() - { - foreach (var repo in _repos) - repo.IsLoaded.Returns(true); - _repos[0].IsLoaded.Returns(false); - _repositoryUnlocker.SelectNextLockedRepository(); - Assert.That(_repositoryUnlocker.SelectedRepository, Is.EqualTo(_repos[0])); - } - - [Test] - public void NothingIsSelectedIfNoReposExist() - { - var repositoryUnlocker = new CompositeRepositoryUnlocker(new ICredentialRepository[0]); - repositoryUnlocker.SelectNextLockedRepository(); - Assert.That(repositoryUnlocker.SelectedRepository, Is.Null); - } - - [Test] - public void FirstLockedRepoSelectedIfNoRepoCurrentlySelected() - { - var repo = BuildRepos(1); - repo[0].IsLoaded.Returns(false); - var repositoryUnlocker = new CompositeRepositoryUnlocker(repo); - repositoryUnlocker.SelectNextLockedRepository(); - Assert.That(repositoryUnlocker.SelectedRepository, Is.EqualTo(repo[0])); - } - - private IList BuildRepos(int count) - { - var list = new List(); - for (var i=0; i < count; i++) - list.Add(Substitute.For()); - return list; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Credential/CredentialChangedEventArgsTests.cs b/mRemoteNGTests/Credential/CredentialChangedEventArgsTests.cs deleted file mode 100644 index 3a2f0805d..000000000 --- a/mRemoteNGTests/Credential/CredentialChangedEventArgsTests.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using mRemoteNG.Credential; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Credential -{ - public class CredentialChangedEventArgsTests - { - private ICredentialRecord _credentialRecord; - private ICredentialRepository _credentialRepository; - - [SetUp] - public void Setup() - { - _credentialRecord = Substitute.For(); - _credentialRepository = Substitute.For(); - } - - [Test] - public void CantProvideNullCredentialRecord() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new CredentialChangedEventArgs(null, _credentialRepository)); - } - - [Test] - public void CantProvideNullCredentialRepository() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new CredentialChangedEventArgs(_credentialRecord, null)); - } - - [Test] - public void CredentialRecordPropertySetFromCtor() - { - var sut = new CredentialChangedEventArgs(_credentialRecord, _credentialRepository); - Assert.That(sut.CredentialRecord, Is.EqualTo(_credentialRecord)); - } - - [Test] - public void RepositoryPropertySetFromCtor() - { - var sut = new CredentialChangedEventArgs(_credentialRecord, _credentialRepository); - Assert.That(sut.Repository, Is.EqualTo(_credentialRepository)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Credential/CredentialDeletionMsgBoxConfirmerTests.cs b/mRemoteNGTests/Credential/CredentialDeletionMsgBoxConfirmerTests.cs deleted file mode 100644 index 317fce70c..000000000 --- a/mRemoteNGTests/Credential/CredentialDeletionMsgBoxConfirmerTests.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System.Windows.Forms; -using mRemoteNG.Credential; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Credential -{ - public class CredentialDeletionMsgBoxConfirmerTests - { - private ICredentialRecord _credentialRecord; - - [SetUp] - public void Setup() - { - _credentialRecord = Substitute.For(); - } - - [Test] - public void ClickingYesReturnsTrue() - { - var deletionConfirmer = new CredentialDeletionMsgBoxConfirmer(MockClickYes); - Assert.That(deletionConfirmer.Confirm(new[] { _credentialRecord }), Is.True); - } - - [Test] - public void ClickingNoReturnsFalse() - { - var deletionConfirmer = new CredentialDeletionMsgBoxConfirmer(MockClickNo); - Assert.That(deletionConfirmer.Confirm(new [] { _credentialRecord }), Is.False); - } - - private DialogResult MockClickYes(string promptMessage, string title, MessageBoxButtons buttons, MessageBoxIcon icon) - { - return DialogResult.Yes; - } - - private DialogResult MockClickNo(string promptMessage, string title, MessageBoxButtons buttons, MessageBoxIcon icon) - { - return DialogResult.No; - } - } -} diff --git a/mRemoteNGTests/Credential/CredentialDomainUserComparerTests.cs b/mRemoteNGTests/Credential/CredentialDomainUserComparerTests.cs deleted file mode 100644 index 89eaacb45..000000000 --- a/mRemoteNGTests/Credential/CredentialDomainUserComparerTests.cs +++ /dev/null @@ -1,58 +0,0 @@ -using mRemoteNG.Credential; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Credential -{ - public class CredentialDomainUserComparerTests - { - private CredentialDomainUserComparer _comparer; - - [SetUp] - public void Setup() - { - _comparer = new CredentialDomainUserComparer(); - } - - [Test] - public void CredentialsWithTheSameUsernameAndDomainAreEqual() - { - const string user = "user1"; - const string domain = "domain"; - var cred1 = Substitute.For(); - cred1.Username.Returns(user); - cred1.Domain.Returns(domain); - var cred2 = Substitute.For(); - cred2.Username.Returns(user); - cred2.Domain.Returns(domain); - Assert.That(_comparer.Equals(cred1, cred2), Is.True); - } - - [Test] - public void CredentialsWithDifferentUsernamesAreNotEqual() - { - const string domain = "domain"; - var cred1 = Substitute.For(); - cred1.Username.Returns("user1"); - cred1.Domain.Returns(domain); - var cred2 = Substitute.For(); - cred2.Username.Returns("user2"); - cred2.Domain.Returns(domain); - Assert.That(_comparer.Equals(cred1, cred2), Is.False); - } - - [Test] - public void CredentialsWithDifferentDomainsAreNotEqual() - { - const string user = "user1"; - var cred1 = Substitute.For(); - cred1.Username.Returns(user); - cred1.Domain.Returns("domain1"); - var cred2 = Substitute.For(); - cred2.Username.Returns(user); - cred2.Domain.Returns("domain2"); - Assert.That(_comparer.Equals(cred1, cred2), Is.False); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Credential/CredentialRecordTests.cs b/mRemoteNGTests/Credential/CredentialRecordTests.cs deleted file mode 100644 index dbf0171a3..000000000 --- a/mRemoteNGTests/Credential/CredentialRecordTests.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Security; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using NUnit.Framework; - - -namespace mRemoteNGTests.Credential -{ - public class CredentialRecordTests - { - private CredentialRecord _credentialRecord; - - [SetUp] - public void Setup() - { - _credentialRecord = new CredentialRecord - { - Username = "userHere", - Domain = "domainHere", - Password = "somepass".ConvertToSecureString() - }; - } - - [Test] - public void IdIsUnique() - { - var credRecord2 = new CredentialRecord(); - Assert.That(_credentialRecord.Id, Is.Not.EqualTo(credRecord2.Id)); - } - - [Test] - public void HasUsername() - { - Assert.That(_credentialRecord.Username, Is.Not.Null); - } - - [Test] - public void PasswordIsSecureString() - { - Assert.That(_credentialRecord.Password, Is.TypeOf()); - } - - [Test] - public void HasDomain() - { - Assert.That(_credentialRecord.Domain, Is.Not.Null); - } - - [Test] - public void CreateWithExistingGuid() - { - var customGuid = new Guid(); - _credentialRecord = new CredentialRecord(customGuid); - Assert.That(_credentialRecord.Id, Is.EqualTo(customGuid)); - } - - [Test] - public void CopyConstructorGeneratesNewGuid() - { - var cred2 = new CredentialRecord(_credentialRecord); - Assert.That(cred2.Id, Is.Not.EqualTo(_credentialRecord.Id)); - } - - [Test] - public void CopyConstructorCopiesUsername() - { - var cred2 = new CredentialRecord(_credentialRecord); - Assert.That(cred2.Username, Is.EqualTo(_credentialRecord.Username)); - } - - [Test] - public void CopyConstructorCopiesPassword() - { - var cred2 = new CredentialRecord(_credentialRecord); - Assert.That(cred2.Password, Is.EqualTo(_credentialRecord.Password)); - } - - [Test] - public void CopyConstructorCopiesDomain() - { - var cred2 = new CredentialRecord(_credentialRecord); - Assert.That(cred2.Domain, Is.EqualTo(_credentialRecord.Domain)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Credential/CredentialRecordTypeConverterTests.cs b/mRemoteNGTests/Credential/CredentialRecordTypeConverterTests.cs deleted file mode 100644 index 93140c352..000000000 --- a/mRemoteNGTests/Credential/CredentialRecordTypeConverterTests.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using mRemoteNG.Credential; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Credential -{ - public class CredentialRecordTypeConverterTests - { - private CredentialRecordTypeConverter _converter; - - [SetUp] - public void Setup() - { - _converter = new CredentialRecordTypeConverter(); - } - - [TestCase(typeof(Guid), true)] - public void CanConvertFrom(Type typeToConvertFrom, bool expectedOutcome) - { - var actualOutcome = _converter.CanConvertFrom(typeToConvertFrom); - Assert.That(actualOutcome, Is.EqualTo(expectedOutcome)); - } - - [TestCase(typeof(Guid), true)] - [TestCase(typeof(ICredentialRecord), true)] - public void CanConvertTo(Type typeToConvertFrom, bool expectedOutcome) - { - var actualOutcome = _converter.CanConvertTo(typeToConvertFrom); - Assert.That(actualOutcome, Is.EqualTo(expectedOutcome)); - } - - [Test] - public void ConvertingToGuidReturnsCorrectValue() - { - var credRecord = Substitute.For(); - credRecord.Id.Returns(Guid.NewGuid()); - var convertedValue = _converter.ConvertTo(credRecord, typeof(Guid)); - Assert.That(convertedValue, Is.EqualTo(credRecord.Id)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Credential/CredentialRepositoryListTests.cs b/mRemoteNGTests/Credential/CredentialRepositoryListTests.cs deleted file mode 100644 index b4a998f00..000000000 --- a/mRemoteNGTests/Credential/CredentialRepositoryListTests.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Credential; -using mRemoteNG.Credential.Repositories; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Credential -{ - public class CredentialRepositoryListTests - { - private CredentialRepositoryList _credentialCatalog; - - [SetUp] - public void Setup() - { - _credentialCatalog = new CredentialRepositoryList(); - } - - [Test] - public void RepositoryListIsInitiallyEmpty() - { - Assert.That(_credentialCatalog.CredentialProviders, Is.Empty); - } - - [Test] - public void RepositoryIsInListAfterBeingAdded() - { - var provider = Substitute.For(); - _credentialCatalog.AddProvider(provider); - Assert.That(_credentialCatalog.CredentialProviders, Does.Contain(provider)); - } - - [Test] - public void WillNotAddDuplicateRepositories() - { - var provider1 = Substitute.For(); - var provider2 = Substitute.For(); - var id = Guid.NewGuid(); - provider1.Config.Id.Returns(id); - provider2.Config.Id.Returns(id); - _credentialCatalog.AddProvider(provider1); - _credentialCatalog.AddProvider(provider2); - Assert.That(_credentialCatalog.CredentialProviders.Count(), Is.EqualTo(1)); - } - - [Test] - public void RepositoryNotInListAfterBeingRemoved() - { - var provider1 = Substitute.For(); - provider1.Config.Id.Returns(Guid.NewGuid()); - var provider2 = Substitute.For(); - provider2.Config.Id.Returns(Guid.NewGuid()); - _credentialCatalog.AddProvider(provider1); - _credentialCatalog.AddProvider(provider2); - _credentialCatalog.RemoveProvider(provider1); - Assert.That(_credentialCatalog.CredentialProviders, Is.EquivalentTo(new[] {provider2})); - } - - [Test] - public void TryingToRemoveRepositoryThatIsntInTheListDoesNothing() - { - _credentialCatalog.RemoveProvider(Substitute.For()); - Assert.That(_credentialCatalog.CredentialProviders, Is.Empty); - } - - [Test] - public void WeCanRetrieveASpecificCredentialRecord() - { - var expectedCredential = Substitute.For(); - expectedCredential.Id.Returns(new Guid()); - var repo = Substitute.For(); - repo.CredentialRecords.Returns(new List {expectedCredential}); - _credentialCatalog.AddProvider(repo); - var retrievedCredential = _credentialCatalog.GetCredentialRecord(expectedCredential.Id); - Assert.That(retrievedCredential, Is.EqualTo(expectedCredential)); - } - - [Test] - public void GetCredentialReturnsNullIfNoRecordFound() - { - var repo = Substitute.For(); - _credentialCatalog.AddProvider(repo); - var retrievedCredential = _credentialCatalog.GetCredentialRecord(Guid.NewGuid()); - Assert.That(retrievedCredential, Is.Null); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Credential/CredentialServiceFacadeTests.cs b/mRemoteNGTests/Credential/CredentialServiceFacadeTests.cs deleted file mode 100644 index 3557f6e57..000000000 --- a/mRemoteNGTests/Credential/CredentialServiceFacadeTests.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using mRemoteNG.Config; -using mRemoteNG.Credential; -using NSubstitute; -using NUnit.Framework; -// ReSharper disable ObjectCreationAsStatement - -namespace mRemoteNGTests.Credential -{ - public class CredentialServiceFacadeTests - { - private CredentialServiceFacade _credentialService; - private ICredentialRepositoryList _credentialRepositoryList; - private ILoader> _loader; - private ISaver> _saver; - - [SetUp] - public void Setup() - { - _credentialRepositoryList = Substitute.For(); - _loader = Substitute.For>>(); - _saver = Substitute.For>>(); - _credentialService = new CredentialServiceFacade(_credentialRepositoryList, _loader, _saver); - } - - [Test] - public void CantProvideNullRepoListToCtor() - { - Assert.Throws(() => new CredentialServiceFacade(null, _loader, _saver)); - } - - [Test] - public void CantProvideNullRepoLoaderToCtor() - { - Assert.Throws(() => new CredentialServiceFacade(_credentialRepositoryList, null, _saver)); - } - - [Test] - public void CantProvideNullRepoSaverToCtor() - { - Assert.Throws(() => new CredentialServiceFacade(_credentialRepositoryList, _loader, null)); - } - - [Test] - public void AddRepoCallsUnderlyingList() - { - var newRepo = Substitute.For(); - _credentialService.AddRepository(newRepo); - _credentialRepositoryList.Received().AddProvider(newRepo); - } - - [Test] - public void RemoveRepoCallsUnderlyingList() - { - var repo = Substitute.For(); - _credentialService.RemoveRepository(repo); - _credentialRepositoryList.Received().RemoveProvider(repo); - } - - [Test] - public void GetCredentialRecordsCallsUnderlyingList() - { - _credentialService.GetCredentialRecords(); - _credentialRepositoryList.Received().GetCredentialRecords(); - } - - [Test] - public void GetCredentialRecordCallsUnderlyingList() - { - var guid = Guid.NewGuid(); - _credentialService.GetCredentialRecord(guid); - _credentialRepositoryList.Received().GetCredentialRecord(guid); - } - - [Test] - public void LoadRepoListsAddsRepoFromLoader() - { - var repo = Substitute.For(); - _loader.Load().Returns(new[] { repo }); - _credentialService.LoadRepositoryList(); - _credentialRepositoryList.Received().AddProvider(repo); - } - - [Test] - public void SaveRepoListsAddsRepoFromLoader() - { - _credentialService.SaveRepositoryList(); - _saver.Received().Save(_credentialRepositoryList); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/IntegrationTests/ConnectionInheritanceIntegrationTests.cs b/mRemoteNGTests/IntegrationTests/ConnectionInheritanceIntegrationTests.cs deleted file mode 100644 index ec9c865c4..000000000 --- a/mRemoteNGTests/IntegrationTests/ConnectionInheritanceIntegrationTests.cs +++ /dev/null @@ -1,72 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Connection.Protocol; -using mRemoteNG.Container; -using mRemoteNG.Tree.Root; -using NUnit.Framework; - - -namespace mRemoteNGTests.IntegrationTests -{ - public class ConnectionInheritanceIntegrationTests - { - private RootNodeInfo _rootNode; - - [SetUp] - public void Setup() - { - _rootNode = new RootNodeInfo(RootNodeType.Connection); - } - - [TearDown] - public void Teardown() - { - _rootNode = null; - } - - [Test] - public void ConnectionsInheritFromCorrectFolder() - { - /** - * Root - * --Folder1 - * ----Connection1 - * ----Folder2 - * ------Connection2 - * ----Connection3 (inherits username) - */ - var folder1 = new ContainerInfo { Icon = "someicon1" }; - var folder2 = new ContainerInfo { Icon = "someicon2" }; - var connection1 = new ConnectionInfo(); - var connection2 = new ConnectionInfo(); - var connection3 = new ConnectionInfo {Inheritance = {Icon = true}}; - _rootNode.AddChild(folder1); - folder1.AddChildRange(new []{connection1, folder2, connection3}); - folder2.AddChild(connection2); - Assert.That(connection3.Icon, Is.EqualTo(folder1.Icon)); - } - - [Test] - public void ConnectionWillInheritAllFromFolder() - { - var folder = new ContainerInfo {Protocol = ProtocolType.SSH2, Icon = "someicon", CacheBitmaps = true}; - var connection = new ConnectionInfo {Inheritance = {EverythingInherited = true}}; - _rootNode.AddChild(folder); - folder.AddChild(connection); - Assert.That(new object[] { connection.Protocol, connection.Icon, connection.CacheBitmaps }, Is.EquivalentTo(new object[] {folder.Protocol, folder.Icon, folder.CacheBitmaps })); - } - - [Test] - public void CanInheritThroughMultipleFolderLevels() - { - var folder1 = new ContainerInfo { Icon = "someicon"}; - var folder2 = new ContainerInfo {Inheritance = { Icon = true}}; - var folder3 = new ContainerInfo {Inheritance = { Icon = true}}; - var connection = new ConnectionInfo {Inheritance = { Icon = true}}; - _rootNode.AddChild(folder1); - folder1.AddChild(folder2); - folder2.AddChild(folder3); - folder3.AddChild(connection); - Assert.That(connection.Icon, Is.EqualTo(folder1.Icon)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/IntegrationTests/XmlCredentialSerializerLifeCycleTests.cs b/mRemoteNGTests/IntegrationTests/XmlCredentialSerializerLifeCycleTests.cs deleted file mode 100644 index 6f55a8231..000000000 --- a/mRemoteNGTests/IntegrationTests/XmlCredentialSerializerLifeCycleTests.cs +++ /dev/null @@ -1,90 +0,0 @@ -using mRemoteNG.Config.Serializers; -using mRemoteNG.Config.Serializers.CredentialSerializer; -using mRemoteNG.Credential; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using NSubstitute; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security; - -namespace mRemoteNGTests.IntegrationTests -{ - public class XmlCredentialSerializerLifeCycleTests - { - private ISecureSerializer, string> _serializer; - private ISecureDeserializer> _deserializer; - private readonly Guid _id = Guid.NewGuid(); - private const string Title = "mycredential1"; - private const string Username = "user1"; - private const string Domain = "domain1"; - private readonly SecureString _key = "myPassword1!".ConvertToSecureString(); - - [SetUp] - public void Setup() - { - var keyProvider = Substitute.For(); - keyProvider.GetKey().Returns(_key); - var cryptoProvider = new CryptoProviderFactory(BlockCipherEngines.AES, BlockCipherModes.CCM).Build(); - _serializer = new XmlCredentialPasswordEncryptorDecorator(cryptoProvider, new XmlCredentialRecordSerializer()); - _deserializer = new XmlCredentialPasswordDecryptorDecorator(new XmlCredentialRecordDeserializer()); - } - - [Test] - public void WeCanSerializeAndDeserializeXmlCredentials() - { - var credentials = new[] { new CredentialRecord(), new CredentialRecord() }; - var serializedCredentials = _serializer.Serialize(credentials, _key); - var deserializedCredentials = _deserializer.Deserialize(serializedCredentials, _key); - Assert.That(deserializedCredentials.Count(), Is.EqualTo(2)); - } - - [Test] - public void IdConsistentAfterSerialization() - { - var sut = SerializeThenDeserializeCredential(); - Assert.That(sut.Id, Is.EqualTo(_id)); - } - - [Test] - public void TitleConsistentAfterSerialization() - { - var sut = SerializeThenDeserializeCredential(); - Assert.That(sut.Title, Is.EqualTo(Title)); - } - - [Test] - public void UsernameConsistentAfterSerialization() - { - var sut = SerializeThenDeserializeCredential(); - Assert.That(sut.Username, Is.EqualTo(Username)); - } - - [Test] - public void DomainConsistentAfterSerialization() - { - var sut = SerializeThenDeserializeCredential(); - Assert.That(sut.Domain, Is.EqualTo(Domain)); - } - - [Test] - public void PasswordConsistentAfterSerialization() - { - var sut = SerializeThenDeserializeCredential(); - Assert.That(sut.Password.ConvertToUnsecureString(), Is.EqualTo(_key.ConvertToUnsecureString())); - } - - private ICredentialRecord SerializeThenDeserializeCredential() - { - var credentials = new[] - { - new CredentialRecord(_id) {Title = Title, Username = Username, Domain = Domain, Password = _key} - }; - var serializedCredentials = _serializer.Serialize(credentials, _key); - var deserializedCredentials = _deserializer.Deserialize(serializedCredentials, _key); - return deserializedCredentials.First(); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/IntegrationTests/XmlSerializationLifeCycleTests.cs b/mRemoteNGTests/IntegrationTests/XmlSerializationLifeCycleTests.cs deleted file mode 100644 index 44c547e57..000000000 --- a/mRemoteNGTests/IntegrationTests/XmlSerializationLifeCycleTests.cs +++ /dev/null @@ -1,196 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNGTests.TestHelpers; -using NUnit.Framework; -using System; -using System.Linq; -using System.Text; -using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml; - - -namespace mRemoteNGTests.IntegrationTests -{ - public class XmlSerializationLifeCycleTests - { - private XmlConnectionsSerializer _serializer; - private XmlConnectionsDeserializer _deserializer; - private ConnectionTreeModel _originalModel; - private readonly ICryptoProviderFactory _cryptoFactory = new CryptoProviderFactory(BlockCipherEngines.AES , BlockCipherModes.GCM); - - [SetUp] - public void Setup() - { - _originalModel = SetupConnectionTreeModel(); - var cryptoProvider = _cryptoFactory.Build(); - var nodeSerializer = new XmlConnectionNodeSerializer27( - cryptoProvider, - _originalModel.RootNodes.OfType().First().PasswordString.ConvertToSecureString(), - new SaveFilter()); - _serializer = new XmlConnectionsSerializer(cryptoProvider, nodeSerializer); - _deserializer = new XmlConnectionsDeserializer(); - } - - [TearDown] - public void Teardown() - { - _serializer = null; - } - - [Test] - public void SerializeThenDeserialize() - { - var serializedContent = _serializer.Serialize(_originalModel); - var deserializedModel = _deserializer.Deserialize(serializedContent); - var nodeNamesFromDeserializedModel = deserializedModel.GetRecursiveChildList().Select(node => node.Name); - var nodeNamesFromOriginalModel = _originalModel.GetRecursiveChildList().Select(node => node.Name); - Assert.That(nodeNamesFromDeserializedModel, Is.EquivalentTo(nodeNamesFromOriginalModel)); - } - - [Test] - public void SerializeThenDeserializeWithFullEncryption() - { - _serializer.UseFullEncryption = true; - var serializedContent = _serializer.Serialize(_originalModel); - var deserializedModel = _deserializer.Deserialize(serializedContent); - var nodeNamesFromDeserializedModel = deserializedModel.GetRecursiveChildList().Select(node => node.Name); - var nodeNamesFromOriginalModel = _originalModel.GetRecursiveChildList().Select(node => node.Name); - Assert.That(nodeNamesFromDeserializedModel, Is.EquivalentTo(nodeNamesFromOriginalModel)); - } - - [Test] - public void SerializeAndDeserializePropertiesWithInternationalCharacters() - { - var originalConnectionInfo = new ConnectionInfo {Name = "con1", Description = "£°úg¶┬ä" }; - var serializedContent = _serializer.Serialize(originalConnectionInfo); - var deserializedModel = _deserializer.Deserialize(serializedContent); - var deserializedConnectionInfo = deserializedModel.GetRecursiveChildList().First(node => node.Name == originalConnectionInfo.Name); - Assert.That(deserializedConnectionInfo.Description, Is.EqualTo(originalConnectionInfo.Description)); - } - - - [Test] - public void SerializeAndDeserializeWithCustomKdfIterationsValue() - { - var cryptoProvider = _cryptoFactory.Build(); - cryptoProvider.KeyDerivationIterations = 5000; - var nodeSerializer = new XmlConnectionNodeSerializer27( - cryptoProvider, - _originalModel.RootNodes.OfType().First().PasswordString.ConvertToSecureString(), - new SaveFilter()); - _serializer = new XmlConnectionsSerializer(cryptoProvider, nodeSerializer); - var serializedContent = _serializer.Serialize(_originalModel); - var deserializedModel = _deserializer.Deserialize(serializedContent); - var nodeNamesFromDeserializedModel = deserializedModel.GetRecursiveChildList().Select(node => node.Name); - var nodeNamesFromOriginalModel = _originalModel.GetRecursiveChildList().Select(node => node.Name); - Assert.That(nodeNamesFromDeserializedModel, Is.EquivalentTo(nodeNamesFromOriginalModel)); - } - - [Test] - public void GuidCreatedIfNonExistedInXml() - { - var originalConnectionInfo = new ConnectionInfo { Name = "con1" }; - var serializedContent = _serializer.Serialize(originalConnectionInfo); - - // remove GUID from connection xml - serializedContent = serializedContent.Replace(originalConnectionInfo.ConstantID, ""); - - var deserializedModel = _deserializer.Deserialize(serializedContent); - var deserializedConnectionInfo = deserializedModel.GetRecursiveChildList().First(node => node.Name == originalConnectionInfo.Name); - Assert.That(Guid.TryParse(deserializedConnectionInfo.ConstantID, out var guid)); - } - - [Test] - public void AllPropertiesCorrectWhenSerializingThenDeserializing() - { - var originalConnectionInfo = new ConnectionInfo().RandomizeValues(); - originalConnectionInfo.Inheritance.TurnOffInheritanceCompletely(); - var serializedContent = _serializer.Serialize(originalConnectionInfo); - var deserializedModel = _deserializer.Deserialize(serializedContent); - var deserializedConnectionInfo = deserializedModel - .GetRecursiveChildList() - .First(info => info.GetTreeNodeType() == TreeNodeType.Connection); - - var sb = new StringBuilder(); - foreach (var property in originalConnectionInfo.GetSerializableProperties()) - { - var originalValue = property.GetValue(originalConnectionInfo); - var deserializedValue = property.GetValue(deserializedConnectionInfo); - if (originalValue.Equals(deserializedValue)) - continue; - - sb.AppendLine($"Property: {property.Name}"); - } - - Assert.That(sb.Length, Is.EqualTo(0), "Some properties are not being serialized properly:\n" + sb); - } - - [Test] - public void AllInheritanceCorrectWhenSerializingThenDeserializing() - { - var originalConnectionInfo = new ConnectionInfo(); - originalConnectionInfo.Inheritance.ToggleAllBooleanProperties(excludeProperties: nameof(ConnectionInfoInheritance.EverythingInherited)); - var container = new ContainerInfo(); - container.AddChild(originalConnectionInfo); - - var serializedContent = _serializer.Serialize(container); - var deserializedModel = _deserializer.Deserialize(serializedContent); - var deserializedConnectionInfo = deserializedModel - .GetRecursiveChildList() - .First(info => info.GetTreeNodeType() == TreeNodeType.Connection); - - var sb = new StringBuilder(); - foreach (var property in originalConnectionInfo.Inheritance.GetProperties()) - { - var originalValue = property.GetValue(originalConnectionInfo.Inheritance); - var deserializedValue = property.GetValue(deserializedConnectionInfo.Inheritance); - - if (originalValue.Equals(deserializedValue)) - continue; - - sb.AppendLine($"Property: Inheritance.{property.Name}"); - } - - Assert.That(sb.Length, Is.EqualTo(0), "Some properties are not being serialized properly:\n" + sb); - } - - - private ConnectionTreeModel SetupConnectionTreeModel() - { - /* - * Root - * |--- con0 - * |--- folder1 - * | L--- con1 - * L--- folder2 - * |--- con2 - * L--- folder3 - * |--- con3 - * L--- con4 - */ - var connectionTreeModel = new ConnectionTreeModel(); - var rootNode = new RootNodeInfo(RootNodeType.Connection); - var folder1 = new ContainerInfo { Name = "folder1" }; - var folder2 = new ContainerInfo { Name = "folder2" }; - var folder3 = new ContainerInfo { Name = "folder3" }; - var con0 = new ConnectionInfo { Name = "con0" }; - var con1 = new ConnectionInfo { Name = "con1" }; - var con2 = new ConnectionInfo { Name = "con2" }; - var con3 = new ConnectionInfo { Name = "con3" }; - var con4 = new ConnectionInfo { Name = "con4" }; - rootNode.AddChild(folder1); - rootNode.AddChild(folder2); - rootNode.AddChild(con0); - folder1.AddChild(con1); - folder2.AddChild(con2); - folder2.AddChild(folder3); - folder3.AddChild(con3); - folder3.AddChild(con4); - connectionTreeModel.AddRootNode(rootNode); - return connectionTreeModel; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/ListViewTester.cs b/mRemoteNGTests/ListViewTester.cs deleted file mode 100644 index e82265a80..000000000 --- a/mRemoteNGTests/ListViewTester.cs +++ /dev/null @@ -1,190 +0,0 @@ -#region Copyright (c) 2003-2005, Luke T. Maxon - -/******************************************************************************************************************** -' -' Copyright (c) 2003-2005, Luke T. Maxon -' All rights reserved. -' -' Redistribution and use in source and binary forms, with or without modification, are permitted provided -' that the following conditions are met: -' -' * Redistributions of source code must retain the above copyright notice, this list of conditions and the -' following disclaimer. -' -' * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and -' the following disclaimer in the documentation and/or other materials provided with the distribution. -' -' * Neither the name of the author nor the names of its contributors may be used to endorse or -' promote products derived from this software without specific prior written permission. -' -' THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED -' WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -' PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -' ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -' LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -' INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -' OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -' IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -' -'*******************************************************************************************************************/ - -#endregion - -//Contributed by: Ian Cooper - -using System; -using System.Collections; -using System.Linq; -using System.Reflection; -using System.Windows.Forms; -using mRemoteNGTests.TestHelpers; - -namespace mRemoteNGTests -{ - /// - /// A ControlTester for testing List Views. - /// - /// - /// It includes helper methods for selecting items from the list - /// and for clearing those selections. - public class ListViewTester - { - private readonly string _name; - private readonly Form _form; - - /// - /// Creates a ControlTester from the control name and the form instance. - /// - /// - /// It is best to use the overloaded Constructor that requires just the name - /// parameter if possible. - /// - /// The Control name. - /// The Form instance. - public ListViewTester(string name, Form form) - { - _name = name; - _form = form; - } - - /// - /// Provides access to all of the Properties of the ListBox. - /// - /// - /// Allows typed access to all of the properties of the underlying control. - /// - /// The underlying control. - public ListView Properties => _form.FindControl(_name); - - /// - /// Helper method to return the List View's Items property - /// - public ListView.ListViewItemCollection Items => Properties.Items; - - /// - /// Helper method to return the columns of the list view - /// - public ListView.ColumnHeaderCollection Columns => Properties.Columns; - - /// - /// Clears the selections from the list box. - /// - public void ClearSelected() - { - foreach (ListViewItem item in Properties.Items) - { - item.Selected = false; - } - } - - /// - /// Selects an item in the ListBox according to its index. - /// - /// the index to select. - public void Select(int i) - { - Properties.Items[i].Selected = true; - - FireEvent("ItemActivate"); - } - - private void FireEvent(string eventName) - { - var ctrl = Properties; - MethodInfo method = typeof(ListView).GetMethod("On" + eventName, BindingFlags.Instance | BindingFlags.NonPublic); - method.Invoke(ctrl, new object[] { EventArgs.Empty }); - } - - /// - /// Selects an item in the list according to its string value. - /// - /// The item to select. - public void Select(string text) - { - int index = FindItemByString(text); - - if (ItemFound(index)) - { - Select(index); - } - } - - /// - /// Multiple selection of a range of items - /// - /// - public void SelectItems(string[] items) - { - foreach (string item in items) - { - Select(item); - } - } - - /// - /// Test that only the indicated items are selected - /// - /// - public bool SelectedItemsMatch(string[] matches) - { - ArrayList matchList = new ArrayList(matches); - - if (matchList.Count != Properties.SelectedItems.Count) - { - return false; - } - - foreach (ListViewItem item in Properties.SelectedItems) - { - if (!matchList.Contains(item.Text)) - { - return false; - } - } - - return true; - } - - #region Implementation - - private bool ItemFound(int index) - { - return index != -1; - } - - private int FindItemByString(string text) - { - for (int i = 0; i < Properties.Items.Count; i++) - { - if (Properties.Items[i].Text == text) - { - return i; - } - } - - return -1; - } - - #endregion - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Messages/MessageCollectorTests.cs b/mRemoteNGTests/Messages/MessageCollectorTests.cs deleted file mode 100644 index 3ae639ed8..000000000 --- a/mRemoteNGTests/Messages/MessageCollectorTests.cs +++ /dev/null @@ -1,92 +0,0 @@ -using mRemoteNG.Messages; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Messages -{ - public class MessageCollectorTests - { - private MessageCollector _messageCollector; - - [SetUp] - public void Setup() - { - _messageCollector = new MessageCollector(); - } - - [Test] - public void InitializesWithNoMessages() - { - Assert.That(_messageCollector.Messages, Is.Empty); - } - - [Test] - public void MessageAddedToList() - { - var message = Substitute.For(); - _messageCollector.AddMessage(message); - Assert.That(_messageCollector.Messages, Does.Contain(message)); - } - - [Test] - public void ListCanBeCleared() - { - var message = Substitute.For(); - _messageCollector.AddMessage(message); - _messageCollector.ClearMessages(); - Assert.That(_messageCollector.Messages, Is.Empty); - } - - [Test] - public void MessagesAreUnique() - { - var message = Substitute.For(); - _messageCollector.AddMessage(message); - _messageCollector.AddMessage(message); - Assert.That(_messageCollector.Messages, Is.Unique); - } - - [Test] - public void NotifiedWhenMessageAdded() - { - var wasCalled = false; - _messageCollector.CollectionChanged += (sender, args) => wasCalled = true; - var message = Substitute.For(); - _messageCollector.AddMessage(message); - Assert.That(wasCalled, Is.True); - } - - [Test] - public void BatchAddAddsAllItems() - { - var msg1 = Substitute.For(); - var msg2 = Substitute.For(); - var msgCollection = new[] {msg1, msg2}; - _messageCollector.AddMessages(msgCollection); - Assert.That(_messageCollector.Messages, Is.EquivalentTo(msgCollection)); - } - - [Test] - public void OneNotificationRaisedForBatchAdd() - { - var notificationCount = 0; - _messageCollector.CollectionChanged += (sender, args) => notificationCount++; - var msg1 = Substitute.For(); - var msg2 = Substitute.For(); - _messageCollector.AddMessages(new[] { msg1, msg2 }); - Assert.That(notificationCount, Is.EqualTo(1)); - } - - [Test] - public void EventNotRaisedIfMsgIsntUnique() - { - var notificationCount = 0; - var msg1 = Substitute.For(); - _messageCollector.AddMessage(msg1); - _messageCollector.CollectionChanged += (sender, args) => notificationCount++; - _messageCollector.AddMessage(msg1); - Assert.That(notificationCount, Is.EqualTo(0)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Messages/MessageWriters/MessageTypeFilterDecoratorTests.cs b/mRemoteNGTests/Messages/MessageWriters/MessageTypeFilterDecoratorTests.cs deleted file mode 100644 index 99a51de1e..000000000 --- a/mRemoteNGTests/Messages/MessageWriters/MessageTypeFilterDecoratorTests.cs +++ /dev/null @@ -1,98 +0,0 @@ -using mRemoteNG.Messages; -using mRemoteNG.Messages.MessageFilteringOptions; -using mRemoteNG.Messages.MessageWriters; -using mRemoteNG.Messages.WriterDecorators; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Messages.MessageWriters -{ - public class MessageTypeFilterDecoratorTests - { - private MessageTypeFilterDecorator _sut; - private IMessageWriter _mockWriter; - private IMessageTypeFilteringOptions _filter; - private IMessage _message; - - [SetUp] - public void Setup() - { - _mockWriter = Substitute.For(); - _filter = Substitute.For(); - _sut = new MessageTypeFilterDecorator(_filter, _mockWriter); - _message = Substitute.For(); - } - - [Test] - public void DebugMessageWrittenIfAllowed() - { - _message.Class.Returns(MessageClass.DebugMsg); - _filter.AllowDebugMessages.Returns(true); - _sut.Write(_message); - _mockWriter.Received().Write(_message); - } - - [Test] - public void DebugMessageNotWrittenIfNotAllowed() - { - _message.Class.Returns(MessageClass.DebugMsg); - _filter.AllowDebugMessages.Returns(false); - _sut.Write(_message); - _mockWriter.DidNotReceive().Write(_message); - } - - [Test] - public void InfoMessageWrittenIfAllowed() - { - _message.Class.Returns(MessageClass.InformationMsg); - _filter.AllowInfoMessages.Returns(true); - _sut.Write(_message); - _mockWriter.Received().Write(_message); - } - - [Test] - public void InfoMessageNotWrittenIfNotAllowed() - { - _message.Class.Returns(MessageClass.InformationMsg); - _filter.AllowInfoMessages.Returns(false); - _sut.Write(_message); - _mockWriter.DidNotReceive().Write(_message); - } - - [Test] - public void WarningMessageWrittenIfAllowed() - { - _message.Class.Returns(MessageClass.WarningMsg); - _filter.AllowWarningMessages.Returns(true); - _sut.Write(_message); - _mockWriter.Received().Write(_message); - } - - [Test] - public void WarningMessageNotWrittenIfNotAllowed() - { - _message.Class.Returns(MessageClass.WarningMsg); - _filter.AllowWarningMessages.Returns(false); - _sut.Write(_message); - _mockWriter.DidNotReceive().Write(_message); - } - - [Test] - public void ErrorMessageWrittenIfAllowed() - { - _message.Class.Returns(MessageClass.ErrorMsg); - _filter.AllowErrorMessages.Returns(true); - _sut.Write(_message); - _mockWriter.Received().Write(_message); - } - - [Test] - public void ErrorMessageNotWrittenIfNotAllowed() - { - _message.Class.Returns(MessageClass.ErrorMsg); - _filter.AllowErrorMessages.Returns(false); - _sut.Write(_message); - _mockWriter.DidNotReceive().Write(_message); - } - } -} diff --git a/mRemoteNGTests/Messages/MessageWriters/OnlyLogMessageFilterTests.cs b/mRemoteNGTests/Messages/MessageWriters/OnlyLogMessageFilterTests.cs deleted file mode 100644 index 30ec2ac05..000000000 --- a/mRemoteNGTests/Messages/MessageWriters/OnlyLogMessageFilterTests.cs +++ /dev/null @@ -1,39 +0,0 @@ -using mRemoteNG.Messages; -using mRemoteNG.Messages.MessageWriters; -using mRemoteNG.Messages.WriterDecorators; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Messages.MessageWriters -{ - public class OnlyLogMessageFilterTests - { - private OnlyLogMessageFilter _sut; - private IMessageWriter _mockWriter; - - [SetUp] - public void Setup() - { - _mockWriter = Substitute.For(); - _sut = new OnlyLogMessageFilter(_mockWriter); - } - - [Test] - public void WillWriteIfTheOnlyLogFlagIsNotSet() - { - var msg = Substitute.For(); - msg.OnlyLog.Returns(false); - _sut.Write(msg); - _mockWriter.Received().Write(msg); - } - - [Test] - public void WillNotWriteIfTheOnlyLogFlagIsSet() - { - var msg = Substitute.For(); - msg.OnlyLog.Returns(true); - _sut.Write(msg); - _mockWriter.DidNotReceiveWithAnyArgs().Write(msg); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Properties/Resources.Designer.cs b/mRemoteNGTests/Properties/Resources.Designer.cs deleted file mode 100644 index b932e291d..000000000 --- a/mRemoteNGTests/Properties/Resources.Designer.cs +++ /dev/null @@ -1,420 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace mRemoteNGTests.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("mRemoteNGTests.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Version: 1.75.6164.27544 - ///dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Installer-1.75.6179.28160.msi - ///clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT - ///CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA - ///Checksum: A1E50ACAC4CB8023527E1E7A0E682459. - /// - internal static string beta_update { - get { - return ResourceManager.GetString("beta_update", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Version: 1.75.6170.27478 - ///dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Portable-1.75.6179.28241.zip - ///clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT - ///CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA - ///Checksum: 1C35EA199F58001BC4EBB164D8B3D11C. - /// - internal static string beta_update_portable { - get { - return ResourceManager.GetString("beta_update_portable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<Connections Name="Connections" Export="False" Protected="95syzRuZ4mRxpNkZQzoyX8SDpQXLyMq3GncO8o4SyTBoYvn3TAWgn05ZEU2DrjkM" ConfVersion="2.5"> - /// <Node Name="Folder1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="ICA" PuttySession="Default Settings" Port="1494" ConnectToConsole="False" UseCredSsp="True" RenderingEngine="IE" ICAEncryptionStrength="Encr128Bit" RDPAuthenticationLevel=" [rest of string was truncated]";. - /// - internal static string confCons_v2_5 { - get { - return ResourceManager.GetString("confCons_v2_5", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to qqv8WEdruAEzSfdnPZMQ8w5cLhsl55V/Vu6h81Ucv7s7OT3vwnocgLmfId8rxpfVBnZwdn1Pdvea0XgwnQKJV5qdrVZEiy694Vv84B3wXjxU1wT72rWu1C5TNLhNEZp9JqjjAxOttIbOFL5X0dM+zI4YrCmTZI2Qt04TaC47MTr2niO7XvQSvjDeZRPnzeHsEiJvxHvBSm9yJ64Iupect0zKIpFPiDuOoHDhFQegUCZ26IdZCX2IHb3pH866rYV+yiAGhqt7pokBHUKURVtN6eKpbYzlDyGPbLRJf/eD13KnlaVC6sbf7YiCP3JwJrkN5mLdnrZbmZGQJG3Sn9rrGeShItYG/vvayFAQ5jxz1Wddixik/1frJOtUCaKW1svh8X9EvJo/RaBwgbTLIWth/WTgT4E+9DAVocdgMDGXrpsulnLTkX8doxeWHmBq2vAOhlYFNlhw2ZL3Yp/fbuVK9OMt7PbGkf3x3nThSf0R61Ip4NRjCzWempepEHoLMeiv [rest of string was truncated]";. - /// - internal static string confCons_v2_5_fullencryption { - get { - return ResourceManager.GetString("confCons_v2_5_fullencryption", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to cpfCUuZuIpTYihGooKKG5eRIZVB8P4bANitHVY57yrzyr9wf6lHlgUKx3Y3/YDYXDeS9uawycgbGSVOCnKmah3zEJ31V3BMlA809AdgQoYV9GFXLhgz8auO0mdcfYo2FP7UYS/I2bAfoNOaLvvgmqamm7Lu5FtvSvqdCf3PmpJAW042BijgkDhqritfDAyBvqUbNtE7yvrJohiSv5Ur7qFMXMIUCK0Fc4o3PXM++exN9XfTrtPAwQpjchxoEEmXBOQVnPB4QIn6eg6Wr/4XgtWYFIbtCCzyA5/L91CsDdKBZZktNSRrJTyMmPYGLn1k3Ted77rsoVUovrhxqfXgErPxDLBFAOA9wAjk7NscTRQJGxbgEU5H514g4U6h9wWlLaFyswQQCIskAbmoBrFJz72X9ooS4IVh1q9gLvCKuqb1VM6tNC0RCcLS5EHpxG6kIVpmnNtSa/0EvwaiSLMskC74TpYJ6nBUpfZT783jTikAFNDVI4eA43mJLEIBvrxBR [rest of string was truncated]";. - /// - internal static string confCons_v2_5_passwordis_Password_fullencryption { - get { - return ResourceManager.GetString("confCons_v2_5_passwordis_Password_fullencryption", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="False" Protected="8LmIO3+MWBY0zTmfjfOEdCGxhTAwnlohb1veTGNZFt6lAYvY2UOzWyjVzkx6V93smpbP0ZOuexN15u7rvwJEjawC" ConfVersion="2.6"> - /// <Node Name="Folder1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="ICA" PuttySession="Default Settings" Port="1494" Connec [rest of string was truncated]";. - /// - internal static string confCons_v2_6 { - get { - return ResourceManager.GetString("confCons_v2_6", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="5000" FullFileEncryption="False" Protected="Z1IOT8h7neJ5V7es5Iv63A2WsDG6QWl10F/Rb9ljKxvCseEITty1BfMNgiaVPfm7w61uabQKqu2waDCXUpLo1OZW" ConfVersion="2.6"> - /// <Node Name="Folder1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="ICA" PuttySession="Default Settings" Port="1494" Connec [rest of string was truncated]";. - /// - internal static string confCons_v2_6_5k_iterations { - get { - return ResourceManager.GetString("confCons_v2_6_5k_iterations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="True" Protected="qrOUhRlBLCnjjmfU1r8uwhgIBwZ+D1+trBgPmcQyEnW0xf2adLeOfUhZHnto2NOsMneXDibsS8PH0B1moOyvua22" ConfVersion="2.6">pCvan5X5+bSJy8oZq3QhrYs9zAS4v2tu9/4eYk4GAeB2EDep9Ed1zkshaLP165sWHE9oJ6bHnWSrSr/XXiDGdosvxl+O3hSSi02On9/TspuHhPDuuDb7UY2+mLh/LVoJqAjz2NmK7f3QkID2aanHkHzE/MDFiez8gLU8SdW9RxlSXT+L8MEjIXnq34yDVsfV89tGoP01T84ShTCZpRAQMq [rest of string was truncated]";. - /// - internal static string confCons_v2_6_fullencryption { - get { - return ResourceManager.GetString("confCons_v2_6_fullencryption", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="False" Protected="e/T6ajrPtNNlHreSeD4QBqToTuiqtNACKiPJv7vU+l6TWCu9JNsmL+Y8lJ4aTl5YVcstXpQjxsZ9i8+YV4Gs" ConfVersion="2.6"> - /// <Node Name="Folder1" Type="Container" Expanded="True" Descr="" Icon="mRemoteNG" Panel="General" Username="" Domain="" Password="" Hostname="" Protocol="ICA" PuttySession="Default Settings" Port="1494" ConnectToC [rest of string was truncated]";. - /// - internal static string confCons_v2_6_passwordis_Password { - get { - return ResourceManager.GetString("confCons_v2_6_passwordis_Password", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<Connections Name="Connections" Export="False" EncryptionEngine="AES" BlockCipherMode="GCM" KdfIterations="1000" FullFileEncryption="True" Protected="d7pvbk1N6aswOmTgjCKkkavQKM2xTpknkdnMgzi+bOPgwr9WirGy82kaQldQ06af7MrZgJwvc9hKAcGxBfYt" ConfVersion="2.6">P9haenvGQ9HxnJSUUY+3SdALKoWQau0gF3Vxk6eCERKJ9G2gi87zhBcMCH+PwSsh/5ohPfOansFvUcDvPeE10slCTVqQmQFeU+daQY4OMk+2Q0UR/rEDRlbjGlM8YKVv2xjLRPRs6AbNJsKLv4zo8T/x3ySlZnuiMiGTGt4Wstfle/QfwNbBeV88N5IPbbKy2FWQf5yOlPtrjgPrcl0cRtRI3c [rest of string was truncated]";. - /// - internal static string confCons_v2_6_passwordis_Password_fullencryption { - get { - return ResourceManager.GetString("confCons_v2_6_passwordis_Password_fullencryption", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Version: 1.75.6164.27544 - ///dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Installer-1.75.6179.28160.msi - ///clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT - ///CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA - ///Checksum: A1E50ACAC4CB8023527E1E7A0E682459. - /// - internal static string dev_update { - get { - return ResourceManager.GetString("dev_update", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Version: 1.75.6170.27478 - ///dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Portable-1.75.6179.28241.zip - ///clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT - ///CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA - ///Checksum: 1C35EA199F58001BC4EBB164D8B3D11C. - /// - internal static string dev_update_portable { - get { - return ResourceManager.GetString("dev_update_portable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-16"?> - ///<!-- ****************************************************************--> - ///<!-- * *--> - ///<!-- * PuTTY Configuration Manager save file - All right reserved. *--> - ///<!-- * *--> - ///<!-- ****************************************************************--> - ///<!-- The following lines can be modified at your own risks. --> - ///<configuration version="0.7.1.136" [rest of string was truncated]";. - /// - internal static string test_puttyConnectionManager_database { - get { - return ResourceManager.GetString("test_puttyConnectionManager_database", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<RDCMan schemaVersion="1"> - /// <version>99.99</version> - /// <file> - /// </file> - ///</RDCMan>. - /// - internal static string test_rdcman_badVersionNumber { - get { - return ResourceManager.GetString("test_rdcman_badVersionNumber", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<RDCMan schemaVersion="1"> - /// <file> - /// </file> - ///</RDCMan>. - /// - internal static string test_rdcman_noversion { - get { - return ResourceManager.GetString("test_rdcman_noversion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<RDCMan schemaVersion="-99"> - /// <version>2.2</version> - /// <file> - /// </file> - ///</RDCMan>. - /// - internal static string test_rdcman_v2_2_badschemaversion { - get { - return ResourceManager.GetString("test_rdcman_v2_2_badschemaversion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<RDCMan schemaVersion="1"> - /// <version>2.2</version> - /// <file> - /// <properties> - /// <name>test_rdcman_v2_2_schema1</name> - /// <expanded>True</expanded> - /// <comment /> - /// <logonCredentials inherit="FromParent" /> - /// <connectionSettings inherit="FromParent" /> - /// <gatewaySettings inherit="FromParent" /> - /// <remoteDesktop inherit="FromParent" /> - /// <localResources inherit="FromParent" [rest of string was truncated]";. - /// - internal static string test_rdcman_v2_2_schema1 { - get { - return ResourceManager.GetString("test_rdcman_v2_2_schema1", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<RDCMan programVersion="2.7" schemaVersion="3"> - /// <file> - /// <credentialsProfiles /> - /// <properties> - /// <expanded>True</expanded> - /// <name>test_RDCMan_connections</name> - /// </properties> - /// <smartGroup> - /// <properties> - /// <expanded>False</expanded> - /// <name>AllServers</name> - /// </properties> - /// <ruleGroup operator="All"> - /// <rule> - /// <property>DisplayName</property> - /// <operator>Matches</operator> - /// [rest of string was truncated]";. - /// - internal static string test_rdcman_v2_7_schema3 { - get { - return ResourceManager.GetString("test_rdcman_v2_7_schema3", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<RDCMan programVersion="2.7" schemaVersion="3"> - /// <file> - /// <credentialsProfiles /> - /// <properties> - /// <expanded>True</expanded> - /// <name>test_RDCMan_connections</name> - /// </properties> - /// <smartGroup> - /// <properties> - /// <expanded>False</expanded> - /// <name>AllServers</name> - /// </properties> - /// <ruleGroup operator="All"> - /// <rule> - /// <property>DisplayName</property> - /// <operator>Matches</operator> - /// [rest of string was truncated]";. - /// - internal static string test_rdcman_v2_7_schema3_empty_values { - get { - return ResourceManager.GetString("test_rdcman_v2_7_schema3_empty_values", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?> - ///<RDCMan programVersion="2.7" schemaVersion="3"> - /// <file> - /// <credentialsProfiles /> - /// <properties> - /// <expanded>True</expanded> - /// <name>test_RDCMan_connections</name> - /// </properties> - /// <smartGroup> - /// <properties> - /// <expanded>False</expanded> - /// <name>AllServers</name> - /// </properties> - /// <ruleGroup operator="All"> - /// <rule> - /// <property>DisplayName</property> - /// <operator>Matches</operator> - /// [rest of string was truncated]";. - /// - internal static string test_rdcman_v2_7_schema3_null_values { - get { - return ResourceManager.GetString("test_rdcman_v2_7_schema3_null_values", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to screen mode id:i:1 - ///use multimon:i:0 - ///desktopwidth:i:800 - ///desktopheight:i:600 - ///session bpp:i:24 - ///winposstr:s:0,3,0,0,800,600 - ///compression:i:1 - ///keyboardhook:i:2 - ///audiocapturemode:i:0 - ///videoplaybackmode:i:1 - ///connection type:i:7 - ///networkautodetect:i:1 - ///bandwidthautodetect:i:1 - ///displayconnectionbar:i:1 - ///username:s:myusernamehere - ///enableworkspacereconnect:i:0 - ///disable wallpaper:i:1 - ///allow font smoothing:i:1 - ///allow desktop composition:i:1 - ///disable full window drag:i:1 - ///disable menu anims:i:1 - ///disable themes:i:1 - /// [rest of string was truncated]";. - /// - internal static string test_remotedesktopconnection_rdp { - get { - return ResourceManager.GetString("test_remotedesktopconnection_rdp", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap TestImage { - get { - object obj = ResourceManager.GetObject("TestImage", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized string similar to Version: 1.75.6164.27544 - ///dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Installer-1.75.6179.28160.msi - ///clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT - ///CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA - ///Checksum: A1E50ACAC4CB8023527E1E7A0E682459. - /// - internal static string update { - get { - return ResourceManager.GetString("update", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Version: 1.75.6170.27478 - ///dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Portable-1.75.6179.28241.zip - ///clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT - ///CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA - ///Checksum: 1C35EA199F58001BC4EBB164D8B3D11C. - /// - internal static string update_portable { - get { - return ResourceManager.GetString("update_portable", resourceCulture); - } - } - } -} diff --git a/mRemoteNGTests/Properties/Resources.resx b/mRemoteNGTests/Properties/Resources.resx deleted file mode 100644 index e35a04652..000000000 --- a/mRemoteNGTests/Properties/Resources.resx +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - ..\Resources\beta-update.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\beta-update-portable.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\confCons_v2_5.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\confCons_v2_5_fullencryption.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\confCons_v2_5_passwordis_Password_fullencryption.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\confCons_v2_6.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\confCons_v2_6_5k-iterations.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\confCons_v2_6_fullencryption.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\confCons_v2_6_passwordis_Password.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\confCons_v2_6_passwordis_Password_fullencryption.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\dev-update.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\dev-update-portable.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\resources\testimage.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Resources\test_puttyConnectionManager_database.dat;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - - ..\Resources\test_rdcman_badVersionNumber.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - ..\Resources\test_rdcman_noversion.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - ..\Resources\test_rdcman_v2_2_badschemaversion.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - ..\Resources\test_rdcman_v2_2_schema1.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - ..\Resources\test_RDCMan_v2_7_schema3.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - ..\Resources\test_rdcman_v2_7_schema3_empty_values.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - ..\Resources\test_rdcman_v2_7_schema3_null_values.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 - - - ..\Resources\test_remotedesktopconnection.rdp;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-16 - - - ..\Resources\update.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - - ..\Resources\update-portable.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/TestImage.bmp b/mRemoteNGTests/Resources/TestImage.bmp deleted file mode 100644 index 745429ef2..000000000 Binary files a/mRemoteNGTests/Resources/TestImage.bmp and /dev/null differ diff --git a/mRemoteNGTests/Resources/beta-update-portable.txt b/mRemoteNGTests/Resources/beta-update-portable.txt deleted file mode 100644 index 5d4e02f26..000000000 --- a/mRemoteNGTests/Resources/beta-update-portable.txt +++ /dev/null @@ -1,5 +0,0 @@ -Version: 1.75.6170.27478 -dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Portable-1.75.6179.28241.zip -clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT -CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA -Checksum: 1C35EA199F58001BC4EBB164D8B3D11C \ No newline at end of file diff --git a/mRemoteNGTests/Resources/beta-update.txt b/mRemoteNGTests/Resources/beta-update.txt deleted file mode 100644 index 1e6beeb0d..000000000 --- a/mRemoteNGTests/Resources/beta-update.txt +++ /dev/null @@ -1,5 +0,0 @@ -Version: 1.75.6164.27544 -dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Installer-1.75.6179.28160.msi -clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT -CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA -Checksum: A1E50ACAC4CB8023527E1E7A0E682459 \ No newline at end of file diff --git a/mRemoteNGTests/Resources/confCons_v2_5.xml b/mRemoteNGTests/Resources/confCons_v2_5.xml deleted file mode 100644 index 22d6627c0..000000000 --- a/mRemoteNGTests/Resources/confCons_v2_5.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/confCons_v2_5_fullencryption.xml b/mRemoteNGTests/Resources/confCons_v2_5_fullencryption.xml deleted file mode 100644 index a2c585222..000000000 --- a/mRemoteNGTests/Resources/confCons_v2_5_fullencryption.xml +++ /dev/null @@ -1 +0,0 @@ -qqv8WEdruAEzSfdnPZMQ8w5cLhsl55V/Vu6h81Ucv7s7OT3vwnocgLmfId8rxpfVBnZwdn1Pdvea0XgwnQKJV5qdrVZEiy694Vv84B3wXjxU1wT72rWu1C5TNLhNEZp9JqjjAxOttIbOFL5X0dM+zI4YrCmTZI2Qt04TaC47MTr2niO7XvQSvjDeZRPnzeHsEiJvxHvBSm9yJ64Iupect0zKIpFPiDuOoHDhFQegUCZ26IdZCX2IHb3pH866rYV+yiAGhqt7pokBHUKURVtN6eKpbYzlDyGPbLRJf/eD13KnlaVC6sbf7YiCP3JwJrkN5mLdnrZbmZGQJG3Sn9rrGeShItYG/vvayFAQ5jxz1Wddixik/1frJOtUCaKW1svh8X9EvJo/RaBwgbTLIWth/WTgT4E+9DAVocdgMDGXrpsulnLTkX8doxeWHmBq2vAOhlYFNlhw2ZL3Yp/fbuVK9OMt7PbGkf3x3nThSf0R61Ip4NRjCzWempepEHoLMeiv3kxHvzCUr45ruafitxeT34sfW7V49+8fYwnqcUFf1nA/JqPmnAN+8gx1xmtnNNmNY1pct9ZRtr0E1jpA5Bmw2Rrg/gYmhoBkTwwlZf3lKMfF7dTIOleJkgOPS/yT1ixU33dWBvu2k5qA2V6999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BQfgVgi0zS+G+x/CzX5g9K/LkSWWO3LPncAN9ceZEFb1CYa7tULFN54GRun3F+gso/Pv/PpZFb4h57uRSP0mElsfIhmP1uMwuVQRr9wdsKbRhfDZKPMZenGHMD6AL0U6vD9xYGD07p1FqI9szT5NHKMr2ivoj6k7g+eZFPdWATkIbZg3DMNv+M+XiTQq54O+/kzKmtyiwD1gqFup0lI9w6XaMSvdbk3PLQ4fR7BFnSh7ngGMGh3HrYphkgHertCuXU8WTchv \ No newline at end of file diff --git a/mRemoteNGTests/Resources/confCons_v2_5_passwordis_Password_fullencryption.xml b/mRemoteNGTests/Resources/confCons_v2_5_passwordis_Password_fullencryption.xml deleted file mode 100644 index d0104db0b..000000000 --- a/mRemoteNGTests/Resources/confCons_v2_5_passwordis_Password_fullencryption.xml +++ /dev/null @@ -1 +0,0 @@ -cpfCUuZuIpTYihGooKKG5eRIZVB8P4bANitHVY57yrzyr9wf6lHlgUKx3Y3/YDYXDeS9uawycgbGSVOCnKmah3zEJ31V3BMlA809AdgQoYV9GFXLhgz8auO0mdcfYo2FP7UYS/I2bAfoNOaLvvgmqamm7Lu5FtvSvqdCf3PmpJAW042BijgkDhqritfDAyBvqUbNtE7yvrJohiSv5Ur7qFMXMIUCK0Fc4o3PXM++exN9XfTrtPAwQpjchxoEEmXBOQVnPB4QIn6eg6Wr/4XgtWYFIbtCCzyA5/L91CsDdKBZZktNSRrJTyMmPYGLn1k3Ted77rsoVUovrhxqfXgErPxDLBFAOA9wAjk7NscTRQJGxbgEU5H514g4U6h9wWlLaFyswQQCIskAbmoBrFJz72X9ooS4IVh1q9gLvCKuqb1VM6tNC0RCcLS5EHpxG6kIVpmnNtSa/0EvwaiSLMskC74TpYJ6nBUpfZT783jTikAFNDVI4eA43mJLEIBvrxBRIFYqZ4qxdtU9yrI12XeawR/uAfXSTRv7uybNIieHjzd3Die4nKbA+VklT0OZCY4RTOqBJ059/77IvV0vgg/IIf3tBx7JB21Jf0QDRmImnwiNl6Vcmociu4Tejl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cLVUaNQPh/rLUpZjfZCGAA3VNpOEEl9wi25ZTj+FLthrSgrIpZG8uFW+sI6cpIPhTUT9CWX1jwPR9yrO4DLiwkuOiLzsA/o6Q8dRSaPhf4tR+uGjxLTWgeoSx5iz8hCBIaF2F7DpPv+xkTMNfWvrA+sLEapcQ2HwpdxbHbpxHFBeaqkqgR7TGWaeG2Hi8m1aMyHh+DHnUJq1fzcc7jY5uhpaPm6dpq/v+re++L2UN/WMaEsJ0h5pvEq/XxQaMgWe7X6OehtcKItK7AI= \ No newline at end of file diff --git a/mRemoteNGTests/Resources/confCons_v2_6.xml b/mRemoteNGTests/Resources/confCons_v2_6.xml deleted file mode 100644 index f48b83bf4..000000000 --- a/mRemoteNGTests/Resources/confCons_v2_6.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/confCons_v2_6_5k-iterations.xml b/mRemoteNGTests/Resources/confCons_v2_6_5k-iterations.xml deleted file mode 100644 index 9ca8d24fb..000000000 --- a/mRemoteNGTests/Resources/confCons_v2_6_5k-iterations.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/confCons_v2_6_fullencryption.xml b/mRemoteNGTests/Resources/confCons_v2_6_fullencryption.xml deleted file mode 100644 index 43600c037..000000000 --- a/mRemoteNGTests/Resources/confCons_v2_6_fullencryption.xml +++ /dev/null @@ -1,2 +0,0 @@ - -pCvan5X5+bSJy8oZq3QhrYs9zAS4v2tu9/4eYk4GAeB2EDep9Ed1zkshaLP165sWHE9oJ6bHnWSrSr/XXiDGdosvxl+O3hSSi02On9/TspuHhPDuuDb7UY2+mLh/LVoJqAjz2NmK7f3QkID2aanHkHzE/MDFiez8gLU8SdW9RxlSXT+L8MEjIXnq34yDVsfV89tGoP01T84ShTCZpRAQMq7og/4eJFj11e6drkTC4yUP7s9viHDXE7Ej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jIGA8NoLjSIhqa0mE6vTlqdemzfEwFw/l0EwS+t17TfhblmUTRttnxBF8friuFStPAjt4cYwrbWJEAu4WRTMVCMAzsK2dvgZ3y1fPKYWVYv1Hy+fF+Uf2slgr1XNJG94pafpjT5CeLBMh+jzoUJDmj/YSHh5hwTAzRWUK6W3xRmvBHg0QDGsb48IJDVcIJZLHnO29MOyPdTSb/csRawjZgGdOqYbhjqcfK9+fLduukLAzkv2t+GJh0fQao7fm47Aynt+eomhmxcE9+jP6yZ7C6L/tiurYFL5IY0BHGSlfMMt6XMMR8qI/Xut7QBvxzVRXDj3A1FmS0XeIRopsbNcnGVLZDD69M1mkPuno7PgTNOnMN+2/NpNckk2HiPXvRvieu3KFlGfkrwwC0r+69q2OMRAowBdNXO8SzKzBM3gNFFFTxeKel5Et4a8bGgre/XcUA7bqjZ/Bpol+YOe+sPp4GoC \ No newline at end of file diff --git a/mRemoteNGTests/Resources/confCons_v2_6_passwordis_Password.xml b/mRemoteNGTests/Resources/confCons_v2_6_passwordis_Password.xml deleted file mode 100644 index 189e30ea0..000000000 --- a/mRemoteNGTests/Resources/confCons_v2_6_passwordis_Password.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/confCons_v2_6_passwordis_Password_fullencryption.xml b/mRemoteNGTests/Resources/confCons_v2_6_passwordis_Password_fullencryption.xml deleted file mode 100644 index 0927d844f..000000000 --- a/mRemoteNGTests/Resources/confCons_v2_6_passwordis_Password_fullencryption.xml +++ /dev/null @@ -1,2 +0,0 @@ - -P9haenvGQ9HxnJSUUY+3SdALKoWQau0gF3Vxk6eCERKJ9G2gi87zhBcMCH+PwSsh/5ohPfOansFvUcDvPeE10slCTVqQmQFeU+daQY4OMk+2Q0UR/rEDRlbjGlM8YKVv2xjLRPRs6AbNJsKLv4zo8T/x3ySlZnuiMiGTGt4Wstfle/QfwNbBeV88N5IPbbKy2FWQf5yOlPtrj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ouz+k+AU4UORXSOT3+zC/FvrZaDc4ASf6ALKshsjkaQD84SJ5jIYo0e6whaCBGv43JhkVwMvYq0WBdmC0q3CPaFCUdlNf5BvhiMmRQmNBgUNXHyWIzRxyul282rxBIle4drYUWKSsmK1sk0hsgU37GUUtYPc88v20xhzsrdhRcTz6Nyxk+2TUxF0KVHEpwTkzgB9GDOgl3IkM/Le+m8ht1ZTyMm/UBqhLPgzNIkChi2rIu6I59CehRPkUbJpFgEB5ZcTwTUVtW+zae1FRSbAVyTDynLVDFIptPNDY6GWpCutjFXxuDSFeE6Kb2WBravPRZjcspCchHISIVJlO+BdVoTgIaCo2tJJwEn1qLGw9Ztm51dTPixrVKAf52jV/ssJ7jmH6i7Hf+7J3SHEoJ+jduoZ/kMBVXRqQScmxCYxmvS1Fe+yUcrpbai1HDcrf3C+AV0x6UsQRXM95VL5mtrAdk8H4HqvmzwP0fKof7xIC6+2UOs4KaNCQY5YV9N/M7dIEr7TyP7nNAojUIQLNL3i0okZzTNNqbsWjYCfeqgND4ypZEVaN2zwpewgXQOqFGZ6xqqYqikni+ZpbssGs/taydzN1DdquCe6I7H \ No newline at end of file diff --git a/mRemoteNGTests/Resources/dev-update-portable.txt b/mRemoteNGTests/Resources/dev-update-portable.txt deleted file mode 100644 index 5d4e02f26..000000000 --- a/mRemoteNGTests/Resources/dev-update-portable.txt +++ /dev/null @@ -1,5 +0,0 @@ -Version: 1.75.6170.27478 -dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Portable-1.75.6179.28241.zip -clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT -CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA -Checksum: 1C35EA199F58001BC4EBB164D8B3D11C \ No newline at end of file diff --git a/mRemoteNGTests/Resources/dev-update.txt b/mRemoteNGTests/Resources/dev-update.txt deleted file mode 100644 index 1e6beeb0d..000000000 --- a/mRemoteNGTests/Resources/dev-update.txt +++ /dev/null @@ -1,5 +0,0 @@ -Version: 1.75.6164.27544 -dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Installer-1.75.6179.28160.msi -clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT -CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA -Checksum: A1E50ACAC4CB8023527E1E7A0E682459 \ No newline at end of file diff --git a/mRemoteNGTests/Resources/test_puttyConnectionManager_database.dat b/mRemoteNGTests/Resources/test_puttyConnectionManager_database.dat deleted file mode 100644 index 552acdde5..000000000 Binary files a/mRemoteNGTests/Resources/test_puttyConnectionManager_database.dat and /dev/null differ diff --git a/mRemoteNGTests/Resources/test_puttyConnectionManager_database_backup.dat b/mRemoteNGTests/Resources/test_puttyConnectionManager_database_backup.dat deleted file mode 100644 index a5496285e..000000000 Binary files a/mRemoteNGTests/Resources/test_puttyConnectionManager_database_backup.dat and /dev/null differ diff --git a/mRemoteNGTests/Resources/test_rdcman_badVersionNumber.rdg b/mRemoteNGTests/Resources/test_rdcman_badVersionNumber.rdg deleted file mode 100644 index 4ba46544b..000000000 --- a/mRemoteNGTests/Resources/test_rdcman_badVersionNumber.rdg +++ /dev/null @@ -1,6 +0,0 @@ - - - 99.99 - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/test_rdcman_noversion.rdg b/mRemoteNGTests/Resources/test_rdcman_noversion.rdg deleted file mode 100644 index b5a0d65eb..000000000 --- a/mRemoteNGTests/Resources/test_rdcman_noversion.rdg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/test_rdcman_v2_2_badschemaversion.rdg b/mRemoteNGTests/Resources/test_rdcman_v2_2_badschemaversion.rdg deleted file mode 100644 index 185cfc423..000000000 --- a/mRemoteNGTests/Resources/test_rdcman_v2_2_badschemaversion.rdg +++ /dev/null @@ -1,6 +0,0 @@ - - - 2.2 - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/test_rdcman_v2_2_schema1.rdg b/mRemoteNGTests/Resources/test_rdcman_v2_2_schema1.rdg deleted file mode 100644 index b3ea94b17..000000000 --- a/mRemoteNGTests/Resources/test_rdcman_v2_2_schema1.rdg +++ /dev/null @@ -1,145 +0,0 @@ - - - 2.2 - - - test_rdcman_v2_2_schema1 - True - - - - - - - - - - - - Group1 - True - - - - - - - - - - - server1 - server1_displayname - Comment text here - - myusername1 - mydomain - AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA/jk3lWsW+ku0n4AOVYyLTAAAAAACAAAAAAAQZgAAAAEAACAAAABhmrmYHd+c7VjWfPvxJ8pgi55yeV2brJDV/i9XzGUz6wAAAAAOgAAAAAIAACAAAAACJMhtb6tmkJn9vSv9J4VMWgt3S7Ikmf63xK/uKQ+YuyAAAACD3mJOT1910KD71zqbi+m/F6A0LK0tu0BhpOhr9v0yH0AAAADrb+Uv2btNYhfTUDGbw5pT5dbp5oXzc3I8QO7X1vgMXiI5TkrSxfHP/2j+Yak++vAjpVtzlxk49hpDLNAZnnhg - - - True - alternate shell - - 9933 - - - gatewayusername - innerdomain - AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA/jk3lWsW+ku0n4AOVYyLTAAAAAACAAAAAAAQZgAAAAEAACAAAACgU917evQ54VsDf3nkofPOAPj0icRejg3yfyUwZqV3DgAAAAAOgAAAAAIAACAAAACuPdtJTxd2yvFuTpSOeZz1loraPu2WFqUXiJp4cfjbJTAAAAB8L5YX93h6pQoKJozrk+Y+spHWqP+eqBUXRJ45oLreKslslSWCEO7VWg4rgr0FYsNAAAAAU1i5aSTlBy99EkNEd2inrAJAopCfNig6osiEVdvA6eYnCogG5mhzYEK5d5Wt49S8HbEyuLF/8IxV0PKG53vCZQ== - True - gatewayserverhost.innerdomain.net - 4 - False - False - - - 1024 x 768 - True - False - 24 - - - 2 - 0 - 0 - 1 - True - True - True - True - True - - - 1 - - - 1 - - - - server2 - server2 - - - - - - - - - - - - - Group2 - True - - - - - - - - - - - - Group3 - True - - - - - - - - - - - server3 - server3 - - - - - - - - - - - server4 - server4 - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3.rdg b/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3.rdg deleted file mode 100644 index 04de05ef3..000000000 --- a/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3.rdg +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - True - test_RDCMan_connections - - - - False - AllServers - - - - DisplayName - Matches - server - - - - - - True - Group1 - - - - server1_displayname - server1 - Comment text here - - - Custom - myusername1 - AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA/jk3lWsW+ku0n4AOVYyLTAAAAAACAAAAAAAQZgAAAAEAACAAAACZryl2a4trJLcUdyg7jL/m51fxn4Vy+je6SBhT5FasmgAAAAAOgAAAAAIAACAAAAAcG6MQhKFvEcKRrRE74YKrrnYKxLFnVxbGzyfl7JoyvjAAAACAofcbQqcr6h9VQuwwWW5IBkW1zsugofl1MjsL9t2uWfuBgnrya1Xlyue5E7cG8BZAAAAApgx/XXqBqXhr6CV2SJTlXihg7n5epOIT02A8ymy3qRftDgXlmu3IaN7krK3gofv+iNdVrvIdJJMYCihm7dyqOw== - mydomain - - - True - alternate shell - - 9933 - - - - True - gatewayserverhost.innerdomain.net - Any - True - True - Custom - gatewayusername - - innerdomain - - - True - False - 24 - - - NoSound - Dynamic - DoNotRecord - Remote - True - True - - C:\ - D:\ - E:\ - F:\ - G:\ - - True - True - True - True - - - 1 - False - False - - - Warn - - - - - server2 - - - - - - True - Group2 - - - - True - Group3 - - - - server3 - - - - - server4 - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3_empty_values.rdg b/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3_empty_values.rdg deleted file mode 100644 index 2a8c7ba3c..000000000 --- a/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3_empty_values.rdg +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - True - test_RDCMan_connections - - - - False - AllServers - - - - DisplayName - Matches - server - - - - - - True - Group1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3_null_values.rdg b/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3_null_values.rdg deleted file mode 100644 index 598219ae0..000000000 --- a/mRemoteNGTests/Resources/test_rdcman_v2_7_schema3_null_values.rdg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - True - test_RDCMan_connections - - - - False - AllServers - - - - DisplayName - Matches - server - - - - - - True - Group1 - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mRemoteNGTests/Resources/test_remotedesktopconnection.rdp b/mRemoteNGTests/Resources/test_remotedesktopconnection.rdp deleted file mode 100644 index 87e082692..000000000 Binary files a/mRemoteNGTests/Resources/test_remotedesktopconnection.rdp and /dev/null differ diff --git a/mRemoteNGTests/Resources/update-portable.txt b/mRemoteNGTests/Resources/update-portable.txt deleted file mode 100644 index 5d4e02f26..000000000 --- a/mRemoteNGTests/Resources/update-portable.txt +++ /dev/null @@ -1,5 +0,0 @@ -Version: 1.75.6170.27478 -dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Portable-1.75.6179.28241.zip -clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT -CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA -Checksum: 1C35EA199F58001BC4EBB164D8B3D11C \ No newline at end of file diff --git a/mRemoteNGTests/Resources/update.txt b/mRemoteNGTests/Resources/update.txt deleted file mode 100644 index 1e6beeb0d..000000000 --- a/mRemoteNGTests/Resources/update.txt +++ /dev/null @@ -1,5 +0,0 @@ -Version: 1.75.6164.27544 -dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/v1.75Beta3/mRemoteNG-Installer-1.75.6179.28160.msi -clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v1.75Beta3/CHANGELOG.TXT -CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA -Checksum: A1E50ACAC4CB8023527E1E7A0E682459 \ No newline at end of file diff --git a/mRemoteNGTests/Security/AeadCryptographyProviderTests.cs b/mRemoteNGTests/Security/AeadCryptographyProviderTests.cs deleted file mode 100644 index b74a09405..000000000 --- a/mRemoteNGTests/Security/AeadCryptographyProviderTests.cs +++ /dev/null @@ -1,124 +0,0 @@ -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Security.SymmetricEncryption; -using NUnit.Framework; -using NUnit.Framework.Constraints; -using System; -using System.Collections; -using System.Security; - - -namespace mRemoteNGTests.Security -{ - public class AeadCryptographyProviderTests - { - private ICryptographyProvider _cryptographyProvider; - private SecureString _encryptionKey; - private string _plainText; - - [SetUp] - public void Setup() - { - _cryptographyProvider = new AeadCryptographyProvider(); - _encryptionKey = "mypassword111111".ConvertToSecureString(); - _plainText = "MySecret!"; - } - - [TearDown] - public void TearDown() - { - _cryptographyProvider = null; - } - - [Test] - public void GetBlockSizeReturnsProperValueForAes() - { - Assert.That(_cryptographyProvider.BlockSizeInBytes, Is.EqualTo(16)); - } - - [Test] - public void EncryptionOutputsBase64String() - { - var cipherText = _cryptographyProvider.Encrypt(_plainText, _encryptionKey); - Assert.That(cipherText.IsBase64String, Is.True); - } - - [TestCaseSource(nameof(GetAllBlockCipherEngineAndModeCombinations))] - public void DecryptedTextIsEqualToOriginalPlainText(BlockCipherEngines engine, BlockCipherModes mode) - { - var cryptoProvider = new CryptoProviderFactory(engine, mode).Build(); - var cipherText = cryptoProvider.Encrypt(_plainText, _encryptionKey); - var decryptedCipherText = cryptoProvider.Decrypt(cipherText, _encryptionKey); - Assert.That(decryptedCipherText, Is.EqualTo(_plainText)); - } - - [Test] - public void EncryptingTheSameValueReturnsNewCipherTextEachTime() - { - var cipherText1 = _cryptographyProvider.Encrypt(_plainText, _encryptionKey); - var cipherText2 = _cryptographyProvider.Encrypt(_plainText, _encryptionKey); - Assert.That(cipherText1, Is.Not.EqualTo(cipherText2)); - } - - private static IEnumerable GetAllBlockCipherEngineAndModeCombinations() - { - var combinationList = new ArrayList(); - var engineChoices = Enum.GetValues(typeof(BlockCipherEngines)); - var modeChoices = Enum.GetValues(typeof(BlockCipherModes)); - foreach (var engine in engineChoices) - { - foreach (var mode in modeChoices) - { - combinationList.Add(new[] { engine, mode }); - } - } - return combinationList; - } - - [Test] - public void DecryptionFailureThrowsException() - { - var cipherText = _cryptographyProvider.Encrypt(_plainText, _encryptionKey); - ActualValueDelegate decryptMethod = () => _cryptographyProvider.Decrypt(cipherText, "wrongKey".ConvertToSecureString()); - Assert.That(decryptMethod, Throws.TypeOf()); - } - - [TestCaseSource(typeof(TestCaseSources), nameof(TestCaseSources.AllEngineAndModeCombos))] - public void GetCipherEngine(BlockCipherEngines engine, BlockCipherModes mode) - { - var cryptoProvider = new CryptoProviderFactory(engine, mode).Build(); - Assert.That(cryptoProvider.CipherEngine, Is.EqualTo(engine)); - } - - [TestCaseSource(typeof(TestCaseSources), nameof(TestCaseSources.AllEngineAndModeCombos))] - public void GetCipherMode(BlockCipherEngines engine, BlockCipherModes mode) - { - var cryptoProvider = new CryptoProviderFactory(engine, mode).Build(); - Assert.That(cryptoProvider.CipherMode, Is.EqualTo(mode)); - } - - [Test] - public void ProvidingEmptyEncryptionKeyThrowsException() - { - Assert.Throws(() => _cryptographyProvider.Encrypt(_plainText, new SecureString())); - } - - - private class TestCaseSources - { - public static IEnumerable AllEngineAndModeCombos - { - get - { - foreach (var engine in Enum.GetValues(typeof(BlockCipherEngines))) - { - foreach (var mode in Enum.GetValues(typeof(BlockCipherModes))) - { - yield return new TestCaseData(engine, mode); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/Authentication/PasswordAuthenticatorTests.cs b/mRemoteNGTests/Security/Authentication/PasswordAuthenticatorTests.cs deleted file mode 100644 index 2dc92a77c..000000000 --- a/mRemoteNGTests/Security/Authentication/PasswordAuthenticatorTests.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System.Security; -using mRemoteNG.Security; -using mRemoteNG.Security.Authentication; -using mRemoteNG.Security.SymmetricEncryption; -using mRemoteNG.Tools; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security.Authentication -{ - public class PasswordAuthenticatorTests - { - private ICryptographyProvider _cryptographyProvider; - private string _cipherText; - private readonly SecureString _correctPassword = "9theCorrectPass#5".ConvertToSecureString(); - private readonly SecureString _wrongPassword = "wrongPassword".ConvertToSecureString(); - - [SetUp] - public void Setup() - { - _cryptographyProvider = new AeadCryptographyProvider {KeyDerivationIterations = 10000}; - _cipherText = "MPELiwk7+xeNlruIyt5uxTvVB+/RLVoLdUGnwY4CWCqwKe7T2IBwWo4oaKum5hdv7447g5m2nZsYPrfARSlotQB4r1KZQg=="; - } - - [Test] - public void AuthenticatingWithCorrectPasswordReturnsTrue() - { - var authenticator = new PasswordAuthenticator(_cryptographyProvider, _cipherText, () => Optional.Empty); - var authenticated = authenticator.Authenticate(_correctPassword); - Assert.That(authenticated); - } - - [Test] - public void AuthenticatingWithWrongPasswordReturnsFalse() - { - var authenticator = new PasswordAuthenticator(_cryptographyProvider, _cipherText, () => Optional.Empty); - var authenticated = authenticator.Authenticate(_wrongPassword); - Assert.That(!authenticated); - } - - [Test] - public void AuthenticationRequestorIsCalledWhenInitialPasswordIsWrong() - { - var wasCalled = false; - - Optional AuthenticationRequestor() - { - wasCalled = true; - return _correctPassword; - } - - var authenticator = new PasswordAuthenticator(_cryptographyProvider, _cipherText, AuthenticationRequestor); - authenticator.Authenticate(_wrongPassword); - Assert.That(wasCalled); - } - - [Test] - public void AuthenticationRequestorNotCalledWhenInitialPasswordIsCorrect() - { - var wasCalled = false; - Optional AuthenticationRequestor() - { - wasCalled = true; - return _correctPassword; - } - - var authenticator = new PasswordAuthenticator(_cryptographyProvider, _cipherText, AuthenticationRequestor); - authenticator.Authenticate(_correctPassword); - Assert.That(!wasCalled); - } - - [Test] - public void ProvidingCorrectPasswordToTheAuthenticationRequestorReturnsTrue() - { - var authenticator = new PasswordAuthenticator(_cryptographyProvider, _cipherText, () => _correctPassword); - var authenticated = authenticator.Authenticate(_wrongPassword); - Assert.That(authenticated); - } - - [Test] - public void AuthenticationFailsWhenAuthenticationRequestorGivenEmptyPassword() - { - var authenticator = new PasswordAuthenticator(_cryptographyProvider, _cipherText, () => new SecureString()); - var authenticated = authenticator.Authenticate(_wrongPassword); - Assert.That(!authenticated); - } - - [Test] - public void AuthenticatorRespectsMaxAttempts() - { - var authAttempts = 0; - Optional AuthenticationRequestor() - { - authAttempts++; - return _wrongPassword; - } - - var authenticator = new PasswordAuthenticator(_cryptographyProvider, _cipherText, AuthenticationRequestor); - authenticator.Authenticate(_wrongPassword); - Assert.That(authAttempts == authenticator.MaxAttempts); - } - - [Test] - public void AuthenticatorRespectsMaxAttemptsCustomValue() - { - const int customMaxAttempts = 5; - var authAttempts = 0; - Optional AuthenticationRequestor() - { - authAttempts++; - return _wrongPassword; - } - - var authenticator = - new PasswordAuthenticator(_cryptographyProvider, _cipherText, AuthenticationRequestor) - { - MaxAttempts = customMaxAttempts - }; - authenticator.Authenticate(_wrongPassword); - Assert.That(authAttempts == customMaxAttempts); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/CryptographyProviderFactoryTests.cs b/mRemoteNGTests/Security/CryptographyProviderFactoryTests.cs deleted file mode 100644 index b7aebe236..000000000 --- a/mRemoteNGTests/Security/CryptographyProviderFactoryTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security -{ - [TestFixture] - public class CryptographyProviderFactoryTests - { - [TestCaseSource(typeof(TestCaseSources), nameof(TestCaseSources.AllEngineAndModeCombos))] - public void CanCreateAeadProvidersWithCorrectEngine(BlockCipherEngines engine, BlockCipherModes mode) - { - var cryptoProvider = new CryptoProviderFactory(engine, mode).Build(); - Assert.That(cryptoProvider.CipherEngine, Is.EqualTo(engine)); - } - - [TestCaseSource(typeof(TestCaseSources), nameof(TestCaseSources.AllEngineAndModeCombos))] - public void CanCreateAeadProvidersWithCorrectMode(BlockCipherEngines engine, BlockCipherModes mode) - { - var cryptoProvider = new CryptoProviderFactory(engine, mode).Build(); - Assert.That(cryptoProvider.CipherMode, Is.EqualTo(mode)); - } - - private class TestCaseSources - { - public static IEnumerable AllEngineAndModeCombos - { - get - { - foreach (var engine in Enum.GetValues(typeof(BlockCipherEngines))) - { - foreach (var mode in Enum.GetValues(typeof(BlockCipherModes))) - { - yield return new TestCaseData(engine, mode); - } - } - } - } - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/EncryptedSecureStringTests.cs b/mRemoteNGTests/Security/EncryptedSecureStringTests.cs deleted file mode 100644 index a0dbb67af..000000000 --- a/mRemoteNGTests/Security/EncryptedSecureStringTests.cs +++ /dev/null @@ -1,45 +0,0 @@ -using mRemoteNG.Security; -using NUnit.Framework; - -namespace mRemoteNGTests.Security -{ - [TestFixture()] - public class EncryptedSecureStringTests - { - private readonly string _clearTextData = "MySecureData"; - - [Test] - public void CanCreateEncryptedSecureString() - { - Assert.That(new EncryptedSecureString(), Is.InstanceOf()); - } - - [Test] - public void CanAssignStringValue() - { - var encryptedSecString = new EncryptedSecureString(); - TestDelegate testDelegate = () => encryptedSecString.SetValue(_clearTextData); - Assert.DoesNotThrow(testDelegate); - } - - [Test] - public void EncryptedValueIsSameAsOriginalValue() - { - var encryptedSecString = new EncryptedSecureString(); - encryptedSecString.SetValue(_clearTextData); - var decryptedData = encryptedSecString.GetClearTextValue(); - Assert.That(decryptedData, Is.EqualTo(_clearTextData)); - } - - [Test] - public void CreatingMultipleEncryptedSecureStrings() - { - var encString1 = new EncryptedSecureString(); - encString1.SetValue(_clearTextData); - var encString2 = new EncryptedSecureString(); - encString2.SetValue("somevalue"); - var decryptedString = encString1.GetClearTextValue(); - Assert.That(decryptedString, Is.EqualTo(_clearTextData)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/KeyDerivation/Pkcs5S2KeyGeneratorTests.cs b/mRemoteNGTests/Security/KeyDerivation/Pkcs5S2KeyGeneratorTests.cs deleted file mode 100644 index c5985b07c..000000000 --- a/mRemoteNGTests/Security/KeyDerivation/Pkcs5S2KeyGeneratorTests.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using mRemoteNG.Security.KeyDerivation; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security.KeyDerivation -{ - public class Pkcs5S2KeyGeneratorTests - { - [Test] - public void DefaultConstructorThrowsNoException() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.DoesNotThrow(() => new Pkcs5S2KeyGenerator()); - } - - [Test] - public void CreatingGeneratorWithLowIterationCountThrowsError() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new Pkcs5S2KeyGenerator(256, 999)); - } - - [Test] - public void CreatingGeneratorWithNegativeKeyBitSizeThrowsError() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new Pkcs5S2KeyGenerator(-1)); - } - - [Test] - public void IdenticalParametersProduceIdenticalKeys() - { - var keyDerivationFunction = new Pkcs5S2KeyGenerator(); - var key1 = keyDerivationFunction.DeriveKey("", new byte[0]); - var key2 = keyDerivationFunction.DeriveKey("", new byte[0]); - Assert.That(key1, Is.EquivalentTo(key2)); - } - - [Test] - public void DifferingIterationsProduceDifferingKeys() - { - var keyDerivationFunction1 = new Pkcs5S2KeyGenerator(256, 1001); - var keyDerivationFunction2 = new Pkcs5S2KeyGenerator(256, 1002); - var key1 = keyDerivationFunction1.DeriveKey("", new byte[0]); - var key2 = keyDerivationFunction2.DeriveKey("", new byte[0]); - Assert.That(key1, Is.Not.EquivalentTo(key2)); - } - - [Test] - public void DifferingKeysizeProduceDifferingKeys() - { - var keyDerivationFunction1 = new Pkcs5S2KeyGenerator(); - var keyDerivationFunction2 = new Pkcs5S2KeyGenerator(512); - var key1 = keyDerivationFunction1.DeriveKey("", new byte[0]); - var key2 = keyDerivationFunction2.DeriveKey("", new byte[0]); - Assert.That(key1, Is.Not.EquivalentTo(key2)); - } - - [Test] - public void DifferingPasswordsProduceDifferingKeys() - { - var keyDerivationFunction = new Pkcs5S2KeyGenerator(); - var key1 = keyDerivationFunction.DeriveKey("a", new byte[0]); - var key2 = keyDerivationFunction.DeriveKey("b", new byte[0]); - Assert.That(key1, Is.Not.EquivalentTo(key2)); - } - - [Test] - public void DifferingSaltsProduceDifferingKeys() - { - var keyDerivationFunction = new Pkcs5S2KeyGenerator(); - var key1 = keyDerivationFunction.DeriveKey("", new byte[0]); - var key2 = keyDerivationFunction.DeriveKey("", new byte[] {1}); - Assert.That(key1, Is.Not.EquivalentTo(key2)); - } - - [TestCase(0)] - [TestCase(1)] - [TestCase(8)] - [TestCase(9)] - [TestCase(256)] - [TestCase(333)] - public void KeyLengthIsKeyBitSizeDividedBy8(int keyBitSize) - { - var keyDerivationFunction = new Pkcs5S2KeyGenerator(keyBitSize); - var key = keyDerivationFunction.DeriveKey("", new byte[0]); - Assert.That(key.Length, Is.EqualTo(keyBitSize / 8)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/LegacyRijndaelCryptographyProviderTests.cs b/mRemoteNGTests/Security/LegacyRijndaelCryptographyProviderTests.cs deleted file mode 100644 index d730ac6c6..000000000 --- a/mRemoteNGTests/Security/LegacyRijndaelCryptographyProviderTests.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System.Security; -using mRemoteNG.Security; -using mRemoteNG.Security.SymmetricEncryption; -using NUnit.Framework; -using NUnit.Framework.Constraints; - - -namespace mRemoteNGTests.Security -{ - public class LegacyRijndaelCryptographyProviderTests - { - private ICryptographyProvider _rijndaelCryptographyProvider; - private SecureString _encryptionKey; - private string _plainText; - private const string CipherText = "RmV7zw/a7ZRRzZdcTkrLDgBfyEmeh8OFMgg2OKFJnwg="; - - - [SetUp] - public void SetUp() - { - _rijndaelCryptographyProvider = new LegacyRijndaelCryptographyProvider(); - _encryptionKey = "mR3m".ConvertToSecureString(); - _plainText = "MySecret!"; - } - - [TearDown] - public void Teardown() - { - _rijndaelCryptographyProvider = null; - } - - [Test] - public void GetBlockSizeReturnsProperValueForRijndael() - { - Assert.That(_rijndaelCryptographyProvider.BlockSizeInBytes, Is.EqualTo(16)); - } - - [Test] - public void EncryptionOutputsBase64String() - { - var cipherText = _rijndaelCryptographyProvider.Encrypt(_plainText, _encryptionKey); - Assert.That(cipherText.IsBase64String, Is.True); - } - - [Test] - public void DecryptedTextIsEqualToOriginalPlainText() - { - var cipherText = _rijndaelCryptographyProvider.Encrypt(_plainText, _encryptionKey); - var decryptedCipherText = _rijndaelCryptographyProvider.Decrypt(cipherText, _encryptionKey); - Assert.That(decryptedCipherText, Is.EqualTo(_plainText)); - } - - [Test] - public void EncryptingTheSameValueReturnsNewCipherTextEachTime() - { - var cipherText1 = _rijndaelCryptographyProvider.Encrypt(_plainText, _encryptionKey); - var cipherText2 = _rijndaelCryptographyProvider.Encrypt(_plainText, _encryptionKey); - Assert.That(cipherText1, Is.Not.EqualTo(cipherText2)); - } - - [Test] - public void DecryptingFromPreviousApplicationExecutionWorks() - { - var decryptedCipherText = _rijndaelCryptographyProvider.Decrypt(CipherText, _encryptionKey); - Assert.That(decryptedCipherText, Is.EqualTo(_plainText)); - } - - [Test] - public void DecryptionFailureThrowsException() - { - ActualValueDelegate decryptMethod = () => _rijndaelCryptographyProvider.Decrypt(CipherText, "wrongKey".ConvertToSecureString()); - Assert.That(decryptMethod, Throws.TypeOf()); - } - - [Test] - public void EncryptingEmptyStringReturnsEmptyString() - { - var cipherText = _rijndaelCryptographyProvider.Encrypt("", _encryptionKey); - Assert.That(cipherText, Is.EqualTo("")); - } - - [Test] - public void DecryptingEmptyStringReturnsEmptyString() - { - var decryptedCipherText = _rijndaelCryptographyProvider.Decrypt("", _encryptionKey); - Assert.That(decryptedCipherText, Is.EqualTo("")); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesLowerCaseConstraintTests.cs b/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesLowerCaseConstraintTests.cs deleted file mode 100644 index 516adcc13..000000000 --- a/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesLowerCaseConstraintTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using mRemoteNG.Security; -using mRemoteNG.Security.PasswordCreation; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security.PasswordCreation -{ - public class PasswordIncludesLowerCaseConstraintTests - { - private PasswordIncludesLowerCaseConstraint _lowerCaseConstraint; - - [Test] - public void PasswordThatExceedsMinimumLowerCasePassesValidation() - { - var password = "hello".ConvertToSecureString(); - _lowerCaseConstraint = new PasswordIncludesLowerCaseConstraint(); - Assert.That(_lowerCaseConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordThatMeetsMinimumLowerCasePassesValidation() - { - var password = "hello".ConvertToSecureString(); - _lowerCaseConstraint = new PasswordIncludesLowerCaseConstraint(5); - Assert.That(_lowerCaseConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordWithFewerThanMinimumLowerCaseFailsValidation() - { - var password = "hELLO".ConvertToSecureString(); - _lowerCaseConstraint = new PasswordIncludesLowerCaseConstraint(2); - Assert.That(_lowerCaseConstraint.Validate(password), Is.False); - } - - [Test] - public void PasswordWithoutLowerCaseFailsValidation() - { - var password = "HELLO".ConvertToSecureString(); - _lowerCaseConstraint = new PasswordIncludesLowerCaseConstraint(); - Assert.That(_lowerCaseConstraint.Validate(password), Is.False); - } - - [Test] - public void CountToRequireMustBeAPositiveValue() - { - Assert.Throws(() => new PasswordIncludesLowerCaseConstraint(-1)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesNumbersConstraintTests.cs b/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesNumbersConstraintTests.cs deleted file mode 100644 index 17ccf2efe..000000000 --- a/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesNumbersConstraintTests.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using mRemoteNG.Security; -using mRemoteNG.Security.PasswordCreation; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security.PasswordCreation -{ - public class PasswordIncludesNumbersConstraintTests - { - private PasswordIncludesNumbersConstraint _includesNumbersConstraint; - - [Test] - public void PasswordWithANumberPassesConstraint() - { - var password = "hello1".ConvertToSecureString(); - _includesNumbersConstraint = new PasswordIncludesNumbersConstraint(); - Assert.That(_includesNumbersConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordWithFewerThanTheMinimumCountOfNumbersFailsConstraint() - { - var password = "hello1".ConvertToSecureString(); - _includesNumbersConstraint = new PasswordIncludesNumbersConstraint(2); - Assert.That(_includesNumbersConstraint.Validate(password), Is.False); - } - - [Test] - public void PasswordWithoutNumbersFailsConstraint() - { - var password = "hello".ConvertToSecureString(); - _includesNumbersConstraint = new PasswordIncludesNumbersConstraint(); - Assert.That(_includesNumbersConstraint.Validate(password), Is.False); - } - - [Test] - public void CountOfNumbersToRequireMustBeAPositiveValue() - { - Assert.Throws(() => new PasswordIncludesNumbersConstraint(-1)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesSpecialCharactersConstraintTests.cs b/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesSpecialCharactersConstraintTests.cs deleted file mode 100644 index 2ba1747eb..000000000 --- a/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesSpecialCharactersConstraintTests.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using mRemoteNG.Security; -using mRemoteNG.Security.PasswordCreation; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security.PasswordCreation -{ - public class PasswordIncludesSpecialCharactersConstraintTests - { - private PasswordIncludesSpecialCharactersConstraint _specialCharactersConstraint; - - [Test] - public void PasswordWithMinimumSpecialCharsPassesValidation() - { - var password = "hello$".ConvertToSecureString(); - _specialCharactersConstraint = new PasswordIncludesSpecialCharactersConstraint(); - Assert.That(_specialCharactersConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordExceedingMinimumSpecialCharsPassesValidation() - { - var password = "hello!#%$".ConvertToSecureString(); - _specialCharactersConstraint = new PasswordIncludesSpecialCharactersConstraint(3); - Assert.That(_specialCharactersConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordUnderMinimumSpecialCharsFailsValidation() - { - var password = "hello!".ConvertToSecureString(); - _specialCharactersConstraint = new PasswordIncludesSpecialCharactersConstraint(2); - Assert.That(_specialCharactersConstraint.Validate(password), Is.False); - } - - [Test] - public void PasswordWithoutSpecialCharsFailsValidation() - { - var password = "hello".ConvertToSecureString(); - _specialCharactersConstraint = new PasswordIncludesSpecialCharactersConstraint(); - Assert.That(_specialCharactersConstraint.Validate(password), Is.False); - } - - [Test] - public void PasswordMatchingCustomCharsPassesValidation() - { - var password = "hello(".ConvertToSecureString(); - _specialCharactersConstraint = new PasswordIncludesSpecialCharactersConstraint(new[] {'('}); - Assert.That(_specialCharactersConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordWithoutCustomCharsFailsValidation() - { - var password = "hello!".ConvertToSecureString(); - _specialCharactersConstraint = new PasswordIncludesSpecialCharactersConstraint(new[] { '(' }); - Assert.That(_specialCharactersConstraint.Validate(password), Is.False); - } - - [Test] - public void CantProvideNullListOfCharacters() - { - Assert.Throws(() => new PasswordIncludesSpecialCharactersConstraint(null)); - } - - [Test] - public void MinimumCountMustBeAPositiveValue() - { - Assert.Throws(() => new PasswordIncludesSpecialCharactersConstraint(-1)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesUpperCaseConstraintTests.cs b/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesUpperCaseConstraintTests.cs deleted file mode 100644 index 1285f566c..000000000 --- a/mRemoteNGTests/Security/PasswordCreation/PasswordIncludesUpperCaseConstraintTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using mRemoteNG.Security; -using mRemoteNG.Security.PasswordCreation; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security.PasswordCreation -{ - public class PasswordIncludesUpperCaseConstraintTests - { - private PasswordIncludesUpperCaseConstraint _lowerCaseConstraint; - - [Test] - public void PasswordThatExceedsMinimumLowerCasePassesValidation() - { - var password = "HELLO".ConvertToSecureString(); - _lowerCaseConstraint = new PasswordIncludesUpperCaseConstraint(); - Assert.That(_lowerCaseConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordThatMeetsMinimumLowerCasePassesValidation() - { - var password = "HELLO".ConvertToSecureString(); - _lowerCaseConstraint = new PasswordIncludesUpperCaseConstraint(5); - Assert.That(_lowerCaseConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordWithFewerThanMinimumLowerCaseFailsValidation() - { - var password = "Hello".ConvertToSecureString(); - _lowerCaseConstraint = new PasswordIncludesUpperCaseConstraint(2); - Assert.That(_lowerCaseConstraint.Validate(password), Is.False); - } - - [Test] - public void PasswordWithoutUpperCaseFailsValidation() - { - var password = "hello".ConvertToSecureString(); - _lowerCaseConstraint = new PasswordIncludesUpperCaseConstraint(); - Assert.That(_lowerCaseConstraint.Validate(password), Is.False); - } - - [Test] - public void CountToRequireMustBeAPositiveValue() - { - Assert.Throws(() => new PasswordIncludesUpperCaseConstraint(-1)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/PasswordCreation/PasswordLengthConstraintTests.cs b/mRemoteNGTests/Security/PasswordCreation/PasswordLengthConstraintTests.cs deleted file mode 100644 index 55800ce0d..000000000 --- a/mRemoteNGTests/Security/PasswordCreation/PasswordLengthConstraintTests.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using mRemoteNG.Security; -using mRemoteNG.Security.PasswordCreation; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security.PasswordCreation -{ - public class PasswordLengthConstraintTests - { - private PasswordLengthConstraint _lengthConstraint; - - - [Test] - public void PasswordLessThanMinimumLengthFailsValidation() - { - var password = "123456789".ConvertToSecureString(); - _lengthConstraint = new PasswordLengthConstraint(10); - Assert.That(_lengthConstraint.Validate(password), Is.False); - } - - [Test] - public void PasswordThatEqualsMinimumLengthPassesValidation() - { - var password = "12345".ConvertToSecureString(); - _lengthConstraint = new PasswordLengthConstraint(5); - Assert.That(_lengthConstraint.Validate(password), Is.True); - } - - [Test] - public void PasswordGreaterThanMaxLengthFailsValidation() - { - var password = "123456".ConvertToSecureString(); - _lengthConstraint = new PasswordLengthConstraint(1, 5); - Assert.That(_lengthConstraint.Validate(password), Is.False); - } - - [Test] - public void PasswordThatEqualsMaxLengthPassesValidation() - { - var password = "12345".ConvertToSecureString(); - _lengthConstraint = new PasswordLengthConstraint(1, 5); - Assert.That(_lengthConstraint.Validate(password), Is.True); - } - - [Test] - public void MinimumLengthMustBeAPositiveValue() - { - Assert.Throws(() => new PasswordLengthConstraint(-1)); - } - - [Test] - public void MaximumLengthMustBeAPositiveValue() - { - Assert.Throws(() => new PasswordLengthConstraint(1, -1)); - } - - [Test] - public void MaximumLengthMustBeGreaterThanMinimumLength() - { - Assert.Throws(() => new PasswordLengthConstraint(4, 1)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/RandomGeneratorTests.cs b/mRemoteNGTests/Security/RandomGeneratorTests.cs deleted file mode 100644 index 6969fe120..000000000 --- a/mRemoteNGTests/Security/RandomGeneratorTests.cs +++ /dev/null @@ -1,23 +0,0 @@ -using mRemoteNG.Security; -using NUnit.Framework; - -namespace mRemoteNGTests.Security -{ - public class RandomGeneratorTests - { - [Test] - public void ProducesStringOfCorrectLength() - { - var text = RandomGenerator.RandomString(8); - Assert.That(text.Length, Is.EqualTo(8)); - } - - [Test] - public void StringsDiffer() - { - var text1 = RandomGenerator.RandomString(8); - var text2 = RandomGenerator.RandomString(8); - Assert.That(text1, Is.Not.EqualTo(text2)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/SecureStringExtensionsTests.cs b/mRemoteNGTests/Security/SecureStringExtensionsTests.cs deleted file mode 100644 index 8367f5273..000000000 --- a/mRemoteNGTests/Security/SecureStringExtensionsTests.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Security; -using mRemoteNG.Security; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security -{ - public class SecureStringExtensionsTests - { - [Test] - public void ConvertToSecureString() - { - var securedString = "MySecureString".ConvertToSecureString(); - Assert.That(securedString.Length, Is.GreaterThan(0)); - } - - [Test] - public void ConvertToUnsecureString() - { - var originalText = "MySecureString"; - var securedString = originalText.ConvertToSecureString(); - var unsecuredString = securedString.ConvertToUnsecureString(); - Assert.That(unsecuredString, Is.EqualTo(originalText)); - } - - [Test] - public void ConvertToSecureStringOnNullStringThrowsException() - { - string myString = null; - Assert.Throws(() => myString.ConvertToSecureString()); - } - - [Test] - public void ConvertToUnsecureStringOnNullStringThrowsException() - { - SecureString secureString = null; - Assert.Throws(() => secureString.ConvertToUnsecureString()); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Security/XmlCryptoProviderBuilderTests.cs b/mRemoteNGTests/Security/XmlCryptoProviderBuilderTests.cs deleted file mode 100644 index 9eb238077..000000000 --- a/mRemoteNGTests/Security/XmlCryptoProviderBuilderTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Xml.Linq; -using mRemoteNG.Security; -using mRemoteNG.Security.Factories; -using mRemoteNG.Security.SymmetricEncryption; -using NUnit.Framework; - - -namespace mRemoteNGTests.Security -{ - public class XmlCryptoProviderBuilderTests - { - [Test] - public void BuildsCorrectEncryptionEngine() - { - var element = BuildValidElement(); - var builder = new CryptoProviderFactoryFromXml(element); - var cryptoProvider = builder.Build(); - Assert.That(cryptoProvider.CipherEngine, Is.EqualTo(BlockCipherEngines.Serpent)); - } - - [Test] - public void BuildsCorrectCipherMode() - { - var element = BuildValidElement(); - var builder = new CryptoProviderFactoryFromXml(element); - var cryptoProvider = builder.Build(); - Assert.That(cryptoProvider.CipherMode, Is.EqualTo(BlockCipherModes.EAX)); - } - - [Test] - public void BuildsCorrectKdfIterations() - { - var element = BuildValidElement(); - var builder = new CryptoProviderFactoryFromXml(element); - var cryptoProvider = builder.Build(); - Assert.That(cryptoProvider.KeyDerivationIterations, Is.EqualTo(1234)); - } - - [Test] - public void CantPassNullIntoConstructor() - { - Assert.Throws(() => - { - // ReSharper disable once ObjectCreationAsStatement - new CryptoProviderFactoryFromXml(null); - }); - } - - [Test] - public void ReturnsOldProviderTypeIfXmlIsntValid() - { - var badElement = new XElement("BadElement"); - var builder = new CryptoProviderFactoryFromXml(badElement); - var cryptoProvider = builder.Build(); - Assert.That(cryptoProvider, Is.TypeOf()); - } - - private static XElement BuildValidElement() - { - return new XElement("TestElement", - new XAttribute("EncryptionEngine", "Serpent"), - new XAttribute("BlockCipherMode", "EAX"), - new XAttribute("KdfIterations", "1234")); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/TestHelpers/ConnectionInfoAllConnectionPropertiesEqualityComparer.cs b/mRemoteNGTests/TestHelpers/ConnectionInfoAllConnectionPropertiesEqualityComparer.cs deleted file mode 100644 index 33aaf9263..000000000 --- a/mRemoteNGTests/TestHelpers/ConnectionInfoAllConnectionPropertiesEqualityComparer.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Connection; - -namespace mRemoteNGTests.TestHelpers -{ - public class ConnectionInfoAllConnectionPropertiesEqualityComparer : IEqualityComparer - { - public bool Equals(ConnectionInfo x, ConnectionInfo y) - { - if (x == null && y == null) - return true; - if ((x == null) != (y == null)) - return false; - return GetHashCode(x) == GetHashCode(y); - } - - public int GetHashCode(ConnectionInfo connectionInfo) - { - var allProperties = connectionInfo.GetSerializableProperties(); - - unchecked // Overflow is fine, just wrap - { - return allProperties - .Aggregate(17, - (current, prop) => current * 23 + prop.GetValue(connectionInfo).GetHashCode()); - } - } - } -} diff --git a/mRemoteNGTests/TestHelpers/ConnectionInfoHelpers.cs b/mRemoteNGTests/TestHelpers/ConnectionInfoHelpers.cs deleted file mode 100644 index 9014ace65..000000000 --- a/mRemoteNGTests/TestHelpers/ConnectionInfoHelpers.cs +++ /dev/null @@ -1,42 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; - -namespace mRemoteNGTests.TestHelpers -{ - internal static class ConnectionInfoHelpers - { - /// - /// Returns a object with randomized - /// values in all fields. - /// - internal static ConnectionInfo GetRandomizedConnectionInfo(bool randomizeInheritance = false) - { - var connectionInfo = new ConnectionInfo().RandomizeValues(); - - if (randomizeInheritance) - connectionInfo.Inheritance = GetRandomizedInheritance(connectionInfo); - - return connectionInfo; - } - - internal static ContainerInfo GetRandomizedContainerInfo(bool randomizeInheritance = false) - { - var containerInfo = new ContainerInfo().RandomizeValues(); - - if (randomizeInheritance) - containerInfo.Inheritance = GetRandomizedInheritance(containerInfo); - - return containerInfo; - } - - internal static ConnectionInfoInheritance GetRandomizedInheritance(ConnectionInfo parent) - { - var inheritance = new ConnectionInfoInheritance(parent, true); - foreach (var property in inheritance.GetProperties()) - { - property.SetValue(inheritance, Randomizer.RandomBool()); - } - return inheritance; - } - } -} diff --git a/mRemoteNGTests/TestHelpers/ConnectionInheritanceAllPropertiesEqualityComparer.cs b/mRemoteNGTests/TestHelpers/ConnectionInheritanceAllPropertiesEqualityComparer.cs deleted file mode 100644 index 21fef6f9c..000000000 --- a/mRemoteNGTests/TestHelpers/ConnectionInheritanceAllPropertiesEqualityComparer.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using mRemoteNG.Connection; - -namespace mRemoteNGTests.TestHelpers -{ - public class ConnectionInheritanceAllPropertiesEqualityComparer : IEqualityComparer - { - public bool Equals(ConnectionInfoInheritance x, ConnectionInfoInheritance y) - { - if (x == null && y == null) - return true; - if ((x == null) != (y == null)) - return false; - return GetHashCode(x) == GetHashCode(y); - } - - public int GetHashCode(ConnectionInfoInheritance inheritance) - { - var allProperties = inheritance.GetProperties(); - - unchecked // Overflow is fine, just wrap - { - return allProperties - .Aggregate(17, - (current, prop) => current * 23 + prop.GetValue(inheritance).GetHashCode()); - } - } - } -} diff --git a/mRemoteNGTests/TestHelpers/ConnectionTreeModelBuilder.cs b/mRemoteNGTests/TestHelpers/ConnectionTreeModelBuilder.cs deleted file mode 100644 index 87e7ef972..000000000 --- a/mRemoteNGTests/TestHelpers/ConnectionTreeModelBuilder.cs +++ /dev/null @@ -1,60 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; - -namespace mRemoteNGTests.TestHelpers -{ - public class ConnectionTreeModelBuilder - { - /// - /// Builds a tree which looks like: - /// Root - /// |- folder1 - /// | |- con1 - /// |- con2 - /// |- folder2 - /// |- folder3 - /// |- con3 - /// - /// - public ConnectionTreeModel Build() - { - var model = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var folder1 = new ContainerInfo { Name = "folder1", Username = "user1", Domain = "domain1", Password = "password1" }; - var folder2 = new ContainerInfo { Name = "folder2", Username = "user2", Domain = "domain2", Password = "password2" }; - var folder3 = new ContainerInfo - { - Name = "folder3", - Inheritance = - { - Username = true, - Domain = true, - Password = true - } - }; - var con1 = new ConnectionInfo { Name = "Con1", Username = "user1", Domain = "domain1", Password = "password1" }; - var con2 = new ConnectionInfo { Name = "Con2", Username = "user2", Domain = "domain2", Password = "password2" }; - var con3 = new ContainerInfo - { - Name = "con3", - Inheritance = - { - Username = true, - Domain = true, - Password = true - } - }; - - root.AddChild(folder1); - root.AddChild(con2); - folder1.AddChild(con1); - root.AddChild(folder2); - folder2.AddChild(folder3); - folder3.AddChild(con3); - model.AddRootNode(root); - return model; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/TestHelpers/FileTestHelpers.cs b/mRemoteNGTests/TestHelpers/FileTestHelpers.cs deleted file mode 100644 index 9e34a5eaf..000000000 --- a/mRemoteNGTests/TestHelpers/FileTestHelpers.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.IO; -using mRemoteNG.Tools; - -namespace mRemoteNGTests.TestHelpers -{ - public class FileTestHelpers - { - public static void DeleteTestFile(string path) - { - if (File.Exists(path)) - File.Delete(path); - } - - public static void DeleteFilesInDirectory(string directory, string fileMatching) - { - var filesToDelete = Directory.GetFiles(directory, fileMatching, SearchOption.TopDirectoryOnly); - foreach (var file in filesToDelete) - if (File.Exists(file)) - File.Delete(file); - } - - public static void DeleteDirectory(string directory) - { - if (Directory.Exists(directory)) - Directory.Delete(directory, true); - } - - public static string NewTempFilePath(string extension = "") - { - var newPath = Path.Combine(GetTestSpecificTempDirectory(), Path.GetRandomFileName()); - if (!string.IsNullOrWhiteSpace(extension)) - newPath = newPath + extension; - var folderPath = Path.GetDirectoryName(newPath); - if (!Directory.Exists(folderPath)) - Directory.CreateDirectory(folderPath); - return newPath; - } - - /// - /// Gets a testing directory that should be unique for a - /// particular mRemoteNG test. - /// - public static string GetTestSpecificTempDirectory() - { - return Path.Combine(Path.GetTempPath(), "mRemoteNGTests", Path.GetRandomFileName()); - } - - public static DisposableAction DisposableTempFile(out string filePath, string extension = "") - { - var file = NewTempFilePath(extension); - filePath = file; - File.AppendAllText(file, ""); - return new DisposableAction( - () => {}, - () => DeleteDirectory(Path.GetDirectoryName(file))); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/TestHelpers/FormExtensions.cs b/mRemoteNGTests/TestHelpers/FormExtensions.cs deleted file mode 100644 index b07e5470e..000000000 --- a/mRemoteNGTests/TestHelpers/FormExtensions.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Linq; -using System.Windows.Forms; - -namespace mRemoteNGTests.TestHelpers -{ - public static class FormExtensions - { - /// - /// Finds a control with the specified name on a form. - /// - /// The type of control to find. - /// The form. - /// The name of the control to find. - /// The control or null if not found or the wrong type. - public static T FindControl(this Form form, string name) where T : Control - { - return form.Controls.Find(name, true).SingleOrDefault() as T; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/TestHelpers/Randomizer.cs b/mRemoteNGTests/TestHelpers/Randomizer.cs deleted file mode 100644 index d66f3f804..000000000 --- a/mRemoteNGTests/TestHelpers/Randomizer.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Enum = System.Enum; - -namespace mRemoteNGTests.TestHelpers -{ - internal static class Randomizer - { - private static readonly Random Random = new Random(); - - internal static string RandomString(params string[] excludedStrings) - { - return GetNonExcludedValue(() => Guid.NewGuid().ToString("N"), excludedStrings); - } - - internal static bool RandomBool(bool? excludedBool = null) - { - if (excludedBool.HasValue) - return !excludedBool.Value; - - return Random.Next() % 2 == 0; - } - - internal static int RandomInt(int minValue = int.MinValue, int maxValue = int.MaxValue, params int[] excludeInts) - { - return GetNonExcludedValue(() => Random.Next(minValue, maxValue), excludeInts); - } - - internal static DateTime RandomDateTime(params DateTime[] excludeTimes) - { - var date = GetNonExcludedValue(() => - new DateTime( - RandomInt(minValue: 1990, maxValue: 2019), - RandomInt(minValue: 1, maxValue: 13), - RandomInt(minValue: 1, maxValue: 29), - RandomInt(minValue: 0, maxValue: 24), - RandomInt(minValue: 0, maxValue: 60), - RandomInt(minValue: 0, maxValue: 60)), - excludeTimes); - - return date; - } - - internal static T RandomEnum(params object[] excludeValues) where T : struct, IConvertible - { - if (!typeof(T).IsEnum) - throw new ArgumentException("T must be an enum"); - - return (T)RandomEnum(typeof(T), excludeValues); - } - - internal static object RandomEnum(Type enumType, params object[] excludeValues) - { - if (!enumType.IsEnum) - throw new ArgumentException("enumType must be an enum"); - - var values = Enum.GetValues(enumType); - return GetNonExcludedValue(() => values.GetValue(Random.Next(values.Length)), excludeValues); - } - - private static T GetNonExcludedValue(Func builder, params object[] excludedValues) - { - do - { - var value = builder(); - if (!excludedValues.Contains(value)) - return value; - } while (true); - } - - /// - /// Randomizes the primitive-type settable properties of the given object. - /// Returns the same object instance to enable fluent method calls. It will - /// never choose the value that the property current holds. For booleans, this - /// means they will always be toggled rather than truly randomized. - /// - internal static T RandomizeValues(this T con) - where T : class - { - var opByType = new Dictionary> - { - { typeof(int), (p, c) => p.SetValue(c, RandomInt(minValue: 0, excludeInts:(int)p.GetValue(c))) }, - { typeof(bool), (p, c) => p.SetValue(c, !(bool)p.GetValue(c)) }, - { typeof(string), (p, c) => p.SetValue(c, RandomString((string)p.GetValue(c))) }, - { typeof(DateTime), (p, c) => p.SetValue(c, RandomDateTime((DateTime)p.GetValue(c))) }, - { typeof(Enum), (p, c) => p.SetValue(c, RandomEnum(p.PropertyType, p.GetValue(c))) }, - }; - - var settableProperties = con - .GetType() - .GetProperties() - .Where(p => p.GetSetMethod() != null); - - foreach (var property in settableProperties) - { - if (opByType.TryGetValue(property.PropertyType, out var mutator)) - mutator(property, con); - - else if (property.PropertyType.BaseType != null && - opByType.TryGetValue(property.PropertyType.BaseType, out var mutator2)) - mutator2(property, con); - } - - return con; - } - - /// - /// Toggles all settable properties - /// on the given object. - /// - /// - /// - /// - /// - internal static T ToggleAllBooleanProperties(this T obj, params string[] excludeProperties) - where T : class - { - var settableBooleanProperties = obj - .GetType() - .GetProperties() - .Where(p => - p.GetSetMethod() != null && - p.PropertyType == typeof(bool) && - !excludeProperties.Contains(p.Name)); - - foreach (var property in settableBooleanProperties) - { - var currentValue = (bool)property.GetValue(obj); - property.SetValue(obj, !currentValue); - } - - return obj; - } - } -} diff --git a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs deleted file mode 100644 index afcf04fe8..000000000 --- a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs +++ /dev/null @@ -1,82 +0,0 @@ -namespace mRemoteNGTests.TestHelpers -{ - /// - /// A ConnectionInfo that has only the serializable properties as string types. - /// Only used for testing. - /// - internal class SerializableConnectionInfoAllPropertiesOfType - { - public TType Description { get; set; } - public TType Icon { get; set; } - public TType Panel { get; set; } - public TType Username { get; set; } - public TType Password { get; set; } - public TType Domain { get; set; } - public TType Protocol { get; set; } - public TType ExtApp { get; set; } - public TType PuttySession { get; set; } - public TType ICAEncryptionStrength { get; set; } - public TType UseConsoleSession { get; set; } - public TType RDPAuthenticationLevel { get; set; } - public TType RDPMinutesToIdleTimeout { get; set; } - public TType RDPAlertIdleTimeout { get; set; } - public TType LoadBalanceInfo { get; set; } - public TType RenderingEngine { get; set; } - public TType UseCredSsp { get; set; } - public TType RDGatewayUsageMethod { get; set; } - public TType RDGatewayHostname { get; set; } - public TType RDGatewayUseConnectionCredentials { get; set; } - public TType RDGatewayUsername { get; set; } - public TType RDGatewayPassword { get; set; } - public TType RDGatewayDomain { get; set; } - public TType Resolution { get; set; } - public TType AutomaticResize { get; set; } - public TType Colors { get; set; } - public TType CacheBitmaps { get; set; } - public TType DisplayWallpaper { get; set; } - public TType DisplayThemes { get; set; } - public TType EnableFontSmoothing { get; set; } - public TType EnableDesktopComposition { get; set; } - public TType DisableFullWindowDrag { get; set; } - public TType DisableMenuAnimations { get; set; } - public TType DisableCursorShadow { get; set; } - public TType DisableCursorBlinking { get; set; } - public TType RedirectKeys { get; set; } - public TType RedirectDiskDrives { get; set; } - public TType RedirectPrinters { get; set; } - public TType RedirectClipboard { get; set; } - public TType RedirectPorts { get; set; } - public TType RedirectSmartCards { get; set; } - public TType RedirectSound { get; set; } - public TType SoundQuality { get; set; } - public TType RedirectAudioCapture { get; set; } - public TType PreExtApp { get; set; } - public TType PostExtApp { get; set; } - public TType MacAddress { get; set; } - public TType UserField { get; set; } - public TType Favorite { get; set; } - public TType VmId { get; set; } - public TType UseVmId { get; set; } - public TType VNCCompression { get; set; } - public TType VNCEncoding { get; set; } - public TType VNCAuthMode { get; set; } - public TType VNCProxyType { get; set; } - public TType VNCProxyIP { get; set; } - public TType VNCProxyPort { get; set; } - public TType VNCProxyUsername { get; set; } - public TType VNCProxyPassword { get; set; } - public TType VNCColors { get; set; } - public TType VNCSmartSizeMode { get; set; } - public TType VNCViewOnly { get; set; } - public TType RdpVersion { get; set; } - public TType UseEnhancedMode { get; set; } - public TType SSHOptions { get; set; } - public TType SSHTunnelConnectionName { get; set; } - public TType RDPStartProgram { get; set; } - public TType RDPStartProgramWorkDir { get; set; } - public TType OpeningCommand { get; set; } - public TType UserViaAPI { get; set; } - public TType EC2InstanceId { get; set; } - public TType EC2Region { get; set; } - } -} diff --git a/mRemoteNGTests/Tools/DisposableActionTests.cs b/mRemoteNGTests/Tools/DisposableActionTests.cs deleted file mode 100644 index 8fab6f801..000000000 --- a/mRemoteNGTests/Tools/DisposableActionTests.cs +++ /dev/null @@ -1,42 +0,0 @@ -using mRemoteNG.Tools; -using NUnit.Framework; - -namespace mRemoteNGTests.Tools -{ - public class DisposableActionTests - { - [Test] - public void InitializerActionRunsWhenObjectIsCreated() - { - var initializerRan = false; - new DisposableAction(() => initializerRan = true, () => { }); - - Assert.That(initializerRan); - } - - [Test] - public void DisposalActionRunsWhenDisposeIsCalled() - { - var disposeActionRan = false; - var action = new DisposableAction(() => {}, () => disposeActionRan = true); - - Assert.That(disposeActionRan, Is.False); - action.Dispose(); - Assert.That(disposeActionRan, Is.True); - } - - [Test] - public void DisposeActionOnlyExecutedOnceWhenCallingDisposeMultipleTimes() - { - var invokeCount = 0; - var action = new DisposableAction(() => { }, () => invokeCount++); - - action.Dispose(); - action.Dispose(); - action.Dispose(); - action.Dispose(); - action.Dispose(); - Assert.That(invokeCount, Is.EqualTo(1)); - } - } -} diff --git a/mRemoteNGTests/Tools/ExternalToolsArgumentParserTests.cs b/mRemoteNGTests/Tools/ExternalToolsArgumentParserTests.cs deleted file mode 100644 index 97959a0ed..000000000 --- a/mRemoteNGTests/Tools/ExternalToolsArgumentParserTests.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.Collections; -using mRemoteNG.Connection; -using mRemoteNG.Tools; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tools -{ - public class ExternalToolsArgumentParserTests - { - private ExternalToolArgumentParser _argumentParser; - private const string TestString = @"()%!^abc123*<>&|""'\"; - private const string StringAfterMetacharacterEscaping = @"^(^)^%^!^^abc123*^<^>^&^|^""'\"; - private const string StringAfterAllEscaping = @"^(^)^%^!^^abc123*^<^>^&^|\^""'\"; - private const string StringAfterNoEscaping = TestString; - private const int Port = 9933; - private const string PortAsString = "9933"; - private const string SampleCommandString = @"/k echo ()%!^abc123*<>&|""'\"; - - - [OneTimeSetUp] - public void Setup() - { - var connectionInfo = new ConnectionInfo - { - Name = TestString, - Hostname = TestString, - Port = Port, - Username = TestString, - Password = TestString, - Domain = TestString, - Description = TestString, - MacAddress = TestString, - UserField = TestString - }; - _argumentParser = new ExternalToolArgumentParser(connectionInfo); - } - - [OneTimeTearDown] - public void Teardown() - { - _argumentParser = null; - } - - [TestCaseSource(typeof(ParserTestsDataSource), nameof(ParserTestsDataSource.TestCases))] - public string ParserTests(string argumentString) - { - return _argumentParser.ParseArguments(argumentString); - } - - [Test] - public void NullConnectionInfoResultsInEmptyVariables() - { - var parser = new ExternalToolArgumentParser(null); - var parsedText = parser.ParseArguments("test %USERNAME% test"); - Assert.That(parsedText, Is.EqualTo("test test")); - } - - - - private class ParserTestsDataSource - { - public static IEnumerable TestCases - { - get - { - yield return new TestCaseData("%NAME%").Returns(StringAfterAllEscaping); - yield return new TestCaseData("%-NAME%").Returns(StringAfterMetacharacterEscaping); - yield return new TestCaseData("%!NAME%").Returns(StringAfterNoEscaping); - yield return new TestCaseData("%HOSTNAME%").Returns(StringAfterAllEscaping); - yield return new TestCaseData("%-HOSTNAME%").Returns(StringAfterMetacharacterEscaping); - yield return new TestCaseData("%!HOSTNAME%").Returns(StringAfterNoEscaping); - yield return new TestCaseData("%PORT%").Returns(PortAsString); - yield return new TestCaseData("%-PORT%").Returns(PortAsString); - yield return new TestCaseData("%!PORT%").Returns(PortAsString); - yield return new TestCaseData("%USERNAME%").Returns(StringAfterAllEscaping); - yield return new TestCaseData("%-USERNAME%").Returns(StringAfterMetacharacterEscaping); - yield return new TestCaseData("%!USERNAME%").Returns(StringAfterNoEscaping); - yield return new TestCaseData("%PASSWORD%").Returns(StringAfterAllEscaping); - yield return new TestCaseData("%-PASSWORD%").Returns(StringAfterMetacharacterEscaping); - yield return new TestCaseData("%!PASSWORD%").Returns(StringAfterNoEscaping); - yield return new TestCaseData("%DOMAIN%").Returns(StringAfterAllEscaping); - yield return new TestCaseData("%-DOMAIN%").Returns(StringAfterMetacharacterEscaping); - yield return new TestCaseData("%!DOMAIN%").Returns(StringAfterNoEscaping); - yield return new TestCaseData("%DESCRIPTION%").Returns(StringAfterAllEscaping); - yield return new TestCaseData("%-DESCRIPTION%").Returns(StringAfterMetacharacterEscaping); - yield return new TestCaseData("%!DESCRIPTION%").Returns(StringAfterNoEscaping); - yield return new TestCaseData("%MACADDRESS%").Returns(StringAfterAllEscaping); - yield return new TestCaseData("%-MACADDRESS%").Returns(StringAfterMetacharacterEscaping); - yield return new TestCaseData("%!MACADDRESS%").Returns(StringAfterNoEscaping); - yield return new TestCaseData("%USERFIELD%").Returns(StringAfterAllEscaping); - yield return new TestCaseData("%-USERFIELD%").Returns(StringAfterMetacharacterEscaping); - yield return new TestCaseData("%!USERFIELD%").Returns(StringAfterNoEscaping); - yield return new TestCaseData("%%") {TestName = "EmptyVariableTagsNotParsed" }.Returns("%%"); - yield return new TestCaseData("/k echo %!USERNAME%") { TestName = "ParsingWorksWhenVariableIsNotInFirstPosition" }.Returns(SampleCommandString); - yield return new TestCaseData("%COMSPEC%") { TestName = "EnvironmentVariablesParsed" }.Returns(Environment.GetEnvironmentVariable("comspec")); - yield return new TestCaseData("%UNSUPPORTEDPARAMETER%") { TestName = "UnsupportedParametersNotParsed" }.Returns("%UNSUPPORTEDPARAMETER%"); - yield return new TestCaseData(@"\%COMSPEC\%") { TestName = "BackslashEscapedEnvironmentVariablesParsed" }.Returns(Environment.GetEnvironmentVariable("comspec")); - yield return new TestCaseData(@"^%COMSPEC^%") { TestName = "ChevronEscapedEnvironmentVariablesNotParsed" }.Returns("%COMSPEC%"); - } - } - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tools/FullyObservableCollectionTests.cs b/mRemoteNGTests/Tools/FullyObservableCollectionTests.cs deleted file mode 100644 index 690d57690..000000000 --- a/mRemoteNGTests/Tools/FullyObservableCollectionTests.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel; -using mRemoteNG.Tools.CustomCollections; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.Tools -{ - public class FullyObservableCollectionTests - { - [Test] - public void CollectionBeginsEmpty() - { - var list = new FullyObservableCollection(); - Assert.That(list, Is.Empty); - } - - [Test] - public void CanCreateWithExistingList() - { - var existingList = new List - { - Substitute.For(), - Substitute.For(), - Substitute.For() - }; - var list = new FullyObservableCollection(existingList); - Assert.That(list, Has.Count.EqualTo(3)); - } - - [Test] - public void ItemAdded() - { - var list = new FullyObservableCollection(); - var item = Substitute.For(); - list.Add(item); - Assert.That(list, Has.Member(item)); - } - - [Test] - public void ItemInserted() - { - var list = new FullyObservableCollection(); - var item = Substitute.For(); - list.Insert(0, item); - Assert.That(list[0], Is.EqualTo(item)); - } - - [Test] - public void ItemRemoved() - { - var item = Substitute.For(); - var list = new FullyObservableCollection - { - item - }; - list.Remove(item); - Assert.That(list, Does.Not.Contains(item)); - } - - [Test] - public void ItemRemovedAtIndex() - { - var item = Substitute.For(); - var list = new FullyObservableCollection - { - item - }; - list.RemoveAt(0); - Assert.That(list, Does.Not.Contains(item)); - } - - [Test] - public void ClearRemovesAllItems() - { - var list = new FullyObservableCollection - { - Substitute.For(), - Substitute.For(), - Substitute.For() - }; - list.Clear(); - Assert.That(list, Is.Empty); - } - - [Test] - public void ChildItemEventsTriggerListEvents() - { - var wasCalled = false; - var item = Substitute.For(); - var list = new FullyObservableCollection {item}; - list.CollectionUpdated += (sender, args) => wasCalled = true; - RaiseEvent(item); - Assert.That(wasCalled, Is.True); - } - - [Test] - public void ListUnsubscribesFromRemovedItems() - { - var wasCalled = false; - var item = Substitute.For(); - var list = new FullyObservableCollection { item }; - list.Remove(item); - list.CollectionUpdated += (sender, args) => wasCalled = true; - RaiseEvent(item); - Assert.That(wasCalled, Is.False); - } - - private void RaiseEvent(INotifyPropertyChanged item) - { - item.PropertyChanged += Raise.Event(item, new PropertyChangedEventArgs("test")); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tools/OptionalTests.cs b/mRemoteNGTests/Tools/OptionalTests.cs deleted file mode 100644 index 222d08a7f..000000000 --- a/mRemoteNGTests/Tools/OptionalTests.cs +++ /dev/null @@ -1,30 +0,0 @@ -using mRemoteNG.Tools; -using NUnit.Framework; - -namespace mRemoteNGTests.Tools -{ - public class OptionalTests - { - [Test] - public void MaybeReturnsEmptyListWhenGivenNullValue() - { - var sut = new Optional(null); - Assert.That(sut, Is.Empty); - } - - [Test] - public void MaybeReturnsValueIfNotNull() - { - var expected = new object(); - var sut = new Optional(expected); - Assert.That(sut, Has.Member(expected)); - } - - [Test] - public void MaybeExtensionOfNullObjectIsntNull() - { - var sut = ((object) null).Maybe(); - Assert.That(sut, Is.Not.Null); - } - } -} diff --git a/mRemoteNGTests/Tools/Registry/WindowsRegistryTests.cs b/mRemoteNGTests/Tools/Registry/WindowsRegistryTests.cs deleted file mode 100644 index 292b1b8aa..000000000 --- a/mRemoteNGTests/Tools/Registry/WindowsRegistryTests.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Linq; -using mRemoteNG.Tools.WindowsRegistry; -using NUnit.Framework; - -namespace mRemoteNGTests.Tools.Registry -{ - public class WindowsRegistryTests - { - private WindowsRegistry _registry; - - [SetUp] - public void Setup() - { - _registry = new WindowsRegistry(); - } - - [Test] - public void CanGetSubkeyNames() - { - var subKeyNames = _registry.GetSubKeyNames(RegistryHive.CurrentUser, "Software"); - Assert.That(subKeyNames, Does.Contain("Microsoft")); - } - - [Test] - public void GetSubkeyNamesThrowsIfGivenNullKeyPath() - { - Assert.Throws(() => _registry.GetSubKeyNames(RegistryHive.CurrentUser, null)); - } - - [Test] - public void CanGetKeyValue() - { - var keyValue = _registry.GetKeyValue(RegistryHive.ClassesRoot, @".dll\PersistentHandler", ""); - Assert.That(keyValue.FirstOrDefault(), Is.EqualTo("{098f2470-bae0-11cd-b579-08002b30bfeb}")); - } - - [Test] - public void GetKeyValueThrowsIfGivenNullKeyPath() - { - Assert.Throws(() => _registry.GetKeyValue(RegistryHive.CurrentUser, null, "")); - } - - [Test] - public void GetKeyValueThrowsIfGivenNullPropertyName() - { - Assert.Throws(() => _registry.GetKeyValue(RegistryHive.CurrentUser, "", null)); - } - } -} diff --git a/mRemoteNGTests/Tree/ClickHandlers/ExpandNodeClickHandlerTests.cs b/mRemoteNGTests/Tree/ClickHandlers/ExpandNodeClickHandlerTests.cs deleted file mode 100644 index 0ef112c19..000000000 --- a/mRemoteNGTests/Tree/ClickHandlers/ExpandNodeClickHandlerTests.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree.ClickHandlers; -using mRemoteNG.UI.Controls.ConnectionTree; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class ExpandNodeClickHandlerTests - { - private ExpandNodeClickHandler _clickHandler; - private IConnectionTree _connectionTree; - - [SetUp] - public void Setup() - { - _connectionTree = Substitute.For(); - _clickHandler = new ExpandNodeClickHandler(_connectionTree); - } - - [Test] - public void TargetedNodeIsExpanded() - { - var folder = new ContainerInfo(); - _clickHandler.Execute(folder); - _connectionTree.Received().ToggleExpansion(folder); - } - - [Test] - public void NothingHappensWhenConnectionInfoProvided() - { - _clickHandler.Execute(new ConnectionInfo()); - _connectionTree.DidNotReceiveWithAnyArgs().ToggleExpansion(new ConnectionInfo()); - } - - [Test] - public void ExceptionThrownOnConstructorNullArg() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new ExpandNodeClickHandler(null)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/ClickHandlers/OpenConnectionClickHandlerTests.cs b/mRemoteNGTests/Tree/ClickHandlers/OpenConnectionClickHandlerTests.cs deleted file mode 100644 index 846911a58..000000000 --- a/mRemoteNGTests/Tree/ClickHandlers/OpenConnectionClickHandlerTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree.ClickHandlers; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class OpenConnectionClickHandlerTests - { - private OpenConnectionClickHandler _clickHandler; - private IConnectionInitiator _connectionInitiator; - - [SetUp] - public void Setup() - { - _connectionInitiator = Substitute.For(); - _clickHandler = new OpenConnectionClickHandler(_connectionInitiator); - } - - [Test] - public void ConnectionOpened() - { - var connectionInfo = new ConnectionInfo(); - _clickHandler.Execute(connectionInfo); - _connectionInitiator.Received().OpenConnection(connectionInfo); - } - - [Test] - public void DoesNothingWhenGivenContainerInfo() - { - _clickHandler.Execute(new ContainerInfo()); - _connectionInitiator.DidNotReceiveWithAnyArgs().OpenConnection(new ConnectionInfo()); - } - - [Test] - public void ExceptionThrownWhenConstructorGivenNullArg() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new OpenConnectionClickHandler(null)); - } - - [Test] - public void ThrowWhenExecuteGivenNullArg() - { - Assert.Throws(() => _clickHandler.Execute(null)); - } - } -} diff --git a/mRemoteNGTests/Tree/ClickHandlers/SwitchToConnectionClickHandlerTests.cs b/mRemoteNGTests/Tree/ClickHandlers/SwitchToConnectionClickHandlerTests.cs deleted file mode 100644 index df105fb17..000000000 --- a/mRemoteNGTests/Tree/ClickHandlers/SwitchToConnectionClickHandlerTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree.ClickHandlers; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class SwitchToConnectionClickHandlerTests - { - private SwitchToConnectionClickHandler _clickHandler; - private IConnectionInitiator _connectionInitiator; - - [SetUp] - public void Setup() - { - _connectionInitiator = Substitute.For(); - _clickHandler = new SwitchToConnectionClickHandler(_connectionInitiator); - } - - [Test] - public void SwitchesToConnection() - { - var connectionInfo = new ConnectionInfo(); - _clickHandler.Execute(connectionInfo); - _connectionInitiator.Received().SwitchToOpenConnection(connectionInfo); - } - - [Test] - public void DoesNothingWhenGivenContainerInfo() - { - _clickHandler.Execute(new ContainerInfo()); - _connectionInitiator.DidNotReceiveWithAnyArgs().SwitchToOpenConnection(new ConnectionInfo()); - } - - [Test] - public void ExceptionThrownWhenConstructorGivenNullArg() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new SwitchToConnectionClickHandler(null)); - } - - [Test] - public void ThrowWhenExecuteGivenNullArg() - { - Assert.Throws(() => _clickHandler.Execute(null)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/ClickHandlers/TreeNodeCompositeClickHandlerTests.cs b/mRemoteNGTests/Tree/ClickHandlers/TreeNodeCompositeClickHandlerTests.cs deleted file mode 100644 index 7937908c0..000000000 --- a/mRemoteNGTests/Tree/ClickHandlers/TreeNodeCompositeClickHandlerTests.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using mRemoteNG.Connection; -using mRemoteNG.Tree.ClickHandlers; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class TreeNodeCompositeClickHandlerTests - { - private TreeNodeCompositeClickHandler _clickHandler; - private ConnectionInfo _connectionInfo; - - [SetUp] - public void Setup() - { - _clickHandler = new TreeNodeCompositeClickHandler(); - _connectionInfo = new ConnectionInfo(); - } - - [Test] - public void ExecutesAllItsHandlers() - { - var handler1 = Substitute.For>(); - var handler2 = Substitute.For>(); - _clickHandler.ClickHandlers = new[] {handler1, handler2}; - _clickHandler.Execute(_connectionInfo); - handler1.Received().Execute(_connectionInfo); - handler2.Received().Execute(_connectionInfo); - } - - [Test] - public void ThrowWhenExecuteGivenNullArg() - { - Assert.Throws(() => _clickHandler.Execute(null)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/ConnectionTreeDragAndDropHandlerTests.cs b/mRemoteNGTests/Tree/ConnectionTreeDragAndDropHandlerTests.cs deleted file mode 100644 index 3d1f4fc1a..000000000 --- a/mRemoteNGTests/Tree/ConnectionTreeDragAndDropHandlerTests.cs +++ /dev/null @@ -1,287 +0,0 @@ -using System.Windows.Forms; -using BrightIdeasSoftware; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class ConnectionTreeDragAndDropHandlerTests - { - private ConnectionTreeDragAndDropHandler _dragAndDropHandler; - private RootNodeInfo _rootNode; - private ContainerInfo _container1; - private ContainerInfo _container2; - private ContainerInfo _container3; - private ConnectionInfo _connection1; - private ConnectionInfo _connection2; - private ConnectionInfo _connection3; - private ConnectionInfo _connection4; - private ConnectionInfo _connection5; - - [SetUp] - public void Setup() - { - _dragAndDropHandler = new ConnectionTreeDragAndDropHandler(); - InitializeNodes(); - CreateSimpleTreeModel(); - } - - [TearDown] - public void Teardown() - { - _dragAndDropHandler = null; - DestroyNodes(); - } - - [Test] - public void CanDragConnectionOntoContainer() - { - var source = _connection3; - var target = _container1; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.Move)); - } - - [Test] - public void CanDragContainerOntoContainer() - { - var source = _container1; - var target = _container2; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.Move)); - } - - [Test] - public void CanDragContainerBetweenContainers() - { - var source = _container3; - var target = _container2; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.AboveItem); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.Move)); - } - - [Test] - public void CanDragConnectionBetweenConnections() - { - var source = _connection1; - var target = _connection4; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.AboveItem); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.Move)); - } - - [Test] - public void CantDragConnectionOntoItself() - { - var source = _connection1; - var target = _connection1; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragContainerOntoItself() - { - var source = _container1; - var target = _container1; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragContainerOntoItsChild() - { - var source = _container2; - var target = _container3; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragContainerBetweenItsChildren() - { - var source = _container3; - var target = _connection4; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.BelowItem); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragNodeOntoItsCurrentParent() - { - var source = _container3; - var target = _container2; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragRootNodeInfo() - { - var source = _rootNode; - var target = new ContainerInfo(); - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragNodeAboveRootNodeInfo() - { - var source = _connection1; - var target = _rootNode; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.AboveItem); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragNodeBelowRootNodeInfo() - { - var source = _connection1; - var target = _rootNode; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.BelowItem); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragPuttySessionInfo() - { - var source = new PuttySessionInfo(); - var target = _container2; - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragConnectionOntoRootPuttySessionNode() - { - var source = _connection1; - var target = new RootPuttySessionsNodeInfo(); - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragContainerOntoRootPuttySessionNode() - { - var source = _container1; - var target = new RootPuttySessionsNodeInfo(); - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.Item); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragNodeAbovePuttySessionNodes() - { - var source = _connection1; - var target = new PuttySessionInfo(); - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.AboveItem); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void CantDragNodeBelowPuttySessionNodes() - { - var source = _connection1; - var target = new PuttySessionInfo(); - var dragDropEffects = _dragAndDropHandler.CanModelDrop(source, target, DropTargetLocation.BelowItem); - Assert.That(dragDropEffects, Is.EqualTo(DragDropEffects.None)); - } - - [Test] - public void DraggingNodeBelowSiblingRearrangesTheUnderlyingModelCorrectly() - { - var source = _connection3; - var target = _connection5; - var location = DropTargetLocation.BelowItem; - _dragAndDropHandler.DropModel(source, target, location); - var actualIndex = _container3.Children.IndexOf(source); - var expectedIndex = _container3.Children.IndexOf(target) + 1; - Assert.That(actualIndex, Is.EqualTo(expectedIndex)); - } - - [Test] - public void DraggingNodeAboveSiblingRearrangesTheUnderlyingModelCorrectly() - { - var source = _connection3; - var target = _connection5; - var location = DropTargetLocation.AboveItem; - _dragAndDropHandler.DropModel(source, target, location); - var actualIndex = _container3.Children.IndexOf(source); - var expectedIndex = _container3.Children.IndexOf(target) - 1; - Assert.That(actualIndex, Is.EqualTo(expectedIndex)); - } - - [Test] - public void DraggingNodeToNewContainerAddsNodeToTheNewContainer() - { - var source = _connection3; - var target = _container1; - var location = DropTargetLocation.Item; - _dragAndDropHandler.DropModel(source, target, location); - Assert.That(target.Children.Contains(source)); - } - - [Test] - public void DraggingNodeToNewContainerRemovesNodeFromOldContainer() - { - var source = _connection3; - var target = _container1; - var location = DropTargetLocation.Item; - _dragAndDropHandler.DropModel(source, target, location); - Assert.That(!_container3.Children.Contains(source)); - } - - - private void InitializeNodes() - { - _rootNode = new RootNodeInfo(RootNodeType.Connection); - _container1 = new ContainerInfo(); - _container2 = new ContainerInfo(); - _container3 = new ContainerInfo(); - _connection1 = new ConnectionInfo(); - _connection2 = new ConnectionInfo(); - _connection3 = new ConnectionInfo(); - _connection4 = new ConnectionInfo(); - _connection5 = new ConnectionInfo(); - } - - private void CreateSimpleTreeModel() - { - /* - * Root - * |-- container1 - * | L-- connection1 - * L-- container2 - * |-- container3 - * | |-- connection3 - * | |-- connection4 - * | L-- connection5 - * L-- connection2 - */ - _rootNode.AddChild(_container1); - _rootNode.AddChild(_container2); - _container1.AddChild(_connection1); - _container2.AddChild(_container3); - _container2.AddChild(_connection2); - _container3.AddChild(_connection3); - _container3.AddChild(_connection4); - _container3.AddChild(_connection5); - } - - private void DestroyNodes() - { - _rootNode = null; - _container1 = null; - _container2 = null; - _container3 = null; - _connection1 = null; - _connection2 = null; - _connection3 = null; - _connection4 = null; - _connection5 = null; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/ConnectionTreeModelTests.cs b/mRemoteNGTests/Tree/ConnectionTreeModelTests.cs deleted file mode 100644 index b392e962f..000000000 --- a/mRemoteNGTests/Tree/ConnectionTreeModelTests.cs +++ /dev/null @@ -1,40 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class ConnectionTreeModelTests - { - private ConnectionTreeModel _connectionTreeModel; - - [SetUp] - public void Setup() - { - _connectionTreeModel = new ConnectionTreeModel(); - } - - [TearDown] - public void Teardown() - { - _connectionTreeModel = null; - } - - [Test] - public void GetChildListProvidesAllChildren() - { - var root = new ContainerInfo(); - var folder1 = new ContainerInfo(); - var folder2 = new ContainerInfo(); - var con1 = new ConnectionInfo(); - root.AddChild(folder1); - folder1.AddChild(folder2); - root.AddChild(con1); - _connectionTreeModel.AddRootNode(root); - var connectionList = _connectionTreeModel.GetRecursiveChildList(root); - Assert.That(connectionList, Is.EquivalentTo(new[] {folder1,folder2,con1})); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/ConnectionTreeTests.cs b/mRemoteNGTests/Tree/ConnectionTreeTests.cs deleted file mode 100644 index f2ac8a7c0..000000000 --- a/mRemoteNGTests/Tree/ConnectionTreeTests.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Threading; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI.Controls.ConnectionTree; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class ConnectionTreeTests - { - private ConnectionTree _connectionTree; - private ConnectionTreeModel _connectionTreeModel; - - [SetUp] - public void Setup() - { - _connectionTreeModel = CreateConnectionTreeModel(); - _connectionTree = new ConnectionTree - { - PostSetupActions = new IConnectionTreeDelegate[] {new RootNodeExpander()} - }; - } - - [TearDown] - public void Teardown() - { - _connectionTree.Dispose(); - } - - - [Test, Apartment(ApartmentState.STA)] - public void CanDeleteLastFolderInTheTree() - { - var lastFolder = new ContainerInfo(); - _connectionTreeModel.RootNodes[0].AddChild(lastFolder); - _connectionTree.ConnectionTreeModel = _connectionTreeModel; - _connectionTree.SelectObject(lastFolder); - _connectionTree.DeleteSelectedNode(); - Assert.That(_connectionTree.GetRootConnectionNode().HasChildren, Is.False); - } - - private ConnectionTreeModel CreateConnectionTreeModel() - { - var connectionTreeModel = new ConnectionTreeModel(); - connectionTreeModel.AddRootNode(new RootNodeInfo(RootNodeType.Connection)); - return connectionTreeModel; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/NodeSearcherTests.cs b/mRemoteNGTests/Tree/NodeSearcherTests.cs deleted file mode 100644 index a43287059..000000000 --- a/mRemoteNGTests/Tree/NodeSearcherTests.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class NodeSearcherTests - { - private NodeSearcher _nodeSearcher; - private ContainerInfo _folder1; - private ContainerInfo _folder2; - private ConnectionInfo _con1; - private ConnectionInfo _con2; - private ConnectionInfo _con3; - private ConnectionInfo _con4; - private ConnectionInfo _con5; - - [OneTimeSetUp] - public void OnetimeSetup() - { - var connectionTreeModel = SetupConnectionTreeModel(); - _nodeSearcher = new NodeSearcher(connectionTreeModel); - } - - [Test] - public void SearchByNameReturnsAllExpectedMatches() - { - var matches = _nodeSearcher.SearchByName("folder"); - Assert.That(matches.ToList(), Is.EquivalentTo(new[] {_folder1, _folder2})); - } - - [Test] - public void SearchByDescriptionReturnsAllExpectedMatches() - { - var matches = _nodeSearcher.SearchByName("description"); - Assert.That(matches.ToList(), Is.EquivalentTo(new[] { _folder1, _folder2, _con1, _con2, _con3, _con4, _con5 })); - } - - [Test] - public void SearchByDescription1ReturnsAllExpectedMatches() - { - var matches = _nodeSearcher.SearchByName("description1"); - Assert.That(matches.ToList(), Is.EquivalentTo(new[] { _folder1 })); - } - - [Test] - public void SearchByHostname1ReturnsAllExpectedMatches() - { - var matches = _nodeSearcher.SearchByName("hostname1"); - Assert.That(matches.ToList(), Is.EquivalentTo(new[] { _folder1 })); - } - - [Test] - public void NextMatchAdvancesTheIterator() - { - _nodeSearcher.SearchByName("folder"); - var match1 = _nodeSearcher.CurrentMatch; - var match2 = _nodeSearcher.NextMatch(); - Assert.That(match1, Is.Not.EqualTo(match2)); - } - - [Test] - public void PreviousMatchRollsBackTheIterator() - { - _nodeSearcher.SearchByName("con"); - var match1 = _nodeSearcher.CurrentMatch; - _nodeSearcher.NextMatch(); - var match2 = _nodeSearcher.PreviousMatch(); - Assert.That(match1, Is.EqualTo(match2)); - } - - [Test] - public void SearchingWithEmptyStringReturnsNoMatches() - { - var matches = _nodeSearcher.SearchByName(""); - Assert.That(matches.Count(), Is.EqualTo(0)); - } - - private ConnectionTreeModel SetupConnectionTreeModel() - { - /* - * Tree: - * Root - * |--- folder1 (description1, hostname1) - * | |--- con1 (description2, hostname2) - * | L--- con2 (description3, hostname3) - * |--- folder2 (description4, hostname4) - * | |--- con3 (description5, hostname5) - * | L--- con4 (description6, hostname6) - * L--- con5 (description7, hostname7) - * - */ - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - _folder1 = new ContainerInfo { Name = "folder1", Description = "description1", Hostname = "hostname1" }; - _con1 = new ConnectionInfo { Name = "con1", Description="description2", Hostname="hostname2" }; - _con2 = new ConnectionInfo { Name = "con2", Description="description3", Hostname="hostname3" }; - _folder2 = new ContainerInfo { Name = "folder2", Description="description4", Hostname="hostname4" }; - _con3 = new ConnectionInfo { Name = "con3", Description="description5", Hostname="hostname5" }; - _con4 = new ConnectionInfo { Name = "con4", Description="description6", Hostname="hostname6" }; - _con5 = new ConnectionInfo { Name = "con5", Description="description7", Hostname="hostname7" }; - - _folder1.Inheritance.TurnOffInheritanceCompletely(); - _con1.Inheritance.TurnOffInheritanceCompletely(); - _con2.Inheritance.TurnOffInheritanceCompletely(); - _folder2.Inheritance.TurnOffInheritanceCompletely(); - _con3.Inheritance.TurnOffInheritanceCompletely(); - _con4.Inheritance.TurnOffInheritanceCompletely(); - _con5.Inheritance.TurnOffInheritanceCompletely(); - - connectionTreeModel.AddRootNode(root); - root.AddChildRange(new [] { _folder1, _folder2, _con5 }); - _folder1.AddChildRange(new [] { _con1, _con2 }); - _folder2.AddChildRange(new[] { _con3, _con4 }); - - return connectionTreeModel; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/PreviousSessionOpenerTests.cs b/mRemoteNGTests/Tree/PreviousSessionOpenerTests.cs deleted file mode 100644 index 8bc71aee4..000000000 --- a/mRemoteNGTests/Tree/PreviousSessionOpenerTests.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using mRemoteNG.Connection; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI.Controls.ConnectionTree; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class PreviousSessionOpenerTests - { - private PreviousSessionOpener _previousSessionOpener; - private IConnectionInitiator _connectionInitiator; - private IConnectionTree _connectionTree; - - [SetUp] - public void Setup() - { - _connectionInitiator = Substitute.For(); - _previousSessionOpener = new PreviousSessionOpener(_connectionInitiator); - _connectionTree = Substitute.For(); - _connectionTree.GetRootConnectionNode().Returns(BuildTree()); - } - - [Test] - public void AllRequestedSessionsAreReopened() - { - _previousSessionOpener.Execute(_connectionTree); - _connectionInitiator.ReceivedWithAnyArgs(2).OpenConnection(new ConnectionInfo()); - } - - [Test] - public void ExceptionThrownWhenConstructorGivenNullArg() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new PreviousSessionOpener(null)); - } - - private RootNodeInfo BuildTree() - { - var root = new RootNodeInfo(RootNodeType.Connection); - root.AddChild(new ConnectionInfo { PleaseConnect = true }); - root.AddChild(new ConnectionInfo()); - root.AddChild(new ConnectionInfo { PleaseConnect = true }); - return root; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/PreviouslyOpenedFolderExpanderTests.cs b/mRemoteNGTests/Tree/PreviouslyOpenedFolderExpanderTests.cs deleted file mode 100644 index a096df5a0..000000000 --- a/mRemoteNGTests/Tree/PreviouslyOpenedFolderExpanderTests.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Linq; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI.Controls.ConnectionTree; -using NSubstitute; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class PreviouslyOpenedFolderExpanderTests - { - private PreviouslyOpenedFolderExpander _folderExpander; - private IConnectionTree _connectionTree; - - [SetUp] - public void Setup() - { - _folderExpander = new PreviouslyOpenedFolderExpander(); - _connectionTree = Substitute.For(); - } - - [Test] - public void ExpandsAllFoldersThatAreMarkedForExpansion() - { - var connectionTreeModel = GenerateConnectionTreeModel(); - _connectionTree.ConnectionTreeModel.Returns(connectionTreeModel); - _connectionTree.GetRootConnectionNode().Returns(connectionTreeModel.RootNodes[0]); - _folderExpander.Execute(_connectionTree); - Assert.That(_connectionTree.ExpandedObjects, Is.EquivalentTo(connectionTreeModel.GetRecursiveChildList().OfType().Where(info => info.IsExpanded))); - } - - private ConnectionTreeModel GenerateConnectionTreeModel() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection) { IsExpanded = true }; - var folder1 = new ContainerInfo { IsExpanded = true }; - var folder2 = new ContainerInfo(); - var con1 = new ConnectionInfo(); - root.AddChild(folder1); - folder1.AddChild(folder2); - root.AddChild(con1); - connectionTreeModel.AddRootNode(root); - return connectionTreeModel; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/RootNodeInfoTests.cs b/mRemoteNGTests/Tree/RootNodeInfoTests.cs deleted file mode 100644 index 4baf33ee2..000000000 --- a/mRemoteNGTests/Tree/RootNodeInfoTests.cs +++ /dev/null @@ -1,59 +0,0 @@ -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using NUnit.Framework; - - -namespace mRemoteNGTests.Tree -{ - public class RootNodeInfoTests - { - private RootNodeInfo _rootNodeInfo; - - [SetUp] - public void Setup() - { - _rootNodeInfo = new RootNodeInfo(RootNodeType.Connection); - } - - [Test] - public void DefaultPasswordReturnsExpectedValue() - { - var defaultPassword = _rootNodeInfo.DefaultPassword; - Assert.That(defaultPassword, Is.EqualTo("mR3m")); - } - - [TestCase("a", true)] - [TestCase("mR3m", false)] - [TestCase("", false)] - [TestCase(null, false)] - public void PasswordPropertyReflectsWhetherACustomPasswordIsInUse(string password, bool expected) - { - _rootNodeInfo.PasswordString = password; - Assert.That(_rootNodeInfo.Password, Is.EqualTo(expected)); - } - - [TestCase("")] - [TestCase(null)] - public void PasswordStringReturnsDefaultPasswordWhenNoCustomOneIsSet(string password) - { - _rootNodeInfo.PasswordString = password; - Assert.That(_rootNodeInfo.PasswordString, Is.EqualTo(_rootNodeInfo.DefaultPassword)); - } - - [TestCase("a")] - [TestCase("1234")] - public void PasswordStringReturnsCustomPassword(string password) - { - _rootNodeInfo.PasswordString = password; - Assert.That(_rootNodeInfo.PasswordString, Is.EqualTo(password)); - } - - [TestCase(RootNodeType.Connection, TreeNodeType.Root)] - [TestCase(RootNodeType.PuttySessions, TreeNodeType.PuttyRoot)] - public void RootNodeHasCorrectTreeNodeType(RootNodeType rootNodeType, TreeNodeType expectedTreeNodeType) - { - var rootNode = new RootNodeInfo(rootNodeType); - Assert.That(rootNode.GetTreeNodeType(), Is.EqualTo(expectedTreeNodeType)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/Tree/SelectedConnectionDeletionConfirmerTests.cs b/mRemoteNGTests/Tree/SelectedConnectionDeletionConfirmerTests.cs deleted file mode 100644 index a881f3c57..000000000 --- a/mRemoteNGTests/Tree/SelectedConnectionDeletionConfirmerTests.cs +++ /dev/null @@ -1,43 +0,0 @@ -using mRemoteNG.Connection; -using mRemoteNG.Tree; -using NUnit.Framework; -using System.Windows.Forms; - - -namespace mRemoteNGTests.Tree -{ - public class SelectedConnectionDeletionConfirmerTests - { - private ConnectionInfo _testConnectionInfo; - - [SetUp] - public void Setup() - { - _testConnectionInfo = new ConnectionInfo(); - } - - [Test] - public void ClickingYesReturnsTrue() - { - var deletionConfirmer = new SelectedConnectionDeletionConfirmer(MockClickYes); - Assert.That(deletionConfirmer.Confirm(_testConnectionInfo), Is.True); - } - - [Test] - public void ClickingNoReturnsFalse() - { - var deletionConfirmer = new SelectedConnectionDeletionConfirmer(MockClickNo); - Assert.That(deletionConfirmer.Confirm(_testConnectionInfo), Is.False); - } - - private DialogResult MockClickYes(string promptMessage) - { - return DialogResult.Yes; - } - - private DialogResult MockClickNo(string promptMessage) - { - return DialogResult.No; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/ConnectionTreeTests.cs b/mRemoteNGTests/UI/Controls/ConnectionTreeTests.cs deleted file mode 100644 index b91194d5c..000000000 --- a/mRemoteNGTests/UI/Controls/ConnectionTreeTests.cs +++ /dev/null @@ -1,323 +0,0 @@ -using System.Linq; -using System.Threading; -using mRemoteNG.Connection; -using mRemoteNG.Container; -using mRemoteNG.Tools.Clipboard; -using mRemoteNG.Tree; -using mRemoteNG.Tree.Root; -using mRemoteNG.UI.Controls.ConnectionTree; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.UI.Controls -{ - public class ConnectionTreeTests - { - private ConnectionTreeSearchTextFilter _filter; - private ConnectionTree _connectionTree; - - [SetUp] - public void Setup() - { - _filter = new ConnectionTreeSearchTextFilter(); - _connectionTree = new ConnectionTree - { - UseFiltering = true - }; - } - - [Test] - [Apartment(ApartmentState.STA)] - public void FilteringIsRetainedAndUpdatedWhenNodeDeleted() - { - // root - // |- folder1 - // | |- con1 - // | |- dontshowme - // |- folder2 - // |- con2 - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var folder1 = new ContainerInfo {Name = "folder1"}; - var folder2 = new ContainerInfo {Name = "folder2"}; - var con1 = new ConnectionInfo {Name = "con1"}; - var con2 = new ConnectionInfo {Name = "con2"}; - var conDontShow = new ConnectionInfo {Name = "dontshowme" }; - root.AddChildRange(new []{folder1, folder2}); - folder1.AddChildRange(new []{con1, conDontShow}); - folder2.AddChild(con2); - connectionTreeModel.AddRootNode(root); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - // ensure all folders expanded - _connectionTree.ExpandAll(); - - // apply filtering on the tree - _filter.FilterText = "con"; - _connectionTree.ModelFilter = _filter; - - connectionTreeModel.DeleteNode(con1); - - Assert.That(_connectionTree.IsFiltering, Is.True); - Assert.That(_connectionTree.FilteredObjects, Does.Not.Contain(con1)); - Assert.That(_connectionTree.FilteredObjects, Does.Not.Contain(conDontShow)); - Assert.That(_connectionTree.FilteredObjects, Does.Contain(con2)); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CannotAddConnectionToPuttySessionNode() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var puttyRoot = new RootNodeInfo(RootNodeType.PuttySessions); - connectionTreeModel.AddRootNode(root); - connectionTreeModel.AddRootNode(puttyRoot); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - - _connectionTree.SelectedObject = puttyRoot; - _connectionTree.AddConnection(); - - Assert.That(puttyRoot.Children, Is.Empty); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CannotAddFolderToPuttySessionNode() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var puttyRoot = new RootNodeInfo(RootNodeType.PuttySessions); - connectionTreeModel.AddRootNode(root); - connectionTreeModel.AddRootNode(puttyRoot); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - - _connectionTree.SelectedObject = puttyRoot; - _connectionTree.AddFolder(); - - Assert.That(puttyRoot.Children, Is.Empty); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CannotDuplicateRootConnectionNode() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - connectionTreeModel.AddRootNode(root); - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - - _connectionTree.SelectedObject = root; - _connectionTree.DuplicateSelectedNode(); - - Assert.That(connectionTreeModel.RootNodes, Has.One.Items); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CanDuplicateConnectionNode() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var con1 = new ConnectionInfo(); - root.AddChild(con1); - connectionTreeModel.AddRootNode(root); - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - - _connectionTree.SelectedObject = con1; - _connectionTree.DuplicateSelectedNode(); - - Assert.That(root.Children, Has.Exactly(2).Items); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CannotDuplicateRootPuttyNode() - { - var connectionTreeModel = new ConnectionTreeModel(); - var puttyRoot = new RootNodeInfo(RootNodeType.PuttySessions); - connectionTreeModel.AddRootNode(puttyRoot); - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - - _connectionTree.SelectedObject = puttyRoot; - _connectionTree.DuplicateSelectedNode(); - - Assert.That(connectionTreeModel.RootNodes, Has.One.Items); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CannotDuplicatePuttyConnectionNode() - { - var connectionTreeModel = new ConnectionTreeModel(); - var puttyRoot = new RootNodeInfo(RootNodeType.PuttySessions); - var puttyConnection = new PuttySessionInfo(); - puttyRoot.AddChild(puttyConnection); - connectionTreeModel.AddRootNode(puttyRoot); - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - - _connectionTree.SelectedObject = puttyConnection; - _connectionTree.DuplicateSelectedNode(); - - Assert.That(puttyRoot.Children, Has.One.Items); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void DuplicatingWithNoNodeSelectedDoesNothing() - { - var connectionTreeModel = new ConnectionTreeModel(); - var puttyRoot = new RootNodeInfo(RootNodeType.PuttySessions); - connectionTreeModel.AddRootNode(puttyRoot); - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - - _connectionTree.SelectedObject = null; - _connectionTree.DuplicateSelectedNode(); - - Assert.That(connectionTreeModel.RootNodes, Has.One.Items); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void ExpandingAllItemsUpdatesColumnWidthAppropriately() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - connectionTreeModel.AddRootNode(root); - ContainerInfo parent = root; - foreach (var i in Enumerable.Repeat("", 8)) - { - var newContainer = new ContainerInfo {IsExpanded = false}; - parent.AddChild(newContainer); - parent = newContainer; - } - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - - var widthBefore = _connectionTree.Columns[0].Width; - _connectionTree.ExpandAll(); - var widthAfter = _connectionTree.Columns[0].Width; - - Assert.That(widthAfter, Is.GreaterThan(widthBefore)); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void RenamingNodeWithNothingSelectedDoesNothing() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - connectionTreeModel.AddRootNode(root); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - _connectionTree.SelectedObject = null; - - Assert.DoesNotThrow(() => _connectionTree.RenameSelectedNode()); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CopyHostnameCopiesTheHostnameOfTheSelectedConnection() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var con1 = new ConnectionInfo {Hostname = "MyHost"}; - root.AddChild(con1); - connectionTreeModel.AddRootNode(root); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - _connectionTree.SelectedObject = con1; - - var clipboard = Substitute.For(); - _connectionTree.CopyHostnameSelectedNode(clipboard); - clipboard.Received(1).SetText(con1.Hostname); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CopyHostnameCopiesTheNodeNameOfTheSelectedContainer() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var container = new ContainerInfo { Name = "MyFolder" }; - root.AddChild(container); - connectionTreeModel.AddRootNode(root); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - _connectionTree.SelectedObject = container; - - var clipboard = Substitute.For(); - _connectionTree.CopyHostnameSelectedNode(clipboard); - clipboard.Received(1).SetText(container.Name); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CopyHostnameDoesNotCopyAnythingIfNoNodeSelected() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var con1 = new ConnectionInfo { Hostname = "MyHost" }; - root.AddChild(con1); - connectionTreeModel.AddRootNode(root); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - _connectionTree.SelectedObject = null; - - var clipboard = Substitute.For(); - _connectionTree.CopyHostnameSelectedNode(clipboard); - clipboard.DidNotReceiveWithAnyArgs().SetText(""); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CopyHostnameDoesNotCopyAnythingIfHostnameOfSelectedConnectionIsEmpty() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var con1 = new ConnectionInfo { Hostname = string.Empty }; - root.AddChild(con1); - connectionTreeModel.AddRootNode(root); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - _connectionTree.SelectedObject = con1; - - var clipboard = Substitute.For(); - _connectionTree.CopyHostnameSelectedNode(clipboard); - clipboard.DidNotReceiveWithAnyArgs().SetText(""); - } - - [Test] - [Apartment(ApartmentState.STA)] - public void CopyHostnameDoesNotCopyAnythingIfNameOfSelectedContainerIsEmpty() - { - var connectionTreeModel = new ConnectionTreeModel(); - var root = new RootNodeInfo(RootNodeType.Connection); - var con1 = new ContainerInfo { Name = string.Empty}; - root.AddChild(con1); - connectionTreeModel.AddRootNode(root); - - _connectionTree.ConnectionTreeModel = connectionTreeModel; - _connectionTree.ExpandAll(); - _connectionTree.SelectedObject = con1; - - var clipboard = Substitute.For(); - _connectionTree.CopyHostnameSelectedNode(clipboard); - clipboard.DidNotReceiveWithAnyArgs().SetText(""); - } - } -} diff --git a/mRemoteNGTests/UI/Controls/FilteredPropertyGridTests.cs b/mRemoteNGTests/UI/Controls/FilteredPropertyGridTests.cs deleted file mode 100644 index 491882b8f..000000000 --- a/mRemoteNGTests/UI/Controls/FilteredPropertyGridTests.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Linq; -using mRemoteNG.UI.Controls.FilteredPropertyGrid; -using NUnit.Framework; - -namespace mRemoteNGTests.UI.Controls -{ - public class FilteredPropertyGridTests - { - [Test] - public void AllPropertiesVisibleByDefault() - { - var grid = new FilteredPropertyGrid(); - var obj = new {Prop1 = "hello"}; - grid.SelectedObject = obj; - - Assert.That(grid.VisibleProperties, Is.EquivalentTo(new []{ nameof(obj.Prop1) })); - } - - [Test] - public void PropertiesOnTheHiddenPropertiesListAreNotShown() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello", Prop2 = "world" }; - grid.HiddenProperties = new[] { nameof(obj.Prop1) }; - grid.SelectedObject = obj; - - Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop2) })); - } - - [Test] - public void OnlyPropertiesOnTheBrowsablePropertiesListAreShown() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello", Prop2 = "world" }; - grid.BrowsableProperties = new[] { nameof(obj.Prop1) }; - grid.SelectedObject = obj; - - Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop1) })); - } - - [Test] - public void APropertyOnBothTheBrowsableAndHiddenListWillNotBeShown() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello", Prop2 = "world", Prop3 = "!" }; - grid.BrowsableProperties = new[] { nameof(obj.Prop1), nameof(obj.Prop2) }; - grid.HiddenProperties = new[] { nameof(obj.Prop1) }; - grid.SelectedObject = obj; - - Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop2) })); - } - - [Test] - public void ExceptionThrownWhenNonExistantPropertyFoundInBrowsablePropertiesList() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello" }; - grid.SelectedObject = obj; - - Assert.Throws(() => - grid.BrowsableProperties = new[] {"NonExistantProperty"}); - } - - [Test] - public void HiddenPropertiesListCanHandleNonExistentProperties() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello" }; - grid.SelectedObject = obj; - - Assert.DoesNotThrow(() => grid.HiddenProperties = new[] { "NonExistantProperty" }); - } - - [Test] - public void GetVisibleGridItemsReturnsAllExpandedItems() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello", Prop2 = new{Prop3 = "world"} }; - grid.SelectedObject = obj; - - var visibleGridItems = grid.GetVisibleGridItems(); - - Assert.That(visibleGridItems.Select(i => i.Label), - Is.EquivalentTo(new[] - { - nameof(obj.Prop1), - nameof(obj.Prop2) - })); - } - - [Test] - public void CanSelectGridItem() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello", Prop2 = "world" }; - grid.SelectedObject = obj; - - grid.SelectGridItem(nameof(obj.Prop2)); - - Assert.That(grid.SelectedGridItem.PropertyDescriptor?.Name, - Is.EqualTo(nameof(obj.Prop2))); - } - - [Test] - public void FindNextGridItemPropertyReturnsTheCorrectItem() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello", Prop2 = "world" }; - grid.SelectedObject = obj; - - grid.SelectGridItem(nameof(obj.Prop1)); - var nextGridItem = grid.FindNextGridItemProperty(grid.SelectedGridItem); - - Assert.That(nextGridItem?.PropertyDescriptor?.Name, - Is.EqualTo(nameof(obj.Prop2))); - } - - [Test] - public void FindPreviousGridItemPropertyReturnsTheCorrectItem() - { - var grid = new FilteredPropertyGrid(); - var obj = new { Prop1 = "hello", Prop2 = "world", Prop3 = "!" }; - grid.SelectedObject = obj; - - grid.SelectGridItem(nameof(obj.Prop3)); - var nextGridItem = grid.FindPreviousGridItemProperty(grid.SelectedGridItem); - - Assert.That(nextGridItem?.PropertyDescriptor?.Name, - Is.EqualTo(nameof(obj.Prop2))); - } - } -} diff --git a/mRemoteNGTests/UI/Controls/PageSequenceTests.cs b/mRemoteNGTests/UI/Controls/PageSequenceTests.cs deleted file mode 100644 index 8a2277011..000000000 --- a/mRemoteNGTests/UI/Controls/PageSequenceTests.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Linq; -using System.Windows.Forms; -using mRemoteNG.UI.Controls.PageSequence; -using NUnit.Framework; - -namespace mRemoteNGTests.UI.Controls -{ - public class PageSequenceTests - { - private PageSequence _pageSequence; - private Control _parentControl; - - [SetUp] - public void Setup() - { - _parentControl = new Control(); - } - - [Test] - public void PageListAddedToSequence() - { - var pages = new[] {new SequencedControl(), new SequencedControl(), new SequencedControl()}; - _pageSequence = new PageSequence(_parentControl, pages); - Assert.That(_pageSequence.Pages, Is.EquivalentTo(pages)); - } - - [Test] - public void PageParamsAddedToSequence() - { - _pageSequence = new PageSequence(_parentControl, - new SequencedControl(), - new SequencedControl(), - new SequencedControl() - ); - Assert.That(_pageSequence.Pages.Count(), Is.EqualTo(3)); - } - - [Test] - public void CallingNextAdvancesPage() - { - var pages = new[] { new SequencedControl(), new SequencedControl(), new SequencedControl() }; - _pageSequence = new PageSequence(_parentControl, pages); - _pageSequence.NextPage(); - Assert.That(_pageSequence.CurrentPageIndex, Is.EqualTo(1)); - } - - [Test] - public void CallingPreviousGoesBackAPage() - { - var pages = new[] { new SequencedControl(), new SequencedControl(), new SequencedControl() }; - _pageSequence = new PageSequence(_parentControl, pages); - _pageSequence.NextPage(); - _pageSequence.NextPage(); - _pageSequence.PreviousPage(); - Assert.That(_pageSequence.CurrentPageIndex, Is.EqualTo(1)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.Designer.cs b/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.Designer.cs deleted file mode 100644 index 7e61eac6e..000000000 --- a/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.Designer.cs +++ /dev/null @@ -1,61 +0,0 @@ -using mRemoteNG.UI.Controls; - -namespace mRemoteNGTests.UI.Controls -{ - partial class SecureTextBoxTestForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.secureTextBox1 = new mRemoteNG.UI.Controls.SecureTextBox(); - this.SuspendLayout(); - // - // secureTextBox1 - // - this.secureTextBox1.Location = new System.Drawing.Point(12, 12); - this.secureTextBox1.Name = "secureTextBox1"; - this.secureTextBox1.ShortcutsEnabled = false; - this.secureTextBox1.Size = new System.Drawing.Size(232, 20); - this.secureTextBox1.TabIndex = 0; - // - // SecureTextBoxTestForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(256, 45); - this.Controls.Add(this.secureTextBox1); - this.Name = "SecureTextBoxTestForm"; - this.Text = "SecureTextBoxTestForm"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - internal SecureTextBox secureTextBox1; - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.cs b/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.cs deleted file mode 100644 index 38fbcad0c..000000000 --- a/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Windows.Forms; - -namespace mRemoteNGTests.UI.Controls -{ - public partial class SecureTextBoxTestForm : Form - { - public SecureTextBoxTestForm() - { - Application.EnableVisualStyles(); - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.resx b/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNGTests/UI/Controls/SecureTextBoxTestForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/SecureTextBoxTests.cs b/mRemoteNGTests/UI/Controls/SecureTextBoxTests.cs deleted file mode 100644 index 3a04c7df2..000000000 --- a/mRemoteNGTests/UI/Controls/SecureTextBoxTests.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Threading; -using mRemoteNG.Security; -using NUnit.Framework; - -namespace mRemoteNGTests.UI.Controls -{ - [Apartment(ApartmentState.STA)] - public class SecureTextBoxTests - { - private SecureTextBoxTestForm _testForm; - - [SetUp] - public void Setup() - { - _testForm = new SecureTextBoxTestForm(); - _testForm.Show(); - } - - [TearDown] - public void TearDown() - { - _testForm.Close(); - while (_testForm.Disposing) { } - _testForm = null; - } - - [Test] - public void TextboxInputGetsAddedToSecureString() - { - var textBox = _testForm.secureTextBox1; - const string textToSend = "abc123"; - textBox.Text = textToSend; - Assert.That(textBox.SecString.ConvertToUnsecureString(), Is.EqualTo(textToSend)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/TestForm.Designer.cs b/mRemoteNGTests/UI/Controls/TestForm.Designer.cs deleted file mode 100644 index f4341e91b..000000000 --- a/mRemoteNGTests/UI/Controls/TestForm.Designer.cs +++ /dev/null @@ -1,48 +0,0 @@ -namespace mRemoteNGTests.UI.Controls -{ - partial class TestForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // TestForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(284, 262); - this.Name = "TestForm"; - this.Text = "TestForm"; - this.ResumeLayout(false); - - } - - #endregion - - - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/TestForm.cs b/mRemoteNGTests/UI/Controls/TestForm.cs deleted file mode 100644 index 200e032dc..000000000 --- a/mRemoteNGTests/UI/Controls/TestForm.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace mRemoteNGTests.UI.Controls -{ - public partial class TestForm : Form - { - public TestForm() - { - InitializeComponent(); - } - - private void listView1_SelectedIndexChanged(object sender, EventArgs e) - { - - } - } -} diff --git a/mRemoteNGTests/UI/Controls/TestForm.resx b/mRemoteNGTests/UI/Controls/TestForm.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNGTests/UI/Controls/TestForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.Designer.cs b/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.Designer.cs deleted file mode 100644 index f97a3dfdf..000000000 --- a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.Designer.cs +++ /dev/null @@ -1,58 +0,0 @@ -namespace mRemoteNGTests.UI.Controls -{ - partial class TextBoxExtensionsTestForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.textBox1 = new System.Windows.Forms.TextBox(); - this.SuspendLayout(); - // - // textBox1 - // - this.textBox1.Location = new System.Drawing.Point(12, 12); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(188, 20); - this.textBox1.TabIndex = 0; - // - // TextBoxExtensionsTestForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(220, 48); - this.Controls.Add(this.textBox1); - this.Name = "TextBoxExtensionsTestForm"; - this.Text = "TextBoxExtensionsTestForm"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - internal System.Windows.Forms.TextBox textBox1; - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.cs b/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.cs deleted file mode 100644 index d4abf59d7..000000000 --- a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Windows.Forms; - -namespace mRemoteNGTests.UI.Controls -{ - public partial class TextBoxExtensionsTestForm : Form - { - public TextBoxExtensionsTestForm() - { - Application.EnableVisualStyles(); - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.resx b/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.resx deleted file mode 100644 index 1af7de150..000000000 --- a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTests.cs b/mRemoteNGTests/UI/Controls/TextBoxExtensionsTests.cs deleted file mode 100644 index 96ca6fa02..000000000 --- a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTests.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Threading; -using mRemoteNG.UI; -using NUnit.Framework; - -namespace mRemoteNGTests.UI.Controls -{ - [TestFixture] - [Apartment(ApartmentState.STA)] - public class TextBoxExtensionsTests - { - private TextBoxExtensionsTestForm _textBoxExtensionsTestForm; - - [SetUp] - public void Setup() - { - _textBoxExtensionsTestForm = new TextBoxExtensionsTestForm(); - _textBoxExtensionsTestForm.Show(); - } - - [TearDown] - public void Teardown() - { - _textBoxExtensionsTestForm.Dispose(); - while (_textBoxExtensionsTestForm.Disposing) - { } - _textBoxExtensionsTestForm = null; - } - - [Test] - public void SetCueBannerSetsTheBannerText() - { - const string text = "Type Here"; - var textBox = _textBoxExtensionsTestForm.textBox1; - Assert.That(textBox.SetCueBannerText(text), Is.True); - } - - [Test] - public void GetCueBannerReturnsCorrectValue() - { - const string text = "Type Here"; - var textBox = _textBoxExtensionsTestForm.textBox1; - textBox.SetCueBannerText(text); - Assert.That(textBox.GetCueBannerText(), Is.EqualTo(text)); - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/DisplayPropertiesTests.cs b/mRemoteNGTests/UI/DisplayPropertiesTests.cs deleted file mode 100644 index 124fb0937..000000000 --- a/mRemoteNGTests/UI/DisplayPropertiesTests.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using System.Drawing; -using mRemoteNG.UI; -using mRemoteNG.UI.GraphicsUtilities; -using mRemoteNGTests.Properties; -using NSubstitute; -using NUnit.Framework; - -namespace mRemoteNGTests.UI -{ - public class DisplayPropertiesTests - { - [Test] - public void ScaleHeightReturnsValueScaledByHeightScalingFactor() - { - var graphics = Substitute.For(); - graphics.GetResolutionScalingFactor().Returns(new SizeF(4, 2)); - var sut = new DisplayProperties(graphics); - - var initialValue = 10; - var scaledValue = sut.ScaleHeight(initialValue); - - Assert.That(scaledValue, Is.EqualTo(sut.ResolutionScalingFactor.Height * initialValue)); - } - - [Test] - public void ScaleWidthReturnsValueScaledByWidthScalingFactor() - { - var graphics = Substitute.For(); - graphics.GetResolutionScalingFactor().Returns(new SizeF(4, 2)); - var sut = new DisplayProperties(graphics); - - var initialValue = 10; - var scaledValue = sut.ScaleWidth(initialValue); - - Assert.That(scaledValue, Is.EqualTo(sut.ResolutionScalingFactor.Width * initialValue)); - } - - [Test] - public void ScaleSizeReturnsNewSizeWithCorrectlyScaledHeight() - { - var graphics = Substitute.For(); - graphics.GetResolutionScalingFactor().Returns(new SizeF(4, 2)); - var sut = new DisplayProperties(graphics); - - var initialValue = new Size(12, 16); - var scaledValue = sut.ScaleSize(initialValue); - - Assert.That(scaledValue.Height, Is.EqualTo(sut.ResolutionScalingFactor.Height * initialValue.Height)); - } - - [Test] - public void ScaleSizeReturnsNewSizeWithCorrectlyScaledWidth() - { - var graphics = Substitute.For(); - graphics.GetResolutionScalingFactor().Returns(new SizeF(4, 2)); - var sut = new DisplayProperties(graphics); - - var initialValue = new Size(12, 16); - var scaledValue = sut.ScaleSize(initialValue); - - Assert.That(scaledValue.Width, Is.EqualTo(sut.ResolutionScalingFactor.Width * initialValue.Width)); - } - - [Test] - public void ScaleImageReturnsNewImageWithCorrectlyScaledHeight() - { - var graphics = Substitute.For(); - graphics.GetResolutionScalingFactor().Returns(new SizeF(4, 2)); - var sut = new DisplayProperties(graphics); - - var initialValue = Resources.TestImage; - var scaledValue = sut.ScaleImage(initialValue); - - Assert.That(scaledValue.Height, Is.EqualTo(sut.ResolutionScalingFactor.Height * initialValue.Height)); - } - - [Test] - public void ScaleImageReturnsNewImageWithCorrectlyScaledWidth() - { - var graphics = Substitute.For(); - graphics.GetResolutionScalingFactor().Returns(new SizeF(4, 2)); - var sut = new DisplayProperties(graphics); - - var initialValue = Resources.TestImage; - var scaledValue = sut.ScaleImage(initialValue); - - Assert.That(scaledValue.Width, Is.EqualTo(sut.ResolutionScalingFactor.Width * initialValue.Width)); - } - - [Test] - public void ResolutionScalingFactorAlwaysReturnsMostUpdatedValue() - { - var graphics = Substitute.For(); - graphics.GetResolutionScalingFactor().Returns(new SizeF(4, 4)); - var sut = new DisplayProperties(graphics); - - graphics.GetResolutionScalingFactor().Returns(new SizeF(8, 8)); - Assert.That(sut.ResolutionScalingFactor.Width, Is.EqualTo(8)); - } - - [Test] - public void AttemptingToScaleANullImageWillThrowAnException() - { - var sut = new DisplayProperties(Substitute.For()); - Assert.Throws(() => sut.ScaleImage((Image)null)); - } - - [Test] - public void AttemptingToScaleANullIconWillThrowAnException() - { - var sut = new DisplayProperties(Substitute.For()); - Assert.Throws(() => sut.ScaleImage((Icon)null)); - } - - [Test] - public void AttemptingToCallConstructorWithNullGraphicsProviderWillThrow() - { - // ReSharper disable once ObjectCreationAsStatement - Assert.Throws(() => new DisplayProperties(null)); - } - } -} diff --git a/mRemoteNGTests/UI/Forms/OptionsFormSetupAndTeardown.cs b/mRemoteNGTests/UI/Forms/OptionsFormSetupAndTeardown.cs deleted file mode 100644 index bbbeda0bd..000000000 --- a/mRemoteNGTests/UI/Forms/OptionsFormSetupAndTeardown.cs +++ /dev/null @@ -1,30 +0,0 @@ -using NUnit.Framework; -using mRemoteNG.UI.Forms; - -namespace mRemoteNGTests.UI.Forms -{ - public class OptionsFormSetupAndTeardown - { - protected FrmOptions _optionsForm; - - [OneTimeSetUp] - public void OnetimeSetup() - { - } - - [SetUp] - public void Setup() - { - _optionsForm = new FrmOptions(); - _optionsForm.Show(); - } - - [TearDown] - public void Teardown() - { - _optionsForm.Dispose(); - while (_optionsForm.Disposing) ; - _optionsForm = null; - } - } -} \ No newline at end of file diff --git a/mRemoteNGTests/UI/Forms/OptionsFormTests.cs b/mRemoteNGTests/UI/Forms/OptionsFormTests.cs deleted file mode 100644 index 297503ad8..000000000 --- a/mRemoteNGTests/UI/Forms/OptionsFormTests.cs +++ /dev/null @@ -1,37 +0,0 @@ -using NUnit.Framework; -using System.Threading; -using System.Windows.Forms; -using mRemoteNGTests.TestHelpers; - -namespace mRemoteNGTests.UI.Forms -{ - [TestFixture] - [Apartment(ApartmentState.STA)] - public class OptionsFormTests : OptionsFormSetupAndTeardown - { - [Test] - public void ClickingCloseButtonClosesTheForm() - { - bool eventFired = false; - _optionsForm.FormClosed += (o, e) => eventFired = true; - Button cancelButton = _optionsForm.FindControl